3 This file is part of Ext JS 4
5 Copyright (c) 2011 Sencha Inc
7 Contact: http://www.sencha.com/contact
9 GNU General Public License Usage
10 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.
12 If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
18 The Ext namespace (global object) encapsulates all classes, singletons, and utility methods provided by Sencha's libraries.</p>
19 Most user interface Components are at a lower level of nesting in the namespace, but many common utility functions are provided
20 as direct properties of the Ext namespace.
22 Also many frequently used methods from other classes are provided as shortcuts within the Ext namespace.
23 For example {@link Ext#getCmp Ext.getCmp} aliases {@link Ext.ComponentManager#get Ext.ComponentManager.get}.
25 Many applications are initiated with {@link Ext#onReady Ext.onReady} which is called once the DOM is ready.
26 This ensures all scripts have been loaded, preventing dependency issues. For example
28 Ext.onReady(function(){
30 renderTo: document.body,
35 For more information about how to use the Ext classes, see
37 - <a href="http://www.sencha.com/learn/">The Learning Center</a>
38 - <a href="http://www.sencha.com/learn/Ext_FAQ">The FAQ</a>
39 - <a href="http://www.sencha.com/forum/">The forums</a>
45 userAgent: navigator.userAgent.toLowerCase(),
48 BLANK_IMAGE_URL : 'data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==',
49 isStrict: document.compatMode == "CSS1Compat",
50 windowId: 'ext-window',
51 documentId: 'ext-document',
54 * True when the document is fully initialized and ready for action
60 * True to automatically uncache orphaned Ext.core.Elements periodically (defaults to true)
63 enableGarbageCollector: true,
66 * True to automatically purge event listeners during garbageCollection (defaults to true).
69 enableListenerCollection: true,
72 * Generates unique ids. If the element already has an id, it is unchanged
73 * @param {Mixed} el (optional) The element to generate an id for
74 * @param {String} prefix (optional) Id prefix (defaults "ext-gen")
75 * @return {String} The generated Id.
77 id: function(el, prefix) {
80 el = Ext.getDom(el, true) || {};
81 if (el === document) {
82 el.id = me.documentId;
84 else if (el === window) {
89 if (!me.uniqueGlobalNamespace) {
90 me.getUniqueGlobalNamespace();
92 sandboxPrefix = me.uniqueGlobalNamespace + '-';
94 el.id = sandboxPrefix + (prefix || "ext-gen") + (++Ext.idSeed);
100 * Returns the current document body as an {@link Ext.core.Element}.
101 * @return Ext.core.Element The document body
103 getBody: function() {
104 return Ext.get(document.body || false);
108 * Returns the current document head as an {@link Ext.core.Element}.
109 * @return Ext.core.Element The document head
112 getHead: function() {
116 if (head == undefined) {
117 head = Ext.get(document.getElementsByTagName("head")[0]);
125 * Returns the current HTML document object as an {@link Ext.core.Element}.
126 * @return Ext.core.Element The document
129 return Ext.get(document);
133 * This is shorthand reference to {@link Ext.ComponentManager#get}.
134 * Looks up an existing {@link Ext.Component Component} by {@link Ext.Component#id id}
135 * @param {String} id The component {@link Ext.Component#id id}
136 * @return Ext.Component The Component, <tt>undefined</tt> if not found, or <tt>null</tt> if a
139 getCmp: function(id) {
140 return Ext.ComponentManager.get(id);
144 * Returns the current orientation of the mobile device
145 * @return {String} Either 'portrait' or 'landscape'
147 getOrientation: function() {
148 return window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
152 * Attempts to destroy any objects passed to it by removing all event listeners, removing them from the
153 * DOM (if applicable) and calling their destroy functions (if available). This method is primarily
154 * intended for arguments of type {@link Ext.core.Element} and {@link Ext.Component}, but any subclass of
155 * {@link Ext.util.Observable} can be passed in. Any number of elements and/or components can be
156 * passed into this function in a single call as separate arguments.
157 * @param {Mixed} arg1 An {@link Ext.core.Element}, {@link Ext.Component}, or an Array of either of these to destroy
158 * @param {Mixed} arg2 (optional)
159 * @param {Mixed} etc... (optional)
161 destroy: function() {
162 var ln = arguments.length,
165 for (i = 0; i < ln; i++) {
168 if (Ext.isArray(arg)) {
169 this.destroy.apply(this, arg);
171 else if (Ext.isFunction(arg.destroy)) {
182 * Execute a callback function in a particular scope. If no function is passed the call is ignored.
184 * For example, these lines are equivalent:
186 * Ext.callback(myFunc, this, [arg1, arg2]);
187 * Ext.isFunction(myFunc) && myFunc.apply(this, [arg1, arg2]);
189 * @param {Function} callback The callback to execute
190 * @param {Object} scope (optional) The scope to execute in
191 * @param {Array} args (optional) The arguments to pass to the function
192 * @param {Number} delay (optional) Pass a number to delay the call by a number of milliseconds.
194 callback: function(callback, scope, args, delay){
195 if(Ext.isFunction(callback)){
197 scope = scope || window;
199 Ext.defer(callback, delay, scope, args);
201 callback.apply(scope, args);
207 * Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages.
208 * @param {String} value The string to encode
209 * @return {String} The encoded text
211 htmlEncode : function(value) {
212 return Ext.String.htmlEncode(value);
216 * Convert certain characters (&, <, >, and ') from their HTML character equivalents.
217 * @param {String} value The string to decode
218 * @return {String} The decoded text
220 htmlDecode : function(value) {
221 return Ext.String.htmlDecode(value);
225 * Appends content to the query string of a URL, handling logic for whether to place
226 * a question mark or ampersand.
227 * @param {String} url The URL to append to.
228 * @param {String} s The content to append to the URL.
229 * @return (String) The resulting URL
231 urlAppend : function(url, s) {
232 if (!Ext.isEmpty(s)) {
233 return url + (url.indexOf('?') === -1 ? '?' : '&') + s;
240 Ext.ns = Ext.namespace;
243 window.undefined = window.undefined;
247 * Ext core utilities and functions.
251 var check = function(regex){
252 return regex.test(Ext.userAgent);
254 docMode = document.documentMode,
255 isOpera = check(/opera/),
256 isOpera10_5 = isOpera && check(/version\/10\.5/),
257 isChrome = check(/\bchrome\b/),
258 isWebKit = check(/webkit/),
259 isSafari = !isChrome && check(/safari/),
260 isSafari2 = isSafari && check(/applewebkit\/4/), // unique to Safari 2
261 isSafari3 = isSafari && check(/version\/3/),
262 isSafari4 = isSafari && check(/version\/4/),
263 isIE = !isOpera && check(/msie/),
264 isIE7 = isIE && (check(/msie 7/) || docMode == 7),
265 isIE8 = isIE && (check(/msie 8/) && docMode != 7 && docMode != 9 || docMode == 8),
266 isIE9 = isIE && (check(/msie 9/) && docMode != 7 && docMode != 8 || docMode == 9),
267 isIE6 = isIE && check(/msie 6/),
268 isGecko = !isWebKit && check(/gecko/),
269 isGecko3 = isGecko && check(/rv:1\.9/),
270 isGecko4 = isGecko && check(/rv:2\.0/),
271 isFF3_0 = isGecko3 && check(/rv:1\.9\.0/),
272 isFF3_5 = isGecko3 && check(/rv:1\.9\.1/),
273 isFF3_6 = isGecko3 && check(/rv:1\.9\.2/),
274 isWindows = check(/windows|win32/),
275 isMac = check(/macintosh|mac os x/),
276 isLinux = check(/linux/),
277 scrollbarSize = null,
278 webKitVersion = isWebKit && (/webkit\/(\d+\.\d+)/.exec(Ext.userAgent));
280 // remove css image flicker
282 document.execCommand("BackgroundImageCache", false, true);
285 Ext.setVersion('extjs', '4.0.2');
288 * URL to a blank file used by Ext when in secure mode for iframe src and onReady src to prevent
289 * the IE insecure content warning (<tt>'about:blank'</tt>, except for IE in secure mode, which is <tt>'javascript:""'</tt>).
292 SSL_SECURE_URL : Ext.isSecure && isIE ? 'javascript:""' : 'about:blank',
295 * True if the {@link Ext.fx.Anim} Class is available
301 * True to scope the reset CSS to be just applied to Ext components. Note that this wraps root containers
302 * with an additional element. Also remember that when you turn on this option, you have to use ext-all-scoped {
303 * unless you use the bootstrap.js to load your javascript, in which case it will be handled for you.
306 scopeResetCSS : Ext.buildSettings.scopeResetCSS,
309 * EXPERIMENTAL - True to cascade listener removal to child elements when an element is removed.
310 * Currently not optimized for performance.
313 enableNestedListenerRemoval : false,
316 * Indicates whether to use native browser parsing for JSON methods.
317 * This option is ignored if the browser does not support native JSON methods.
318 * <b>Note: Native JSON methods will not work with objects that have functions.
319 * Also, property names must be quoted, otherwise the data will not parse.</b> (Defaults to false)
322 USE_NATIVE_JSON : false,
325 * Return the dom node for the passed String (id), dom node, or Ext.core.Element.
326 * Optional 'strict' flag is needed for IE since it can return 'name' and
327 * 'id' elements by using getElementById.
328 * Here are some examples:
330 // gets dom node based on id
331 var elDom = Ext.getDom('elId');
332 // gets dom node based on the dom node
333 var elDom1 = Ext.getDom(elDom);
335 // If we don't know if we are working with an
336 // Ext.core.Element or a dom node use Ext.getDom
338 var dom = Ext.getDom(el);
339 // do something with the dom node
342 * <b>Note</b>: the dom node to be found actually needs to exist (be rendered, etc)
343 * when this method is called to be successful.
345 * @return HTMLElement
347 getDom : function(el, strict) {
348 if (!el || !document) {
354 if (typeof el == 'string') {
355 var e = document.getElementById(el);
356 // IE returns elements with the 'name' and 'id' attribute.
357 // we do a strict check to return the element with only the id attribute
358 if (e && isIE && strict) {
359 if (el == e.getAttribute('id')) {
373 * Removes a DOM node from the document.
374 * <p>Removes this element from the document, removes all DOM event listeners, and deletes the cache reference.
375 * All DOM event listeners are removed from this element. If {@link Ext#enableNestedListenerRemoval Ext.enableNestedListenerRemoval} is
376 * <code>true</code>, then DOM event listeners are also removed from all child nodes. The body node
377 * will be ignored if passed in.</p>
378 * @param {HTMLElement} node The node to remove
381 removeNode : isIE6 || isIE7 ? function() {
384 if(n && n.tagName != 'BODY'){
385 (Ext.enableNestedListenerRemoval) ? Ext.EventManager.purgeElement(n) : Ext.EventManager.removeAll(n);
386 d = d || document.createElement('div');
389 delete Ext.cache[n.id];
393 if (n && n.parentNode && n.tagName != 'BODY') {
394 (Ext.enableNestedListenerRemoval) ? Ext.EventManager.purgeElement(n) : Ext.EventManager.removeAll(n);
395 n.parentNode.removeChild(n);
396 delete Ext.cache[n.id];
401 * True if the detected browser is Opera.
407 * True if the detected browser is Opera 10.5x.
410 isOpera10_5 : isOpera10_5,
413 * True if the detected browser uses WebKit.
419 * True if the detected browser is Chrome.
425 * True if the detected browser is Safari.
431 * True if the detected browser is Safari 3.x.
434 isSafari3 : isSafari3,
437 * True if the detected browser is Safari 4.x.
440 isSafari4 : isSafari4,
443 * True if the detected browser is Safari 2.x.
446 isSafari2 : isSafari2,
449 * True if the detected browser is Internet Explorer.
455 * True if the detected browser is Internet Explorer 6.x.
461 * True if the detected browser is Internet Explorer 7.x.
467 * True if the detected browser is Internet Explorer 8.x.
473 * True if the detected browser is Internet Explorer 9.x.
479 * True if the detected browser uses the Gecko layout engine (e.g. Mozilla, Firefox).
485 * True if the detected browser uses a Gecko 1.9+ layout engine (e.g. Firefox 3.x).
491 * True if the detected browser uses a Gecko 2.0+ layout engine (e.g. Firefox 4.x).
497 * True if the detected browser uses FireFox 3.0
503 * True if the detected browser uses FireFox 3.5
509 * True if the detected browser uses FireFox 3.6
515 * True if the detected platform is Linux.
521 * True if the detected platform is Windows.
524 isWindows : isWindows,
527 * True if the detected platform is Mac OS.
533 * The current version of WebKit (-1 if the browser does not use WebKit).
536 webKitVersion: webKitVersion ? parseFloat(webKitVersion[1]) : -1,
539 * URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images.
540 * In older versions of IE, this defaults to "http://sencha.com/s.gif" and you should change this to a URL on your server.
541 * For other browsers it uses an inline data URL.
544 BLANK_IMAGE_URL : (isIE6 || isIE7) ? 'http:/' + '/www.sencha.com/s.gif' : 'data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==',
547 * <p>Utility method for returning a default value if the passed value is empty.</p>
548 * <p>The value is deemed to be empty if it is<div class="mdetail-params"><ul>
551 * <li>an empty array</li>
552 * <li>a zero length string (Unless the <tt>allowBlank</tt> parameter is <tt>true</tt>)</li>
554 * @param {Mixed} value The value to test
555 * @param {Mixed} defaultValue The value to return if the original value is empty
556 * @param {Boolean} allowBlank (optional) true to allow zero length strings to qualify as non-empty (defaults to false)
557 * @return {Mixed} value, if non-empty, else defaultValue
558 * @deprecated 4.0.0 Use {@link Ext#valueFrom} instead
560 value : function(v, defaultValue, allowBlank){
561 return Ext.isEmpty(v, allowBlank) ? defaultValue : v;
565 * Escapes the passed string for use in a regular expression
566 * @param {String} str
568 * @deprecated 4.0.0 Use {@link Ext.String#escapeRegex} instead
570 escapeRe : function(s) {
571 return s.replace(/([-.*+?^${}()|[\]\/\\])/g, "\\$1");
575 * Applies event listeners to elements by selectors when the document is ready.
576 * The event name is specified with an <tt>@</tt> suffix.
579 // add a listener for click on all anchors in element with id foo
580 '#foo a@click' : function(e, t){
584 // add the same listener to multiple selectors (separated by comma BEFORE the @)
585 '#foo a, #bar span.some-class@mouseover' : function(){
590 * @param {Object} obj The list of behaviors to apply
592 addBehaviors : function(o){
594 Ext.onReady(function(){
598 var cache = {}, // simple cache for applying multiple behaviors to same selector does query multiple times
603 if ((parts = b.split('@'))[1]) { // for Object prototype breakers
606 cache[s] = Ext.select(s);
608 cache[s].on(parts[1], o[b]);
616 * Returns the size of the browser scrollbars. This can differ depending on
617 * operating system settings, such as the theme or font size.
618 * @param {Boolean} force (optional) true to force a recalculation of the value.
619 * @return {Object} An object containing the width of a vertical scrollbar and the
620 * height of a horizontal scrollbar.
622 getScrollbarSize: function (force) {
627 if(force === true || scrollbarSize === null){
629 // When IE9 positions an element offscreen via offsets, the offsetWidth is
630 // inaccurately reported. For IE9 only, we render on screen before removing.
631 var cssClass = Ext.isIE9 ? '' : Ext.baseCSSPrefix + 'hide-offsets',
632 // Append our div, do our calculation and then remove it
633 div = Ext.getBody().createChild('<div class="' + cssClass + '" style="width:100px;height:50px;overflow:hidden;"><div style="height:200px;"></div></div>'),
634 child = div.child('div', true),
635 w1 = child.offsetWidth;
637 div.setStyle('overflow', (Ext.isWebKit || Ext.isGecko) ? 'auto' : 'scroll');
639 var w2 = child.offsetWidth, width = w1 - w2;
642 // We assume width == height for now. TODO: is this always true?
643 scrollbarSize = { width: width, height: width };
646 return scrollbarSize;
650 * Utility method for getting the width of the browser's vertical scrollbar. This
651 * can differ depending on operating system settings, such as the theme or font size.
653 * This method is deprected in favor of {@link #getScrollbarSize}.
655 * @param {Boolean} force (optional) true to force a recalculation of the value.
656 * @return {Number} The width of a vertical scrollbar.
659 getScrollBarWidth: function(force){
660 var size = Ext.getScrollbarSize(force);
661 return size.width + 2; // legacy fudge factor
665 * Copies a set of named properties fom the source object to the destination object.
669 * ImageComponent = Ext.extend(Ext.Component, {
670 * initComponent: function() {
671 * this.autoEl = { tag: 'img' };
672 * MyComponent.superclass.initComponent.apply(this, arguments);
673 * this.initialBox = Ext.copyTo({}, this.initialConfig, 'x,y,width,height');
677 * Important note: To borrow class prototype methods, use {@link Ext.Base#borrow} instead.
679 * @param {Object} dest The destination object.
680 * @param {Object} source The source object.
681 * @param {Array/String} names Either an Array of property names, or a comma-delimited list
682 * of property names to copy.
683 * @param {Boolean} usePrototypeKeys (Optional) Defaults to false. Pass true to copy keys off of the prototype as well as the instance.
684 * @return {Object} The modified object.
686 copyTo : function(dest, source, names, usePrototypeKeys){
687 if(typeof names == 'string'){
688 names = names.split(/[,;\s]/);
690 Ext.each(names, function(name){
691 if(usePrototypeKeys || source.hasOwnProperty(name)){
692 dest[name] = source[name];
699 * Attempts to destroy and then remove a set of named properties of the passed object.
700 * @param {Object} o The object (most likely a Component) who's properties you wish to destroy.
701 * @param {Mixed} arg1 The name of the property to destroy and remove from the object.
702 * @param {Mixed} etc... More property names to destroy and remove.
704 destroyMembers : function(o){
705 for (var i = 1, a = arguments, len = a.length; i < len; i++) {
706 Ext.destroy(o[a[i]]);
712 * Logs a message. If a console is present it will be used. On Opera, the method
713 * "opera.postError" is called. In other cases, the message is logged to an array
714 * "Ext.log.out". An attached debugger can watch this array and view the log. The
715 * log buffer is limited to a maximum of "Ext.log.max" entries (defaults to 100).
717 * If additional parameters are passed, they are joined and appended to the message.
719 * This method does nothing in a release build.
721 * @param {String|Object} message The message to log or an options object with any
722 * of the following properties:
724 * - `msg`: The message to log (required).
725 * - `level`: One of: "error", "warn", "info" or "log" (the default is "log").
726 * - `dump`: An object to dump to the log as part of the message.
727 * - `stack`: True to include a stack trace in the log.
730 log : function (message) {
733 con = Ext.global.console,
740 if (!Ext.isString(message)) {
742 message = options.msg || '';
743 level = options.level || level;
745 stack = options.stack;
747 if (dump && !(con && con.dir)) {
750 // Cannot use Ext.encode since it can recurse endlessly (if we're lucky)
751 // ...and the data could be prettier!
752 Ext.Object.each(dump, function (name, value) {
753 if (typeof(value) === "function") {
757 if (!Ext.isDefined(value) || value === null ||
759 Ext.isString(value) || (typeof(value) == "number") ||
760 Ext.isBoolean(value)) {
761 member = Ext.encode(value);
762 } else if (Ext.isArray(value)) {
764 } else if (Ext.isObject(value)) {
767 member = 'undefined';
769 members.push(Ext.encode(name) + ': ' + member);
772 if (members.length) {
773 message += ' \nData: {\n ' + members.join(',\n ') + '\n}';
779 if (arguments.length > 1) {
780 message += Array.prototype.slice.call(arguments, 1).join('');
783 // Not obvious, but 'console' comes and goes when Firebug is turned on/off, so
784 // an early test may fail either direction if Firebug is toggled.
786 if (con) { // if (Firebug-like console)
797 if (stack && con.trace) {
798 // Firebug's console.error() includes a trace already...
799 if (!con.firebug || level != 'error') {
804 // w/o console, all messages are equal, so munge the level into the message:
805 if (level != 'log') {
806 message = level.toUpperCase() + ': ' + message;
810 opera.postError(message);
812 var out = log.out || (log.out = []),
813 max = log.max || (log.max = 100);
815 if (out.length >= max) {
816 // this formula allows out.max to change (via debugger), where the
817 // more obvious "max/4" would not quite be the same
818 Ext.Array.erase(out, 0, out.length - 3 * Math.floor(max / 4)); // keep newest 75%
825 // Mostly informational, but the Ext.Error notifier uses them:
826 var counters = log.counters ||
827 (log.counters = { error: 0, warn: 0, info: 0, log: 0 });
834 * Partitions the set into two sets: a true set and a false set.
839 Ext.partition([true, false, true, true, false]); // [[true, true, true], [false, false]]
845 return val.className == "class1"
848 // true are those paragraph elements with a className of "class1",
849 // false set are those that do not have that className.
851 * @param {Array|NodeList} arr The array to partition
852 * @param {Function} truth (optional) a function to determine truth. If this is omitted the element
853 * itself must be able to be evaluated for its truthfulness.
854 * @return {Array} [array of truish values, array of falsy values]
855 * @deprecated 4.0.0 Will be removed in the next major version
857 partition : function(arr, truth){
859 Ext.each(arr, function(v, i, a) {
860 ret[ (truth && truth(v, i, a)) || (!truth && v) ? 0 : 1].push(v);
866 * Invokes a method on each item in an Array.
869 Ext.invoke(Ext.query("p"), "getAttribute", "id");
870 // [el1.getAttribute("id"), el2.getAttribute("id"), ..., elN.getAttribute("id")]
872 * @param {Array|NodeList} arr The Array of items to invoke the method on.
873 * @param {String} methodName The method name to invoke.
874 * @param {...*} args Arguments to send into the method invocation.
875 * @return {Array} The results of invoking the method on each item in the array.
876 * @deprecated 4.0.0 Will be removed in the next major version
878 invoke : function(arr, methodName){
880 args = Array.prototype.slice.call(arguments, 2);
881 Ext.each(arr, function(v,i) {
882 if (v && typeof v[methodName] == 'function') {
883 ret.push(v[methodName].apply(v, args));
892 * <p>Zips N sets together.</p>
895 Ext.zip([1,2,3],[4,5,6]); // [[1,4],[2,5],[3,6]]
902 return "$" + a + "" + b + "." + c
904 ); // ["$+12.43", "$-10.15", "$+22.96"]
906 * @param {Arrays|NodeLists} arr This argument may be repeated. Array(s) to contribute values.
907 * @param {Function} zipper (optional) The last item in the argument list. This will drive how the items are zipped together.
908 * @return {Array} The zipped set.
909 * @deprecated 4.0.0 Will be removed in the next major version
912 var parts = Ext.partition(arguments, function( val ){ return typeof val != 'function'; }),
915 len = Ext.max(Ext.pluck(arrs, "length")),
918 for (var i = 0; i < len; i++) {
921 ret[i] = fn.apply(fn, Ext.pluck(arrs, i));
923 for (var j = 0, aLen = arrs.length; j < aLen; j++){
924 ret[i].push( arrs[j][i] );
932 * Turns an array into a sentence, joined by a specified connector - e.g.:
933 * Ext.toSentence(['Adama', 'Tigh', 'Roslin']); //'Adama, Tigh and Roslin'
934 * Ext.toSentence(['Adama', 'Tigh', 'Roslin'], 'or'); //'Adama, Tigh or Roslin'
935 * @param {Array} items The array to create a sentence from
936 * @param {String} connector The string to use to connect the last two words. Usually 'and' or 'or' - defaults to 'and'.
937 * @return {String} The sentence string
938 * @deprecated 4.0.0 Will be removed in the next major version
940 toSentence: function(items, connector) {
941 var length = items.length;
946 var head = items.slice(0, length - 1),
947 tail = items[length - 1];
949 return Ext.util.Format.format("{0} {1} {2}", head.join(", "), connector || 'and', tail);
954 * By default, Ext intelligently decides whether floating elements should be shimmed. If you are using flash,
955 * you may want to set this to true.
963 * Loads Ext.app.Application class and starts it up with given configuration after the page is ready.
965 * See Ext.app.Application for details.
967 * @param {Object} config
969 Ext.application = function(config) {
970 Ext.require('Ext.app.Application');
972 Ext.onReady(function() {
973 Ext.create('Ext.app.Application', config);