16 lines
175 KiB
JavaScript
16 lines
175 KiB
JavaScript
|
/*
|
||
|
|
||
|
This file is part of Ext JS 4
|
||
|
|
||
|
Copyright (c) 2011 Sencha Inc
|
||
|
|
||
|
Contact: http://www.sencha.com/contact
|
||
|
|
||
|
GNU General Public License Usage
|
||
|
This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||
|
|
||
|
If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
|
||
|
|
||
|
*/
|
||
|
(function(){var e=this,a=Object.prototype,g=a.toString,b=true,d={toString:1},c;if(typeof Ext==="undefined"){e.Ext={}}Ext.global=e;for(c in d){b=null}if(b){b=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]}Ext.enumerables=b;Ext.apply=function(n,m,p){if(p){Ext.apply(n,p)}if(n&&m&&typeof m==="object"){var o,l,h;for(o in m){n[o]=m[o]}if(b){for(l=b.length;l--;){h=b[l];if(m.hasOwnProperty(h)){n[h]=m[h]}}}}return n};Ext.buildSettings=Ext.apply({baseCSSPrefix:"x-",scopeResetCSS:false},Ext.buildSettings||{});Ext.apply(Ext,{emptyFn:function(){},baseCSSPrefix:Ext.buildSettings.baseCSSPrefix,applyIf:function(i,h){var j;if(i){for(j in h){if(i[j]===undefined){i[j]=h[j]}}}return i},iterate:function(h,j,i){if(Ext.isEmpty(h)){return}if(i===undefined){i=h}if(Ext.isIterable(h)){Ext.Array.each.call(Ext.Array,h,j,i)}else{Ext.Object.each.call(Ext.Object,h,j,i)}}});Ext.apply(Ext,{extend:function(){var h=a.constructor,i=function(k){for(var j in k){if(!k.hasOwnProperty(j)){continue}this[j]=k[j]}};return function(j,o,m){if(Ext.isObject(o)){m=o;o=j;j=m.constructor!==h?m.constructor:function(){o.apply(this,arguments)}}var l=function(){},k,n=o.prototype;l.prototype=n;k=j.prototype=new l();k.constructor=j;j.superclass=n;if(n.constructor===h){n.constructor=o}j.override=function(p){Ext.override(j,p)};k.override=i;k.proto=k;j.override(m);j.extend=function(p){return Ext.extend(j,p)};return j}}(),override:function(h,i){if(h.prototype.$className){return h.override(i)}else{Ext.apply(h.prototype,i)}}});Ext.apply(Ext,{valueFrom:function(j,h,i){return Ext.isEmpty(j,i)?h:j},typeOf:function(i){if(i===null){return"null"}var h=typeof i;if(h==="undefined"||h==="string"||h==="number"||h==="boolean"){return h}var j=g.call(i);switch(j){case"[object Array]":return"array";case"[object Date]":return"date";case"[object Boolean]":return"boolean";case"[object Number]":return"number";case"[object RegExp]":return"regexp"}if(h==="function"){return"function"}if(h==="object"){if(i.nodeType!==undefined){if(i.nodeType===3){return(/\S/).test(i.nodeValue)?"textnode":"whitespace"}else{return"element"}}return"object"}},isEmpty:function(h,i){return(h===null)||(h===undefined)||(!i?h==="":false)||(Ext.isArray(h)&&h.length===0)},isArray:("isArray" in Array)?Array.isArray:function(h){return g.call(h)==="[object Array]"},isDate:function(h){return g.call(h)==="[object Date]"},isObject:(g.call(null)==="[object Object]")?function(h){return h!==null&&h!==undefined&&g.call(h)==="[object Object]"&&h.ownerDocument===undefined}:function(h){return g.call(h)==="[object Object]"},isPrimitive:function(i){var h=typeof i;return h==="string"||h==="number"||h==="boolean"},isFunction:(typeof document!=="undefined"&&typeof document.getElementsByTagName("body")==="function")?function(h){return g.call(h)==="[object Function]"}:function(h){return typeof h==="function"},isNumber:function(h){return typeof h==="number"&&isFinite(h)},isNumeric:function(h){return !isNaN(parseFloat(h))&&isFinite(h)},isString:function(h){return typeof h==="string"},isBoolean:function(h){return typeof h==="boolean"},isElement:function(h){return h?h.nodeType===1:false},isTextNode:function(h){return h?h.nodeName==="#text":false},isDefined:function(h){return typeof h!=="undefined"},isIterable:function(h){return(h&&typeof h!=="string")?h.length!==undefined:false}});Ext.apply(Ext,{clone:function(p){if(p===null||p===undefined){return p}if(p.nodeType&&p.cloneNode){return p.cloneNode(true)}var o=g.call(p);if(o==="[object Date]"){return new Date(p.getTime())}var n,l,h,q,m;if(o==="[object Array]"){n=p.length;q=[];while(n--){q[n]=Ext.clone(p[n])}}else{if(o==="[object Object]"&&p.constructor===Object){q={};for(m in p){q[m]=Ext.clone(p[m])}if(b){for(l=b.length;l--;){h=b[l];q[h]=p[h]}}}}return q||p},getUniqueGlobalNamespace:function(){var j=this.uniqueGlobalNamespace;if(j===undefined){var h=0;do{j="ExtBox"+(++h)}while(Ext.global[j]!==undefined);Ext.global[j]=Ext;this.uniqueGlobalNamespace=j}return j},functionFactory:function(){var h=Array.prototype.slice.call(arguments);if(h.length>0){h[
|