Added javascript to give a #URL when clicking on tabs (good for backup in browser, and bookmarks)

svn: r19717
This commit is contained in:
Doug Blank 2012-05-30 21:39:01 +00:00
parent 61bd569c29
commit 1bd9848b1a
12 changed files with 181 additions and 52 deletions

View File

@ -5,13 +5,32 @@
<script type="text/javascript">
$(function(){
$('#tabs').tabs();
$('#general-tabs').tabs();
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
});
$('#general-tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#general-tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
});
});
</script>
<div class="content" id="IndividualDetail">
{% include "detail_breadcrumb.html" %}

View File

@ -5,8 +5,18 @@
<script type="text/javascript">
$(function(){
$('#tabs').tabs();
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
});
});
</script>

View File

@ -5,8 +5,18 @@
<script type="text/javascript">
$(function(){
$('#tabs').tabs();
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
});
});
</script>

View File

@ -5,8 +5,18 @@
<script type="text/javascript">
$(function(){
$('#tabs').tabs();
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
});
});
</script>

View File

@ -5,8 +5,18 @@
<script type="text/javascript">
$(function(){
$('#tabs').tabs();
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
});
});
</script>

View File

@ -5,7 +5,18 @@
<script type="text/javascript">
$(function(){
$('#tabs').tabs();
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
});
$('.wysiwyg').htmlarea({
toolbar: [
"bold", "italic", "underline",

View File

@ -5,8 +5,18 @@
<script type="text/javascript">
$(function(){
$('#tabs').tabs();
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
});
});
</script>

View File

@ -5,8 +5,18 @@
<script type="text/javascript">
$(function(){
$('#tabs').tabs();
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
});
});
</script>

View File

@ -5,8 +5,18 @@
<script type="text/javascript">
$(function(){
$('#tabs').tabs();
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
});
});
</script>

View File

@ -5,12 +5,21 @@
<script type="text/javascript">
$(function(){
$('#tabs').tabs();
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
});
});
</script>
<div class="content" id="IndividualDetail">
{% include "detail_breadcrumb.html" %}

View File

@ -5,8 +5,18 @@
<script type="text/javascript">
$(function(){
$('#tabs').tabs();
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
});
});
</script>

View File

@ -5,8 +5,18 @@
<script type="text/javascript">
$(function(){
$('#tabs').tabs();
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
});
});
</script>