Changeset 5410
- Timestamp:
- Sep 17, 2010, 9:33:48 AM (12 years ago)
- Location:
- trunk/www
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/common/plugin/test_with_file.jsp
r5327 r5410 129 129 function showPredefined(event, menu) 130 130 { 131 Menu.toggleTopMenu(document.getElementById(menu), event.clientX, event.clientY , true);131 Menu.toggleTopMenu(document.getElementById(menu), event.clientX, event.clientY); 132 132 event.cancelBubble = true; 133 133 } -
trunk/www/include/scripts/menu.js
r4889 r5410 40 40 this.zIndex = 999; 41 41 42 this.showTopMenu = function(menu, x, y , keepForms)42 this.showTopMenu = function(menu, x, y) 43 43 { 44 44 this.hideAll(); … … 48 48 menu.style.zIndex = this.zIndex++; 49 49 menu.canHide = true; 50 this.registerVisible(menu , keepForms);50 this.registerVisible(menu); 51 51 } 52 52 53 this.toggleTopMenu = function(menu, x, y , keepForms)53 this.toggleTopMenu = function(menu, x, y) 54 54 { 55 55 if (menu.style.display == 'none') 56 56 { 57 this.showTopMenu(menu, x, y , keepForms);57 this.showTopMenu(menu, x, y); 58 58 } 59 59 else … … 151 151 152 152 153 this.registerVisible = function(menu , keepForms)153 this.registerVisible = function(menu) 154 154 { 155 155 this.numVisible++; 156 if (keepForms == undefined)157 {158 keepForms = !Browser.hideFormElementsForMenu;159 }160 if (this.numVisible == 1 && !keepForms) this.hideForms();161 156 this.allVisible[this.allVisible.length] = menu; 162 157 } … … 165 160 { 166 161 this.numVisible--; 167 if (this.numVisible == 0) this.showForms();168 162 for (var i = this.allVisible.length-1; i >= 0; i--) 169 163 { … … 186 180 } 187 181 188 this.hideForms = function(win)189 {190 if (!win) win = window;191 var doc = win.document;192 for (var i = 0; i < doc.forms.length; i++)193 {194 var frm = doc.forms[i];195 for (var j = 0; j < frm.elements.length; j++)196 {197 frm.elements[j].style.visibility = 'hidden';198 }199 }200 if (win.frames && win.frames.length > 0)201 {202 for (var i = 0; i < win.frames.length; i++)203 {204 this.hideForms(win.frames[i]);205 }206 }207 }208 209 this.showForms = function(win)210 {211 if (!win) win = window;212 var doc = win.document;213 for (i = 0; i < doc.forms.length; i++)214 {215 var frm = doc.forms[i];216 for (var j = 0; j < frm.elements.length; j++)217 {218 frm.elements[j].style.visibility = 'inherit';219 }220 }221 if (win.frames && win.frames.length > 0)222 {223 for (var i = 0; i < win.frames.length; i++)224 {225 this.showForms(win.frames[i]);226 }227 }228 }229 182 230 183 this.openUrl = function(url, target)
Note: See TracChangeset
for help on using the changeset viewer.