X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=js%2Fdhtmlsuite%2Fmenu-for-applications.js;h=bf23469a8eb23f6f77fd782bf29b6fd96d9770d6;hb=713de5ed35a8a1faea940354254c4e781631c495;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..bf23469a8 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); @@ -1137,7 +1138,7 @@ DHTMLSuite.menuItem = function() var cssPrefix; // Css prefix for the menu items. var modelItemRef; // Reference to menuModelItem - this.layoutCSS = 'menu-item.css'; +// this.layoutCSS = 'menu-item.css'; this.cssPrefix = 'DHTMLSuite_'; if(!standardObjectsCreated)DHTMLSuite.createStandardObjects(); @@ -1159,7 +1160,7 @@ DHTMLSuite.menuItem.prototype = */ createItem : function(menuModelItemObj) { - DHTMLSuite.commonObj.loadCSS(this.layoutCSS); // Load css +// DHTMLSuite.commonObj.loadCSS(this.layoutCSS); // Load css DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects[this.objectIndex] = this; @@ -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'; @@ -1583,7 +1594,7 @@ DHTMLSuite.menuBar = function() var globalObjectIndex; // Global index of this object - used to refer to the object of this class outside this.cssPrefix = 'DHTMLSuite_'; this.menuItemLayoutCss = false; // false = use default for the menuItem class. - this.layoutCSS = 'menu-bar.css'; +// this.layoutCSS = 'menu-bar.css'; this.menuBarBackgroundImage = 'menu_strip_bg.jpg'; this.menuItem_objects = new Array(); DHTMLSuite.variableStorage.menuBar_highlightedItems = new Array(); @@ -1619,7 +1630,7 @@ DHTMLSuite.menuBar.prototype = { init : function() { - DHTMLSuite.commonObj.loadCSS(this.layoutCSS); +// DHTMLSuite.commonObj.loadCSS(this.layoutCSS); this.__createDivs(); // Create general divs this.__createMenuItems(); // Create menu items this.__setBasicEvents(); // Set basic events. @@ -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; + }); } }