rwiki 0.1.3 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Capfile +2 -0
- data/Gemfile +30 -0
- data/Rakefile +22 -65
- data/VERSION +1 -1
- data/config.ru +11 -0
- data/config/config.yml.example +1 -0
- data/config/deploy.rb +37 -0
- data/features/create_page.feature +30 -20
- data/features/delete_page.feature +23 -18
- data/features/display_page.feature +10 -11
- data/features/editor.feature +45 -0
- data/features/history.feature +46 -0
- data/features/rename_page.feature +42 -37
- data/features/step_definitions/common_steps.rb +19 -47
- data/features/step_definitions/common_transforms.rb +5 -0
- data/features/step_definitions/dialog_box_steps.rb +16 -0
- data/features/step_definitions/history_steps.rb +11 -0
- data/features/step_definitions/tab_panel_steps.rb +27 -0
- data/features/step_definitions/tree_panel_steps.rb +42 -0
- data/features/step_definitions/wait_steps.rb +21 -0
- data/features/support/env.rb +6 -0
- data/features/tab_panel.feature +47 -0
- data/features/tree_panel.feature +14 -15
- data/lib/rwiki.rb +1 -0
- data/lib/rwiki/app.rb +14 -2
- data/lib/rwiki/models/folder.rb +1 -1
- data/lib/rwiki/models/node.rb +11 -1
- data/lib/rwiki/models/page.rb +1 -1
- data/public/favicon.ico +0 -0
- data/public/images/compressed.png +0 -0
- data/public/images/css.png +0 -0
- data/public/images/file.png +0 -0
- data/public/images/html.png +0 -0
- data/public/images/icon_word.png +0 -0
- data/public/images/image.png +0 -0
- data/public/images/javascript.png +0 -0
- data/public/images/pdf.png +0 -0
- data/public/images/php.png +0 -0
- data/public/images/presentation.png +0 -0
- data/public/images/ruby.png +0 -0
- data/public/images/shellscript.png +0 -0
- data/public/images/stylesheet.png +0 -0
- data/public/images/text.png +0 -0
- data/public/images/wordprocessing.png +0 -0
- data/public/javascripts/Rwiki.js +71 -29
- data/public/javascripts/Rwiki/EditorPanel.js +5 -37
- data/public/javascripts/Rwiki/EditorPanel/Editor.js +8 -44
- data/public/javascripts/Rwiki/EditorWindow.js +66 -0
- data/public/javascripts/Rwiki/FuzzyFinderDialog.js +61 -0
- data/public/javascripts/Rwiki/NavigationPanel.js +25 -0
- data/public/javascripts/Rwiki/NodeManager.js +2 -0
- data/public/javascripts/Rwiki/TabPanel.js +39 -2
- data/public/javascripts/Rwiki/TreePanel.js +39 -26
- data/public/javascripts/Rwiki/TreePanel/Menu.js +1 -1
- data/public/javascripts/Rwiki/TreePanel/Node.js +46 -0
- data/public/javascripts/vendor/ext/adapter/ext/ext-base-debug.js +836 -710
- data/public/javascripts/vendor/ext/adapter/ext/ext-base.js +5 -5
- data/public/javascripts/vendor/ext/adapter/jquery/ext-jquery-adapter-debug.js +47 -700
- data/public/javascripts/vendor/ext/adapter/jquery/ext-jquery-adapter.js +5 -5
- data/public/javascripts/vendor/ext/adapter/prototype/ext-prototype-adapter-debug.js +45 -698
- data/public/javascripts/vendor/ext/adapter/prototype/ext-prototype-adapter.js +5 -5
- data/public/javascripts/vendor/ext/adapter/yui/ext-yui-adapter-debug.js +39 -696
- data/public/javascripts/vendor/ext/adapter/yui/ext-yui-adapter.js +5 -5
- data/public/javascripts/vendor/ext/ext-all-debug-w-comments.js +17932 -12860
- data/public/javascripts/vendor/ext/ext-all-debug.js +11674 -8102
- data/public/javascripts/vendor/ext/ext-all.js +6 -6
- data/public/javascripts/vendor/ext/ux/StatusBar.js +418 -0
- data/public/resources/ext/charts.swf +0 -0
- data/public/resources/ext/css/debug.css +4 -4
- data/public/resources/ext/css/ext-all-notheme.css +204 -52
- data/public/resources/ext/css/ext-all.css +234 -54
- data/public/resources/ext/css/reset-min.css +4 -4
- data/public/resources/ext/css/structure/borders.css +4 -4
- data/public/resources/ext/css/structure/box.css +4 -4
- data/public/resources/ext/css/structure/button.css +7 -7
- data/public/resources/ext/css/structure/combo.css +4 -4
- data/public/resources/ext/css/structure/core.css +15 -5
- data/public/resources/ext/css/structure/date-picker.css +4 -4
- data/public/resources/ext/css/structure/dd.css +4 -4
- data/public/resources/ext/css/structure/debug.css +4 -4
- data/public/resources/ext/css/structure/dialog.css +6 -9
- data/public/resources/ext/css/structure/editor.css +4 -4
- data/public/resources/ext/css/structure/form.css +14 -4
- data/public/resources/ext/css/structure/grid.css +15 -5
- data/public/resources/ext/css/structure/layout.css +7 -7
- data/public/resources/ext/css/structure/list-view.css +4 -4
- data/public/resources/ext/css/structure/menu.css +13 -6
- data/public/resources/ext/css/structure/panel-reset.css +4 -4
- data/public/resources/ext/css/structure/panel.css +70 -22
- data/public/resources/ext/css/structure/pivotgrid.css +65 -0
- data/public/resources/ext/css/structure/progress.css +4 -4
- data/public/resources/ext/css/structure/qtips.css +4 -4
- data/public/resources/ext/css/structure/reset.css +11 -5
- data/public/resources/ext/css/structure/resizable.css +4 -4
- data/public/resources/ext/css/structure/slider.css +4 -4
- data/public/resources/ext/css/structure/tabs.css +13 -8
- data/public/resources/ext/css/structure/toolbar.css +5 -5
- data/public/resources/ext/css/structure/tree.css +11 -11
- data/public/resources/ext/css/structure/window.css +5 -5
- data/public/resources/ext/css/theme-access/borders.css +4 -4
- data/public/resources/ext/css/theme-access/box.css +4 -4
- data/public/resources/ext/css/theme-access/button.css +4 -4
- data/public/resources/ext/css/theme-access/combo.css +4 -4
- data/public/resources/ext/css/theme-access/core.css +4 -4
- data/public/resources/ext/css/theme-access/date-picker.css +4 -4
- data/public/resources/ext/css/theme-access/dd.css +4 -4
- data/public/resources/ext/css/theme-access/debug.css +4 -4
- data/public/resources/ext/css/theme-access/dialog.css +4 -4
- data/public/resources/ext/css/theme-access/editor.css +4 -4
- data/public/resources/ext/css/theme-access/form.css +4 -4
- data/public/resources/ext/css/theme-access/grid.css +4 -4
- data/public/resources/ext/css/theme-access/layout.css +4 -4
- data/public/resources/ext/css/theme-access/list-view.css +8 -4
- data/public/resources/ext/css/theme-access/menu.css +4 -4
- data/public/resources/ext/css/theme-access/panel.css +4 -4
- data/public/resources/ext/css/theme-access/progress.css +4 -4
- data/public/resources/ext/css/theme-access/qtips.css +4 -4
- data/public/resources/ext/css/theme-access/resizable.css +4 -4
- data/public/resources/ext/css/theme-access/slider.css +4 -4
- data/public/resources/ext/css/theme-access/tabs.css +4 -4
- data/public/resources/ext/css/theme-access/toolbar.css +4 -4
- data/public/resources/ext/css/theme-access/tree.css +4 -4
- data/public/resources/ext/css/theme-access/window.css +5 -5
- data/public/resources/ext/css/theme-gray/borders.css +4 -4
- data/public/resources/ext/css/theme-gray/box.css +4 -4
- data/public/resources/ext/css/theme-gray/button.css +4 -4
- data/public/resources/ext/css/theme-gray/combo.css +4 -4
- data/public/resources/ext/css/theme-gray/core.css +6 -4
- data/public/resources/ext/css/theme-gray/date-picker.css +4 -4
- data/public/resources/ext/css/theme-gray/dd.css +4 -4
- data/public/resources/ext/css/theme-gray/debug.css +4 -4
- data/public/resources/ext/css/theme-gray/dialog.css +4 -4
- data/public/resources/ext/css/theme-gray/editor.css +4 -4
- data/public/resources/ext/css/theme-gray/form.css +4 -4
- data/public/resources/ext/css/theme-gray/grid.css +10 -6
- data/public/resources/ext/css/theme-gray/layout.css +4 -4
- data/public/resources/ext/css/theme-gray/list-view.css +5 -5
- data/public/resources/ext/css/theme-gray/menu.css +4 -4
- data/public/resources/ext/css/theme-gray/panel.css +4 -4
- data/public/resources/ext/css/theme-gray/pivotgrid.css +28 -0
- data/public/resources/ext/css/theme-gray/progress.css +4 -4
- data/public/resources/ext/css/theme-gray/qtips.css +4 -4
- data/public/resources/ext/css/theme-gray/resizable.css +4 -4
- data/public/resources/ext/css/theme-gray/slider.css +4 -4
- data/public/resources/ext/css/theme-gray/tabs.css +4 -4
- data/public/resources/ext/css/theme-gray/toolbar.css +4 -4
- data/public/resources/ext/css/theme-gray/tree.css +4 -4
- data/public/resources/ext/css/theme-gray/window.css +4 -4
- data/public/resources/ext/css/visual/borders.css +4 -4
- data/public/resources/ext/css/visual/box.css +4 -4
- data/public/resources/ext/css/visual/button.css +4 -4
- data/public/resources/ext/css/visual/combo.css +4 -4
- data/public/resources/ext/css/visual/core.css +6 -4
- data/public/resources/ext/css/visual/date-picker.css +4 -4
- data/public/resources/ext/css/visual/dd.css +4 -4
- data/public/resources/ext/css/visual/debug.css +4 -4
- data/public/resources/ext/css/visual/dialog.css +4 -4
- data/public/resources/ext/css/visual/editor.css +4 -4
- data/public/resources/ext/css/visual/form.css +4 -4
- data/public/resources/ext/css/visual/grid.css +8 -4
- data/public/resources/ext/css/visual/layout.css +4 -4
- data/public/resources/ext/css/visual/list-view.css +4 -4
- data/public/resources/ext/css/visual/menu.css +4 -4
- data/public/resources/ext/css/visual/panel.css +4 -4
- data/public/resources/ext/css/visual/pivotgrid.css +28 -0
- data/public/resources/ext/css/visual/progress.css +4 -4
- data/public/resources/ext/css/visual/qtips.css +4 -4
- data/public/resources/ext/css/visual/resizable.css +4 -4
- data/public/resources/ext/css/visual/slider.css +4 -4
- data/public/resources/ext/css/visual/tabs.css +4 -4
- data/public/resources/ext/css/visual/toolbar.css +5 -5
- data/public/resources/ext/css/visual/tree.css +4 -4
- data/public/resources/ext/css/visual/window.css +4 -4
- data/public/resources/ext/css/xtheme-access.css +9 -5
- data/public/resources/ext/css/xtheme-blue.css +34 -6
- data/public/resources/ext/css/xtheme-gray.css +35 -7
- data/public/resources/ext/css/yourtheme.css +11 -5
- data/public/resources/ext/images/access/panel/tool-sprites.gif +0 -0
- data/public/resources/ext/images/default/grid/grid3-rowheader.gif +0 -0
- data/public/resources/ext/images/default/grid/refresh-disabled.gif +0 -0
- data/public/resources/ext/images/default/panel/tool-sprites.gif +0 -0
- data/public/resources/ext/images/gray/grid/sort-hd.gif +0 -0
- data/public/resources/ext/images/gray/panel/tool-sprites.gif +0 -0
- data/public/resources/ext/images/gray/window/left-corners.png +0 -0
- data/public/resources/ext/images/gray/window/left-right.png +0 -0
- data/public/resources/ext/images/gray/window/right-corners.png +0 -0
- data/public/resources/ext/images/gray/window/top-bottom.png +0 -0
- data/public/stylesheets/coderay.css +3 -0
- data/public/stylesheets/markitup.css +19 -0
- data/public/stylesheets/style.css +1 -1
- data/run_tests.sh +1 -0
- data/rwiki.gemspec +56 -37
- data/test/fixtures/pages/Info/dummy +0 -0
- data/test/rwiki/models/test_folder.rb +4 -4
- data/vendor/.gitkeep +0 -0
- data/views/layout.erb +13 -5
- metadata +78 -69
- data/.idea/projectCodeStyle.xml +0 -80
- data/.rvmrc +0 -1
- data/public/javascripts/Rwiki/SidePanel.js +0 -26
- data/public/javascripts/Rwiki/Toolbar.js +0 -31
- data/public/javascripts/Rwiki/Viewport.js +0 -10
- data/tmp/ExtDesigner/MyViewport.js +0 -18
- data/tmp/ExtDesigner/MyViewport.ui.js +0 -29
- data/tmp/ExtDesigner/Rwiki.EditorPanel.js +0 -19
- data/tmp/ExtDesigner/Rwiki.EditorPanel.ui.js +0 -27
- data/tmp/ExtDesigner/Rwiki.MainPanel.js +0 -19
- data/tmp/ExtDesigner/Rwiki.MainPanel.ui.js +0 -29
- data/tmp/ExtDesigner/Rwiki.TabPane.PageTab.js +0 -19
- data/tmp/ExtDesigner/Rwiki.TabPane.PageTab.ui.js +0 -19
- data/tmp/ExtDesigner/Rwiki.TabPanel.js +0 -19
- data/tmp/ExtDesigner/Rwiki.TabPanel.ui.js +0 -27
- data/tmp/ExtDesigner/Rwiki.TreePanel.js +0 -19
- data/tmp/ExtDesigner/Rwiki.TreePanel.ui.js +0 -27
- data/tmp/ExtDesigner/Rwiki.Viewport.js +0 -18
- data/tmp/ExtDesigner/Rwiki.Viewport.ui.js +0 -30
- data/tmp/ExtDesigner/rwiki.xds +0 -192
- data/tmp/ExtDesigner/xds_includeOrder.txt +0 -12
- data/tmp/ExtDesigner/xds_index.html +0 -26
- data/tmp/ExtDesigner/xds_index.js +0 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Ext JS Library 3.
|
|
3
|
-
* Copyright(c) 2006-2010
|
|
4
|
-
* licensing@
|
|
5
|
-
* http://www.
|
|
2
|
+
* Ext JS Library 3.3.1
|
|
3
|
+
* Copyright(c) 2006-2010 Sencha Inc.
|
|
4
|
+
* licensing@sencha.com
|
|
5
|
+
* http://www.sencha.com/license
|
|
6
6
|
*/
|
|
7
|
-
window.undefined=window.undefined;Ext={version:"3.2.1",versionDetail:{major:3,minor:2,patch:1}};Ext.apply=function(d,e,b){if(b){Ext.apply(d,b)}if(d&&e&&typeof e=="object"){for(var a in e){d[a]=e[a]}}return d};(function(){var g=0,s=Object.prototype.toString,t=navigator.userAgent.toLowerCase(),y=function(e){return e.test(t)},i=document,l=i.compatMode=="CSS1Compat",A=y(/opera/),h=y(/\bchrome\b/),u=y(/webkit/),x=!h&&y(/safari/),f=x&&y(/applewebkit\/4/),b=x&&y(/version\/3/),B=x&&y(/version\/4/),r=!A&&y(/msie/),p=r&&y(/msie 7/),o=r&&y(/msie 8/),q=r&&!p&&!o,n=!u&&y(/gecko/),d=n&&y(/rv:1\.8/),a=n&&y(/rv:1\.9/),v=r&&!l,z=y(/windows|win32/),k=y(/macintosh|mac os x/),j=y(/adobeair/),m=y(/linux/),c=/^https/i.test(window.location.protocol);if(q){try{i.execCommand("BackgroundImageCache",false,true)}catch(w){}}Ext.apply(Ext,{SSL_SECURE_URL:c&&r?'javascript:""':"about:blank",isStrict:l,isSecure:c,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,enableNestedListenerRemoval:false,USE_NATIVE_JSON:false,applyIf:function(C,D){if(C){for(var e in D){if(!Ext.isDefined(C[e])){C[e]=D[e]}}}return C},id:function(e,C){e=Ext.getDom(e,true)||{};if(!e.id){e.id=(C||"ext-gen")+(++g)}return e.id},extend:function(){var C=function(E){for(var D in E){this[D]=E[D]}};var e=Object.prototype.constructor;return function(J,G,I){if(typeof G=="object"){I=G;G=J;J=I.constructor!=e?I.constructor:function(){G.apply(this,arguments)}}var E=function(){},H,D=G.prototype;E.prototype=D;H=J.prototype=new E();H.constructor=J;J.superclass=D;if(D.constructor==e){D.constructor=G}J.override=function(F){Ext.override(J,F)};H.superclass=H.supr=(function(){return D});H.override=C;Ext.override(J,I);J.extend=function(F){return Ext.extend(J,F)};return J}}(),override:function(e,D){if(D){var C=e.prototype;Ext.apply(C,D);if(Ext.isIE&&D.hasOwnProperty("toString")){C.toString=D.toString}}},namespace:function(){var C,e;Ext.each(arguments,function(D){e=D.split(".");C=window[e[0]]=window[e[0]]||{};Ext.each(e.slice(1),function(E){C=C[E]=C[E]||{}})});return C},urlEncode:function(G,F){var D,C=[],E=encodeURIComponent;Ext.iterate(G,function(e,H){D=Ext.isEmpty(H);Ext.each(D?e:H,function(I){C.push("&",E(e),"=",(!Ext.isEmpty(I)&&(I!=e||!D))?(Ext.isDate(I)?Ext.encode(I).replace(/"/g,""):E(I)):"")})});if(!F){C.shift();F=""}return F+C.join("")},urlDecode:function(D,C){if(Ext.isEmpty(D)){return{}}var G={},F=D.split("&"),H=decodeURIComponent,e,E;Ext.each(F,function(I){I=I.split("=");e=H(I[0]);E=H(I[1]);G[e]=C||!G[e]?E:[].concat(G[e]).concat(E)});return G},urlAppend:function(e,C){if(!Ext.isEmpty(C)){return e+(e.indexOf("?")===-1?"?":"&")+C}return e},toArray:function(){return r?function(D,G,E,F){F=[];for(var C=0,e=D.length;C<e;C++){F.push(D[C])}return F.slice(G||0,E||F.length)}:function(e,D,C){return Array.prototype.slice.call(e,D||0,C||e.length)}}(),isIterable:function(e){if(Ext.isArray(e)||e.callee){return true}if(/NodeList|HTMLCollection/.test(s.call(e))){return true}return((typeof e.nextNode!="undefined"||e.item)&&Ext.isNumber(e.length))},each:function(F,E,D){if(Ext.isEmpty(F,true)){return}if(!Ext.isIterable(F)||Ext.isPrimitive(F)){F=[F]}for(var C=0,e=F.length;C<e;C++){if(E.call(D||F[C],F[C],C,F)===false){return C}}},iterate:function(D,C,e){if(Ext.isEmpty(D)){return}if(Ext.isIterable(D)){Ext.each(D,C,e);return}else{if(typeof D=="object"){for(var E in D){if(D.hasOwnProperty(E)){if(C.call(e||D,E,D[E],D)===false){return}}}}}},getDom:function(D,C){if(!D||!i){return null}if(D.dom){return D.dom}else{if(typeof D=="string"){var E=i.getElementById(D);if(E&&r&&C){if(D==E.getAttribute("id")){return E}else{return null}}return E}else{return D}}},getBody:function(){return Ext.get(i.body||i.documentElement)},removeNode:r&&!o?function(){var e;return function(C){if(C&&C.tagName!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(C,true):Ext.EventManager.removeAll(C);e=e||i.createElement("div");e.appendChild(C);e.innerHTML="";delete Ext.elCache[C.id]}}}():function(e){if(e&&e.parentNode&&e.tagName!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(e,true):Ext.EventManager.removeAll(e);e.parentNode.removeChild(e);delete Ext.elCache[e.id]}},isEmpty:function(C,e){return C===null||C===undefined||((Ext.isArray(C)&&!C.length))||(!e?C==="":false)},isArray:function(e){return s.apply(e)==="[object Array]"},isDate:function(e){return s.apply(e)==="[object Date]"},isObject:function(e){return !!e&&Object.prototype.toString.call(e)==="[object Object]"},isPrimitive:function(e){return Ext.isString(e)||Ext.isNumber(e)||Ext.isBoolean(e)},isFunction:function(e){return s.apply(e)==="[object Function]"},isNumber:function(e){return typeof e==="number"&&isFinite(e)},isString:function(e){return typeof e==="string"},isBoolean:function(e){return typeof e==="boolean"},isElement:function(e){return e?!!e.tagName:false},isDefined:function(e){return typeof e!=="undefined"},isOpera:A,isWebKit:u,isChrome:h,isSafari:x,isSafari3:b,isSafari4:B,isSafari2:f,isIE:r,isIE6:q,isIE7:p,isIE8:o,isGecko:n,isGecko2:d,isGecko3:a,isBorderBox:v,isLinux:m,isWindows:z,isMac:k,isAir:j});Ext.ns=Ext.namespace})();Ext.ns("Ext.util","Ext.lib","Ext.data");Ext.elCache={};Ext.apply(Function.prototype,{createInterceptor:function(b,a){var c=this;return !Ext.isFunction(b)?this:function(){var e=this,d=arguments;b.target=e;b.method=c;return(b.apply(a||e||window,d)!==false)?c.apply(e||window,d):null}},createCallback:function(){var a=arguments,b=this;return function(){return b.apply(window,a)}},createDelegate:function(c,b,a){var d=this;return function(){var f=b||arguments;if(a===true){f=Array.prototype.slice.call(arguments,0);f=f.concat(b)}else{if(Ext.isNumber(a)){f=Array.prototype.slice.call(arguments,0);var e=[a,0].concat(b);Array.prototype.splice.apply(f,e)}}return d.apply(c||window,f)}},defer:function(c,e,b,a){var d=this.createDelegate(e,b,a);if(c>0){return setTimeout(d,c)}d();return 0}});Ext.applyIf(String,{format:function(b){var a=Ext.toArray(arguments,1);return b.replace(/\{(\d+)\}/g,function(c,d){return a[d]})}});Ext.applyIf(Array.prototype,{indexOf:function(b,c){var a=this.length;c=c||0;c+=(c<0)?a:0;for(;c<a;++c){if(this[c]===b){return c}}return -1},remove:function(b){var a=this.indexOf(b);if(a!=-1){this.splice(a,1)}return this}});Ext.ns("Ext.grid","Ext.list","Ext.dd","Ext.tree","Ext.form","Ext.menu","Ext.state","Ext.layout","Ext.app","Ext.ux","Ext.chart","Ext.direct");Ext.apply(Ext,function(){var c=Ext,a=0,b=null;return{emptyFn:function(){},BLANK_IMAGE_URL:Ext.isIE6||Ext.isIE7||Ext.isAir?"http://www.extjs.com/s.gif":"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",extendX:function(d,e){return Ext.extend(d,e(d.prototype))},getDoc:function(){return Ext.get(document)},num:function(e,d){e=Number(Ext.isEmpty(e)||Ext.isArray(e)||typeof e=="boolean"||(typeof e=="string"&&e.trim().length==0)?NaN:e);return isNaN(e)?d:e},value:function(f,d,e){return Ext.isEmpty(f,e)?d:f},escapeRe:function(d){return d.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},sequence:function(g,d,f,e){g[d]=g[d].createSequence(f,e)},addBehaviors:function(h){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(h)})}else{var e={},g,d,f;for(d in h){if((g=d.split("@"))[1]){f=g[0];if(!e[f]){e[f]=Ext.select(f)}e[f].on(g[1],h[d])}}e=null}},getScrollBarWidth:function(f){if(!Ext.isReady){return 0}if(f===true||b===null){var h=Ext.getBody().createChild('<div class="x-hide-offsets" style="width:100px;height:50px;overflow:hidden;"><div style="height:200px;"></div></div>'),g=h.child("div",true);var e=g.offsetWidth;h.setStyle("overflow",(Ext.isWebKit||Ext.isGecko)?"auto":"scroll");var d=g.offsetWidth;h.remove();b=e-d+2}return b},combine:function(){var f=arguments,e=f.length,h=[];for(var g=0;g<e;g++){var d=f[g];if(Ext.isArray(d)){h=h.concat(d)}else{if(d.length!==undefined&&!d.substr){h=h.concat(Array.prototype.slice.call(d,0))}else{h.push(d)}}}return h},copyTo:function(d,e,f){if(typeof f=="string"){f=f.split(/[,;\s]/)}Ext.each(f,function(g){if(e.hasOwnProperty(g)){d[g]=e[g]}},this);return d},destroy:function(){Ext.each(arguments,function(d){if(d){if(Ext.isArray(d)){this.destroy.apply(this,d)}else{if(typeof d.destroy=="function"){d.destroy()}else{if(d.dom){d.remove()}}}}},this)},destroyMembers:function(k,h,f,g){for(var j=1,e=arguments,d=e.length;j<d;j++){Ext.destroy(k[e[j]]);delete k[e[j]]}},clean:function(d){var e=[];Ext.each(d,function(f){if(!!f){e.push(f)}});return e},unique:function(d){var e=[],f={};Ext.each(d,function(g){if(!f[g]){e.push(g)}f[g]=true});return e},flatten:function(d){var f=[];function e(g){Ext.each(g,function(h){if(Ext.isArray(h)){e(h)}else{f.push(h)}});return f}return e(d)},min:function(d,e){var f=d[0];e=e||function(h,g){return h<g?-1:1};Ext.each(d,function(g){f=e(f,g)==-1?f:g});return f},max:function(d,e){var f=d[0];e=e||function(h,g){return h>g?1:-1};Ext.each(d,function(g){f=e(f,g)==1?f:g});return f},mean:function(d){return d.length>0?Ext.sum(d)/d.length:undefined},sum:function(d){var e=0;Ext.each(d,function(f){e+=f});return e},partition:function(d,e){var f=[[],[]];Ext.each(d,function(h,j,g){f[(e&&e(h,j,g))||(!e&&h)?0:1].push(h)});return f},invoke:function(d,e){var g=[],f=Array.prototype.slice.call(arguments,2);Ext.each(d,function(h,j){if(h&&typeof h[e]=="function"){g.push(h[e].apply(h,f))}else{g.push(undefined)}});return g},pluck:function(d,f){var e=[];Ext.each(d,function(g){e.push(g[f])});return e},zip:function(){var m=Ext.partition(arguments,function(i){return typeof i!="function"}),h=m[0],l=m[1][0],d=Ext.max(Ext.pluck(h,"length")),g=[];for(var k=0;k<d;k++){g[k]=[];if(l){g[k]=l.apply(l,Ext.pluck(h,k))}else{for(var f=0,e=h.length;f<e;f++){g[k].push(h[f][k])}}}return g},getCmp:function(d){return Ext.ComponentMgr.get(d)},useShims:c.isIE6||(c.isMac&&c.isGecko2),type:function(e){if(e===undefined||e===null){return false}if(e.htmlElement){return"element"}var d=typeof e;if(d=="object"&&e.nodeName){switch(e.nodeType){case 1:return"element";case 3:return(/\S/).test(e.nodeValue)?"textnode":"whitespace"}}if(d=="object"||d=="function"){switch(e.constructor){case Array:return"array";case RegExp:return"regexp";case Date:return"date"}if(typeof e.length=="number"&&typeof e.item=="function"){return"nodelist"}}return d},intercept:function(g,d,f,e){g[d]=g[d].createInterceptor(f,e)},callback:function(d,g,f,e){if(typeof d=="function"){if(e){d.defer(e,g,f||[])}else{d.apply(g,f||[])}}}}}());Ext.apply(Function.prototype,{createSequence:function(b,a){var c=this;return(typeof b!="function")?this:function(){var d=c.apply(this||window,arguments);b.apply(a||this||window,arguments);return d}}});Ext.applyIf(String,{escape:function(a){return a.replace(/('|\\)/g,"\\$1")},leftPad:function(d,b,c){var a=String(d);if(!c){c=" "}while(a.length<b){a=c+a}return a}});String.prototype.toggle=function(b,a){return this==b?a:b};String.prototype.trim=function(){var a=/^\s+|\s+$/g;return function(){return this.replace(a,"")}}();Date.prototype.getElapsed=function(a){return Math.abs((a||new Date()).getTime()-this.getTime())};Ext.applyIf(Number.prototype,{constrain:function(b,a){return Math.min(Math.max(this,b),a)}});Ext.util.TaskRunner=function(e){e=e||10;var f=[],a=[],b=0,g=false,d=function(){g=false;clearInterval(b);b=0},h=function(){if(!g){g=true;b=setInterval(i,e)}},c=function(j){a.push(j);if(j.onStop){j.onStop.apply(j.scope||j)}},i=function(){var l=a.length,n=new Date().getTime();if(l>0){for(var p=0;p<l;p++){f.remove(a[p])}a=[];if(f.length<1){d();return}}for(var p=0,o,k,m,j=f.length;p<j;++p){o=f[p];k=n-o.taskRunTime;if(o.interval<=k){m=o.run.apply(o.scope||o,o.args||[++o.taskRunCount]);o.taskRunTime=n;if(m===false||o.taskRunCount===o.repeat){c(o);return}}if(o.duration&&o.duration<=(n-o.taskStartTime)){c(o)}}};this.start=function(j){f.push(j);j.taskStartTime=new Date().getTime();j.taskRunTime=0;j.taskRunCount=0;h();return j};this.stop=function(j){c(j);return j};this.stopAll=function(){d();for(var k=0,j=f.length;k<j;k++){if(f[k].onStop){f[k].onStop()}}f=[];a=[]}};Ext.TaskMgr=new Ext.util.TaskRunner();if(typeof jQuery=="undefined"){throw"Unable to load Ext, jQuery not found."}(function(){var b;Ext.lib.Dom={getViewWidth:function(d){return d?Math.max(jQuery(document).width(),jQuery(window).width()):jQuery(window).width()},getViewHeight:function(d){return d?Math.max(jQuery(document).height(),jQuery(window).height()):jQuery(window).height()},isAncestor:function(e,f){var d=false;e=Ext.getDom(e);f=Ext.getDom(f);if(e&&f){if(e.contains){return e.contains(f)}else{if(e.compareDocumentPosition){return !!(e.compareDocumentPosition(f)&16)}else{while(f=f.parentNode){d=f==e||d}}}}return d},getRegion:function(d){return Ext.lib.Region.getRegion(d)},getY:function(d){return this.getXY(d)[1]},getX:function(d){return this.getXY(d)[0]},getXY:function(f){var e,j,l,m,i=(document.body||document.documentElement);f=Ext.getDom(f);if(f==i){return[0,0]}if(f.getBoundingClientRect){l=f.getBoundingClientRect();m=c(document).getScroll();return[Math.round(l.left+m.left),Math.round(l.top+m.top)]}var n=0,k=0;e=f;var d=c(f).getStyle("position")=="absolute";while(e){n+=e.offsetLeft;k+=e.offsetTop;if(!d&&c(e).getStyle("position")=="absolute"){d=true}if(Ext.isGecko){j=c(e);var o=parseInt(j.getStyle("borderTopWidth"),10)||0;var g=parseInt(j.getStyle("borderLeftWidth"),10)||0;n+=g;k+=o;if(e!=f&&j.getStyle("overflow")!="visible"){n+=g;k+=o}}e=e.offsetParent}if(Ext.isSafari&&d){n-=i.offsetLeft;k-=i.offsetTop}if(Ext.isGecko&&!d){var h=c(i);n+=parseInt(h.getStyle("borderLeftWidth"),10)||0;k+=parseInt(h.getStyle("borderTopWidth"),10)||0}e=f.parentNode;while(e&&e!=i){if(!Ext.isOpera||(e.tagName!="TR"&&c(e).getStyle("display")!="inline")){n-=e.scrollLeft;k-=e.scrollTop}e=e.parentNode}return[n,k]},setXY:function(d,e){d=Ext.fly(d,"_setXY");d.position();var f=d.translatePoints(e);if(e[0]!==false){d.dom.style.left=f.left+"px"}if(e[1]!==false){d.dom.style.top=f.top+"px"}},setX:function(e,d){this.setXY(e,[d,false])},setY:function(d,e){this.setXY(d,[false,e])}};function c(d){if(!b){b=new Ext.Element.Flyweight()}b.dom=d;return b}Ext.lib.Event={getPageX:function(d){d=d.browserEvent||d;return d.pageX},getPageY:function(d){d=d.browserEvent||d;return d.pageY},getXY:function(d){d=d.browserEvent||d;return[d.pageX,d.pageY]},getTarget:function(d){return d.target},on:function(h,d,g,f,e){jQuery(h).bind(d,g)},un:function(f,d,e){jQuery(f).unbind(d,e)},purgeElement:function(d){jQuery(d).unbind()},preventDefault:function(d){d=d.browserEvent||d;if(d.preventDefault){d.preventDefault()}else{d.returnValue=false}},stopPropagation:function(d){d=d.browserEvent||d;if(d.stopPropagation){d.stopPropagation()}else{d.cancelBubble=true}},stopEvent:function(d){this.preventDefault(d);this.stopPropagation(d)},onAvailable:function(j,e,d){var i=new Date();var g=function(){if(i.getElapsed()>10000){clearInterval(h)}var f=document.getElementById(j);if(f){clearInterval(h);e.call(d||window,f)}};var h=setInterval(g,50)},resolveTextNode:Ext.isGecko?function(e){if(!e){return}var d=HTMLElement.prototype.toString.call(e);if(d=="[xpconnect wrapped native prototype]"||d=="[object XULElement]"){return}return e.nodeType==3?e.parentNode:e}:function(d){return d&&d.nodeType==3?d.parentNode:d},getRelatedTarget:function(e){e=e.browserEvent||e;var d=e.relatedTarget;if(!d){if(e.type=="mouseout"){d=e.toElement}else{if(e.type=="mouseover"){d=e.fromElement}}}return this.resolveTextNode(d)}};Ext.lib.Ajax=function(){var d=function(f){return function(h,g){if((g=="error"||g=="timeout")&&f.failure){f.failure.call(f.scope||window,e(f,h))}else{if(f.success){f.success.call(f.scope||window,e(f,h))}}}};var e=function(f,l){var h={},j,g,i;try{j=l.getAllResponseHeaders();Ext.each(j.replace(/\r\n/g,"\n").split("\n"),function(m){g=m.indexOf(":");if(g>=0){i=m.substr(0,g).toLowerCase();if(m.charAt(g+1)==" "){++g}h[i]=m.substr(g+1)}})}catch(k){}return{responseText:l.responseText,responseXML:l.responseXML,argument:f.argument,status:l.status,statusText:l.statusText,getResponseHeader:function(m){return h[m.toLowerCase()]},getAllResponseHeaders:function(){return j}}};return{request:function(l,i,f,j,g){var k={type:l,url:i,data:j,timeout:f.timeout,complete:d(f)};if(g){var h=g.headers;if(g.xmlData){k.data=g.xmlData;k.processData=false;k.type=(l?l:(g.method?g.method:"POST"));if(!h||!h["Content-Type"]){k.contentType="text/xml"}}else{if(g.jsonData){k.data=typeof g.jsonData=="object"?Ext.encode(g.jsonData):g.jsonData;k.processData=false;k.type=(l?l:(g.method?g.method:"POST"));if(!h||!h["Content-Type"]){k.contentType="application/json"}}}if(h){k.beforeSend=function(n){for(var m in h){if(h.hasOwnProperty(m)){n.setRequestHeader(m,h[m])}}}}}jQuery.ajax(k)},formRequest:function(j,i,g,k,f,h){jQuery.ajax({type:Ext.getDom(j).method||"POST",url:i,data:jQuery(j).serialize()+(k?"&"+k:""),timeout:g.timeout,complete:d(g)})},isCallInProgress:function(f){return false},abort:function(f){return false},serializeForm:function(f){return jQuery(f.dom||f).serialize()}}}();Ext.lib.Anim=function(){var d=function(e,f){var g=true;return{stop:function(h){},isAnimated:function(){return g},proxyCallback:function(){g=false;Ext.callback(e,f)}}};return{scroll:function(h,f,j,k,e,g){var i=d(e,g);h=Ext.getDom(h);if(typeof f.scroll.to[0]=="number"){h.scrollLeft=f.scroll.to[0]}if(typeof f.scroll.to[1]=="number"){h.scrollTop=f.scroll.to[1]}i.proxyCallback();return i},motion:function(h,f,i,j,e,g){return this.run(h,f,i,j,e,g)},color:function(h,f,j,k,e,g){var i=d(e,g);i.proxyCallback();return i},run:function(g,q,j,p,h,s,r){var l=d(h,s),m=Ext.fly(g,"_animrun");var f={};for(var i in q){switch(i){case"points":var n,u;m.position();if(n=q.points.by){var t=m.getXY();u=m.translatePoints([t[0]+n[0],t[1]+n[1]])}else{u=m.translatePoints(q.points.to)}f.left=u.left;f.top=u.top;if(!parseInt(m.getStyle("left"),10)){m.setLeft(0)}if(!parseInt(m.getStyle("top"),10)){m.setTop(0)}if(q.points.from){m.setXY(q.points.from)}break;case"width":f.width=q.width.to;if(q.width.from){m.setWidth(q.width.from)}break;case"height":f.height=q.height.to;if(q.height.from){m.setHeight(q.height.from)}break;case"opacity":f.opacity=q.opacity.to;if(q.opacity.from){m.setOpacity(q.opacity.from)}break;case"left":f.left=q.left.to;if(q.left.from){m.setLeft(q.left.from)}break;case"top":f.top=q.top.to;if(q.top.from){m.setTop(q.top.from)}break;case"callback":case"scope":case"xy":break;default:f[i]=q[i].to;if(q[i].from){m.setStyle(i,q[i].from)}break}}jQuery(g).animate(f,j*1000,undefined,l.proxyCallback);return l}}}();Ext.lib.Region=function(f,g,d,e){this.top=f;this[1]=f;this.right=g;this.bottom=d;this.left=e;this[0]=e};Ext.lib.Region.prototype={contains:function(d){return(d.left>=this.left&&d.right<=this.right&&d.top>=this.top&&d.bottom<=this.bottom)},getArea:function(){return((this.bottom-this.top)*(this.right-this.left))},intersect:function(h){var f=Math.max(this.top,h.top);var g=Math.min(this.right,h.right);var d=Math.min(this.bottom,h.bottom);var e=Math.max(this.left,h.left);if(d>=f&&g>=e){return new Ext.lib.Region(f,g,d,e)}else{return null}},union:function(h){var f=Math.min(this.top,h.top);var g=Math.max(this.right,h.right);var d=Math.max(this.bottom,h.bottom);var e=Math.min(this.left,h.left);return new Ext.lib.Region(f,g,d,e)},constrainTo:function(d){this.top=this.top.constrain(d.top,d.bottom);this.bottom=this.bottom.constrain(d.top,d.bottom);this.left=this.left.constrain(d.left,d.right);this.right=this.right.constrain(d.left,d.right);return this},adjust:function(f,e,d,g){this.top+=f;this.left+=e;this.right+=g;this.bottom+=d;return this}};Ext.lib.Region.getRegion=function(g){var i=Ext.lib.Dom.getXY(g);var f=i[1];var h=i[0]+g.offsetWidth;var d=i[1]+g.offsetHeight;var e=i[0];return new Ext.lib.Region(f,h,d,e)};Ext.lib.Point=function(d,e){if(Ext.isArray(d)){e=d[1];d=d[0]}this.x=this.right=this.left=this[0]=d;this.y=this.top=this.bottom=this[1]=e};Ext.lib.Point.prototype=new Ext.lib.Region();if(Ext.isIE){function a(){var d=Function.prototype;delete d.createSequence;delete d.defer;delete d.createDelegate;delete d.createCallback;delete d.createInterceptor;window.detachEvent("onunload",a)}window.attachEvent("onunload",a)}})();
|
|
7
|
+
window.undefined=window.undefined;Ext={version:"3.3.1",versionDetail:{major:3,minor:3,patch:1}};Ext.apply=function(d,e,b){if(b){Ext.apply(d,b)}if(d&&e&&typeof e=="object"){for(var a in e){d[a]=e[a]}}return d};(function(){var g=0,t=Object.prototype.toString,u=navigator.userAgent.toLowerCase(),z=function(e){return e.test(u)},i=document,n=i.documentMode,l=i.compatMode=="CSS1Compat",B=z(/opera/),h=z(/\bchrome\b/),v=z(/webkit/),y=!h&&z(/safari/),f=y&&z(/applewebkit\/4/),b=y&&z(/version\/3/),C=y&&z(/version\/4/),s=!B&&z(/msie/),q=s&&(z(/msie 7/)||n==7),p=s&&(z(/msie 8/)&&n!=7),r=s&&!q&&!p,o=!v&&z(/gecko/),d=o&&z(/rv:1\.8/),a=o&&z(/rv:1\.9/),w=s&&!l,A=z(/windows|win32/),k=z(/macintosh|mac os x/),j=z(/adobeair/),m=z(/linux/),c=/^https/i.test(window.location.protocol);if(r){try{i.execCommand("BackgroundImageCache",false,true)}catch(x){}}Ext.apply(Ext,{SSL_SECURE_URL:c&&s?'javascript:""':"about:blank",isStrict:l,isSecure:c,isReady:false,enableForcedBoxModel:false,enableGarbageCollector:true,enableListenerCollection:false,enableNestedListenerRemoval:false,USE_NATIVE_JSON:false,applyIf:function(D,E){if(D){for(var e in E){if(!Ext.isDefined(D[e])){D[e]=E[e]}}}return D},id:function(e,D){e=Ext.getDom(e,true)||{};if(!e.id){e.id=(D||"ext-gen")+(++g)}return e.id},extend:function(){var D=function(F){for(var E in F){this[E]=F[E]}};var e=Object.prototype.constructor;return function(K,H,J){if(typeof H=="object"){J=H;H=K;K=J.constructor!=e?J.constructor:function(){H.apply(this,arguments)}}var G=function(){},I,E=H.prototype;G.prototype=E;I=K.prototype=new G();I.constructor=K;K.superclass=E;if(E.constructor==e){E.constructor=H}K.override=function(F){Ext.override(K,F)};I.superclass=I.supr=(function(){return E});I.override=D;Ext.override(K,J);K.extend=function(F){return Ext.extend(K,F)};return K}}(),override:function(e,E){if(E){var D=e.prototype;Ext.apply(D,E);if(Ext.isIE&&E.hasOwnProperty("toString")){D.toString=E.toString}}},namespace:function(){var D,e;Ext.each(arguments,function(E){e=E.split(".");D=window[e[0]]=window[e[0]]||{};Ext.each(e.slice(1),function(F){D=D[F]=D[F]||{}})});return D},urlEncode:function(H,G){var E,D=[],F=encodeURIComponent;Ext.iterate(H,function(e,I){E=Ext.isEmpty(I);Ext.each(E?e:I,function(J){D.push("&",F(e),"=",(!Ext.isEmpty(J)&&(J!=e||!E))?(Ext.isDate(J)?Ext.encode(J).replace(/"/g,""):F(J)):"")})});if(!G){D.shift();G=""}return G+D.join("")},urlDecode:function(E,D){if(Ext.isEmpty(E)){return{}}var H={},G=E.split("&"),I=decodeURIComponent,e,F;Ext.each(G,function(J){J=J.split("=");e=I(J[0]);F=I(J[1]);H[e]=D||!H[e]?F:[].concat(H[e]).concat(F)});return H},urlAppend:function(e,D){if(!Ext.isEmpty(D)){return e+(e.indexOf("?")===-1?"?":"&")+D}return e},toArray:function(){return s?function(E,H,F,G){G=[];for(var D=0,e=E.length;D<e;D++){G.push(E[D])}return G.slice(H||0,F||G.length)}:function(e,E,D){return Array.prototype.slice.call(e,E||0,D||e.length)}}(),isIterable:function(e){if(Ext.isArray(e)||e.callee){return true}if(/NodeList|HTMLCollection/.test(t.call(e))){return true}return((typeof e.nextNode!="undefined"||e.item)&&Ext.isNumber(e.length))},each:function(G,F,E){if(Ext.isEmpty(G,true)){return}if(!Ext.isIterable(G)||Ext.isPrimitive(G)){G=[G]}for(var D=0,e=G.length;D<e;D++){if(F.call(E||G[D],G[D],D,G)===false){return D}}},iterate:function(E,D,e){if(Ext.isEmpty(E)){return}if(Ext.isIterable(E)){Ext.each(E,D,e);return}else{if(typeof E=="object"){for(var F in E){if(E.hasOwnProperty(F)){if(D.call(e||E,F,E[F],E)===false){return}}}}}},getDom:function(E,D){if(!E||!i){return null}if(E.dom){return E.dom}else{if(typeof E=="string"){var F=i.getElementById(E);if(F&&s&&D){if(E==F.getAttribute("id")){return F}else{return null}}return F}else{return E}}},getBody:function(){return Ext.get(i.body||i.documentElement)},getHead:function(){var e;return function(){if(e==undefined){e=Ext.get(i.getElementsByTagName("head")[0])}return e}}(),removeNode:s&&!p?function(){var e;return function(D){if(D&&D.tagName!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(D,true):Ext.EventManager.removeAll(D);e=e||i.createElement("div");e.appendChild(D);e.innerHTML="";delete Ext.elCache[D.id]}}}():function(e){if(e&&e.parentNode&&e.tagName!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(e,true):Ext.EventManager.removeAll(e);e.parentNode.removeChild(e);delete Ext.elCache[e.id]}},isEmpty:function(D,e){return D===null||D===undefined||((Ext.isArray(D)&&!D.length))||(!e?D==="":false)},isArray:function(e){return t.apply(e)==="[object Array]"},isDate:function(e){return t.apply(e)==="[object Date]"},isObject:function(e){return !!e&&Object.prototype.toString.call(e)==="[object Object]"},isPrimitive:function(e){return Ext.isString(e)||Ext.isNumber(e)||Ext.isBoolean(e)},isFunction:function(e){return t.apply(e)==="[object Function]"},isNumber:function(e){return typeof e==="number"&&isFinite(e)},isString:function(e){return typeof e==="string"},isBoolean:function(e){return typeof e==="boolean"},isElement:function(e){return e?!!e.tagName:false},isDefined:function(e){return typeof e!=="undefined"},isOpera:B,isWebKit:v,isChrome:h,isSafari:y,isSafari3:b,isSafari4:C,isSafari2:f,isIE:s,isIE6:r,isIE7:q,isIE8:p,isGecko:o,isGecko2:d,isGecko3:a,isBorderBox:w,isLinux:m,isWindows:A,isMac:k,isAir:j});Ext.ns=Ext.namespace})();Ext.ns("Ext.util","Ext.lib","Ext.data","Ext.supports");Ext.elCache={};Ext.apply(Function.prototype,{createInterceptor:function(b,a){var c=this;return !Ext.isFunction(b)?this:function(){var e=this,d=arguments;b.target=e;b.method=c;return(b.apply(a||e||window,d)!==false)?c.apply(e||window,d):null}},createCallback:function(){var a=arguments,b=this;return function(){return b.apply(window,a)}},createDelegate:function(c,b,a){var d=this;return function(){var f=b||arguments;if(a===true){f=Array.prototype.slice.call(arguments,0);f=f.concat(b)}else{if(Ext.isNumber(a)){f=Array.prototype.slice.call(arguments,0);var e=[a,0].concat(b);Array.prototype.splice.apply(f,e)}}return d.apply(c||window,f)}},defer:function(c,e,b,a){var d=this.createDelegate(e,b,a);if(c>0){return setTimeout(d,c)}d();return 0}});Ext.applyIf(String,{format:function(b){var a=Ext.toArray(arguments,1);return b.replace(/\{(\d+)\}/g,function(c,d){return a[d]})}});Ext.applyIf(Array.prototype,{indexOf:function(b,c){var a=this.length;c=c||0;c+=(c<0)?a:0;for(;c<a;++c){if(this[c]===b){return c}}return -1},remove:function(b){var a=this.indexOf(b);if(a!=-1){this.splice(a,1)}return this}});Ext.util.TaskRunner=function(e){e=e||10;var f=[],a=[],b=0,g=false,d=function(){g=false;clearInterval(b);b=0},h=function(){if(!g){g=true;b=setInterval(i,e)}},c=function(j){a.push(j);if(j.onStop){j.onStop.apply(j.scope||j)}},i=function(){var l=a.length,n=new Date().getTime();if(l>0){for(var p=0;p<l;p++){f.remove(a[p])}a=[];if(f.length<1){d();return}}for(var p=0,o,k,m,j=f.length;p<j;++p){o=f[p];k=n-o.taskRunTime;if(o.interval<=k){m=o.run.apply(o.scope||o,o.args||[++o.taskRunCount]);o.taskRunTime=n;if(m===false||o.taskRunCount===o.repeat){c(o);return}}if(o.duration&&o.duration<=(n-o.taskStartTime)){c(o)}}};this.start=function(j){f.push(j);j.taskStartTime=new Date().getTime();j.taskRunTime=0;j.taskRunCount=0;h();return j};this.stop=function(j){c(j);return j};this.stopAll=function(){d();for(var k=0,j=f.length;k<j;k++){if(f[k].onStop){f[k].onStop()}}f=[];a=[]}};Ext.TaskMgr=new Ext.util.TaskRunner();if(typeof jQuery=="undefined"){throw"Unable to load Ext, jQuery not found."}(function(){var b;Ext.lib.Dom={getViewWidth:function(d){return d?Math.max(jQuery(document).width(),jQuery(window).width()):jQuery(window).width()},getViewHeight:function(d){return d?Math.max(jQuery(document).height(),jQuery(window).height()):jQuery(window).height()},isAncestor:function(e,f){var d=false;e=Ext.getDom(e);f=Ext.getDom(f);if(e&&f){if(e.contains){return e.contains(f)}else{if(e.compareDocumentPosition){return !!(e.compareDocumentPosition(f)&16)}else{while(f=f.parentNode){d=f==e||d}}}}return d},getRegion:function(d){return Ext.lib.Region.getRegion(d)},getY:function(d){return this.getXY(d)[1]},getX:function(d){return this.getXY(d)[0]},getXY:function(f){var e,j,l,m,i=(document.body||document.documentElement);f=Ext.getDom(f);if(f==i){return[0,0]}if(f.getBoundingClientRect){l=f.getBoundingClientRect();m=c(document).getScroll();return[Math.round(l.left+m.left),Math.round(l.top+m.top)]}var n=0,k=0;e=f;var d=c(f).getStyle("position")=="absolute";while(e){n+=e.offsetLeft;k+=e.offsetTop;if(!d&&c(e).getStyle("position")=="absolute"){d=true}if(Ext.isGecko){j=c(e);var o=parseInt(j.getStyle("borderTopWidth"),10)||0;var g=parseInt(j.getStyle("borderLeftWidth"),10)||0;n+=g;k+=o;if(e!=f&&j.getStyle("overflow")!="visible"){n+=g;k+=o}}e=e.offsetParent}if(Ext.isSafari&&d){n-=i.offsetLeft;k-=i.offsetTop}if(Ext.isGecko&&!d){var h=c(i);n+=parseInt(h.getStyle("borderLeftWidth"),10)||0;k+=parseInt(h.getStyle("borderTopWidth"),10)||0}e=f.parentNode;while(e&&e!=i){if(!Ext.isOpera||(e.tagName!="TR"&&c(e).getStyle("display")!="inline")){n-=e.scrollLeft;k-=e.scrollTop}e=e.parentNode}return[n,k]},setXY:function(d,e){d=Ext.fly(d,"_setXY");d.position();var f=d.translatePoints(e);if(e[0]!==false){d.dom.style.left=f.left+"px"}if(e[1]!==false){d.dom.style.top=f.top+"px"}},setX:function(e,d){this.setXY(e,[d,false])},setY:function(d,e){this.setXY(d,[false,e])}};function c(d){if(!b){b=new Ext.Element.Flyweight()}b.dom=d;return b}Ext.lib.Event={getPageX:function(d){d=d.browserEvent||d;return d.pageX},getPageY:function(d){d=d.browserEvent||d;return d.pageY},getXY:function(d){d=d.browserEvent||d;return[d.pageX,d.pageY]},getTarget:function(d){return d.target},on:function(h,d,g,f,e){jQuery(h).bind(d,g)},un:function(f,d,e){jQuery(f).unbind(d,e)},purgeElement:function(d){jQuery(d).unbind()},preventDefault:function(d){d=d.browserEvent||d;if(d.preventDefault){d.preventDefault()}else{d.returnValue=false}},stopPropagation:function(d){d=d.browserEvent||d;if(d.stopPropagation){d.stopPropagation()}else{d.cancelBubble=true}},stopEvent:function(d){this.preventDefault(d);this.stopPropagation(d)},onAvailable:function(j,e,d){var i=new Date();var g=function(){if(i.getElapsed()>10000){clearInterval(h)}var f=document.getElementById(j);if(f){clearInterval(h);e.call(d||window,f)}};var h=setInterval(g,50)},resolveTextNode:Ext.isGecko?function(e){if(!e){return}var d=HTMLElement.prototype.toString.call(e);if(d=="[xpconnect wrapped native prototype]"||d=="[object XULElement]"){return}return e.nodeType==3?e.parentNode:e}:function(d){return d&&d.nodeType==3?d.parentNode:d},getRelatedTarget:function(e){e=e.browserEvent||e;var d=e.relatedTarget;if(!d){if(e.type=="mouseout"){d=e.toElement}else{if(e.type=="mouseover"){d=e.fromElement}}}return this.resolveTextNode(d)}};Ext.lib.Ajax=function(){var d=function(f){return function(h,g){if((g=="error"||g=="timeout")&&f.failure){f.failure.call(f.scope||window,e(f,h))}else{if(f.success){f.success.call(f.scope||window,e(f,h))}}}};var e=function(f,l){var h={},j,g,i;try{j=l.getAllResponseHeaders();Ext.each(j.replace(/\r\n/g,"\n").split("\n"),function(m){g=m.indexOf(":");if(g>=0){i=m.substr(0,g).toLowerCase();if(m.charAt(g+1)==" "){++g}h[i]=m.substr(g+1)}})}catch(k){}return{responseText:l.responseText,responseXML:l.responseXML,argument:f.argument,status:l.status,statusText:l.statusText,getResponseHeader:function(m){return h[m.toLowerCase()]},getAllResponseHeaders:function(){return j}}};return{request:function(l,i,f,j,g){var k={type:l,url:i,data:j,timeout:f.timeout,complete:d(f)};if(g){var h=g.headers;if(g.xmlData){k.data=g.xmlData;k.processData=false;k.type=(l?l:(g.method?g.method:"POST"));if(!h||!h["Content-Type"]){k.contentType="text/xml"}}else{if(g.jsonData){k.data=typeof g.jsonData=="object"?Ext.encode(g.jsonData):g.jsonData;k.processData=false;k.type=(l?l:(g.method?g.method:"POST"));if(!h||!h["Content-Type"]){k.contentType="application/json"}}}if(h){k.beforeSend=function(n){for(var m in h){if(h.hasOwnProperty(m)){n.setRequestHeader(m,h[m])}}}}}jQuery.ajax(k)},formRequest:function(j,i,g,k,f,h){jQuery.ajax({type:Ext.getDom(j).method||"POST",url:i,data:jQuery(j).serialize()+(k?"&"+k:""),timeout:g.timeout,complete:d(g)})},isCallInProgress:function(f){return false},abort:function(f){return false},serializeForm:function(f){return jQuery(f.dom||f).serialize()}}}();Ext.lib.Anim=function(){var d=function(e,f){var g=true;return{stop:function(h){},isAnimated:function(){return g},proxyCallback:function(){g=false;Ext.callback(e,f)}}};return{scroll:function(h,f,j,k,e,g){var i=d(e,g);h=Ext.getDom(h);if(typeof f.scroll.to[0]=="number"){h.scrollLeft=f.scroll.to[0]}if(typeof f.scroll.to[1]=="number"){h.scrollTop=f.scroll.to[1]}i.proxyCallback();return i},motion:function(h,f,i,j,e,g){return this.run(h,f,i,j,e,g)},color:function(h,f,j,k,e,g){var i=d(e,g);i.proxyCallback();return i},run:function(g,q,j,p,h,s,r){var l=d(h,s),m=Ext.fly(g,"_animrun");var f={};for(var i in q){switch(i){case"points":var n,u;m.position();if(n=q.points.by){var t=m.getXY();u=m.translatePoints([t[0]+n[0],t[1]+n[1]])}else{u=m.translatePoints(q.points.to)}f.left=u.left;f.top=u.top;if(!parseInt(m.getStyle("left"),10)){m.setLeft(0)}if(!parseInt(m.getStyle("top"),10)){m.setTop(0)}if(q.points.from){m.setXY(q.points.from)}break;case"width":f.width=q.width.to;if(q.width.from){m.setWidth(q.width.from)}break;case"height":f.height=q.height.to;if(q.height.from){m.setHeight(q.height.from)}break;case"opacity":f.opacity=q.opacity.to;if(q.opacity.from){m.setOpacity(q.opacity.from)}break;case"left":f.left=q.left.to;if(q.left.from){m.setLeft(q.left.from)}break;case"top":f.top=q.top.to;if(q.top.from){m.setTop(q.top.from)}break;case"callback":case"scope":case"xy":break;default:f[i]=q[i].to;if(q[i].from){m.setStyle(i,q[i].from)}break}}jQuery(g).animate(f,j*1000,undefined,l.proxyCallback);return l}}}();Ext.lib.Region=function(f,g,d,e){this.top=f;this[1]=f;this.right=g;this.bottom=d;this.left=e;this[0]=e};Ext.lib.Region.prototype={contains:function(d){return(d.left>=this.left&&d.right<=this.right&&d.top>=this.top&&d.bottom<=this.bottom)},getArea:function(){return((this.bottom-this.top)*(this.right-this.left))},intersect:function(h){var f=Math.max(this.top,h.top);var g=Math.min(this.right,h.right);var d=Math.min(this.bottom,h.bottom);var e=Math.max(this.left,h.left);if(d>=f&&g>=e){return new Ext.lib.Region(f,g,d,e)}else{return null}},union:function(h){var f=Math.min(this.top,h.top);var g=Math.max(this.right,h.right);var d=Math.max(this.bottom,h.bottom);var e=Math.min(this.left,h.left);return new Ext.lib.Region(f,g,d,e)},constrainTo:function(d){this.top=this.top.constrain(d.top,d.bottom);this.bottom=this.bottom.constrain(d.top,d.bottom);this.left=this.left.constrain(d.left,d.right);this.right=this.right.constrain(d.left,d.right);return this},adjust:function(f,e,d,g){this.top+=f;this.left+=e;this.right+=g;this.bottom+=d;return this}};Ext.lib.Region.getRegion=function(g){var i=Ext.lib.Dom.getXY(g);var f=i[1];var h=i[0]+g.offsetWidth;var d=i[1]+g.offsetHeight;var e=i[0];return new Ext.lib.Region(f,h,d,e)};Ext.lib.Point=function(d,e){if(Ext.isArray(d)){e=d[1];d=d[0]}this.x=this.right=this.left=this[0]=d;this.y=this.top=this.bottom=this[1]=e};Ext.lib.Point.prototype=new Ext.lib.Region();if(Ext.isIE){function a(){var d=Function.prototype;delete d.createSequence;delete d.defer;delete d.createDelegate;delete d.createCallback;delete d.createInterceptor;window.detachEvent("onunload",a)}window.attachEvent("onunload",a)}})();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Ext JS Library 3.
|
|
3
|
-
* Copyright(c) 2006-2010
|
|
4
|
-
* licensing@
|
|
5
|
-
* http://www.
|
|
2
|
+
* Ext JS Library 3.3.1
|
|
3
|
+
* Copyright(c) 2006-2010 Sencha Inc.
|
|
4
|
+
* licensing@sencha.com
|
|
5
|
+
* http://www.sencha.com/license
|
|
6
6
|
*/
|
|
7
7
|
// for old browsers
|
|
8
8
|
window.undefined = window.undefined;
|
|
@@ -18,11 +18,11 @@ Ext = {
|
|
|
18
18
|
* The version of the framework
|
|
19
19
|
* @type String
|
|
20
20
|
*/
|
|
21
|
-
version : '3.
|
|
21
|
+
version : '3.3.1',
|
|
22
22
|
versionDetail : {
|
|
23
|
-
major: 3,
|
|
24
|
-
minor:
|
|
25
|
-
patch: 1
|
|
23
|
+
major : 3,
|
|
24
|
+
minor : 3,
|
|
25
|
+
patch : 1
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
|
|
@@ -55,6 +55,7 @@ Ext.apply = function(o, c, defaults){
|
|
|
55
55
|
return r.test(ua);
|
|
56
56
|
},
|
|
57
57
|
DOC = document,
|
|
58
|
+
docMode = DOC.documentMode,
|
|
58
59
|
isStrict = DOC.compatMode == "CSS1Compat",
|
|
59
60
|
isOpera = check(/opera/),
|
|
60
61
|
isChrome = check(/\bchrome\b/),
|
|
@@ -64,8 +65,8 @@ Ext.apply = function(o, c, defaults){
|
|
|
64
65
|
isSafari3 = isSafari && check(/version\/3/),
|
|
65
66
|
isSafari4 = isSafari && check(/version\/4/),
|
|
66
67
|
isIE = !isOpera && check(/msie/),
|
|
67
|
-
isIE7 = isIE && check(/msie 7/),
|
|
68
|
-
isIE8 = isIE && check(/msie 8/),
|
|
68
|
+
isIE7 = isIE && (check(/msie 7/) || docMode == 7),
|
|
69
|
+
isIE8 = isIE && (check(/msie 8/) && docMode != 7),
|
|
69
70
|
isIE6 = isIE && !isIE7 && !isIE8,
|
|
70
71
|
isGecko = !isWebKit && check(/gecko/),
|
|
71
72
|
isGecko2 = isGecko && check(/rv:1\.8/),
|
|
@@ -113,6 +114,14 @@ Ext.apply = function(o, c, defaults){
|
|
|
113
114
|
* @property enableFx
|
|
114
115
|
*/
|
|
115
116
|
|
|
117
|
+
/**
|
|
118
|
+
* HIGHLY EXPERIMENTAL
|
|
119
|
+
* True to force css based border-box model override and turning off javascript based adjustments. This is a
|
|
120
|
+
* runtime configuration and must be set before onReady.
|
|
121
|
+
* @type Boolean
|
|
122
|
+
*/
|
|
123
|
+
enableForcedBoxModel : false,
|
|
124
|
+
|
|
116
125
|
/**
|
|
117
126
|
* True to automatically uncache orphaned Ext.Elements periodically (defaults to true)
|
|
118
127
|
* @type Boolean
|
|
@@ -398,7 +407,7 @@ Ext.urlDecode("foo=1&bar=2&bar=3&bar=4", false); // returns {foo: "1", bar: ["2"
|
|
|
398
407
|
} :
|
|
399
408
|
function(a, i, j){
|
|
400
409
|
return Array.prototype.slice.call(a, i || 0, j || a.length);
|
|
401
|
-
}
|
|
410
|
+
};
|
|
402
411
|
}(),
|
|
403
412
|
|
|
404
413
|
isIterable : function(v){
|
|
@@ -545,6 +554,22 @@ function(el){
|
|
|
545
554
|
getBody : function(){
|
|
546
555
|
return Ext.get(DOC.body || DOC.documentElement);
|
|
547
556
|
},
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Returns the current document body as an {@link Ext.Element}.
|
|
560
|
+
* @return Ext.Element The document body
|
|
561
|
+
*/
|
|
562
|
+
getHead : function() {
|
|
563
|
+
var head;
|
|
564
|
+
|
|
565
|
+
return function() {
|
|
566
|
+
if (head == undefined) {
|
|
567
|
+
head = Ext.get(DOC.getElementsByTagName("head")[0]);
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
return head;
|
|
571
|
+
};
|
|
572
|
+
}(),
|
|
548
573
|
|
|
549
574
|
/**
|
|
550
575
|
* Removes a DOM node from the document.
|
|
@@ -566,7 +591,7 @@ function(el){
|
|
|
566
591
|
d.innerHTML = '';
|
|
567
592
|
delete Ext.elCache[n.id];
|
|
568
593
|
}
|
|
569
|
-
}
|
|
594
|
+
};
|
|
570
595
|
}() : function(n){
|
|
571
596
|
if(n && n.parentNode && n.tagName != 'BODY'){
|
|
572
597
|
(Ext.enableNestedListenerRemoval) ? Ext.EventManager.purgeElement(n, true) : Ext.EventManager.removeAll(n);
|
|
@@ -796,7 +821,7 @@ Company.data.CustomStore = function(config) { ... }
|
|
|
796
821
|
Ext.ns = Ext.namespace;
|
|
797
822
|
})();
|
|
798
823
|
|
|
799
|
-
Ext.ns(
|
|
824
|
+
Ext.ns('Ext.util', 'Ext.lib', 'Ext.data', 'Ext.supports');
|
|
800
825
|
|
|
801
826
|
Ext.elCache = {};
|
|
802
827
|
|
|
@@ -1024,688 +1049,6 @@ Ext.applyIf(Array.prototype, {
|
|
|
1024
1049
|
return this;
|
|
1025
1050
|
}
|
|
1026
1051
|
});
|
|
1027
|
-
/**
|
|
1028
|
-
* @class Ext
|
|
1029
|
-
*/
|
|
1030
|
-
|
|
1031
|
-
Ext.ns("Ext.grid", "Ext.list", "Ext.dd", "Ext.tree", "Ext.form", "Ext.menu",
|
|
1032
|
-
"Ext.state", "Ext.layout", "Ext.app", "Ext.ux", "Ext.chart", "Ext.direct");
|
|
1033
|
-
/**
|
|
1034
|
-
* Namespace alloted for extensions to the framework.
|
|
1035
|
-
* @property ux
|
|
1036
|
-
* @type Object
|
|
1037
|
-
*/
|
|
1038
|
-
|
|
1039
|
-
Ext.apply(Ext, function(){
|
|
1040
|
-
var E = Ext,
|
|
1041
|
-
idSeed = 0,
|
|
1042
|
-
scrollWidth = null;
|
|
1043
|
-
|
|
1044
|
-
return {
|
|
1045
|
-
/**
|
|
1046
|
-
* A reusable empty function
|
|
1047
|
-
* @property
|
|
1048
|
-
* @type Function
|
|
1049
|
-
*/
|
|
1050
|
-
emptyFn : function(){},
|
|
1051
|
-
|
|
1052
|
-
/**
|
|
1053
|
-
* URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images.
|
|
1054
|
-
* In older versions of IE, this defaults to "http://extjs.com/s.gif" and you should change this to a URL on your server.
|
|
1055
|
-
* For other browsers it uses an inline data URL.
|
|
1056
|
-
* @type String
|
|
1057
|
-
*/
|
|
1058
|
-
BLANK_IMAGE_URL : Ext.isIE6 || Ext.isIE7 || Ext.isAir ?
|
|
1059
|
-
'http:/' + '/www.extjs.com/s.gif' :
|
|
1060
|
-
'data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==',
|
|
1061
|
-
|
|
1062
|
-
extendX : function(supr, fn){
|
|
1063
|
-
return Ext.extend(supr, fn(supr.prototype));
|
|
1064
|
-
},
|
|
1065
|
-
|
|
1066
|
-
/**
|
|
1067
|
-
* Returns the current HTML document object as an {@link Ext.Element}.
|
|
1068
|
-
* @return Ext.Element The document
|
|
1069
|
-
*/
|
|
1070
|
-
getDoc : function(){
|
|
1071
|
-
return Ext.get(document);
|
|
1072
|
-
},
|
|
1073
|
-
|
|
1074
|
-
/**
|
|
1075
|
-
* Utility method for validating that a value is numeric, returning the specified default value if it is not.
|
|
1076
|
-
* @param {Mixed} value Should be a number, but any type will be handled appropriately
|
|
1077
|
-
* @param {Number} defaultValue The value to return if the original value is non-numeric
|
|
1078
|
-
* @return {Number} Value, if numeric, else defaultValue
|
|
1079
|
-
*/
|
|
1080
|
-
num : function(v, defaultValue){
|
|
1081
|
-
v = Number(Ext.isEmpty(v) || Ext.isArray(v) || typeof v == 'boolean' || (typeof v == 'string' && v.trim().length == 0) ? NaN : v);
|
|
1082
|
-
return isNaN(v) ? defaultValue : v;
|
|
1083
|
-
},
|
|
1084
|
-
|
|
1085
|
-
/**
|
|
1086
|
-
* <p>Utility method for returning a default value if the passed value is empty.</p>
|
|
1087
|
-
* <p>The value is deemed to be empty if it is<div class="mdetail-params"><ul>
|
|
1088
|
-
* <li>null</li>
|
|
1089
|
-
* <li>undefined</li>
|
|
1090
|
-
* <li>an empty array</li>
|
|
1091
|
-
* <li>a zero length string (Unless the <tt>allowBlank</tt> parameter is <tt>true</tt>)</li>
|
|
1092
|
-
* </ul></div>
|
|
1093
|
-
* @param {Mixed} value The value to test
|
|
1094
|
-
* @param {Mixed} defaultValue The value to return if the original value is empty
|
|
1095
|
-
* @param {Boolean} allowBlank (optional) true to allow zero length strings to qualify as non-empty (defaults to false)
|
|
1096
|
-
* @return {Mixed} value, if non-empty, else defaultValue
|
|
1097
|
-
*/
|
|
1098
|
-
value : function(v, defaultValue, allowBlank){
|
|
1099
|
-
return Ext.isEmpty(v, allowBlank) ? defaultValue : v;
|
|
1100
|
-
},
|
|
1101
|
-
|
|
1102
|
-
/**
|
|
1103
|
-
* Escapes the passed string for use in a regular expression
|
|
1104
|
-
* @param {String} str
|
|
1105
|
-
* @return {String}
|
|
1106
|
-
*/
|
|
1107
|
-
escapeRe : function(s) {
|
|
1108
|
-
return s.replace(/([-.*+?^${}()|[\]\/\\])/g, "\\$1");
|
|
1109
|
-
},
|
|
1110
|
-
|
|
1111
|
-
sequence : function(o, name, fn, scope){
|
|
1112
|
-
o[name] = o[name].createSequence(fn, scope);
|
|
1113
|
-
},
|
|
1114
|
-
|
|
1115
|
-
/**
|
|
1116
|
-
* Applies event listeners to elements by selectors when the document is ready.
|
|
1117
|
-
* The event name is specified with an <tt>@</tt> suffix.
|
|
1118
|
-
* <pre><code>
|
|
1119
|
-
Ext.addBehaviors({
|
|
1120
|
-
// add a listener for click on all anchors in element with id foo
|
|
1121
|
-
'#foo a@click' : function(e, t){
|
|
1122
|
-
// do something
|
|
1123
|
-
},
|
|
1124
|
-
|
|
1125
|
-
// add the same listener to multiple selectors (separated by comma BEFORE the @)
|
|
1126
|
-
'#foo a, #bar span.some-class@mouseover' : function(){
|
|
1127
|
-
// do something
|
|
1128
|
-
}
|
|
1129
|
-
});
|
|
1130
|
-
* </code></pre>
|
|
1131
|
-
* @param {Object} obj The list of behaviors to apply
|
|
1132
|
-
*/
|
|
1133
|
-
addBehaviors : function(o){
|
|
1134
|
-
if(!Ext.isReady){
|
|
1135
|
-
Ext.onReady(function(){
|
|
1136
|
-
Ext.addBehaviors(o);
|
|
1137
|
-
});
|
|
1138
|
-
} else {
|
|
1139
|
-
var cache = {}, // simple cache for applying multiple behaviors to same selector does query multiple times
|
|
1140
|
-
parts,
|
|
1141
|
-
b,
|
|
1142
|
-
s;
|
|
1143
|
-
for (b in o) {
|
|
1144
|
-
if ((parts = b.split('@'))[1]) { // for Object prototype breakers
|
|
1145
|
-
s = parts[0];
|
|
1146
|
-
if(!cache[s]){
|
|
1147
|
-
cache[s] = Ext.select(s);
|
|
1148
|
-
}
|
|
1149
|
-
cache[s].on(parts[1], o[b]);
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
cache = null;
|
|
1153
|
-
}
|
|
1154
|
-
},
|
|
1155
|
-
|
|
1156
|
-
/**
|
|
1157
|
-
* Utility method for getting the width of the browser scrollbar. This can differ depending on
|
|
1158
|
-
* operating system settings, such as the theme or font size.
|
|
1159
|
-
* @param {Boolean} force (optional) true to force a recalculation of the value.
|
|
1160
|
-
* @return {Number} The width of the scrollbar.
|
|
1161
|
-
*/
|
|
1162
|
-
getScrollBarWidth: function(force){
|
|
1163
|
-
if(!Ext.isReady){
|
|
1164
|
-
return 0;
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
if(force === true || scrollWidth === null){
|
|
1168
|
-
// Append our div, do our calculation and then remove it
|
|
1169
|
-
var div = Ext.getBody().createChild('<div class="x-hide-offsets" style="width:100px;height:50px;overflow:hidden;"><div style="height:200px;"></div></div>'),
|
|
1170
|
-
child = div.child('div', true);
|
|
1171
|
-
var w1 = child.offsetWidth;
|
|
1172
|
-
div.setStyle('overflow', (Ext.isWebKit || Ext.isGecko) ? 'auto' : 'scroll');
|
|
1173
|
-
var w2 = child.offsetWidth;
|
|
1174
|
-
div.remove();
|
|
1175
|
-
// Need to add 2 to ensure we leave enough space
|
|
1176
|
-
scrollWidth = w1 - w2 + 2;
|
|
1177
|
-
}
|
|
1178
|
-
return scrollWidth;
|
|
1179
|
-
},
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
// deprecated
|
|
1183
|
-
combine : function(){
|
|
1184
|
-
var as = arguments, l = as.length, r = [];
|
|
1185
|
-
for(var i = 0; i < l; i++){
|
|
1186
|
-
var a = as[i];
|
|
1187
|
-
if(Ext.isArray(a)){
|
|
1188
|
-
r = r.concat(a);
|
|
1189
|
-
}else if(a.length !== undefined && !a.substr){
|
|
1190
|
-
r = r.concat(Array.prototype.slice.call(a, 0));
|
|
1191
|
-
}else{
|
|
1192
|
-
r.push(a);
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
return r;
|
|
1196
|
-
},
|
|
1197
|
-
|
|
1198
|
-
/**
|
|
1199
|
-
* Copies a set of named properties fom the source object to the destination object.
|
|
1200
|
-
* <p>example:<pre><code>
|
|
1201
|
-
ImageComponent = Ext.extend(Ext.BoxComponent, {
|
|
1202
|
-
initComponent: function() {
|
|
1203
|
-
this.autoEl = { tag: 'img' };
|
|
1204
|
-
MyComponent.superclass.initComponent.apply(this, arguments);
|
|
1205
|
-
this.initialBox = Ext.copyTo({}, this.initialConfig, 'x,y,width,height');
|
|
1206
|
-
}
|
|
1207
|
-
});
|
|
1208
|
-
* </code></pre>
|
|
1209
|
-
* @param {Object} dest The destination object.
|
|
1210
|
-
* @param {Object} source The source object.
|
|
1211
|
-
* @param {Array/String} names Either an Array of property names, or a comma-delimited list
|
|
1212
|
-
* of property names to copy.
|
|
1213
|
-
* @return {Object} The modified object.
|
|
1214
|
-
*/
|
|
1215
|
-
copyTo : function(dest, source, names){
|
|
1216
|
-
if(typeof names == 'string'){
|
|
1217
|
-
names = names.split(/[,;\s]/);
|
|
1218
|
-
}
|
|
1219
|
-
Ext.each(names, function(name){
|
|
1220
|
-
if(source.hasOwnProperty(name)){
|
|
1221
|
-
dest[name] = source[name];
|
|
1222
|
-
}
|
|
1223
|
-
}, this);
|
|
1224
|
-
return dest;
|
|
1225
|
-
},
|
|
1226
|
-
|
|
1227
|
-
/**
|
|
1228
|
-
* Attempts to destroy any objects passed to it by removing all event listeners, removing them from the
|
|
1229
|
-
* DOM (if applicable) and calling their destroy functions (if available). This method is primarily
|
|
1230
|
-
* intended for arguments of type {@link Ext.Element} and {@link Ext.Component}, but any subclass of
|
|
1231
|
-
* {@link Ext.util.Observable} can be passed in. Any number of elements and/or components can be
|
|
1232
|
-
* passed into this function in a single call as separate arguments.
|
|
1233
|
-
* @param {Mixed} arg1 An {@link Ext.Element}, {@link Ext.Component}, or an Array of either of these to destroy
|
|
1234
|
-
* @param {Mixed} arg2 (optional)
|
|
1235
|
-
* @param {Mixed} etc... (optional)
|
|
1236
|
-
*/
|
|
1237
|
-
destroy : function(){
|
|
1238
|
-
Ext.each(arguments, function(arg){
|
|
1239
|
-
if(arg){
|
|
1240
|
-
if(Ext.isArray(arg)){
|
|
1241
|
-
this.destroy.apply(this, arg);
|
|
1242
|
-
}else if(typeof arg.destroy == 'function'){
|
|
1243
|
-
arg.destroy();
|
|
1244
|
-
}else if(arg.dom){
|
|
1245
|
-
arg.remove();
|
|
1246
|
-
}
|
|
1247
|
-
}
|
|
1248
|
-
}, this);
|
|
1249
|
-
},
|
|
1250
|
-
|
|
1251
|
-
/**
|
|
1252
|
-
* Attempts to destroy and then remove a set of named properties of the passed object.
|
|
1253
|
-
* @param {Object} o The object (most likely a Component) who's properties you wish to destroy.
|
|
1254
|
-
* @param {Mixed} arg1 The name of the property to destroy and remove from the object.
|
|
1255
|
-
* @param {Mixed} etc... More property names to destroy and remove.
|
|
1256
|
-
*/
|
|
1257
|
-
destroyMembers : function(o, arg1, arg2, etc){
|
|
1258
|
-
for(var i = 1, a = arguments, len = a.length; i < len; i++) {
|
|
1259
|
-
Ext.destroy(o[a[i]]);
|
|
1260
|
-
delete o[a[i]];
|
|
1261
|
-
}
|
|
1262
|
-
},
|
|
1263
|
-
|
|
1264
|
-
/**
|
|
1265
|
-
* Creates a copy of the passed Array with falsy values removed.
|
|
1266
|
-
* @param {Array/NodeList} arr The Array from which to remove falsy values.
|
|
1267
|
-
* @return {Array} The new, compressed Array.
|
|
1268
|
-
*/
|
|
1269
|
-
clean : function(arr){
|
|
1270
|
-
var ret = [];
|
|
1271
|
-
Ext.each(arr, function(v){
|
|
1272
|
-
if(!!v){
|
|
1273
|
-
ret.push(v);
|
|
1274
|
-
}
|
|
1275
|
-
});
|
|
1276
|
-
return ret;
|
|
1277
|
-
},
|
|
1278
|
-
|
|
1279
|
-
/**
|
|
1280
|
-
* Creates a copy of the passed Array, filtered to contain only unique values.
|
|
1281
|
-
* @param {Array} arr The Array to filter
|
|
1282
|
-
* @return {Array} The new Array containing unique values.
|
|
1283
|
-
*/
|
|
1284
|
-
unique : function(arr){
|
|
1285
|
-
var ret = [],
|
|
1286
|
-
collect = {};
|
|
1287
|
-
|
|
1288
|
-
Ext.each(arr, function(v) {
|
|
1289
|
-
if(!collect[v]){
|
|
1290
|
-
ret.push(v);
|
|
1291
|
-
}
|
|
1292
|
-
collect[v] = true;
|
|
1293
|
-
});
|
|
1294
|
-
return ret;
|
|
1295
|
-
},
|
|
1296
|
-
|
|
1297
|
-
/**
|
|
1298
|
-
* Recursively flattens into 1-d Array. Injects Arrays inline.
|
|
1299
|
-
* @param {Array} arr The array to flatten
|
|
1300
|
-
* @return {Array} The new, flattened array.
|
|
1301
|
-
*/
|
|
1302
|
-
flatten : function(arr){
|
|
1303
|
-
var worker = [];
|
|
1304
|
-
function rFlatten(a) {
|
|
1305
|
-
Ext.each(a, function(v) {
|
|
1306
|
-
if(Ext.isArray(v)){
|
|
1307
|
-
rFlatten(v);
|
|
1308
|
-
}else{
|
|
1309
|
-
worker.push(v);
|
|
1310
|
-
}
|
|
1311
|
-
});
|
|
1312
|
-
return worker;
|
|
1313
|
-
}
|
|
1314
|
-
return rFlatten(arr);
|
|
1315
|
-
},
|
|
1316
|
-
|
|
1317
|
-
/**
|
|
1318
|
-
* Returns the minimum value in the Array.
|
|
1319
|
-
* @param {Array|NodeList} arr The Array from which to select the minimum value.
|
|
1320
|
-
* @param {Function} comp (optional) a function to perform the comparision which determines minimization.
|
|
1321
|
-
* If omitted the "<" operator will be used. Note: gt = 1; eq = 0; lt = -1
|
|
1322
|
-
* @return {Object} The minimum value in the Array.
|
|
1323
|
-
*/
|
|
1324
|
-
min : function(arr, comp){
|
|
1325
|
-
var ret = arr[0];
|
|
1326
|
-
comp = comp || function(a,b){ return a < b ? -1 : 1; };
|
|
1327
|
-
Ext.each(arr, function(v) {
|
|
1328
|
-
ret = comp(ret, v) == -1 ? ret : v;
|
|
1329
|
-
});
|
|
1330
|
-
return ret;
|
|
1331
|
-
},
|
|
1332
|
-
|
|
1333
|
-
/**
|
|
1334
|
-
* Returns the maximum value in the Array
|
|
1335
|
-
* @param {Array|NodeList} arr The Array from which to select the maximum value.
|
|
1336
|
-
* @param {Function} comp (optional) a function to perform the comparision which determines maximization.
|
|
1337
|
-
* If omitted the ">" operator will be used. Note: gt = 1; eq = 0; lt = -1
|
|
1338
|
-
* @return {Object} The maximum value in the Array.
|
|
1339
|
-
*/
|
|
1340
|
-
max : function(arr, comp){
|
|
1341
|
-
var ret = arr[0];
|
|
1342
|
-
comp = comp || function(a,b){ return a > b ? 1 : -1; };
|
|
1343
|
-
Ext.each(arr, function(v) {
|
|
1344
|
-
ret = comp(ret, v) == 1 ? ret : v;
|
|
1345
|
-
});
|
|
1346
|
-
return ret;
|
|
1347
|
-
},
|
|
1348
|
-
|
|
1349
|
-
/**
|
|
1350
|
-
* Calculates the mean of the Array
|
|
1351
|
-
* @param {Array} arr The Array to calculate the mean value of.
|
|
1352
|
-
* @return {Number} The mean.
|
|
1353
|
-
*/
|
|
1354
|
-
mean : function(arr){
|
|
1355
|
-
return arr.length > 0 ? Ext.sum(arr) / arr.length : undefined;
|
|
1356
|
-
},
|
|
1357
|
-
|
|
1358
|
-
/**
|
|
1359
|
-
* Calculates the sum of the Array
|
|
1360
|
-
* @param {Array} arr The Array to calculate the sum value of.
|
|
1361
|
-
* @return {Number} The sum.
|
|
1362
|
-
*/
|
|
1363
|
-
sum : function(arr){
|
|
1364
|
-
var ret = 0;
|
|
1365
|
-
Ext.each(arr, function(v) {
|
|
1366
|
-
ret += v;
|
|
1367
|
-
});
|
|
1368
|
-
return ret;
|
|
1369
|
-
},
|
|
1370
|
-
|
|
1371
|
-
/**
|
|
1372
|
-
* Partitions the set into two sets: a true set and a false set.
|
|
1373
|
-
* Example:
|
|
1374
|
-
* Example2:
|
|
1375
|
-
* <pre><code>
|
|
1376
|
-
// Example 1:
|
|
1377
|
-
Ext.partition([true, false, true, true, false]); // [[true, true, true], [false, false]]
|
|
1378
|
-
|
|
1379
|
-
// Example 2:
|
|
1380
|
-
Ext.partition(
|
|
1381
|
-
Ext.query("p"),
|
|
1382
|
-
function(val){
|
|
1383
|
-
return val.className == "class1"
|
|
1384
|
-
}
|
|
1385
|
-
);
|
|
1386
|
-
// true are those paragraph elements with a className of "class1",
|
|
1387
|
-
// false set are those that do not have that className.
|
|
1388
|
-
* </code></pre>
|
|
1389
|
-
* @param {Array|NodeList} arr The array to partition
|
|
1390
|
-
* @param {Function} truth (optional) a function to determine truth. If this is omitted the element
|
|
1391
|
-
* itself must be able to be evaluated for its truthfulness.
|
|
1392
|
-
* @return {Array} [true<Array>,false<Array>]
|
|
1393
|
-
*/
|
|
1394
|
-
partition : function(arr, truth){
|
|
1395
|
-
var ret = [[],[]];
|
|
1396
|
-
Ext.each(arr, function(v, i, a) {
|
|
1397
|
-
ret[ (truth && truth(v, i, a)) || (!truth && v) ? 0 : 1].push(v);
|
|
1398
|
-
});
|
|
1399
|
-
return ret;
|
|
1400
|
-
},
|
|
1401
|
-
|
|
1402
|
-
/**
|
|
1403
|
-
* Invokes a method on each item in an Array.
|
|
1404
|
-
* <pre><code>
|
|
1405
|
-
// Example:
|
|
1406
|
-
Ext.invoke(Ext.query("p"), "getAttribute", "id");
|
|
1407
|
-
// [el1.getAttribute("id"), el2.getAttribute("id"), ..., elN.getAttribute("id")]
|
|
1408
|
-
* </code></pre>
|
|
1409
|
-
* @param {Array|NodeList} arr The Array of items to invoke the method on.
|
|
1410
|
-
* @param {String} methodName The method name to invoke.
|
|
1411
|
-
* @param {...*} args Arguments to send into the method invocation.
|
|
1412
|
-
* @return {Array} The results of invoking the method on each item in the array.
|
|
1413
|
-
*/
|
|
1414
|
-
invoke : function(arr, methodName){
|
|
1415
|
-
var ret = [],
|
|
1416
|
-
args = Array.prototype.slice.call(arguments, 2);
|
|
1417
|
-
Ext.each(arr, function(v,i) {
|
|
1418
|
-
if (v && typeof v[methodName] == 'function') {
|
|
1419
|
-
ret.push(v[methodName].apply(v, args));
|
|
1420
|
-
} else {
|
|
1421
|
-
ret.push(undefined);
|
|
1422
|
-
}
|
|
1423
|
-
});
|
|
1424
|
-
return ret;
|
|
1425
|
-
},
|
|
1426
|
-
|
|
1427
|
-
/**
|
|
1428
|
-
* Plucks the value of a property from each item in the Array
|
|
1429
|
-
* <pre><code>
|
|
1430
|
-
// Example:
|
|
1431
|
-
Ext.pluck(Ext.query("p"), "className"); // [el1.className, el2.className, ..., elN.className]
|
|
1432
|
-
* </code></pre>
|
|
1433
|
-
* @param {Array|NodeList} arr The Array of items to pluck the value from.
|
|
1434
|
-
* @param {String} prop The property name to pluck from each element.
|
|
1435
|
-
* @return {Array} The value from each item in the Array.
|
|
1436
|
-
*/
|
|
1437
|
-
pluck : function(arr, prop){
|
|
1438
|
-
var ret = [];
|
|
1439
|
-
Ext.each(arr, function(v) {
|
|
1440
|
-
ret.push( v[prop] );
|
|
1441
|
-
});
|
|
1442
|
-
return ret;
|
|
1443
|
-
},
|
|
1444
|
-
|
|
1445
|
-
/**
|
|
1446
|
-
* <p>Zips N sets together.</p>
|
|
1447
|
-
* <pre><code>
|
|
1448
|
-
// Example 1:
|
|
1449
|
-
Ext.zip([1,2,3],[4,5,6]); // [[1,4],[2,5],[3,6]]
|
|
1450
|
-
// Example 2:
|
|
1451
|
-
Ext.zip(
|
|
1452
|
-
[ "+", "-", "+"],
|
|
1453
|
-
[ 12, 10, 22],
|
|
1454
|
-
[ 43, 15, 96],
|
|
1455
|
-
function(a, b, c){
|
|
1456
|
-
return "$" + a + "" + b + "." + c
|
|
1457
|
-
}
|
|
1458
|
-
); // ["$+12.43", "$-10.15", "$+22.96"]
|
|
1459
|
-
* </code></pre>
|
|
1460
|
-
* @param {Arrays|NodeLists} arr This argument may be repeated. Array(s) to contribute values.
|
|
1461
|
-
* @param {Function} zipper (optional) The last item in the argument list. This will drive how the items are zipped together.
|
|
1462
|
-
* @return {Array} The zipped set.
|
|
1463
|
-
*/
|
|
1464
|
-
zip : function(){
|
|
1465
|
-
var parts = Ext.partition(arguments, function( val ){ return typeof val != 'function'; }),
|
|
1466
|
-
arrs = parts[0],
|
|
1467
|
-
fn = parts[1][0],
|
|
1468
|
-
len = Ext.max(Ext.pluck(arrs, "length")),
|
|
1469
|
-
ret = [];
|
|
1470
|
-
|
|
1471
|
-
for (var i = 0; i < len; i++) {
|
|
1472
|
-
ret[i] = [];
|
|
1473
|
-
if(fn){
|
|
1474
|
-
ret[i] = fn.apply(fn, Ext.pluck(arrs, i));
|
|
1475
|
-
}else{
|
|
1476
|
-
for (var j = 0, aLen = arrs.length; j < aLen; j++){
|
|
1477
|
-
ret[i].push( arrs[j][i] );
|
|
1478
|
-
}
|
|
1479
|
-
}
|
|
1480
|
-
}
|
|
1481
|
-
return ret;
|
|
1482
|
-
},
|
|
1483
|
-
|
|
1484
|
-
/**
|
|
1485
|
-
* This is shorthand reference to {@link Ext.ComponentMgr#get}.
|
|
1486
|
-
* Looks up an existing {@link Ext.Component Component} by {@link Ext.Component#id id}
|
|
1487
|
-
* @param {String} id The component {@link Ext.Component#id id}
|
|
1488
|
-
* @return Ext.Component The Component, <tt>undefined</tt> if not found, or <tt>null</tt> if a
|
|
1489
|
-
* Class was found.
|
|
1490
|
-
*/
|
|
1491
|
-
getCmp : function(id){
|
|
1492
|
-
return Ext.ComponentMgr.get(id);
|
|
1493
|
-
},
|
|
1494
|
-
|
|
1495
|
-
/**
|
|
1496
|
-
* By default, Ext intelligently decides whether floating elements should be shimmed. If you are using flash,
|
|
1497
|
-
* you may want to set this to true.
|
|
1498
|
-
* @type Boolean
|
|
1499
|
-
*/
|
|
1500
|
-
useShims: E.isIE6 || (E.isMac && E.isGecko2),
|
|
1501
|
-
|
|
1502
|
-
// inpired by a similar function in mootools library
|
|
1503
|
-
/**
|
|
1504
|
-
* Returns the type of object that is passed in. If the object passed in is null or undefined it
|
|
1505
|
-
* return false otherwise it returns one of the following values:<div class="mdetail-params"><ul>
|
|
1506
|
-
* <li><b>string</b>: If the object passed is a string</li>
|
|
1507
|
-
* <li><b>number</b>: If the object passed is a number</li>
|
|
1508
|
-
* <li><b>boolean</b>: If the object passed is a boolean value</li>
|
|
1509
|
-
* <li><b>date</b>: If the object passed is a Date object</li>
|
|
1510
|
-
* <li><b>function</b>: If the object passed is a function reference</li>
|
|
1511
|
-
* <li><b>object</b>: If the object passed is an object</li>
|
|
1512
|
-
* <li><b>array</b>: If the object passed is an array</li>
|
|
1513
|
-
* <li><b>regexp</b>: If the object passed is a regular expression</li>
|
|
1514
|
-
* <li><b>element</b>: If the object passed is a DOM Element</li>
|
|
1515
|
-
* <li><b>nodelist</b>: If the object passed is a DOM NodeList</li>
|
|
1516
|
-
* <li><b>textnode</b>: If the object passed is a DOM text node and contains something other than whitespace</li>
|
|
1517
|
-
* <li><b>whitespace</b>: If the object passed is a DOM text node and contains only whitespace</li>
|
|
1518
|
-
* </ul></div>
|
|
1519
|
-
* @param {Mixed} object
|
|
1520
|
-
* @return {String}
|
|
1521
|
-
*/
|
|
1522
|
-
type : function(o){
|
|
1523
|
-
if(o === undefined || o === null){
|
|
1524
|
-
return false;
|
|
1525
|
-
}
|
|
1526
|
-
if(o.htmlElement){
|
|
1527
|
-
return 'element';
|
|
1528
|
-
}
|
|
1529
|
-
var t = typeof o;
|
|
1530
|
-
if(t == 'object' && o.nodeName) {
|
|
1531
|
-
switch(o.nodeType) {
|
|
1532
|
-
case 1: return 'element';
|
|
1533
|
-
case 3: return (/\S/).test(o.nodeValue) ? 'textnode' : 'whitespace';
|
|
1534
|
-
}
|
|
1535
|
-
}
|
|
1536
|
-
if(t == 'object' || t == 'function') {
|
|
1537
|
-
switch(o.constructor) {
|
|
1538
|
-
case Array: return 'array';
|
|
1539
|
-
case RegExp: return 'regexp';
|
|
1540
|
-
case Date: return 'date';
|
|
1541
|
-
}
|
|
1542
|
-
if(typeof o.length == 'number' && typeof o.item == 'function') {
|
|
1543
|
-
return 'nodelist';
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
return t;
|
|
1547
|
-
},
|
|
1548
|
-
|
|
1549
|
-
intercept : function(o, name, fn, scope){
|
|
1550
|
-
o[name] = o[name].createInterceptor(fn, scope);
|
|
1551
|
-
},
|
|
1552
|
-
|
|
1553
|
-
// internal
|
|
1554
|
-
callback : function(cb, scope, args, delay){
|
|
1555
|
-
if(typeof cb == 'function'){
|
|
1556
|
-
if(delay){
|
|
1557
|
-
cb.defer(delay, scope, args || []);
|
|
1558
|
-
}else{
|
|
1559
|
-
cb.apply(scope, args || []);
|
|
1560
|
-
}
|
|
1561
|
-
}
|
|
1562
|
-
}
|
|
1563
|
-
};
|
|
1564
|
-
}());
|
|
1565
|
-
|
|
1566
|
-
/**
|
|
1567
|
-
* @class Function
|
|
1568
|
-
* These functions are available on every Function object (any JavaScript function).
|
|
1569
|
-
*/
|
|
1570
|
-
Ext.apply(Function.prototype, {
|
|
1571
|
-
/**
|
|
1572
|
-
* Create a combined function call sequence of the original function + the passed function.
|
|
1573
|
-
* The resulting function returns the results of the original function.
|
|
1574
|
-
* The passed fcn is called with the parameters of the original function. Example usage:
|
|
1575
|
-
* <pre><code>
|
|
1576
|
-
var sayHi = function(name){
|
|
1577
|
-
alert('Hi, ' + name);
|
|
1578
|
-
}
|
|
1579
|
-
|
|
1580
|
-
sayHi('Fred'); // alerts "Hi, Fred"
|
|
1581
|
-
|
|
1582
|
-
var sayGoodbye = sayHi.createSequence(function(name){
|
|
1583
|
-
alert('Bye, ' + name);
|
|
1584
|
-
});
|
|
1585
|
-
|
|
1586
|
-
sayGoodbye('Fred'); // both alerts show
|
|
1587
|
-
</code></pre>
|
|
1588
|
-
* @param {Function} fcn The function to sequence
|
|
1589
|
-
* @param {Object} scope (optional) The scope (<code><b>this</b></code> reference) in which the passed function is executed.
|
|
1590
|
-
* <b>If omitted, defaults to the scope in which the original function is called or the browser window.</b>
|
|
1591
|
-
* @return {Function} The new function
|
|
1592
|
-
*/
|
|
1593
|
-
createSequence : function(fcn, scope){
|
|
1594
|
-
var method = this;
|
|
1595
|
-
return (typeof fcn != 'function') ?
|
|
1596
|
-
this :
|
|
1597
|
-
function(){
|
|
1598
|
-
var retval = method.apply(this || window, arguments);
|
|
1599
|
-
fcn.apply(scope || this || window, arguments);
|
|
1600
|
-
return retval;
|
|
1601
|
-
};
|
|
1602
|
-
}
|
|
1603
|
-
});
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
/**
|
|
1607
|
-
* @class String
|
|
1608
|
-
* These functions are available as static methods on the JavaScript String object.
|
|
1609
|
-
*/
|
|
1610
|
-
Ext.applyIf(String, {
|
|
1611
|
-
|
|
1612
|
-
/**
|
|
1613
|
-
* Escapes the passed string for ' and \
|
|
1614
|
-
* @param {String} string The string to escape
|
|
1615
|
-
* @return {String} The escaped string
|
|
1616
|
-
* @static
|
|
1617
|
-
*/
|
|
1618
|
-
escape : function(string) {
|
|
1619
|
-
return string.replace(/('|\\)/g, "\\$1");
|
|
1620
|
-
},
|
|
1621
|
-
|
|
1622
|
-
/**
|
|
1623
|
-
* Pads the left side of a string with a specified character. This is especially useful
|
|
1624
|
-
* for normalizing number and date strings. Example usage:
|
|
1625
|
-
* <pre><code>
|
|
1626
|
-
var s = String.leftPad('123', 5, '0');
|
|
1627
|
-
// s now contains the string: '00123'
|
|
1628
|
-
* </code></pre>
|
|
1629
|
-
* @param {String} string The original string
|
|
1630
|
-
* @param {Number} size The total length of the output string
|
|
1631
|
-
* @param {String} char (optional) The character with which to pad the original string (defaults to empty string " ")
|
|
1632
|
-
* @return {String} The padded string
|
|
1633
|
-
* @static
|
|
1634
|
-
*/
|
|
1635
|
-
leftPad : function (val, size, ch) {
|
|
1636
|
-
var result = String(val);
|
|
1637
|
-
if(!ch) {
|
|
1638
|
-
ch = " ";
|
|
1639
|
-
}
|
|
1640
|
-
while (result.length < size) {
|
|
1641
|
-
result = ch + result;
|
|
1642
|
-
}
|
|
1643
|
-
return result;
|
|
1644
|
-
}
|
|
1645
|
-
});
|
|
1646
|
-
|
|
1647
|
-
/**
|
|
1648
|
-
* Utility function that allows you to easily switch a string between two alternating values. The passed value
|
|
1649
|
-
* is compared to the current string, and if they are equal, the other value that was passed in is returned. If
|
|
1650
|
-
* they are already different, the first value passed in is returned. Note that this method returns the new value
|
|
1651
|
-
* but does not change the current string.
|
|
1652
|
-
* <pre><code>
|
|
1653
|
-
// alternate sort directions
|
|
1654
|
-
sort = sort.toggle('ASC', 'DESC');
|
|
1655
|
-
|
|
1656
|
-
// instead of conditional logic:
|
|
1657
|
-
sort = (sort == 'ASC' ? 'DESC' : 'ASC');
|
|
1658
|
-
</code></pre>
|
|
1659
|
-
* @param {String} value The value to compare to the current string
|
|
1660
|
-
* @param {String} other The new value to use if the string already equals the first value passed in
|
|
1661
|
-
* @return {String} The new value
|
|
1662
|
-
*/
|
|
1663
|
-
String.prototype.toggle = function(value, other){
|
|
1664
|
-
return this == value ? other : value;
|
|
1665
|
-
};
|
|
1666
|
-
|
|
1667
|
-
/**
|
|
1668
|
-
* Trims whitespace from either end of a string, leaving spaces within the string intact. Example:
|
|
1669
|
-
* <pre><code>
|
|
1670
|
-
var s = ' foo bar ';
|
|
1671
|
-
alert('-' + s + '-'); //alerts "- foo bar -"
|
|
1672
|
-
alert('-' + s.trim() + '-'); //alerts "-foo bar-"
|
|
1673
|
-
</code></pre>
|
|
1674
|
-
* @return {String} The trimmed string
|
|
1675
|
-
*/
|
|
1676
|
-
String.prototype.trim = function(){
|
|
1677
|
-
var re = /^\s+|\s+$/g;
|
|
1678
|
-
return function(){ return this.replace(re, ""); };
|
|
1679
|
-
}();
|
|
1680
|
-
|
|
1681
|
-
// here to prevent dependency on Date.js
|
|
1682
|
-
/**
|
|
1683
|
-
Returns the number of milliseconds between this date and date
|
|
1684
|
-
@param {Date} date (optional) Defaults to now
|
|
1685
|
-
@return {Number} The diff in milliseconds
|
|
1686
|
-
@member Date getElapsed
|
|
1687
|
-
*/
|
|
1688
|
-
Date.prototype.getElapsed = function(date) {
|
|
1689
|
-
return Math.abs((date || new Date()).getTime()-this.getTime());
|
|
1690
|
-
};
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
/**
|
|
1694
|
-
* @class Number
|
|
1695
|
-
*/
|
|
1696
|
-
Ext.applyIf(Number.prototype, {
|
|
1697
|
-
/**
|
|
1698
|
-
* Checks whether or not the current number is within a desired range. If the number is already within the
|
|
1699
|
-
* range it is returned, otherwise the min or max value is returned depending on which side of the range is
|
|
1700
|
-
* exceeded. Note that this method returns the constrained value but does not change the current number.
|
|
1701
|
-
* @param {Number} min The minimum number in the range
|
|
1702
|
-
* @param {Number} max The maximum number in the range
|
|
1703
|
-
* @return {Number} The constrained value if outside the range, otherwise the current value
|
|
1704
|
-
*/
|
|
1705
|
-
constrain : function(min, max){
|
|
1706
|
-
return Math.min(Math.max(this, min), max);
|
|
1707
|
-
}
|
|
1708
|
-
});
|
|
1709
1052
|
/**
|
|
1710
1053
|
* @class Ext.util.TaskRunner
|
|
1711
1054
|
* Provides the ability to execute one or more arbitrary tasks in a multithreaded
|
|
@@ -1883,7 +1226,7 @@ Ext.TaskMgr = new Ext.util.TaskRunner();(function(){
|
|
|
1883
1226
|
|
|
1884
1227
|
var libFlyweight,
|
|
1885
1228
|
version = Prototype.Version.split('.'),
|
|
1886
|
-
mouseEnterSupported = (parseInt(version[0]) >= 2) || (parseInt(version[1]) >= 7) || (parseInt(version[2]) >= 1),
|
|
1229
|
+
mouseEnterSupported = (parseInt(version[0], 10) >= 2) || (parseInt(version[1], 10) >= 7) || (parseInt(version[2], 10) >= 1),
|
|
1887
1230
|
mouseCache = {},
|
|
1888
1231
|
elContains = function(parent, child) {
|
|
1889
1232
|
if(parent && parent.firstChild){
|
|
@@ -2216,8 +1559,12 @@ Ext.lib.Ajax = function(){
|
|
|
2216
1559
|
argument: cb.argument,
|
|
2217
1560
|
status: xhr.status,
|
|
2218
1561
|
statusText: xhr.statusText,
|
|
2219
|
-
getResponseHeader : function(header){
|
|
2220
|
-
|
|
1562
|
+
getResponseHeader : function(header){
|
|
1563
|
+
return headerObj[header.toLowerCase()];
|
|
1564
|
+
},
|
|
1565
|
+
getAllResponseHeaders : function(){
|
|
1566
|
+
return headerStr;
|
|
1567
|
+
}
|
|
2221
1568
|
};
|
|
2222
1569
|
};
|
|
2223
1570
|
return {
|