@@ 601-640 (lines=40) @@ | ||
598 | for (var a in this.itemPull) { handler(String(a).replace(this.idPrefix, "")); } |
|
599 | } |
|
600 | /* clear selection and hide menu on onbody click event, optimized in version 0.3 */ |
|
601 | this._clearAndHide = function() { |
|
602 | main_self.menuSelected = -1; |
|
603 | main_self.menuLastClicked = -1; |
|
604 | while (main_self._openedPolygons.length > 0) { main_self._openedPolygons.pop(); } |
|
605 | for (var q=0; q<main_self._selectedSubItems.length; q++) { |
|
606 | var id = main_self._selectedSubItems[q][0]; |
|
607 | // clear all selection |
|
608 | if (main_self.idPull[id] != null) { |
|
609 | if (main_self.itemPull[id]["state"] == "enabled") { |
|
610 | if (main_self.idPull[id].className == "sub_item_selected") main_self.idPull[id].className = "sub_item"; |
|
611 | if (main_self.idPull[id].className == "dhtmlxMenu_"+main_self.skin+"_TopLevel_Item_Selected") { |
|
612 | // main_self.idPull[id].className = "dhtmlxMenu_"+main_self.skin+"_TopLevel_Item_Normal"; |
|
613 | // custom css |
|
614 | // console.log(main_self.itemPull[this.id]) |
|
615 | if (main_self.itemPull[id]["cssNormal"] != null) { |
|
616 | // alert(1) |
|
617 | main_self.idPull[id].className = main_self.itemPull[id]["cssNormal"]; |
|
618 | } else { |
|
619 | // default css |
|
620 | main_self.idPull[id].className = "dhtmlxMenu_"+main_self.skin+"_TopLevel_Item_Normal"; |
|
621 | } |
|
622 | } |
|
623 | } |
|
624 | } |
|
625 | main_self._hidePolygon(id); |
|
626 | } |
|
627 | // added in 0.4 |
|
628 | // main_self._hidePolygon(main_self.idPrefix+main_self.topId); |
|
629 | main_self.menuTouched = false; |
|
630 | // |
|
631 | // hide all contextmenu polygons on mouseout |
|
632 | if (main_self.context) { |
|
633 | if (main_self.contextHideAllMode) { |
|
634 | main_self._hidePolygon(main_self.idPrefix+main_self.topId); |
|
635 | main_self.zInd = main_self.zIndInit; |
|
636 | } else { |
|
637 | main_self.zInd = main_self.zIndInit+main_self.zIndStep; |
|
638 | } |
|
639 | } |
|
640 | } |
|
641 | /* loading and parsing through xml, optimized in version 0.3 */ |
|
642 | this._doOnLoad = function() {} |
|
643 | /** |
@@ 575-614 (lines=40) @@ | ||
572 | for (var a in this.itemPull) { handler(String(a).replace(this.idPrefix, "")); } |
|
573 | } |
|
574 | /* clear selection and hide menu on onbody click event, optimized in version 0.3 */ |
|
575 | this._clearAndHide = function() { |
|
576 | main_self.menuSelected = -1; |
|
577 | main_self.menuLastClicked = -1; |
|
578 | while (main_self._openedPolygons.length > 0) { main_self._openedPolygons.pop(); } |
|
579 | for (var q=0; q<main_self._selectedSubItems.length; q++) { |
|
580 | var id = main_self._selectedSubItems[q][0]; |
|
581 | // clear all selection |
|
582 | if (main_self.idPull[id] != null) { |
|
583 | if (main_self.itemPull[id]["state"] == "enabled") { |
|
584 | if (main_self.idPull[id].className == "sub_item_selected") main_self.idPull[id].className = "sub_item"; |
|
585 | if (main_self.idPull[id].className == "dhtmlxMenu_"+main_self.skin+"_TopLevel_Item_Selected") { |
|
586 | // main_self.idPull[id].className = "dhtmlxMenu_"+main_self.skin+"_TopLevel_Item_Normal"; |
|
587 | // custom css |
|
588 | // console.log(main_self.itemPull[this.id]) |
|
589 | if (main_self.itemPull[id]["cssNormal"] != null) { |
|
590 | // alert(1) |
|
591 | main_self.idPull[id].className = main_self.itemPull[id]["cssNormal"]; |
|
592 | } else { |
|
593 | // default css |
|
594 | main_self.idPull[id].className = "dhtmlxMenu_"+main_self.skin+"_TopLevel_Item_Normal"; |
|
595 | } |
|
596 | } |
|
597 | } |
|
598 | } |
|
599 | main_self._hidePolygon(id); |
|
600 | } |
|
601 | // added in 0.4 |
|
602 | // main_self._hidePolygon(main_self.idPrefix+main_self.topId); |
|
603 | main_self.menuTouched = false; |
|
604 | // |
|
605 | // hide all contextmenu polygons on mouseout |
|
606 | if (main_self.context) { |
|
607 | if (main_self.contextHideAllMode) { |
|
608 | main_self._hidePolygon(main_self.idPrefix+main_self.topId); |
|
609 | main_self.zInd = main_self.zIndInit; |
|
610 | } else { |
|
611 | main_self.zInd = main_self.zIndInit+main_self.zIndStep; |
|
612 | } |
|
613 | } |
|
614 | } |
|
615 | /* loading and parsing through xml, optimized in version 0.3 */ |
|
616 | this._doOnLoad = function() {} |
|
617 | /** |