| @@ 1900-2148 (lines=249) @@ | ||
| 1897 | * @desc: unloads menu from page (destructor) |
|
| 1898 | * @type: public |
|
| 1899 | */ |
|
| 1900 | dhtmlXMenuObject.prototype.unload = function() {
|
|
| 1901 | ||
| 1902 | if (_isIE) {
|
|
| 1903 | document.body.detachEvent("onclick", this._bodyClick);
|
|
| 1904 | document.body.detachEvent("oncontextmenu", this._bodyContext);
|
|
| 1905 | } else {
|
|
| 1906 | window.removeEventListener("click", this._bodyClick, false);
|
|
| 1907 | window.removeEventListener("contextmenu", this._bodyContext, false);
|
|
| 1908 | } |
|
| 1909 | this._bodyClick = null; |
|
| 1910 | this._bodyContext = null; |
|
| 1911 | ||
| 1912 | // will recursively remove all items |
|
| 1913 | this.removeItem(this.idPrefix+this.topId, true); |
|
| 1914 | ||
| 1915 | this.itemPull = null; |
|
| 1916 | this.idPull = null; |
|
| 1917 | ||
| 1918 | // clear context zones |
|
| 1919 | if (this.context) for (var a in this.contextZones) this.removeContextZone(a); |
|
| 1920 | ||
| 1921 | if (this.cont != null) {
|
|
| 1922 | this.cont.className = ""; |
|
| 1923 | this.cont.parentNode.removeChild(this.cont); |
|
| 1924 | this.cont = null; |
|
| 1925 | } |
|
| 1926 | ||
| 1927 | if (this.base != null) {
|
|
| 1928 | this.base.className = ""; |
|
| 1929 | if (!this.context) this.base.oncontextmenu = (this.base._oldContextMenuHandler||null); |
|
| 1930 | this.base.onselectstart = null; |
|
| 1931 | this.base = null; |
|
| 1932 | } |
|
| 1933 | this.setSkin = null; |
|
| 1934 | ||
| 1935 | this.detachAllEvents(); |
|
| 1936 | ||
| 1937 | if (this._xmlLoader) {
|
|
| 1938 | this._xmlLoader.destructor(); |
|
| 1939 | this._xmlLoader = null; |
|
| 1940 | } |
|
| 1941 | ||
| 1942 | this._align = null; |
|
| 1943 | this._arrowFFFix = null; |
|
| 1944 | this._isIE6 = null; |
|
| 1945 | this._isInited = null; |
|
| 1946 | this._rtl = null; |
|
| 1947 | this._scrollDownTMStep = null; |
|
| 1948 | this._scrollDownTMTime = null; |
|
| 1949 | this._scrollUpTMStep = null; |
|
| 1950 | this._scrollUpTMTime = null; |
|
| 1951 | this._topLevelBottomMargin = null; |
|
| 1952 | this._topLevelOffsetLeft = null; |
|
| 1953 | this._topLevelBottomMargin = null; |
|
| 1954 | this._topLevelRightMargin = null; |
|
| 1955 | this.addBaseIdAsContextZone = null; |
|
| 1956 | this.context = null; |
|
| 1957 | this.contextAutoHide = null; |
|
| 1958 | this.contextAutoShow = null; |
|
| 1959 | this.contextHideAllMode = null; |
|
| 1960 | this.contextMenuZoneId = null; |
|
| 1961 | this.dLoad = null; |
|
| 1962 | this.dLoadSign = null; |
|
| 1963 | this.dLoadUrl = null; |
|
| 1964 | this.loaderIcon = null; |
|
| 1965 | this.fixedPosition = null; |
|
| 1966 | this.dirSubLevel = null; |
|
| 1967 | this.dirTopLevel = null; |
|
| 1968 | this.limit = null; |
|
| 1969 | this.menuSelected = null; |
|
| 1970 | this.menuLastClicked = null; |
|
| 1971 | this.idPrefix = null; |
|
| 1972 | this.imagePath = null; |
|
| 1973 | this.menuMode = null; |
|
| 1974 | this.menuModeTopLevelTimeout = null; |
|
| 1975 | this.menuModeTopLevelTimeoutTime = null; |
|
| 1976 | this.menuTimeoutHandler = null; |
|
| 1977 | this.menuTimeoutMsec = null; |
|
| 1978 | this.menuTouched = null; |
|
| 1979 | this.isDhtmlxMenuObject = null; |
|
| 1980 | this.itemHotKeyTagName = null; |
|
| 1981 | this.itemHrefTagName = null; |
|
| 1982 | this.itemTagName = null; |
|
| 1983 | this.itemTextTagName = null; |
|
| 1984 | this.itemTipTagName = null; |
|
| 1985 | this.userDataTagName = null; |
|
| 1986 | this.skin = null; |
|
| 1987 | this.topId = null; |
|
| 1988 | this.dacCycles = null; |
|
| 1989 | this.dacCyclesIE = null; |
|
| 1990 | this.dacSpeed = null; |
|
| 1991 | this.dacSpeedIE = null; |
|
| 1992 | this.zInd = null; |
|
| 1993 | this.zIndInit = null; |
|
| 1994 | this.zIndStep = null; |
|
| 1995 | ||
| 1996 | // |
|
| 1997 | // unload basic methods |
|
| 1998 | ||
| 1999 | this._enableDacSupport = null; |
|
| 2000 | this._selectedSubItems = null; |
|
| 2001 | this._openedPolygons = null; |
|
| 2002 | this._addSubItemToSelected = null; |
|
| 2003 | this._removeSubItemFromSelected = null; |
|
| 2004 | this._getSubItemToDeselectByPolygon = null; |
|
| 2005 | this._hidePolygon = null; |
|
| 2006 | this._showPolygon = null; |
|
| 2007 | this._redistribSubLevelSelection = null; |
|
| 2008 | this._doOnClick = null; |
|
| 2009 | this._doOnTouchMenu = null; |
|
| 2010 | this._searchMenuNode = null; |
|
| 2011 | this._getMenuNodes = null; |
|
| 2012 | this._genStr = null; |
|
| 2013 | this._clearAndHide = null; |
|
| 2014 | this._doOnLoad = null; |
|
| 2015 | this.getItemType = null; |
|
| 2016 | this.forEachItem = null; |
|
| 2017 | this.init = null; |
|
| 2018 | this.loadXML = null; |
|
| 2019 | this.loadXMLString = null; |
|
| 2020 | this._buildMenu = null; |
|
| 2021 | this._xmlParser = null; |
|
| 2022 | this._showSubLevelItem = null; |
|
| 2023 | this._hideSubLevelItem = null; |
|
| 2024 | this._countVisiblePolygonItems = null; |
|
| 2025 | this._redefineComplexState = null; |
|
| 2026 | this._updateItemComplexState = null; |
|
| 2027 | this._getItemLevelType = null; |
|
| 2028 | this._redistribTopLevelSelection = null; |
|
| 2029 | this._initTopLevelMenu = null; |
|
| 2030 | this._renderToplevelItem = null; |
|
| 2031 | this.setImagePath = null; |
|
| 2032 | this.setIconsPath = null; |
|
| 2033 | this.setIconPath = null; |
|
| 2034 | this._updateItemImage = null; |
|
| 2035 | this.removeItem = null; |
|
| 2036 | this._getAllParents = null; |
|
| 2037 | this.renderAsContextMenu = null; |
|
| 2038 | this.addContextZone = null; |
|
| 2039 | this.removeContextZone = null; |
|
| 2040 | this.isContextZone = null; |
|
| 2041 | this._isContextMenuVisible = null; |
|
| 2042 | this._showContextMenu = null; |
|
| 2043 | this._doOnContextBeforeCall = null; |
|
| 2044 | this._autoDetectVisibleArea = null; |
|
| 2045 | this._addItemIntoGlobalStrorage = null; |
|
| 2046 | this._addSubMenuPolygon = null; |
|
| 2047 | this._renderSublevelPolygon = null; |
|
| 2048 | this._renderSublevelItem = null; |
|
| 2049 | this._renderSeparator = null; |
|
| 2050 | this._hideContextMenu = null; |
|
| 2051 | this.clearAll = null; |
|
| 2052 | this.getItemPosition = null; |
|
| 2053 | this.setItemPosition = null; |
|
| 2054 | this.getParentId = null; |
|
| 2055 | this.addNewSibling = null; |
|
| 2056 | this.addNewChild = null; |
|
| 2057 | this.addNewSeparator = null; |
|
| 2058 | this.attachEvent = null; |
|
| 2059 | this.callEvent = null; |
|
| 2060 | this.checkEvent = null; |
|
| 2061 | this.eventCatcher = null; |
|
| 2062 | this.detachEvent = null; |
|
| 2063 | this.dhx_Event = null; |
|
| 2064 | this.unload = null; |
|
| 2065 | this.items = null; |
|
| 2066 | this.radio = null; |
|
| 2067 | this.detachAllEvents = null; |
|
| 2068 | this.hide = null; |
|
| 2069 | this.showContextMenu = null; |
|
| 2070 | this.hideContextMenu = null; |
|
| 2071 | ||
| 2072 | ||
| 2073 | // unload extended methods |
|
| 2074 | this._changeItemState = null; |
|
| 2075 | this._changeItemVisible = null; |
|
| 2076 | this._updateLoaderIcon = null; |
|
| 2077 | this._clearAllSelectedSubItemsInPolygon = null; |
|
| 2078 | this._checkArrowsState = null; |
|
| 2079 | this._addUpArrow = null; |
|
| 2080 | this._addDownArrow = null; |
|
| 2081 | this._removeUpArrow = null; |
|
| 2082 | this._removeDownArrow = null; |
|
| 2083 | this._isArrowExists = null; |
|
| 2084 | this._doScrollUp = null; |
|
| 2085 | this._doScrollDown = null; |
|
| 2086 | this._countPolygonItems = null; |
|
| 2087 | this._getRadioImgObj = null; |
|
| 2088 | this._setRadioState = null; |
|
| 2089 | this._radioOnClickHandler = null; |
|
| 2090 | this._getCheckboxState = null; |
|
| 2091 | this._setCheckboxState = null; |
|
| 2092 | this._readLevel = null; |
|
| 2093 | this._updateCheckboxImage = null; |
|
| 2094 | this._checkboxOnClickHandler = null; |
|
| 2095 | this._removeArrow = null; |
|
| 2096 | this.setItemEnabled = null; |
|
| 2097 | this.setItemDisabled = null; |
|
| 2098 | this.isItemEnabled = null; |
|
| 2099 | this.getItemText = null; |
|
| 2100 | this.setItemText = null; |
|
| 2101 | this.loadFromHTML = null; |
|
| 2102 | this.hideItem = null; |
|
| 2103 | this.showItem = null; |
|
| 2104 | this.isItemHidden = null; |
|
| 2105 | this.setUserData = null; |
|
| 2106 | this.getUserData = null; |
|
| 2107 | this.setOpenMode = null; |
|
| 2108 | this.setWebModeTimeout = null; |
|
| 2109 | this.enableDynamicLoading = null; |
|
| 2110 | this.getItemImage = null; |
|
| 2111 | this.setItemImage = null; |
|
| 2112 | this.clearItemImage = null; |
|
| 2113 | this.setAutoShowMode = null; |
|
| 2114 | this.setAutoHideMode = null; |
|
| 2115 | this.setContextMenuHideAllMode = null; |
|
| 2116 | this.getContextMenuHideAllMode = null; |
|
| 2117 | this.setVisibleArea = null; |
|
| 2118 | this.setTooltip = null; |
|
| 2119 | this.getTooltip = null; |
|
| 2120 | this.setHotKey = null; |
|
| 2121 | this.getHotKey = null; |
|
| 2122 | this.setItemSelected = null; |
|
| 2123 | this.setTopText = null; |
|
| 2124 | this.setRTL = null; |
|
| 2125 | this.setAlign = null; |
|
| 2126 | this.setHref = null; |
|
| 2127 | this.clearHref = null; |
|
| 2128 | this.getCircuit = null; |
|
| 2129 | this.contextZones = null; |
|
| 2130 | this.setOverflowHeight = null; |
|
| 2131 | this.userData = null; |
|
| 2132 | this.getRadioChecked = null; |
|
| 2133 | this.setRadioChecked = null; |
|
| 2134 | this.addRadioButton = null; |
|
| 2135 | this.setCheckboxState = null; |
|
| 2136 | this.getCheckboxState = null; |
|
| 2137 | this.addCheckbox = null; |
|
| 2138 | this.serialize = null; |
|
| 2139 | ||
| 2140 | ||
| 2141 | this.extendedModule = null; |
|
| 2142 | ||
| 2143 | // remove menu from global store |
|
| 2144 | dhtmlxMenuObjectLiveInstances[this._UID] = null; |
|
| 2145 | try { delete dhtmlxMenuObjectLiveInstances[this._UID]; } catch(e) {}
|
|
| 2146 | this._UID = null; |
|
| 2147 | ||
| 2148 | } |
|
| 2149 | // dhtmlxmenu global store |
|
| 2150 | var dhtmlxMenuObjectLiveInstances = {};
|
|
| 2151 | ||
| @@ 1876-2124 (lines=249) @@ | ||
| 1873 | * @desc: unloads menu from page (destructor) |
|
| 1874 | * @type: public |
|
| 1875 | */ |
|
| 1876 | dhtmlXMenuObject.prototype.unload = function() {
|
|
| 1877 | ||
| 1878 | if (typeof(window.addEventListener) == "function") {
|
|
| 1879 | window.removeEventListener("click", this._bodyClick, false);
|
|
| 1880 | window.removeEventListener("contextmenu", this._bodyContext, false);
|
|
| 1881 | } else {
|
|
| 1882 | document.body.detachEvent("onclick", this._bodyClick);
|
|
| 1883 | document.body.detachEvent("oncontextmenu", this._bodyContext);
|
|
| 1884 | } |
|
| 1885 | this._bodyClick = null; |
|
| 1886 | this._bodyContext = null; |
|
| 1887 | ||
| 1888 | // will recursively remove all items |
|
| 1889 | this.removeItem(this.idPrefix+this.topId, true); |
|
| 1890 | ||
| 1891 | this.itemPull = null; |
|
| 1892 | this.idPull = null; |
|
| 1893 | ||
| 1894 | // clear context zones |
|
| 1895 | if (this.context) for (var a in this.contextZones) this.removeContextZone(a); |
|
| 1896 | ||
| 1897 | if (this.cont != null) {
|
|
| 1898 | this.cont.className = ""; |
|
| 1899 | this.cont.parentNode.removeChild(this.cont); |
|
| 1900 | this.cont = null; |
|
| 1901 | } |
|
| 1902 | ||
| 1903 | if (this.base != null) {
|
|
| 1904 | this.base.className = ""; |
|
| 1905 | if (!this.context) this.base.oncontextmenu = (this.base._oldContextMenuHandler||null); |
|
| 1906 | this.base.onselectstart = null; |
|
| 1907 | this.base = null; |
|
| 1908 | } |
|
| 1909 | this.setSkin = null; |
|
| 1910 | ||
| 1911 | this.detachAllEvents(); |
|
| 1912 | ||
| 1913 | if (this._xmlLoader) {
|
|
| 1914 | this._xmlLoader.destructor(); |
|
| 1915 | this._xmlLoader = null; |
|
| 1916 | } |
|
| 1917 | ||
| 1918 | this._align = null; |
|
| 1919 | this._arrowFFFix = null; |
|
| 1920 | this._isIE6 = null; |
|
| 1921 | this._isInited = null; |
|
| 1922 | this._rtl = null; |
|
| 1923 | this._scrollDownTMStep = null; |
|
| 1924 | this._scrollDownTMTime = null; |
|
| 1925 | this._scrollUpTMStep = null; |
|
| 1926 | this._scrollUpTMTime = null; |
|
| 1927 | this._topLevelBottomMargin = null; |
|
| 1928 | this._topLevelOffsetLeft = null; |
|
| 1929 | this._topLevelBottomMargin = null; |
|
| 1930 | this._topLevelRightMargin = null; |
|
| 1931 | this.addBaseIdAsContextZone = null; |
|
| 1932 | this.context = null; |
|
| 1933 | this.contextAutoHide = null; |
|
| 1934 | this.contextAutoShow = null; |
|
| 1935 | this.contextHideAllMode = null; |
|
| 1936 | this.contextMenuZoneId = null; |
|
| 1937 | this.dLoad = null; |
|
| 1938 | this.dLoadSign = null; |
|
| 1939 | this.dLoadUrl = null; |
|
| 1940 | this.loaderIcon = null; |
|
| 1941 | this.fixedPosition = null; |
|
| 1942 | this.dirSubLevel = null; |
|
| 1943 | this.dirTopLevel = null; |
|
| 1944 | this.limit = null; |
|
| 1945 | this.menuSelected = null; |
|
| 1946 | this.menuLastClicked = null; |
|
| 1947 | this.idPrefix = null; |
|
| 1948 | this.imagePath = null; |
|
| 1949 | this.menuMode = null; |
|
| 1950 | this.menuModeTopLevelTimeout = null; |
|
| 1951 | this.menuModeTopLevelTimeoutTime = null; |
|
| 1952 | this.menuTimeoutHandler = null; |
|
| 1953 | this.menuTimeoutMsec = null; |
|
| 1954 | this.menuTouched = null; |
|
| 1955 | this.isDhtmlxMenuObject = null; |
|
| 1956 | this.itemHotKeyTagName = null; |
|
| 1957 | this.itemHrefTagName = null; |
|
| 1958 | this.itemTagName = null; |
|
| 1959 | this.itemTextTagName = null; |
|
| 1960 | this.itemTipTagName = null; |
|
| 1961 | this.userDataTagName = null; |
|
| 1962 | this.skin = null; |
|
| 1963 | this.topId = null; |
|
| 1964 | this.dacCycles = null; |
|
| 1965 | this.dacCyclesIE = null; |
|
| 1966 | this.dacSpeed = null; |
|
| 1967 | this.dacSpeedIE = null; |
|
| 1968 | this.zInd = null; |
|
| 1969 | this.zIndInit = null; |
|
| 1970 | this.zIndStep = null; |
|
| 1971 | ||
| 1972 | // |
|
| 1973 | // unload basic methods |
|
| 1974 | ||
| 1975 | this._enableDacSupport = null; |
|
| 1976 | this._selectedSubItems = null; |
|
| 1977 | this._openedPolygons = null; |
|
| 1978 | this._addSubItemToSelected = null; |
|
| 1979 | this._removeSubItemFromSelected = null; |
|
| 1980 | this._getSubItemToDeselectByPolygon = null; |
|
| 1981 | this._hidePolygon = null; |
|
| 1982 | this._showPolygon = null; |
|
| 1983 | this._redistribSubLevelSelection = null; |
|
| 1984 | this._doOnClick = null; |
|
| 1985 | this._doOnTouchMenu = null; |
|
| 1986 | this._searchMenuNode = null; |
|
| 1987 | this._getMenuNodes = null; |
|
| 1988 | this._genStr = null; |
|
| 1989 | this._clearAndHide = null; |
|
| 1990 | this._doOnLoad = null; |
|
| 1991 | this.getItemType = null; |
|
| 1992 | this.forEachItem = null; |
|
| 1993 | this.init = null; |
|
| 1994 | this.loadXML = null; |
|
| 1995 | this.loadXMLString = null; |
|
| 1996 | this._buildMenu = null; |
|
| 1997 | this._xmlParser = null; |
|
| 1998 | this._showSubLevelItem = null; |
|
| 1999 | this._hideSubLevelItem = null; |
|
| 2000 | this._countVisiblePolygonItems = null; |
|
| 2001 | this._redefineComplexState = null; |
|
| 2002 | this._updateItemComplexState = null; |
|
| 2003 | this._getItemLevelType = null; |
|
| 2004 | this._redistribTopLevelSelection = null; |
|
| 2005 | this._initTopLevelMenu = null; |
|
| 2006 | this._renderToplevelItem = null; |
|
| 2007 | this.setImagePath = null; |
|
| 2008 | this.setIconsPath = null; |
|
| 2009 | this.setIconPath = null; |
|
| 2010 | this._updateItemImage = null; |
|
| 2011 | this.removeItem = null; |
|
| 2012 | this._getAllParents = null; |
|
| 2013 | this.renderAsContextMenu = null; |
|
| 2014 | this.addContextZone = null; |
|
| 2015 | this.removeContextZone = null; |
|
| 2016 | this.isContextZone = null; |
|
| 2017 | this._isContextMenuVisible = null; |
|
| 2018 | this._showContextMenu = null; |
|
| 2019 | this._doOnContextBeforeCall = null; |
|
| 2020 | this._autoDetectVisibleArea = null; |
|
| 2021 | this._addItemIntoGlobalStrorage = null; |
|
| 2022 | this._addSubMenuPolygon = null; |
|
| 2023 | this._renderSublevelPolygon = null; |
|
| 2024 | this._renderSublevelItem = null; |
|
| 2025 | this._renderSeparator = null; |
|
| 2026 | this._hideContextMenu = null; |
|
| 2027 | this.clearAll = null; |
|
| 2028 | this.getItemPosition = null; |
|
| 2029 | this.setItemPosition = null; |
|
| 2030 | this.getParentId = null; |
|
| 2031 | this.addNewSibling = null; |
|
| 2032 | this.addNewChild = null; |
|
| 2033 | this.addNewSeparator = null; |
|
| 2034 | this.attachEvent = null; |
|
| 2035 | this.callEvent = null; |
|
| 2036 | this.checkEvent = null; |
|
| 2037 | this.eventCatcher = null; |
|
| 2038 | this.detachEvent = null; |
|
| 2039 | this.dhx_Event = null; |
|
| 2040 | this.unload = null; |
|
| 2041 | this.items = null; |
|
| 2042 | this.radio = null; |
|
| 2043 | this.detachAllEvents = null; |
|
| 2044 | this.hide = null; |
|
| 2045 | this.showContextMenu = null; |
|
| 2046 | this.hideContextMenu = null; |
|
| 2047 | ||
| 2048 | ||
| 2049 | // unload extended methods |
|
| 2050 | this._changeItemState = null; |
|
| 2051 | this._changeItemVisible = null; |
|
| 2052 | this._updateLoaderIcon = null; |
|
| 2053 | this._clearAllSelectedSubItemsInPolygon = null; |
|
| 2054 | this._checkArrowsState = null; |
|
| 2055 | this._addUpArrow = null; |
|
| 2056 | this._addDownArrow = null; |
|
| 2057 | this._removeUpArrow = null; |
|
| 2058 | this._removeDownArrow = null; |
|
| 2059 | this._isArrowExists = null; |
|
| 2060 | this._doScrollUp = null; |
|
| 2061 | this._doScrollDown = null; |
|
| 2062 | this._countPolygonItems = null; |
|
| 2063 | this._getRadioImgObj = null; |
|
| 2064 | this._setRadioState = null; |
|
| 2065 | this._radioOnClickHandler = null; |
|
| 2066 | this._getCheckboxState = null; |
|
| 2067 | this._setCheckboxState = null; |
|
| 2068 | this._readLevel = null; |
|
| 2069 | this._updateCheckboxImage = null; |
|
| 2070 | this._checkboxOnClickHandler = null; |
|
| 2071 | this._removeArrow = null; |
|
| 2072 | this.setItemEnabled = null; |
|
| 2073 | this.setItemDisabled = null; |
|
| 2074 | this.isItemEnabled = null; |
|
| 2075 | this.getItemText = null; |
|
| 2076 | this.setItemText = null; |
|
| 2077 | this.loadFromHTML = null; |
|
| 2078 | this.hideItem = null; |
|
| 2079 | this.showItem = null; |
|
| 2080 | this.isItemHidden = null; |
|
| 2081 | this.setUserData = null; |
|
| 2082 | this.getUserData = null; |
|
| 2083 | this.setOpenMode = null; |
|
| 2084 | this.setWebModeTimeout = null; |
|
| 2085 | this.enableDynamicLoading = null; |
|
| 2086 | this.getItemImage = null; |
|
| 2087 | this.setItemImage = null; |
|
| 2088 | this.clearItemImage = null; |
|
| 2089 | this.setAutoShowMode = null; |
|
| 2090 | this.setAutoHideMode = null; |
|
| 2091 | this.setContextMenuHideAllMode = null; |
|
| 2092 | this.getContextMenuHideAllMode = null; |
|
| 2093 | this.setVisibleArea = null; |
|
| 2094 | this.setTooltip = null; |
|
| 2095 | this.getTooltip = null; |
|
| 2096 | this.setHotKey = null; |
|
| 2097 | this.getHotKey = null; |
|
| 2098 | this.setItemSelected = null; |
|
| 2099 | this.setTopText = null; |
|
| 2100 | this.setRTL = null; |
|
| 2101 | this.setAlign = null; |
|
| 2102 | this.setHref = null; |
|
| 2103 | this.clearHref = null; |
|
| 2104 | this.getCircuit = null; |
|
| 2105 | this.contextZones = null; |
|
| 2106 | this.setOverflowHeight = null; |
|
| 2107 | this.userData = null; |
|
| 2108 | this.getRadioChecked = null; |
|
| 2109 | this.setRadioChecked = null; |
|
| 2110 | this.addRadioButton = null; |
|
| 2111 | this.setCheckboxState = null; |
|
| 2112 | this.getCheckboxState = null; |
|
| 2113 | this.addCheckbox = null; |
|
| 2114 | this.serialize = null; |
|
| 2115 | ||
| 2116 | ||
| 2117 | this.extendedModule = null; |
|
| 2118 | ||
| 2119 | // remove menu from global store |
|
| 2120 | dhtmlxMenuObjectLiveInstances[this._UID] = null; |
|
| 2121 | try { delete dhtmlxMenuObjectLiveInstances[this._UID]; } catch(e) {}
|
|
| 2122 | this._UID = null; |
|
| 2123 | ||
| 2124 | } |
|
| 2125 | // dhtmlxmenu global store |
|
| 2126 | var dhtmlxMenuObjectLiveInstances = {};
|
|
| 2127 | ||
| @@ 99-108 (lines=10) @@ | ||
| 96 | !1};g.onclick=function(a){a=a||event;a.cancelBubble=!0;var b={ctrl:a.ctrlKey,alt:a.altKey,shift:a.shiftKey};d._doOnClick(this.id.replace("separator_"+d.idPrefix,""),"--s",b)};if(a=="TopLevel"){if(c!=null)c++,c<0&&(c=0),this.cont.childNodes[c]!=null?this.cont.insertBefore(g,this.cont.childNodes[c]):this.cont.appendChild(g);else{var h=this.cont.childNodes[this.cont.childNodes.length-1];String(h).search("TopLevel_Text")==-1?this.cont.appendChild(g):this.cont.insertBefore(g,h)}this.idPull[g.id]=g}else{var j= |
|
| 97 | this.idPull["polygon_"+this.itemPull[b].parent];c!=null&&(c++,c<0&&(c=0),c>j.tbd.childNodes.length-1&&(c=null));c!=null&&j.tbd.childNodes[c]!=null?j.tbd.insertBefore(f,j.tbd.childNodes[c]):j.tbd.appendChild(f);e.appendChild(g);this.idPull[g.id]=f}}};dhtmlXMenuObject.prototype.addNewSeparator=function(b,c){var c=this.idPrefix+(c!=null?c:this._genStr(24)),a=this.idPrefix+this.getParentId(b);this._addItemIntoGlobalStrorage(c,a,"","separator",!1,"","");this._renderSeparator(c,this.getItemPosition(b))}; |
|
| 98 | dhtmlXMenuObject.prototype.hide=function(){this._clearAndHide()};dhtmlXMenuObject.prototype.clearAll=function(){this.removeItem(this.idPrefix+this.topId,!0);this._isInited=!1;this.idPrefix=this._genStr(12);this.itemPull={}}; |
|
| 99 | dhtmlXMenuObject.prototype.unload=function(){typeof window.addEventListener=="function"?(window.removeEventListener("click",this._bodyClick,!1),window.removeEventListener("contextmenu",this._bodyContext,!1)):(document.body.detachEvent("onclick",this._bodyClick),document.body.detachEvent("oncontextmenu",this._bodyContext));this._bodyContext=this._bodyClick=null;this.removeItem(this.idPrefix+this.topId,!0);this.idPull=this.itemPull=null;if(this.context)for(var b in this.contextZones)this.removeContextZone(b); |
|
| 100 | if(this.cont!=null)this.cont.className="",this.cont.parentNode.removeChild(this.cont),this.cont=null;if(this.base!=null){this.base.className="";if(!this.context)this.base.oncontextmenu=this.base._oldContextMenuHandler||null;this.base=this.base.onselectstart=null}this.setSkin=null;this.detachAllEvents();if(this._xmlLoader)this._xmlLoader.destructor(),this._xmlLoader=null;this.extendedModule=this.serialize=this.addCheckbox=this.getCheckboxState=this.setCheckboxState=this.addRadioButton=this.setRadioChecked= |
|
| 101 | this.getRadioChecked=this.userData=this.setOverflowHeight=this.contextZones=this.getCircuit=this.clearHref=this.setHref=this.setAlign=this.setRTL=this.setTopText=this.setItemSelected=this.getHotKey=this.setHotKey=this.getTooltip=this.setTooltip=this.setVisibleArea=this.getContextMenuHideAllMode=this.setContextMenuHideAllMode=this.setAutoHideMode=this.setAutoShowMode=this.clearItemImage=this.setItemImage=this.getItemImage=this.enableDynamicLoading=this.setWebModeTimeout=this.setOpenMode=this.getUserData= |
|
| 102 | this.setUserData=this.isItemHidden=this.showItem=this.hideItem=this.loadFromHTML=this.setItemText=this.getItemText=this.isItemEnabled=this.setItemDisabled=this.setItemEnabled=this._removeArrow=this._checkboxOnClickHandler=this._updateCheckboxImage=this._readLevel=this._setCheckboxState=this._getCheckboxState=this._radioOnClickHandler=this._setRadioState=this._getRadioImgObj=this._countPolygonItems=this._doScrollDown=this._doScrollUp=this._isArrowExists=this._removeDownArrow=this._removeUpArrow=this._addDownArrow= |
|
| 103 | this._addUpArrow=this._checkArrowsState=this._clearAllSelectedSubItemsInPolygon=this._updateLoaderIcon=this._changeItemVisible=this._changeItemState=this.hideContextMenu=this.showContextMenu=this.hide=this.detachAllEvents=this.radio=this.items=this.unload=this.dhx_Event=this.detachEvent=this.eventCatcher=this.checkEvent=this.callEvent=this.attachEvent=this.addNewSeparator=this.addNewChild=this.addNewSibling=this.getParentId=this.setItemPosition=this.getItemPosition=this.clearAll=this._hideContextMenu= |
|
| 104 | this._renderSeparator=this._renderSublevelItem=this._renderSublevelPolygon=this._addSubMenuPolygon=this._addItemIntoGlobalStrorage=this._autoDetectVisibleArea=this._doOnContextBeforeCall=this._showContextMenu=this._isContextMenuVisible=this.isContextZone=this.removeContextZone=this.addContextZone=this.renderAsContextMenu=this._getAllParents=this.removeItem=this._updateItemImage=this.setIconPath=this.setIconsPath=this.setImagePath=this._renderToplevelItem=this._initTopLevelMenu=this._redistribTopLevelSelection= |
|
| 105 | this._getItemLevelType=this._updateItemComplexState=this._redefineComplexState=this._countVisiblePolygonItems=this._hideSubLevelItem=this._showSubLevelItem=this._xmlParser=this._buildMenu=this.loadXMLString=this.loadXML=this.init=this.forEachItem=this.getItemType=this._doOnLoad=this._clearAndHide=this._genStr=this._getMenuNodes=this._searchMenuNode=this._doOnTouchMenu=this._doOnClick=this._redistribSubLevelSelection=this._showPolygon=this._hidePolygon=this._getSubItemToDeselectByPolygon=this._removeSubItemFromSelected= |
|
| 106 | this._addSubItemToSelected=this._openedPolygons=this._selectedSubItems=this._enableDacSupport=this.zIndStep=this.zIndInit=this.zInd=this.dacSpeedIE=this.dacSpeed=this.dacCyclesIE=this.dacCycles=this.topId=this.skin=this.userDataTagName=this.itemTipTagName=this.itemTextTagName=this.itemTagName=this.itemHrefTagName=this.itemHotKeyTagName=this.isDhtmlxMenuObject=this.menuTouched=this.menuTimeoutMsec=this.menuTimeoutHandler=this.menuModeTopLevelTimeoutTime=this.menuModeTopLevelTimeout=this.menuMode=this.imagePath= |
|
| 107 | this.idPrefix=this.menuLastClicked=this.menuSelected=this.limit=this.dirTopLevel=this.dirSubLevel=this.fixedPosition=this.loaderIcon=this.dLoadUrl=this.dLoadSign=this.dLoad=this.contextMenuZoneId=this.contextHideAllMode=this.contextAutoShow=this.contextAutoHide=this.context=this.addBaseIdAsContextZone=this._topLevelRightMargin=this._topLevelBottomMargin=this._topLevelOffsetLeft=this._topLevelBottomMargin=this._scrollUpTMTime=this._scrollUpTMStep=this._scrollDownTMTime=this._scrollDownTMStep=this._rtl= |
|
| 108 | this._isInited=this._isIE6=this._arrowFFFix=this._align=null;dhtmlxMenuObjectLiveInstances[this._UID]=null;try{delete dhtmlxMenuObjectLiveInstances[this._UID]}catch(c){}this._UID=null};var dhtmlxMenuObjectLiveInstances={};dhtmlXMenuObject.prototype.i18n={dhxmenuextalert:"dhtmlxmenu_ext.js required"}; |
|
| 109 | (function(){dhtmlx.extend_api("dhtmlXMenuObject",{_init:function(b){return[b.parent,b.skin]},align:"setAlign",top_text:"setTopText",context:"renderAsContextMenu",icon_path:"setIconsPath",open_mode:"setOpenMode",rtl:"setRTL",skin:"setSkin",dynamic:"enableDynamicLoading",xml:"loadXML",items:"items",overflow:"setOverflowHeight"},{items:function(b,c){for(var a=1E5,d=null,f=0;f<b.length;f++){var e=b[f];e.type=="separator"?(this.addNewSeparator(d,a,e.id),d=e.id):(this.addNewChild(c,a,e.id,e.text,e.disabled, |
|
| 110 | e.img,e.img_disabled),d=e.id,e.items&&this.items(e.items,e.id))}}})})(); |
|
| 111 | dhtmlXMenuObject.prototype._improveTerraceSkin=function(){for(var b in this.itemPull)if(this.itemPull[b].parent==this.idPrefix+this.topId&&this.idPull[b]!=null){var c=!1,a=!1;this.idPull[b].parentNode.firstChild==this.idPull[b]&&(c=!0);this.idPull[b].parentNode.lastChild==this.idPull[b]&&(a=!0);for(var d in this.itemPull)this.itemPull[d].type=="separator"&&this.itemPull[d].parent==this.idPrefix+this.topId&&(this.idPull[b].nextSibling==this.idPull["separator_"+d]&&(a=!0),this.idPull[b].previousSibling== |
|