JS-Menu: Bei Mittel-Klick Link im neuen Fenster öffnen(Ticket #1921)
authorThomas Heck <theck@linet-services.de>
Fri, 3 Aug 2012 08:34:14 +0000 (10:34 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Wed, 8 Aug 2012 16:08:03 +0000 (18:08 +0200)
css/kivitendo/dhtmlsuite/menu-item.css
css/lx-office-erp/dhtmlsuite/menu-item.css
js/dhtmlsuite/menu-for-applications.js

index 604b730..5f75312 100644 (file)
        background-color:#D1D1D1;\r
 }\r
 \r
-\r
+.DHTMLSuite_menuItem_textContent\r
+{\r
+  border-bottom-style: none !important;\r
+  background-color: inherit !important;\r
+  color: inherit !important;\r
+}\r
index b50805d..992a60d 100644 (file)
        background-color:#6A8CCB;       /* background color for the separator - blue */\r
 }\r
 \r
-\r
+.DHTMLSuite_menuItem_textContent\r
+{\r
+  border-bottom-style: none !important;\r
+  background-color: inherit !important;\r
+  color: inherit !important;\r
+}\r
index 7a7d76e..48d0303 100644 (file)
@@ -1187,7 +1187,7 @@ DHTMLSuite.menuItem.prototype =
                }else{          \r
                        /* Add events */\r
                        var tmpVar = this.objectIndex/1;\r
-                       this.divElement.onclick = function(e) { DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects[tmpVar].__navigate(e); }\r
+                       //this.divElement.onclick = function(e) { DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects[tmpVar].__navigate(e); }\r
                        this.divElement.onmousedown = this.__clickMenuItem;                     // on mouse down effect\r
                        this.divElement.onmouseup = this.__rolloverMenuItem;            // on mouse up effect\r
                        this.divElement.onmouseover = this.__rolloverMenuItem;          // mouse over effect\r
@@ -1264,7 +1264,17 @@ DHTMLSuite.menuItem.prototype =
                        parentEl.style.backgroundPosition = 'left center';      \r
                }\r
                if(this.modelItemRef.itemText){\r
-                       var div = document.createElement('DIV');\r
+                 var div;\r
+                 if( this.modelItemRef.url )\r
+                 {\r
+                         div = document.createElement('a');\r
+                         div.href = this.modelItemRef.url;\r
+                         div.target = this.modelItemRef.frameTarget;\r
+                         div.style.display = 'block';\r
+                       }\r
+                       else\r
+                         div = document.createElement('div');\r
+                         \r
                        div.className = 'DHTMLSuite_textContent';\r
                        div.innerHTML = this.modelItemRef.itemText;     \r
                        div.className = this.cssPrefix + 'menuItem_textContent';\r