Changeset 5082
- Timestamp:
- Aug 28, 2009, 11:01:45 AM (13 years ago)
- Location:
- branches/2.13-stable/www/include/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.13-stable/www/include/scripts/main.js
r5075 r5082 723 723 724 724 /** 725 Save a key-value pair for a page. 726 */ 727 this.setPageValue = function(page, key, value) 728 { 729 if (!window.top.pageValues) window.top.pageValues = new Array(); 730 if (!window.top.pageValues[page]) window.top.pageValues[page] = new Array(); 731 window.top.pageValues[page][key] = value; 732 } 733 734 /** 735 Get the saved value for the given key on a page 736 */ 737 this.getPageValue = function(page, key) 738 { 739 if (!window.top.pageValues) return null; 740 if (!window.top.pageValues[page]) return null; 741 return window.top.pageValues[page][key]; 742 } 743 744 /** 725 745 Get all elements with a given <tag> and class="..." 726 746 */ -
branches/2.13-stable/www/include/scripts/tabcontrol.js
r4911 r5082 124 124 this.rememberActiveTab = function(window, tabControlId, tabId) 125 125 { 126 if (!window.rememberedTabs) window.rememberedTabs = new Array(); 127 var rememberedTabs = window.rememberedTabs; 128 var thisLocation = location.pathname; 129 if (!rememberedTabs[thisLocation]) rememberedTabs[thisLocation] = new Array(); 130 rememberedTabs[thisLocation][tabControlId] = tabId; 126 if (window.Main) window.Main.setPageValue(location.pathname, tabControlId, tabId); 131 127 } 132 128 133 129 this.getRememberedTabId = function(window, tabControlId) 134 130 { 135 if (!window.rememberedTabs) return null; 136 var rememberedTabs = window.rememberedTabs; 137 var thisLocation = location.pathname; 138 if (!rememberedTabs[thisLocation]) return null; 139 return rememberedTabs[thisLocation][tabControlId]; 131 if (!window.Main) return null; 132 return window.Main.getPageValue(location.pathname, tabControlId); 140 133 } 141 134
Note: See TracChangeset
for help on using the changeset viewer.