Changeset 10356
- Timestamp:
- 07/19/08 16:16:48 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfExtjs2Plugin/trunk/web/extjs/ext-all-debug.js
r8582 r10356 3 3 * Copyright(c) 2006-2008, Ext JS, LLC. 4 4 * licensing@extjs.com 5 * 5 * 6 6 * http://extjs.com/license 7 7 */ … … 71 71 }; 72 72 73 73 74 74 var createDom = function(o, parentNode){ 75 75 var el; … … 119 119 tre = '</tr>'+tbe; 120 120 121 121 122 122 var insertIntoTable = function(tag, where, el, html){ 123 123 if(!tempTableEl){ … … 180 180 181 181 return { 182 182 183 183 useDom : false, 184 184 185 185 186 186 markup : function(o){ 187 187 return createHtml(o); 188 188 }, 189 189 190 190 191 191 applyStyles : function(el, styles){ 192 192 if(styles){ … … 208 208 }, 209 209 210 210 211 211 insertHtml : function(where, el, html){ 212 212 where = where.toLowerCase(); … … 271 271 }, 272 272 273 273 274 274 insertBefore : function(el, o, returnElement){ 275 275 return this.doInsert(el, o, returnElement, "beforeBegin"); 276 276 }, 277 277 278 278 279 279 insertAfter : function(el, o, returnElement){ 280 280 return this.doInsert(el, o, returnElement, "afterEnd", "nextSibling"); 281 281 }, 282 282 283 283 284 284 insertFirst : function(el, o, returnElement){ 285 285 return this.doInsert(el, o, returnElement, "afterBegin", "firstChild"); … … 299 299 }, 300 300 301 301 302 302 append : function(el, o, returnElement){ 303 303 el = Ext.getDom(el); … … 313 313 }, 314 314 315 315 316 316 overwrite : function(el, o, returnElement){ 317 317 el = Ext.getDom(el); … … 320 320 }, 321 321 322 322 323 323 createTemplate : function(o){ 324 324 var html = createHtml(o); … … 344 344 html = buf.join(''); 345 345 } 346 346 347 347 this.html = html; 348 348 if(this.compiled){ … … 351 351 }; 352 352 Ext.Template.prototype = { 353 353 354 354 applyTemplate : function(values){ 355 355 if(this.compiled){ … … 382 382 }, 383 383 384 384 385 385 set : function(html, compile){ 386 386 this.html = html; … … 392 392 }, 393 393 394 394 395 395 disableFormats : false, 396 396 397 397 398 398 re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, 399 399 400 400 401 401 compile : function(){ 402 402 var fm = Ext.util.Format; … … 436 436 }, 437 437 438 438 439 439 insertFirst: function(el, values, returnElement){ 440 440 return this.doInsert('afterBegin', el, values, returnElement); 441 441 }, 442 442 443 443 444 444 insertBefore: function(el, values, returnElement){ 445 445 return this.doInsert('beforeBegin', el, values, returnElement); 446 446 }, 447 447 448 448 449 449 insertAfter : function(el, values, returnElement){ 450 450 return this.doInsert('afterEnd', el, values, returnElement); 451 451 }, 452 452 453 453 454 454 append : function(el, values, returnElement){ 455 455 return this.doInsert('beforeEnd', el, values, returnElement); … … 462 462 }, 463 463 464 464 465 465 overwrite : function(el, values, returnElement){ 466 466 el = Ext.getDom(el); … … 516 516 function children(d){ 517 517 var n = d.firstChild, ni = -1; 518 while(n){519 var nx = n.nextSibling;520 if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){521 d.removeChild(n);522 }else{523 n.nodeIndex = ++ni;524 }525 n = nx;526 }527 return this;528 };518 while(n){ 519 var nx = n.nextSibling; 520 if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ 521 d.removeChild(n); 522 }else{ 523 n.nodeIndex = ++ni; 524 } 525 n = nx; 526 } 527 return this; 528 }; 529 529 530 530 function byClassName(c, a, v){ … … 675 675 }; 676 676 677 678 679 677 678 679 680 680 var isIE = window.ActiveXObject ? true : false; 681 681 682 683 682 683 684 684 eval("var batch = 30803;"); 685 685 … … 787 787 return Ext.fly(el).getStyle(name); 788 788 }, 789 789 790 790 compile : function(path, type){ 791 791 type = type || "select"; … … 797 797 var mm; 798 798 799 799 800 800 var lmode = q.match(modeRe); 801 801 if(lmode && lmode[1]){ … … 803 803 q = q.replace(lmode[1], ""); 804 804 } 805 805 806 806 while(path.substr(0, 1)=="/"){ 807 807 path = path.substr(1); … … 846 846 } 847 847 } 848 848 849 849 if(!matched){ 850 850 throw 'Error parsing selector, parsing failed at "' + q + '"'; … … 861 861 }, 862 862 863 863 864 864 select : function(path, root, type){ 865 865 if(!root || root == document){ … … 890 890 }, 891 891 892 892 893 893 selectNode : function(path, root){ 894 894 return Ext.DomQuery.select(path, root)[0]; 895 895 }, 896 896 897 897 898 898 selectValue : function(path, root, defaultValue){ 899 899 path = path.replace(trimRe, ""); … … 907 907 }, 908 908 909 909 910 910 selectNumber : function(path, root, defaultValue){ 911 911 var v = Ext.DomQuery.selectValue(path, root, defaultValue || 0); … … 913 913 }, 914 914 915 915 916 916 is : function(el, ss){ 917 917 if(typeof el == "string"){ … … 923 923 }, 924 924 925 925 926 926 filter : function(els, ss, nonMatches){ 927 927 ss = ss.replace(trimRe, ""); … … 933 933 }, 934 934 935 935 936 936 matchers : [{ 937 937 re: /^\.([\w-]+)/, … … 952 952 ], 953 953 954 954 955 955 operators : { 956 956 "=" : function(a, v){ … … 980 980 }, 981 981 982 982 983 983 pseudos : { 984 984 "first-child" : function(c){ … … 1170 1170 1171 1171 Ext.util.Observable = function(){ 1172 1172 1173 1173 if(this.listeners){ 1174 1174 this.on(this.listeners); … … 1177 1177 }; 1178 1178 Ext.util.Observable.prototype = { 1179 1179 1180 1180 fireEvent : function(){ 1181 1181 if(this.eventsSuspended !== true){ … … 1190 1190 filterOptRe : /^(?:scope|delay|buffer|single)$/, 1191 1191 1192 1192 1193 1193 addListener : function(eventName, fn, scope, o){ 1194 1194 if(typeof eventName == "object"){ … … 1216 1216 }, 1217 1217 1218 1218 1219 1219 removeListener : function(eventName, fn, scope){ 1220 1220 var ce = this.events[eventName.toLowerCase()]; … … 1224 1224 }, 1225 1225 1226 1226 1227 1227 purgeListeners : function(){ 1228 1228 for(var evt in this.events){ … … 1233 1233 }, 1234 1234 1235 1235 1236 1236 relayEvents : function(o, events){ 1237 1237 var createHandler = function(ename){ … … 1247 1247 }, 1248 1248 1249 1249 1250 1250 addEvents : function(o){ 1251 1251 if(!this.events){ … … 1263 1263 }, 1264 1264 1265 1265 1266 1266 hasListener : function(eventName){ 1267 1267 var e = this.events[eventName]; … … 1269 1269 }, 1270 1270 1271 1271 1272 1272 suspendEvents : function(){ 1273 1273 this.eventsSuspended = true; 1274 1274 }, 1275 1275 1276 1276 1277 1277 resumeEvents : function(){ 1278 1278 this.eventsSuspended = false; … … 1549 1549 }, 10); 1550 1550 } 1551 1551 1552 1552 E.on(window, "load", fireDocReady); 1553 1553 }; … … 1556 1556 var task = new Ext.util.DelayedTask(h); 1557 1557 return function(e){ 1558 1558 1559 1559 e = new Ext.EventObjectImpl(e); 1560 1560 task.delay(o.buffer, h, null, [e]); … … 1571 1571 var createDelayed = function(h, o){ 1572 1572 return function(e){ 1573 1573 1574 1574 e = new Ext.EventObjectImpl(e); 1575 1575 setTimeout(function(){ … … 1626 1626 1627 1627 E.on(el, ename, h); 1628 if(ename == "mousewheel" && el.addEventListener){ 1628 if(ename == "mousewheel" && el.addEventListener){ 1629 1629 el.addEventListener("DOMMouseScroll", h, false); 1630 1630 E.on(window, 'unload', function(){ … … 1632 1632 }); 1633 1633 } 1634 if(ename == "mousedown" && el == document){ 1634 if(ename == "mousedown" && el == document){ 1635 1635 Ext.EventManager.stoppedMouseDownEvent.addListener(h); 1636 1636 } … … 1655 1655 el.removeEventListener("DOMMouseScroll", hd, false); 1656 1656 } 1657 if(ename == "mousedown" && el == document){ 1657 if(ename == "mousedown" && el == document){ 1658 1658 Ext.EventManager.stoppedMouseDownEvent.removeListener(hd); 1659 1659 } … … 1663 1663 var pub = { 1664 1664 1665 1665 1666 1666 addListener : function(element, eventName, fn, scope, options){ 1667 1667 if(typeof eventName == "object"){ … … 1672 1672 } 1673 1673 if(typeof o[e] == "function"){ 1674 1674 1675 1675 listen(element, e, o, o[e], o.scope); 1676 1676 }else{ 1677 1677 1678 1678 listen(element, e, o[e]); 1679 1679 } … … 1684 1684 }, 1685 1685 1686 1686 1687 1687 removeListener : function(element, eventName, fn){ 1688 1688 return stopListening(element, eventName, fn); 1689 1689 }, 1690 1690 1691 1691 1692 1692 onDocumentReady : function(fn, scope, options){ 1693 if(docReadyState){ 1693 if(docReadyState){ 1694 1694 docReadyEvent.addListener(fn, scope, options); 1695 1695 docReadyEvent.fire(); … … 1703 1703 }, 1704 1704 1705 1705 1706 1706 onWindowResize : function(fn, scope, options){ 1707 1707 if(!resizeEvent){ … … 1715 1715 }, 1716 1716 1717 1717 1718 1718 fireWindowResize : function(){ 1719 1719 if(resizeEvent){ … … 1726 1726 }, 1727 1727 1728 1728 1729 1729 onTextResize : function(fn, scope, options){ 1730 1730 if(!textEvent){ … … 1744 1744 }, 1745 1745 1746 1746 1747 1747 removeResizeListener : function(fn, scope){ 1748 1748 if(resizeEvent){ … … 1751 1751 }, 1752 1752 1753 1753 1754 1754 fireResize : function(){ 1755 1755 if(resizeEvent){ … … 1757 1757 } 1758 1758 }, 1759 1759 1760 1760 ieDeferSrc : false, 1761 1761 1762 1762 textResizeInterval : 50 1763 1763 }; 1764 1764 1765 1765 pub.on = pub.addListener; 1766 1766 1767 1767 pub.un = pub.removeListener; 1768 1768 … … 1792 1792 cls.push('ext-border-box'); 1793 1793 } 1794 if(Ext.isStrict){ 1794 if(Ext.isStrict){ 1795 1795 var p = bd.dom.parentNode; 1796 1796 if(p){ … … 1806 1806 var E = Ext.lib.Event; 1807 1807 1808 1808 1809 1809 var safariKeys = { 1810 63234 : 37, 1811 63235 : 39, 1812 63232 : 38, 1813 63233 : 40, 1814 63276 : 33, 1815 63277 : 34, 1816 63272 : 46, 1817 63273 : 36, 1818 63275 : 35 1810 63234 : 37, 1811 63235 : 39, 1812 63232 : 38, 1813 63233 : 40, 1814 63276 : 33, 1815 63277 : 34, 1816 63272 : 46, 1817 63273 : 36, 1818 63275 : 35 1819 1819 }; 1820 1820 1821 1821 1822 1822 var btnMap = Ext.isIE ? {1:0,4:1,2:2} : 1823 1823 (Ext.isSafari ? {1:0,2:1,3:2} : {0:0,1:1,2:2}); … … 1829 1829 }; 1830 1830 Ext.EventObjectImpl.prototype = { 1831 1831 1832 1832 browserEvent : null, 1833 1833 1834 1834 button : -1, 1835 1835 1836 1836 shiftKey : false, 1837 1837 1838 1838 ctrlKey : false, 1839 1839 1840 1840 altKey : false, 1841 1841 1842 1842 1843 1843 BACKSPACE : 8, 1844 1844 1845 1845 TAB : 9, 1846 1846 1847 1847 RETURN : 13, 1848 1848 1849 1849 ENTER : 13, 1850 1850 1851 1851 SHIFT : 16, 1852 1852 1853 1853 CONTROL : 17, 1854 1854 1855 1855 ESC : 27, 1856 1856 1857 1857 SPACE : 32, 1858 1858 1859 1859 PAGEUP : 33, 1860 1860 1861 1861 PAGEDOWN : 34, 1862 1862 1863 1863 END : 35, 1864 1864 1865 1865 HOME : 36, 1866 1866 1867 1867 LEFT : 37, 1868 1868 1869 1869 UP : 38, 1870 1870 1871 1871 RIGHT : 39, 1872 1872 1873 1873 DOWN : 40, 1874 1874 1875 1875 DELETE : 46, 1876 1876 1877 1877 F5 : 116, 1878 1878 1879 1879 1880 1880 setEvent : function(e){ 1881 if(e == this || (e && e.browserEvent)){ 1881 if(e == this || (e && e.browserEvent)){ 1882 1882 return e; 1883 1883 } 1884 1884 this.browserEvent = e; 1885 1885 if(e){ 1886 1886 1887 1887 this.button = e.button ? btnMap[e.button] : (e.which ? e.which-1 : -1); 1888 1888 if(e.type == 'click' && this.button == -1){ … … 1891 1891 this.type = e.type; 1892 1892 this.shiftKey = e.shiftKey; 1893 1893 1894 1894 this.ctrlKey = e.ctrlKey || e.metaKey; 1895 1895 this.altKey = e.altKey; 1896 1896 1897 1897 this.keyCode = e.keyCode; 1898 1898 this.charCode = e.charCode; 1899 1899 1900 1900 this.target = E.getTarget(e); 1901 1901 1902 1902 this.xy = E.getXY(e); 1903 1903 }else{ … … 1914 1914 }, 1915 1915 1916 1916 1917 1917 stopEvent : function(){ 1918 1918 if(this.browserEvent){ … … 1924 1924 }, 1925 1925 1926 1926 1927 1927 preventDefault : function(){ 1928 1928 if(this.browserEvent){ … … 1931 1931 }, 1932 1932 1933 1933 1934 1934 isNavKeyPress : function(){ 1935 1935 var k = this.keyCode; … … 1947 1947 (k >= 44 && k <= 45); 1948 1948 }, 1949 1949 1950 1950 stopPropagation : function(){ 1951 1951 if(this.browserEvent){ … … 1957 1957 }, 1958 1958 1959 1959 1960 1960 getCharCode : function(){ 1961 1961 return this.charCode || this.keyCode; 1962 1962 }, 1963 1963 1964 1964 1965 1965 getKey : function(){ 1966 1966 var k = this.keyCode || this.charCode; … … 1968 1968 }, 1969 1969 1970 1970 1971 1971 getPageX : function(){ 1972 1972 return this.xy[0]; 1973 1973 }, 1974 1974 1975 1975 1976 1976 getPageY : function(){ 1977 1977 return this.xy[1]; 1978 1978 }, 1979 1979 1980 1980 1981 1981 getTime : function(){ 1982 1982 if(this.browserEvent){ … … 1986 1986 }, 1987 1987 1988 1988 1989 1989 getXY : function(){ 1990 1990 return this.xy; 1991 1991 }, 1992 1992 1993 1993 1994 1994 getTarget : function(selector, maxDepth, returnEl){ 1995 1995 return selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : (returnEl ? Ext.get(this.target) : this.target); 1996 1996 }, 1997 1998 1997 1998 1999 1999 getRelatedTarget : function(){ 2000 2000 if(this.browserEvent){ … … 2004 2004 }, 2005 2005 2006 2006 2007 2007 getWheelDelta : function(){ 2008 2008 var e = this.browserEvent; 2009 2009 var delta = 0; 2010 if(e.wheelDelta){ 2010 if(e.wheelDelta){ 2011 2011 delta = e.wheelDelta/120; 2012 }else if(e.detail){ 2012 }else if(e.detail){ 2013 2013 delta = -e.detail/3; 2014 2014 } … … 2016 2016 }, 2017 2017 2018 2018 2019 2019 hasModifier : function(){ 2020 2020 return ((this.ctrlKey || this.altKey) || this.shiftKey) ? true : false; 2021 2021 }, 2022 2022 2023 2023 2024 2024 within : function(el, related){ 2025 2025 var t = this[related ? "getRelatedTarget" : "getTarget"](); … … 2054 2054 } 2055 2055 2056 2056 2057 2057 this.dom = dom; 2058 2058 2059 2059 2060 2060 this.id = id || Ext.id(dom); 2061 2061 }; … … 2064 2064 2065 2065 El.prototype = { 2066 2066 2067 2067 originalDisplay : "", 2068 2068 2069 2069 visibilityMode : 1, 2070 2070 2071 2071 defaultUnit : "px", 2072 2072 2073 2073 setVisibilityMode : function(visMode){ 2074 2074 this.visibilityMode = visMode; 2075 2075 return this; 2076 2076 }, 2077 2077 2078 2078 enableDisplayMode : function(display){ 2079 2079 this.setVisibilityMode(El.DISPLAY); … … 2082 2082 }, 2083 2083 2084 2084 2085 2085 findParent : function(simpleSelector, maxDepth, returnEl){ 2086 2086 var p = this.dom, b = document.body, depth = 0, dq = Ext.DomQuery, stopEl; … … 2101 2101 2102 2102 2103 2103 2104 2104 findParentNode : function(simpleSelector, maxDepth, returnEl){ 2105 2105 var p = Ext.fly(this.dom.parentNode, '_internal'); … … 2107 2107 }, 2108 2108 2109 2109 2110 2110 up : function(simpleSelector, maxDepth){ 2111 2111 return this.findParentNode(simpleSelector, maxDepth, true); … … 2114 2114 2115 2115 2116 2116 2117 2117 is : function(simpleSelector){ 2118 2118 return Ext.DomQuery.is(this.dom, simpleSelector); 2119 2119 }, 2120 2120 2121 2121 2122 2122 animate : function(args, duration, onComplete, easing, animType){ 2123 2123 this.anim(args, {duration: duration, callback: onComplete, easing: easing}, animType); … … 2125 2125 }, 2126 2126 2127 2127 2128 2128 anim : function(args, opt, animType, defaultDur, defaultEase, cb){ 2129 2129 animType = animType || 'run'; … … 2147 2147 }, 2148 2148 2149 2149 2150 2150 clean : function(forceReclean){ 2151 2151 if(this.isCleaned && forceReclean !== true){ … … 2154 2154 var ns = /\S/; 2155 2155 var d = this.dom, n = d.firstChild, ni = -1; 2156 while(n){2157 var nx = n.nextSibling;2158 if(n.nodeType == 3 && !ns.test(n.nodeValue)){2159 d.removeChild(n);2160 }else{2161 n.nodeIndex = ++ni;2162 }2163 n = nx;2164 }2165 this.isCleaned = true;2166 return this;2167 },2168 2169 2156 while(n){ 2157 var nx = n.nextSibling; 2158 if(n.nodeType == 3 && !ns.test(n.nodeValue)){ 2159 d.removeChild(n); 2160 }else{ 2161 n.nodeIndex = ++ni; 2162 } 2163 n = nx; 2164 } 2165 this.isCleaned = true; 2166 return this; 2167 }, 2168 2169 2170 2170 scrollIntoView : function(container, hscroll){ 2171 2171 var c = Ext.getDom(container) || Ext.getBody().dom; … … 2185 2185 2186 2186 if(el.offsetHeight > ch || t < ct){ 2187 c.scrollTop = t;2187 c.scrollTop = t; 2188 2188 }else if(b > cb){ 2189 2189 c.scrollTop = b-ch; 2190 2190 } 2191 c.scrollTop = c.scrollTop; 2191 c.scrollTop = c.scrollTop; 2192 2192 if(hscroll !== false){ 2193 if(el.offsetWidth > c.clientWidth || l < cl){2193 if(el.offsetWidth > c.clientWidth || l < cl){ 2194 2194 c.scrollLeft = l; 2195 2195 }else if(r > cr){ … … 2205 2205 }, 2206 2206 2207 2207 2208 2208 autoHeight : function(animate, duration, onComplete, easing){ 2209 2209 var oldHeight = this.getHeight(); … … 2226 2226 }, 2227 2227 2228 2228 2229 2229 contains : function(el){ 2230 2230 if(!el){return false;} … … 2232 2232 }, 2233 2233 2234 2234 2235 2235 isVisible : function(deep) { 2236 2236 var vis = !(this.getStyle("visibility") == "hidden" || this.getStyle("display") == "none"); … … 2248 2248 }, 2249 2249 2250 2250 2251 2251 select : function(selector, unique){ 2252 2252 return El.select(selector, unique, this.dom); 2253 2253 }, 2254 2254 2255 2255 2256 2256 query : function(selector, unique){ 2257 2257 return Ext.DomQuery.select(selector, this.dom); 2258 2258 }, 2259 2259 2260 2260 2261 2261 child : function(selector, returnDom){ 2262 2262 var n = Ext.DomQuery.selectNode(selector, this.dom); … … 2264 2264 }, 2265 2265 2266 2266 2267 2267 down : function(selector, returnDom){ 2268 2268 var n = Ext.DomQuery.selectNode(" > " + selector, this.dom); … … 2270 2270 }, 2271 2271 2272 2272 2273 2273 initDD : function(group, config, overrides){ 2274 2274 var dd = new Ext.dd.DD(Ext.id(this.dom), group, config); … … 2276 2276 }, 2277 2277 2278 2278 2279 2279 initDDProxy : function(group, config, overrides){ 2280 2280 var dd = new Ext.dd.DDProxy(Ext.id(this.dom), group, config); … … 2282 2282 }, 2283 2283 2284 2284 2285 2285 initDDTarget : function(group, config, overrides){ 2286 2286 var dd = new Ext.dd.DDTarget(Ext.id(this.dom), group, config); … … 2288 2288 }, 2289 2289 2290 2290 2291 2291 setVisible : function(visible, animate){ 2292 2292 if(!animate || !A){ … … 2320 2320 }, 2321 2321 2322 2322 2323 2323 isDisplayed : function() { 2324 2324 return this.getStyle("display") != "none"; 2325 2325 }, 2326 2326 2327 2327 2328 2328 toggle : function(animate){ 2329 2329 this.setVisible(!this.isVisible(), this.preanim(arguments, 0)); … … 2331 2331 }, 2332 2332 2333 2333 2334 2334 setDisplayed : function(value) { 2335 2335 if(typeof value == "boolean"){ … … 2340 2340 }, 2341 2341 2342 2342 2343 2343 focus : function() { 2344 2344 try{ … … 2348 2348 }, 2349 2349 2350 2350 2351 2351 blur : function() { 2352 2352 try{ … … 2356 2356 }, 2357 2357 2358 2358 2359 2359 addClass : function(className){ 2360 2360 if(Ext.isArray(className)){ 2361 2361 for(var i = 0, len = className.length; i < len; i++) { 2362 this.addClass(className[i]);2362 this.addClass(className[i]); 2363 2363 } 2364 2364 }else{ … … 2370 2370 }, 2371 2371 2372 2372 2373 2373 radioClass : function(className){ 2374 2374 var siblings = this.dom.parentNode.childNodes; 2375 2375 for(var i = 0; i < siblings.length; i++) { 2376 var s = siblings[i];2377 if(s.nodeType == 1){2378 Ext.get(s).removeClass(className);2379 }2376 var s = siblings[i]; 2377 if(s.nodeType == 1){ 2378 Ext.get(s).removeClass(className); 2379 } 2380 2380 } 2381 2381 this.addClass(className); … … 2383 2383 }, 2384 2384 2385 2385 2386 2386 removeClass : function(className){ 2387 2387 if(!className || !this.dom.className){ … … 2390 2390 if(Ext.isArray(className)){ 2391 2391 for(var i = 0, len = className.length; i < len; i++) { 2392 this.removeClass(className[i]);2392 this.removeClass(className[i]); 2393 2393 } 2394 2394 }else{ … … 2408 2408 classReCache: {}, 2409 2409 2410 2410 2411 2411 toggleClass : function(className){ 2412 2412 if(this.hasClass(className)){ … … 2418 2418 }, 2419 2419 2420 2420 2421 2421 hasClass : function(className){ 2422 2422 return className && (' '+this.dom.className+' ').indexOf(' '+className+' ') != -1; 2423 2423 }, 2424 2424 2425 2425 2426 2426 replaceClass : function(oldClassName, newClassName){ 2427 2427 this.removeClass(oldClassName); … … 2430 2430 }, 2431 2431 2432 2432 2433 2433 getStyles : function(){ 2434 2434 var a = arguments, len = a.length, r = {}; … … 2439 2439 }, 2440 2440 2441 2441 2442 2442 getStyle : function(){ 2443 2443 return view && view.getComputedStyle ? … … 2487 2487 }(), 2488 2488 2489 2489 2490 2490 setStyle : function(prop, value){ 2491 2491 if(typeof prop == "string"){ … … 2509 2509 }, 2510 2510 2511 2511 2512 2512 applyStyles : function(style){ 2513 2513 Ext.DomHelper.applyStyles(this.dom, style); … … 2515 2515 }, 2516 2516 2517 2517 2518 2518 getX : function(){ 2519 2519 return D.getX(this.dom); 2520 2520 }, 2521 2521 2522 2522 2523 2523 getY : function(){ 2524 2524 return D.getY(this.dom);