X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=js%2Fdhtmlsuite%2Fmenu-for-applications.js;h=f99b27aadf051b1be77d3ac9080e61bd9a461fcc;hb=5924394316f7243cdf06a6130df160e0d7efd656;hp=7a7d76e10e4897c75917236c6a90f2112dec221d;hpb=36dcbd724cb061f35c22d5a31c1a47aba30f348c;p=kivitendo-erp.git diff --git a/js/dhtmlsuite/menu-for-applications.js b/js/dhtmlsuite/menu-for-applications.js index 7a7d76e10..f99b27aad 100644 --- a/js/dhtmlsuite/menu-for-applications.js +++ b/js/dhtmlsuite/menu-for-applications.js @@ -242,6 +242,7 @@ DHTMLSuite.common.prototype = { getTopPos : function(inputObj) { var returnValue = inputObj.offsetTop; + if (returnValue > 700) returnValue = 0; while((inputObj = inputObj.offsetParent) != null){ if(inputObj.tagName!='HTML'){ returnValue += (inputObj.offsetTop - inputObj.scrollTop); @@ -1187,7 +1188,7 @@ DHTMLSuite.menuItem.prototype = }else{ /* Add events */ var tmpVar = this.objectIndex/1; - this.divElement.onclick = function(e) { DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects[tmpVar].__navigate(e); } + //this.divElement.onclick = function(e) { DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects[tmpVar].__navigate(e); } this.divElement.onmousedown = this.__clickMenuItem; // on mouse down effect this.divElement.onmouseup = this.__rolloverMenuItem; // on mouse up effect this.divElement.onmouseover = this.__rolloverMenuItem; // mouse over effect @@ -1264,7 +1265,17 @@ DHTMLSuite.menuItem.prototype = parentEl.style.backgroundPosition = 'left center'; } if(this.modelItemRef.itemText){ - var div = document.createElement('DIV'); + var div; + if( this.modelItemRef.url ) + { + div = document.createElement('a'); + div.href = this.modelItemRef.url; + div.target = this.modelItemRef.frameTarget; + div.style.display = 'block'; + } + else + div = document.createElement('div'); + div.className = 'DHTMLSuite_textContent'; div.innerHTML = this.modelItemRef.itemText; div.className = this.cssPrefix + 'menuItem_textContent'; @@ -2221,6 +2232,14 @@ DHTMLSuite.menuBar.prototype = { try{ var shortRef = this.submenuGroups[parentId]; + if( shortRef.style.visible == 'hidden' ) + { + shortRef.style.display = 'none'; + return; + } + else + shortRef.style.display = 'block'; + var depth = this.menuItems[parentId].depth; var dir = this.menuItemObj.submenuType[depth]; if(dir=='top'){ @@ -2366,12 +2385,10 @@ DHTMLSuite.menuBar.prototype = { $('div.DHTMLSuite_menuBar_top').click(function(e) { if ($(e.target).attr('class') == 'DHTMLSuite_menuBar_top') { menu.hideSubMenus(); menu.unsetMenuBarState() } }); - $('#win1').load(function(){ - $('#win1').contents().mousedown(function(){ - menu.hideSubMenus(); - menu.menuBarState = false; - }); - }) + $('#content').mousedown(function(){ + menu.hideSubMenus(); + menu.menuBarState = false; + }); } }