Ext-more.html 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>The source code</title>
  6. <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  7. <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  8. <style type="text/css">
  9. .highlight { display: block; background-color: #ddd; }
  10. </style>
  11. <script type="text/javascript">
  12. function highlight() {
  13. document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
  14. }
  15. </script>
  16. </head>
  17. <body onload="prettyPrint(); highlight();">
  18. <pre class="prettyprint lang-js"><span id='Ext'>/**
  19. </span> * @class Ext
  20. *
  21. * The Ext namespace (global object) encapsulates all classes, singletons, and
  22. * utility methods provided by Sencha's libraries.
  23. *
  24. * Most user interface Components are at a lower level of nesting in the namespace,
  25. * but many common utility functions are provided as direct properties of the Ext namespace.
  26. *
  27. * Also many frequently used methods from other classes are provided as shortcuts
  28. * within the Ext namespace. For example {@link Ext#getCmp Ext.getCmp} aliases
  29. * {@link Ext.ComponentManager#get Ext.ComponentManager.get}.
  30. *
  31. * Many applications are initiated with {@link Ext#onReady Ext.onReady} which is
  32. * called once the DOM is ready. This ensures all scripts have been loaded,
  33. * preventing dependency issues. For example:
  34. *
  35. * Ext.onReady(function(){
  36. * new Ext.Component({
  37. * renderTo: document.body,
  38. * html: 'DOM ready!'
  39. * });
  40. * });
  41. *
  42. * For more information about how to use the Ext classes, see:
  43. *
  44. * - &lt;a href=&quot;http://www.sencha.com/learn/&quot;&gt;The Learning Center&lt;/a&gt;
  45. * - &lt;a href=&quot;http://www.sencha.com/learn/Ext_FAQ&quot;&gt;The FAQ&lt;/a&gt;
  46. * - &lt;a href=&quot;http://www.sencha.com/forum/&quot;&gt;The forums&lt;/a&gt;
  47. *
  48. * @singleton
  49. */
  50. Ext.apply(Ext, {
  51. userAgent: navigator.userAgent.toLowerCase(),
  52. cache: {},
  53. idSeed: 1000,
  54. windowId: 'ext-window',
  55. documentId: 'ext-document',
  56. <span id='Ext-property-isReady'> /**
  57. </span> * True when the document is fully initialized and ready for action
  58. */
  59. isReady: false,
  60. <span id='Ext-property-enableGarbageCollector'> /**
  61. </span> * True to automatically uncache orphaned Ext.Elements periodically
  62. */
  63. enableGarbageCollector: true,
  64. <span id='Ext-property-enableListenerCollection'> /**
  65. </span> * True to automatically purge event listeners during garbageCollection.
  66. */
  67. enableListenerCollection: true,
  68. addCacheEntry: function(id, el, dom) {
  69. dom = dom || el.dom;
  70. //&lt;debug&gt;
  71. if (!dom) {
  72. // Without the DOM node we can't GC the entry
  73. Ext.Error.raise('Cannot add an entry to the element cache without the DOM node');
  74. }
  75. //&lt;/debug&gt;
  76. var key = id || (el &amp;&amp; el.id) || dom.id,
  77. entry = Ext.cache[key] || (Ext.cache[key] = {
  78. data: {},
  79. events: {},
  80. dom: dom,
  81. // Skip garbage collection for special elements (window, document, iframes)
  82. skipGarbageCollection: !!(dom.getElementById || dom.navigator)
  83. });
  84. if (el) {
  85. el.$cache = entry;
  86. // Inject the back link from the cache in case the cache entry
  87. // had already been created by Ext.fly. Ext.fly creates a cache entry with no el link.
  88. entry.el = el;
  89. }
  90. return entry;
  91. },
  92. updateCacheEntry: function(cacheItem, dom){
  93. cacheItem.dom = dom;
  94. if (cacheItem.el) {
  95. cacheItem.el.dom = dom;
  96. }
  97. return cacheItem;
  98. },
  99. <span id='Ext-method-id'> /**
  100. </span> * Generates unique ids. If the element already has an id, it is unchanged
  101. * @param {HTMLElement/Ext.Element} [el] The element to generate an id for
  102. * @param {String} prefix (optional) Id prefix (defaults &quot;ext-gen&quot;)
  103. * @return {String} The generated Id.
  104. */
  105. id: function(el, prefix) {
  106. var me = this,
  107. sandboxPrefix = '';
  108. el = Ext.getDom(el, true) || {};
  109. if (el === document) {
  110. el.id = me.documentId;
  111. }
  112. else if (el === window) {
  113. el.id = me.windowId;
  114. }
  115. if (!el.id) {
  116. if (me.isSandboxed) {
  117. sandboxPrefix = Ext.sandboxName.toLowerCase() + '-';
  118. }
  119. el.id = sandboxPrefix + (prefix || &quot;ext-gen&quot;) + (++Ext.idSeed);
  120. }
  121. return el.id;
  122. },
  123. escapeId: (function(){
  124. var validIdRe = /^[a-zA-Z_][a-zA-Z0-9_\-]*$/i,
  125. escapeRx = /([\W]{1})/g,
  126. leadingNumRx = /^(\d)/g,
  127. escapeFn = function(match, capture){
  128. return &quot;\\&quot; + capture;
  129. },
  130. numEscapeFn = function(match, capture){
  131. return '\\00' + capture.charCodeAt(0).toString(16) + ' ';
  132. };
  133. return function(id) {
  134. return validIdRe.test(id)
  135. ? id
  136. // replace the number portion last to keep the trailing ' '
  137. // from being escaped
  138. : id.replace(escapeRx, escapeFn)
  139. .replace(leadingNumRx, numEscapeFn);
  140. };
  141. }()),
  142. <span id='Ext-method-getBody'> /**
  143. </span> * Returns the current document body as an {@link Ext.Element}.
  144. * @return Ext.Element The document body
  145. */
  146. getBody: (function() {
  147. var body;
  148. return function() {
  149. return body || (body = Ext.get(document.body));
  150. };
  151. }()),
  152. <span id='Ext-method-getHead'> /**
  153. </span> * Returns the current document head as an {@link Ext.Element}.
  154. * @return Ext.Element The document head
  155. * @method
  156. */
  157. getHead: (function() {
  158. var head;
  159. return function() {
  160. return head || (head = Ext.get(document.getElementsByTagName(&quot;head&quot;)[0]));
  161. };
  162. }()),
  163. <span id='Ext-method-getDoc'> /**
  164. </span> * Returns the current HTML document object as an {@link Ext.Element}.
  165. * @return Ext.Element The document
  166. */
  167. getDoc: (function() {
  168. var doc;
  169. return function() {
  170. return doc || (doc = Ext.get(document));
  171. };
  172. }()),
  173. <span id='Ext-method-getCmp'> /**
  174. </span> * This is shorthand reference to {@link Ext.ComponentManager#get}.
  175. * Looks up an existing {@link Ext.Component Component} by {@link Ext.Component#id id}
  176. *
  177. * @param {String} id The component {@link Ext.Component#id id}
  178. * @return Ext.Component The Component, `undefined` if not found, or `null` if a
  179. * Class was found.
  180. */
  181. getCmp: function(id) {
  182. return Ext.ComponentManager.get(id);
  183. },
  184. <span id='Ext-method-getOrientation'> /**
  185. </span> * Returns the current orientation of the mobile device
  186. * @return {String} Either 'portrait' or 'landscape'
  187. */
  188. getOrientation: function() {
  189. return window.innerHeight &gt; window.innerWidth ? 'portrait' : 'landscape';
  190. },
  191. <span id='Ext-method-destroy'> /**
  192. </span> * Attempts to destroy any objects passed to it by removing all event listeners, removing them from the
  193. * DOM (if applicable) and calling their destroy functions (if available). This method is primarily
  194. * intended for arguments of type {@link Ext.Element} and {@link Ext.Component}, but any subclass of
  195. * {@link Ext.util.Observable} can be passed in. Any number of elements and/or components can be
  196. * passed into this function in a single call as separate arguments.
  197. *
  198. * @param {Ext.Element/Ext.Component/Ext.Element[]/Ext.Component[]...} args
  199. * An {@link Ext.Element}, {@link Ext.Component}, or an Array of either of these to destroy
  200. */
  201. destroy: function() {
  202. var ln = arguments.length,
  203. i, arg;
  204. for (i = 0; i &lt; ln; i++) {
  205. arg = arguments[i];
  206. if (arg) {
  207. if (Ext.isArray(arg)) {
  208. this.destroy.apply(this, arg);
  209. }
  210. else if (Ext.isFunction(arg.destroy)) {
  211. arg.destroy();
  212. }
  213. else if (arg.dom) {
  214. arg.remove();
  215. }
  216. }
  217. }
  218. },
  219. <span id='Ext-method-callback'> /**
  220. </span> * Execute a callback function in a particular scope. If no function is passed the call is ignored.
  221. *
  222. * For example, these lines are equivalent:
  223. *
  224. * Ext.callback(myFunc, this, [arg1, arg2]);
  225. * Ext.isFunction(myFunc) &amp;&amp; myFunc.apply(this, [arg1, arg2]);
  226. *
  227. * @param {Function} callback The callback to execute
  228. * @param {Object} [scope] The scope to execute in
  229. * @param {Array} [args] The arguments to pass to the function
  230. * @param {Number} [delay] Pass a number to delay the call by a number of milliseconds.
  231. */
  232. callback: function(callback, scope, args, delay){
  233. if(Ext.isFunction(callback)){
  234. args = args || [];
  235. scope = scope || window;
  236. if (delay) {
  237. Ext.defer(callback, delay, scope, args);
  238. } else {
  239. callback.apply(scope, args);
  240. }
  241. }
  242. },
  243. <span id='global-method-htmlEncode'> /**
  244. </span> * Alias for {@link Ext.String#htmlEncode}.
  245. * @inheritdoc Ext.String#htmlEncode
  246. * @ignore
  247. */
  248. htmlEncode : function(value) {
  249. return Ext.String.htmlEncode(value);
  250. },
  251. <span id='global-method-htmlDecode'> /**
  252. </span> * Alias for {@link Ext.String#htmlDecode}.
  253. * @inheritdoc Ext.String#htmlDecode
  254. * @ignore
  255. */
  256. htmlDecode : function(value) {
  257. return Ext.String.htmlDecode(value);
  258. },
  259. <span id='global-method-urlAppend'> /**
  260. </span> * Alias for {@link Ext.String#urlAppend}.
  261. * @inheritdoc Ext.String#urlAppend
  262. * @ignore
  263. */
  264. urlAppend : function(url, s) {
  265. return Ext.String.urlAppend(url, s);
  266. }
  267. });
  268. Ext.ns = Ext.namespace;
  269. // for old browsers
  270. window.undefined = window.undefined;
  271. <span id='Ext'>/**
  272. </span> * @class Ext
  273. */
  274. (function(){
  275. /*
  276. FF 3.6 - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17
  277. FF 4.0.1 - Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
  278. FF 5.0 - Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0
  279. IE6 - Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;)
  280. IE7 - Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1;)
  281. IE8 - Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
  282. IE9 - Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
  283. Chrome 11 - Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24
  284. Safari 5 - Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1
  285. Opera 11.11 - Opera/9.80 (Windows NT 6.1; U; en) Presto/2.8.131 Version/11.11
  286. */
  287. var check = function(regex){
  288. return regex.test(Ext.userAgent);
  289. },
  290. isStrict = document.compatMode == &quot;CSS1Compat&quot;,
  291. version = function (is, regex) {
  292. var m;
  293. return (is &amp;&amp; (m = regex.exec(Ext.userAgent))) ? parseFloat(m[1]) : 0;
  294. },
  295. docMode = document.documentMode,
  296. isOpera = check(/opera/),
  297. isOpera10_5 = isOpera &amp;&amp; check(/version\/10\.5/),
  298. isChrome = check(/\bchrome\b/),
  299. isWebKit = check(/webkit/),
  300. isSafari = !isChrome &amp;&amp; check(/safari/),
  301. isSafari2 = isSafari &amp;&amp; check(/applewebkit\/4/), // unique to Safari 2
  302. isSafari3 = isSafari &amp;&amp; check(/version\/3/),
  303. isSafari4 = isSafari &amp;&amp; check(/version\/4/),
  304. isSafari5_0 = isSafari &amp;&amp; check(/version\/5\.0/),
  305. isSafari5 = isSafari &amp;&amp; check(/version\/5/),
  306. isIE = !isOpera &amp;&amp; check(/msie/),
  307. isIE7 = isIE &amp;&amp; ((check(/msie 7/) &amp;&amp; docMode != 8 &amp;&amp; docMode != 9) || docMode == 7),
  308. isIE8 = isIE &amp;&amp; ((check(/msie 8/) &amp;&amp; docMode != 7 &amp;&amp; docMode != 9) || docMode == 8),
  309. isIE9 = isIE &amp;&amp; ((check(/msie 9/) &amp;&amp; docMode != 7 &amp;&amp; docMode != 8) || docMode == 9),
  310. isIE6 = isIE &amp;&amp; check(/msie 6/),
  311. isGecko = !isWebKit &amp;&amp; check(/gecko/),
  312. isGecko3 = isGecko &amp;&amp; check(/rv:1\.9/),
  313. isGecko4 = isGecko &amp;&amp; check(/rv:2\.0/),
  314. isGecko5 = isGecko &amp;&amp; check(/rv:5\./),
  315. isGecko10 = isGecko &amp;&amp; check(/rv:10\./),
  316. isFF3_0 = isGecko3 &amp;&amp; check(/rv:1\.9\.0/),
  317. isFF3_5 = isGecko3 &amp;&amp; check(/rv:1\.9\.1/),
  318. isFF3_6 = isGecko3 &amp;&amp; check(/rv:1\.9\.2/),
  319. isWindows = check(/windows|win32/),
  320. isMac = check(/macintosh|mac os x/),
  321. isLinux = check(/linux/),
  322. scrollbarSize = null,
  323. chromeVersion = version(true, /\bchrome\/(\d+\.\d+)/),
  324. firefoxVersion = version(true, /\bfirefox\/(\d+\.\d+)/),
  325. ieVersion = version(isIE, /msie (\d+\.\d+)/),
  326. operaVersion = version(isOpera, /version\/(\d+\.\d+)/),
  327. safariVersion = version(isSafari, /version\/(\d+\.\d+)/),
  328. webKitVersion = version(isWebKit, /webkit\/(\d+\.\d+)/),
  329. isSecure = /^https/i.test(window.location.protocol),
  330. nullLog;
  331. // remove css image flicker
  332. try {
  333. document.execCommand(&quot;BackgroundImageCache&quot;, false, true);
  334. } catch(e) {}
  335. //&lt;debug&gt;
  336. var primitiveRe = /string|number|boolean/;
  337. function dumpObject (object) {
  338. var member, type, value, name,
  339. members = [];
  340. // Cannot use Ext.encode since it can recurse endlessly (if we're lucky)
  341. // ...and the data could be prettier!
  342. for (name in object) {
  343. if (object.hasOwnProperty(name)) {
  344. value = object[name];
  345. type = typeof value;
  346. if (type == &quot;function&quot;) {
  347. continue;
  348. }
  349. if (type == 'undefined') {
  350. member = type;
  351. } else if (value === null || primitiveRe.test(type) || Ext.isDate(value)) {
  352. member = Ext.encode(value);
  353. } else if (Ext.isArray(value)) {
  354. member = '[ ]';
  355. } else if (Ext.isObject(value)) {
  356. member = '{ }';
  357. } else {
  358. member = type;
  359. }
  360. members.push(Ext.encode(name) + ': ' + member);
  361. }
  362. }
  363. if (members.length) {
  364. return ' \nData: {\n ' + members.join(',\n ') + '\n}';
  365. }
  366. return '';
  367. }
  368. function log (message) {
  369. var options, dump,
  370. con = Ext.global.console,
  371. level = 'log',
  372. indent = log.indent || 0,
  373. stack,
  374. out,
  375. max;
  376. log.indent = indent;
  377. if (typeof message != 'string') {
  378. options = message;
  379. message = options.msg || '';
  380. level = options.level || level;
  381. dump = options.dump;
  382. stack = options.stack;
  383. if (options.indent) {
  384. ++log.indent;
  385. } else if (options.outdent) {
  386. log.indent = indent = Math.max(indent - 1, 0);
  387. }
  388. if (dump &amp;&amp; !(con &amp;&amp; con.dir)) {
  389. message += dumpObject(dump);
  390. dump = null;
  391. }
  392. }
  393. if (arguments.length &gt; 1) {
  394. message += Array.prototype.slice.call(arguments, 1).join('');
  395. }
  396. message = indent ? Ext.String.repeat(' ', log.indentSize * indent) + message : message;
  397. // w/o console, all messages are equal, so munge the level into the message:
  398. if (level != 'log') {
  399. message = '[' + level.charAt(0).toUpperCase() + '] ' + message;
  400. }
  401. // Not obvious, but 'console' comes and goes when Firebug is turned on/off, so
  402. // an early test may fail either direction if Firebug is toggled.
  403. //
  404. if (con) { // if (Firebug-like console)
  405. if (con[level]) {
  406. con[level](message);
  407. } else {
  408. con.log(message);
  409. }
  410. if (dump) {
  411. con.dir(dump);
  412. }
  413. if (stack &amp;&amp; con.trace) {
  414. // Firebug's console.error() includes a trace already...
  415. if (!con.firebug || level != 'error') {
  416. con.trace();
  417. }
  418. }
  419. } else {
  420. if (Ext.isOpera) {
  421. opera.postError(message);
  422. } else {
  423. out = log.out;
  424. max = log.max;
  425. if (out.length &gt;= max) {
  426. // this formula allows out.max to change (via debugger), where the
  427. // more obvious &quot;max/4&quot; would not quite be the same
  428. Ext.Array.erase(out, 0, out.length - 3 * Math.floor(max / 4)); // keep newest 75%
  429. }
  430. out.push(message);
  431. }
  432. }
  433. // Mostly informational, but the Ext.Error notifier uses them:
  434. ++log.count;
  435. ++log.counters[level];
  436. }
  437. function logx (level, args) {
  438. if (typeof args[0] == 'string') {
  439. args.unshift({});
  440. }
  441. args[0].level = level;
  442. log.apply(this, args);
  443. }
  444. log.error = function () {
  445. logx('error', Array.prototype.slice.call(arguments));
  446. };
  447. log.info = function () {
  448. logx('info', Array.prototype.slice.call(arguments));
  449. };
  450. log.warn = function () {
  451. logx('warn', Array.prototype.slice.call(arguments));
  452. };
  453. log.count = 0;
  454. log.counters = { error: 0, warn: 0, info: 0, log: 0 };
  455. log.indentSize = 2;
  456. log.out = [];
  457. log.max = 750;
  458. log.show = function () {
  459. window.open('','extlog').document.write([
  460. '&lt;html&gt;&lt;head&gt;&lt;script type=&quot;text/javascript&quot;&gt;',
  461. 'var lastCount = 0;',
  462. 'function update () {',
  463. 'var ext = window.opener.Ext,',
  464. 'extlog = ext &amp;&amp; ext.log;',
  465. 'if (extlog &amp;&amp; extlog.out &amp;&amp; lastCount != extlog.count) {',
  466. 'lastCount = extlog.count;',
  467. 'var s = &quot;&lt;tt&gt;&quot; + extlog.out.join(&quot;~~~&quot;).replace(/[&amp;]/g, &quot;&amp;amp;&quot;).replace(/[&lt;]/g, &quot;&amp;lt;&quot;).replace(/[ ]/g, &quot;&amp;#160;&quot;).replace(/\\~\\~\\~/g, &quot;&lt;br/&gt;&quot;) + &quot;&lt;/tt&gt;&quot;;',
  468. 'document.body.innerHTML = s;',
  469. '}',
  470. 'setTimeout(update, 1000);',
  471. '}',
  472. 'setTimeout(update, 1000);',
  473. '&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;'].join(''));
  474. };
  475. //&lt;/debug&gt;
  476. nullLog = function () {};
  477. nullLog.info = nullLog.warn = nullLog.error = Ext.emptyFn;
  478. Ext.setVersion('extjs', '4.1.1');
  479. Ext.apply(Ext, {
  480. <span id='Ext-property-SSL_SECURE_URL'> /**
  481. </span> * @property {String} SSL_SECURE_URL
  482. * URL to a blank file used by Ext when in secure mode for iframe src and onReady src
  483. * to prevent the IE insecure content warning (`'about:blank'`, except for IE
  484. * in secure mode, which is `'javascript:&quot;&quot;'`).
  485. */
  486. SSL_SECURE_URL : isSecure &amp;&amp; isIE ? 'javascript:\'\'' : 'about:blank',
  487. <span id='Ext-property-enableFx'> /**
  488. </span> * @property {Boolean} enableFx
  489. * True if the {@link Ext.fx.Anim} Class is available.
  490. */
  491. <span id='Ext-property-scopeResetCSS'> /**
  492. </span> * @property {Boolean} scopeResetCSS
  493. * True to scope the reset CSS to be just applied to Ext components. Note that this
  494. * wraps root containers with an additional element. Also remember that when you turn
  495. * on this option, you have to use ext-all-scoped (unless you use the bootstrap.js to
  496. * load your javascript, in which case it will be handled for you).
  497. */
  498. scopeResetCSS : Ext.buildSettings.scopeResetCSS,
  499. <span id='Ext-property-resetCls'> /**
  500. </span> * @property {String} resetCls
  501. * The css class used to wrap Ext components when the {@link #scopeResetCSS} option
  502. * is used.
  503. */
  504. resetCls: Ext.buildSettings.baseCSSPrefix + 'reset',
  505. <span id='Ext-property-enableNestedListenerRemoval'> /**
  506. </span> * @property {Boolean} enableNestedListenerRemoval
  507. * **Experimental.** True to cascade listener removal to child elements when an element
  508. * is removed. Currently not optimized for performance.
  509. */
  510. enableNestedListenerRemoval : false,
  511. <span id='Ext-property-USE_NATIVE_JSON'> /**
  512. </span> * @property {Boolean} USE_NATIVE_JSON
  513. * Indicates whether to use native browser parsing for JSON methods.
  514. * This option is ignored if the browser does not support native JSON methods.
  515. *
  516. * **Note:** Native JSON methods will not work with objects that have functions.
  517. * Also, property names must be quoted, otherwise the data will not parse.
  518. */
  519. USE_NATIVE_JSON : false,
  520. <span id='Ext-method-getDom'> /**
  521. </span> * Returns the dom node for the passed String (id), dom node, or Ext.Element.
  522. * Optional 'strict' flag is needed for IE since it can return 'name' and
  523. * 'id' elements by using getElementById.
  524. *
  525. * Here are some examples:
  526. *
  527. * // gets dom node based on id
  528. * var elDom = Ext.getDom('elId');
  529. * // gets dom node based on the dom node
  530. * var elDom1 = Ext.getDom(elDom);
  531. *
  532. * // If we don&amp;#39;t know if we are working with an
  533. * // Ext.Element or a dom node use Ext.getDom
  534. * function(el){
  535. * var dom = Ext.getDom(el);
  536. * // do something with the dom node
  537. * }
  538. *
  539. * **Note:** the dom node to be found actually needs to exist (be rendered, etc)
  540. * when this method is called to be successful.
  541. *
  542. * @param {String/HTMLElement/Ext.Element} el
  543. * @return HTMLElement
  544. */
  545. getDom : function(el, strict) {
  546. if (!el || !document) {
  547. return null;
  548. }
  549. if (el.dom) {
  550. return el.dom;
  551. } else {
  552. if (typeof el == 'string') {
  553. var e = Ext.getElementById(el);
  554. // IE returns elements with the 'name' and 'id' attribute.
  555. // we do a strict check to return the element with only the id attribute
  556. if (e &amp;&amp; isIE &amp;&amp; strict) {
  557. if (el == e.getAttribute('id')) {
  558. return e;
  559. } else {
  560. return null;
  561. }
  562. }
  563. return e;
  564. } else {
  565. return el;
  566. }
  567. }
  568. },
  569. <span id='Ext-method-removeNode'> /**
  570. </span> * Removes a DOM node from the document.
  571. *
  572. * Removes this element from the document, removes all DOM event listeners, and
  573. * deletes the cache reference. All DOM event listeners are removed from this element.
  574. * If {@link Ext#enableNestedListenerRemoval Ext.enableNestedListenerRemoval} is
  575. * `true`, then DOM event listeners are also removed from all child nodes.
  576. * The body node will be ignored if passed in.
  577. *
  578. * @param {HTMLElement} node The node to remove
  579. * @method
  580. */
  581. removeNode : isIE6 || isIE7 || isIE8
  582. ? (function() {
  583. var d;
  584. return function(n){
  585. if(n &amp;&amp; n.tagName.toUpperCase() != 'BODY'){
  586. (Ext.enableNestedListenerRemoval) ? Ext.EventManager.purgeElement(n) : Ext.EventManager.removeAll(n);
  587. var cache = Ext.cache,
  588. id = n.id;
  589. if (cache[id]) {
  590. delete cache[id].dom;
  591. delete cache[id];
  592. }
  593. if (isIE8 &amp;&amp; n.parentNode) {
  594. n.parentNode.removeChild(n);
  595. }
  596. d = d || document.createElement('div');
  597. d.appendChild(n);
  598. d.innerHTML = '';
  599. }
  600. };
  601. }())
  602. : function(n) {
  603. if (n &amp;&amp; n.parentNode &amp;&amp; n.tagName.toUpperCase() != 'BODY') {
  604. (Ext.enableNestedListenerRemoval) ? Ext.EventManager.purgeElement(n) : Ext.EventManager.removeAll(n);
  605. var cache = Ext.cache,
  606. id = n.id;
  607. if (cache[id]) {
  608. delete cache[id].dom;
  609. delete cache[id];
  610. }
  611. n.parentNode.removeChild(n);
  612. }
  613. },
  614. isStrict: isStrict,
  615. isIEQuirks: isIE &amp;&amp; !isStrict,
  616. <span id='Ext-property-isOpera'> /**
  617. </span> * True if the detected browser is Opera.
  618. * @type Boolean
  619. */
  620. isOpera : isOpera,
  621. <span id='Ext-property-isOpera10_5'> /**
  622. </span> * True if the detected browser is Opera 10.5x.
  623. * @type Boolean
  624. */
  625. isOpera10_5 : isOpera10_5,
  626. <span id='Ext-property-isWebKit'> /**
  627. </span> * True if the detected browser uses WebKit.
  628. * @type Boolean
  629. */
  630. isWebKit : isWebKit,
  631. <span id='Ext-property-isChrome'> /**
  632. </span> * True if the detected browser is Chrome.
  633. * @type Boolean
  634. */
  635. isChrome : isChrome,
  636. <span id='Ext-property-isSafari'> /**
  637. </span> * True if the detected browser is Safari.
  638. * @type Boolean
  639. */
  640. isSafari : isSafari,
  641. <span id='Ext-property-isSafari3'> /**
  642. </span> * True if the detected browser is Safari 3.x.
  643. * @type Boolean
  644. */
  645. isSafari3 : isSafari3,
  646. <span id='Ext-property-isSafari4'> /**
  647. </span> * True if the detected browser is Safari 4.x.
  648. * @type Boolean
  649. */
  650. isSafari4 : isSafari4,
  651. <span id='Ext-property-isSafari5'> /**
  652. </span> * True if the detected browser is Safari 5.x.
  653. * @type Boolean
  654. */
  655. isSafari5 : isSafari5,
  656. <span id='Ext-property-isSafari5_0'> /**
  657. </span> * True if the detected browser is Safari 5.0.x.
  658. * @type Boolean
  659. */
  660. isSafari5_0 : isSafari5_0,
  661. <span id='Ext-property-isSafari2'> /**
  662. </span> * True if the detected browser is Safari 2.x.
  663. * @type Boolean
  664. */
  665. isSafari2 : isSafari2,
  666. <span id='Ext-property-isIE'> /**
  667. </span> * True if the detected browser is Internet Explorer.
  668. * @type Boolean
  669. */
  670. isIE : isIE,
  671. <span id='Ext-property-isIE6'> /**
  672. </span> * True if the detected browser is Internet Explorer 6.x.
  673. * @type Boolean
  674. */
  675. isIE6 : isIE6,
  676. <span id='Ext-property-isIE7'> /**
  677. </span> * True if the detected browser is Internet Explorer 7.x.
  678. * @type Boolean
  679. */
  680. isIE7 : isIE7,
  681. <span id='Ext-property-isIE8'> /**
  682. </span> * True if the detected browser is Internet Explorer 8.x.
  683. * @type Boolean
  684. */
  685. isIE8 : isIE8,
  686. <span id='Ext-property-isIE9'> /**
  687. </span> * True if the detected browser is Internet Explorer 9.x.
  688. * @type Boolean
  689. */
  690. isIE9 : isIE9,
  691. <span id='Ext-property-isGecko'> /**
  692. </span> * True if the detected browser uses the Gecko layout engine (e.g. Mozilla, Firefox).
  693. * @type Boolean
  694. */
  695. isGecko : isGecko,
  696. <span id='Ext-property-isGecko3'> /**
  697. </span> * True if the detected browser uses a Gecko 1.9+ layout engine (e.g. Firefox 3.x).
  698. * @type Boolean
  699. */
  700. isGecko3 : isGecko3,
  701. <span id='Ext-property-isGecko4'> /**
  702. </span> * True if the detected browser uses a Gecko 2.0+ layout engine (e.g. Firefox 4.x).
  703. * @type Boolean
  704. */
  705. isGecko4 : isGecko4,
  706. <span id='Ext-property-isGecko5'> /**
  707. </span> * True if the detected browser uses a Gecko 5.0+ layout engine (e.g. Firefox 5.x).
  708. * @type Boolean
  709. */
  710. isGecko5 : isGecko5,
  711. <span id='Ext-property-isGecko10'> /**
  712. </span> * True if the detected browser uses a Gecko 5.0+ layout engine (e.g. Firefox 5.x).
  713. * @type Boolean
  714. */
  715. isGecko10 : isGecko10,
  716. <span id='Ext-property-isFF3_0'> /**
  717. </span> * True if the detected browser uses FireFox 3.0
  718. * @type Boolean
  719. */
  720. isFF3_0 : isFF3_0,
  721. <span id='Ext-property-isFF3_5'> /**
  722. </span> * True if the detected browser uses FireFox 3.5
  723. * @type Boolean
  724. */
  725. isFF3_5 : isFF3_5,
  726. <span id='Ext-property-isFF3_6'> /**
  727. </span> * True if the detected browser uses FireFox 3.6
  728. * @type Boolean
  729. */
  730. isFF3_6 : isFF3_6,
  731. <span id='Ext-property-isFF4'> /**
  732. </span> * True if the detected browser uses FireFox 4
  733. * @type Boolean
  734. */
  735. isFF4 : 4 &lt;= firefoxVersion &amp;&amp; firefoxVersion &lt; 5,
  736. <span id='Ext-property-isFF5'> /**
  737. </span> * True if the detected browser uses FireFox 5
  738. * @type Boolean
  739. */
  740. isFF5 : 5 &lt;= firefoxVersion &amp;&amp; firefoxVersion &lt; 6,
  741. <span id='Ext-property-isFF10'> /**
  742. </span> * True if the detected browser uses FireFox 10
  743. * @type Boolean
  744. */
  745. isFF10 : 10 &lt;= firefoxVersion &amp;&amp; firefoxVersion &lt; 11,
  746. <span id='Ext-property-isLinux'> /**
  747. </span> * True if the detected platform is Linux.
  748. * @type Boolean
  749. */
  750. isLinux : isLinux,
  751. <span id='Ext-property-isWindows'> /**
  752. </span> * True if the detected platform is Windows.
  753. * @type Boolean
  754. */
  755. isWindows : isWindows,
  756. <span id='Ext-property-isMac'> /**
  757. </span> * True if the detected platform is Mac OS.
  758. * @type Boolean
  759. */
  760. isMac : isMac,
  761. <span id='Ext-property-chromeVersion'> /**
  762. </span> * The current version of Chrome (0 if the browser is not Chrome).
  763. * @type Number
  764. */
  765. chromeVersion: chromeVersion,
  766. <span id='Ext-property-firefoxVersion'> /**
  767. </span> * The current version of Firefox (0 if the browser is not Firefox).
  768. * @type Number
  769. */
  770. firefoxVersion: firefoxVersion,
  771. <span id='Ext-property-ieVersion'> /**
  772. </span> * The current version of IE (0 if the browser is not IE). This does not account
  773. * for the documentMode of the current page, which is factored into {@link #isIE7},
  774. * {@link #isIE8} and {@link #isIE9}. Thus this is not always true:
  775. *
  776. * Ext.isIE8 == (Ext.ieVersion == 8)
  777. *
  778. * @type Number
  779. */
  780. ieVersion: ieVersion,
  781. <span id='Ext-property-operaVersion'> /**
  782. </span> * The current version of Opera (0 if the browser is not Opera).
  783. * @type Number
  784. */
  785. operaVersion: operaVersion,
  786. <span id='Ext-property-safariVersion'> /**
  787. </span> * The current version of Safari (0 if the browser is not Safari).
  788. * @type Number
  789. */
  790. safariVersion: safariVersion,
  791. <span id='Ext-property-webKitVersion'> /**
  792. </span> * The current version of WebKit (0 if the browser does not use WebKit).
  793. * @type Number
  794. */
  795. webKitVersion: webKitVersion,
  796. <span id='Ext-property-isSecure'> /**
  797. </span> * True if the page is running over SSL
  798. * @type Boolean
  799. */
  800. isSecure: isSecure,
  801. <span id='Ext-property-BLANK_IMAGE_URL'> /**
  802. </span> * URL to a 1x1 transparent gif image used by Ext to create inline icons with
  803. * CSS background images. In older versions of IE, this defaults to
  804. * &quot;http://sencha.com/s.gif&quot; and you should change this to a URL on your server.
  805. * For other browsers it uses an inline data URL.
  806. * @type String
  807. */
  808. BLANK_IMAGE_URL : (isIE6 || isIE7) ? '/' + '/www.sencha.com/s.gif' : 'data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==',
  809. <span id='Ext-method-value'> /**
  810. </span> * Utility method for returning a default value if the passed value is empty.
  811. *
  812. * The value is deemed to be empty if it is:
  813. *
  814. * - null
  815. * - undefined
  816. * - an empty array
  817. * - a zero length string (Unless the `allowBlank` parameter is `true`)
  818. *
  819. * @param {Object} value The value to test
  820. * @param {Object} defaultValue The value to return if the original value is empty
  821. * @param {Boolean} [allowBlank=false] true to allow zero length strings to qualify as non-empty.
  822. * @return {Object} value, if non-empty, else defaultValue
  823. * @deprecated 4.0.0 Use {@link Ext#valueFrom} instead
  824. */
  825. value : function(v, defaultValue, allowBlank){
  826. return Ext.isEmpty(v, allowBlank) ? defaultValue : v;
  827. },
  828. <span id='Ext-method-escapeRe'> /**
  829. </span> * Escapes the passed string for use in a regular expression.
  830. * @param {String} str
  831. * @return {String}
  832. * @deprecated 4.0.0 Use {@link Ext.String#escapeRegex} instead
  833. */
  834. escapeRe : function(s) {
  835. return s.replace(/([-.*+?\^${}()|\[\]\/\\])/g, &quot;\\$1&quot;);
  836. },
  837. <span id='Ext-method-addBehaviors'> /**
  838. </span> * Applies event listeners to elements by selectors when the document is ready.
  839. * The event name is specified with an `@` suffix.
  840. *
  841. * Ext.addBehaviors({
  842. * // add a listener for click on all anchors in element with id foo
  843. * '#foo a@click' : function(e, t){
  844. * // do something
  845. * },
  846. *
  847. * // add the same listener to multiple selectors (separated by comma BEFORE the @)
  848. * '#foo a, #bar span.some-class@mouseover' : function(){
  849. * // do something
  850. * }
  851. * });
  852. *
  853. * @param {Object} obj The list of behaviors to apply
  854. */
  855. addBehaviors : function(o){
  856. if(!Ext.isReady){
  857. Ext.onReady(function(){
  858. Ext.addBehaviors(o);
  859. });
  860. } else {
  861. var cache = {}, // simple cache for applying multiple behaviors to same selector does query multiple times
  862. parts,
  863. b,
  864. s;
  865. for (b in o) {
  866. if ((parts = b.split('@'))[1]) { // for Object prototype breakers
  867. s = parts[0];
  868. if(!cache[s]){
  869. cache[s] = Ext.select(s);
  870. }
  871. cache[s].on(parts[1], o[b]);
  872. }
  873. }
  874. cache = null;
  875. }
  876. },
  877. <span id='Ext-method-getScrollbarSize'> /**
  878. </span> * Returns the size of the browser scrollbars. This can differ depending on
  879. * operating system settings, such as the theme or font size.
  880. * @param {Boolean} [force] true to force a recalculation of the value.
  881. * @return {Object} An object containing scrollbar sizes.
  882. * @return.width {Number} The width of the vertical scrollbar.
  883. * @return.height {Number} The height of the horizontal scrollbar.
  884. */
  885. getScrollbarSize: function (force) {
  886. if (!Ext.isReady) {
  887. return {};
  888. }
  889. if (force || !scrollbarSize) {
  890. var db = document.body,
  891. div = document.createElement('div');
  892. div.style.width = div.style.height = '100px';
  893. div.style.overflow = 'scroll';
  894. div.style.position = 'absolute';
  895. db.appendChild(div); // now we can measure the div...
  896. // at least in iE9 the div is not 100px - the scrollbar size is removed!
  897. scrollbarSize = {
  898. width: div.offsetWidth - div.clientWidth,
  899. height: div.offsetHeight - div.clientHeight
  900. };
  901. db.removeChild(div);
  902. }
  903. return scrollbarSize;
  904. },
  905. <span id='Ext-method-getScrollBarWidth'> /**
  906. </span> * Utility method for getting the width of the browser's vertical scrollbar. This
  907. * can differ depending on operating system settings, such as the theme or font size.
  908. *
  909. * This method is deprected in favor of {@link #getScrollbarSize}.
  910. *
  911. * @param {Boolean} [force] true to force a recalculation of the value.
  912. * @return {Number} The width of a vertical scrollbar.
  913. * @deprecated
  914. */
  915. getScrollBarWidth: function(force){
  916. var size = Ext.getScrollbarSize(force);
  917. return size.width + 2; // legacy fudge factor
  918. },
  919. <span id='Ext-method-copyTo'> /**
  920. </span> * Copies a set of named properties fom the source object to the destination object.
  921. *
  922. * Example:
  923. *
  924. * ImageComponent = Ext.extend(Ext.Component, {
  925. * initComponent: function() {
  926. * this.autoEl = { tag: 'img' };
  927. * MyComponent.superclass.initComponent.apply(this, arguments);
  928. * this.initialBox = Ext.copyTo({}, this.initialConfig, 'x,y,width,height');
  929. * }
  930. * });
  931. *
  932. * Important note: To borrow class prototype methods, use {@link Ext.Base#borrow} instead.
  933. *
  934. * @param {Object} dest The destination object.
  935. * @param {Object} source The source object.
  936. * @param {String/String[]} names Either an Array of property names, or a comma-delimited list
  937. * of property names to copy.
  938. * @param {Boolean} [usePrototypeKeys] Defaults to false. Pass true to copy keys off of the
  939. * prototype as well as the instance.
  940. * @return {Object} The modified object.
  941. */
  942. copyTo : function(dest, source, names, usePrototypeKeys){
  943. if(typeof names == 'string'){
  944. names = names.split(/[,;\s]/);
  945. }
  946. var n,
  947. nLen = names.length,
  948. name;
  949. for(n = 0; n &lt; nLen; n++) {
  950. name = names[n];
  951. if(usePrototypeKeys || source.hasOwnProperty(name)){
  952. dest[name] = source[name];
  953. }
  954. }
  955. return dest;
  956. },
  957. <span id='Ext-method-destroyMembers'> /**
  958. </span> * Attempts to destroy and then remove a set of named properties of the passed object.
  959. * @param {Object} o The object (most likely a Component) who's properties you wish to destroy.
  960. * @param {String...} args One or more names of the properties to destroy and remove from the object.
  961. */
  962. destroyMembers : function(o){
  963. for (var i = 1, a = arguments, len = a.length; i &lt; len; i++) {
  964. Ext.destroy(o[a[i]]);
  965. delete o[a[i]];
  966. }
  967. },
  968. <span id='Ext-method-log'> /**
  969. </span> * Logs a message. If a console is present it will be used. On Opera, the method
  970. * &quot;opera.postError&quot; is called. In other cases, the message is logged to an array
  971. * &quot;Ext.log.out&quot;. An attached debugger can watch this array and view the log. The
  972. * log buffer is limited to a maximum of &quot;Ext.log.max&quot; entries (defaults to 250).
  973. * The `Ext.log.out` array can also be written to a popup window by entering the
  974. * following in the URL bar (a &quot;bookmarklet&quot;):
  975. *
  976. * javascript:void(Ext.log.show());
  977. *
  978. * If additional parameters are passed, they are joined and appended to the message.
  979. * A technique for tracing entry and exit of a function is this:
  980. *
  981. * function foo () {
  982. * Ext.log({ indent: 1 }, '&gt;&gt; foo');
  983. *
  984. * // log statements in here or methods called from here will be indented
  985. * // by one step
  986. *
  987. * Ext.log({ outdent: 1 }, '&lt;&lt; foo');
  988. * }
  989. *
  990. * This method does nothing in a release build.
  991. *
  992. * @param {String/Object} [options] The message to log or an options object with any
  993. * of the following properties:
  994. *
  995. * - `msg`: The message to log (required).
  996. * - `level`: One of: &quot;error&quot;, &quot;warn&quot;, &quot;info&quot; or &quot;log&quot; (the default is &quot;log&quot;).
  997. * - `dump`: An object to dump to the log as part of the message.
  998. * - `stack`: True to include a stack trace in the log.
  999. * - `indent`: Cause subsequent log statements to be indented one step.
  1000. * - `outdent`: Cause this and following statements to be one step less indented.
  1001. *
  1002. * @param {String...} [message] The message to log (required unless specified in
  1003. * options object).
  1004. *
  1005. * @method
  1006. */
  1007. log :
  1008. //&lt;debug&gt;
  1009. log ||
  1010. //&lt;/debug&gt;
  1011. nullLog,
  1012. <span id='Ext-method-partition'> /**
  1013. </span> * Partitions the set into two sets: a true set and a false set.
  1014. *
  1015. * Example 1:
  1016. *
  1017. * Ext.partition([true, false, true, true, false]);
  1018. * // returns [[true, true, true], [false, false]]
  1019. *
  1020. * Example 2:
  1021. *
  1022. * Ext.partition(
  1023. * Ext.query(&quot;p&quot;),
  1024. * function(val){
  1025. * return val.className == &quot;class1&quot;
  1026. * }
  1027. * );
  1028. * // true are those paragraph elements with a className of &quot;class1&quot;,
  1029. * // false set are those that do not have that className.
  1030. *
  1031. * @param {Array/NodeList} arr The array to partition
  1032. * @param {Function} truth (optional) a function to determine truth.
  1033. * If this is omitted the element itself must be able to be evaluated for its truthfulness.
  1034. * @return {Array} [array of truish values, array of falsy values]
  1035. * @deprecated 4.0.0 Will be removed in the next major version
  1036. */
  1037. partition : function(arr, truth){
  1038. var ret = [[],[]],
  1039. a, v,
  1040. aLen = arr.length;
  1041. for (a = 0; a &lt; aLen; a++) {
  1042. v = arr[a];
  1043. ret[ (truth &amp;&amp; truth(v, a, arr)) || (!truth &amp;&amp; v) ? 0 : 1].push(v);
  1044. }
  1045. return ret;
  1046. },
  1047. <span id='Ext-method-invoke'> /**
  1048. </span> * Invokes a method on each item in an Array.
  1049. *
  1050. * Example:
  1051. *
  1052. * Ext.invoke(Ext.query(&quot;p&quot;), &quot;getAttribute&quot;, &quot;id&quot;);
  1053. * // [el1.getAttribute(&quot;id&quot;), el2.getAttribute(&quot;id&quot;), ..., elN.getAttribute(&quot;id&quot;)]
  1054. *
  1055. * @param {Array/NodeList} arr The Array of items to invoke the method on.
  1056. * @param {String} methodName The method name to invoke.
  1057. * @param {Object...} args Arguments to send into the method invocation.
  1058. * @return {Array} The results of invoking the method on each item in the array.
  1059. * @deprecated 4.0.0 Will be removed in the next major version
  1060. */
  1061. invoke : function(arr, methodName){
  1062. var ret = [],
  1063. args = Array.prototype.slice.call(arguments, 2),
  1064. a, v,
  1065. aLen = arr.length;
  1066. for (a = 0; a &lt; aLen; a++) {
  1067. v = arr[a];
  1068. if (v &amp;&amp; typeof v[methodName] == 'function') {
  1069. ret.push(v[methodName].apply(v, args));
  1070. } else {
  1071. ret.push(undefined);
  1072. }
  1073. }
  1074. return ret;
  1075. },
  1076. <span id='Ext-method-zip'> /**
  1077. </span> * Zips N sets together.
  1078. *
  1079. * Example 1:
  1080. *
  1081. * Ext.zip([1,2,3],[4,5,6]); // [[1,4],[2,5],[3,6]]
  1082. *
  1083. * Example 2:
  1084. *
  1085. * Ext.zip(
  1086. * [ &quot;+&quot;, &quot;-&quot;, &quot;+&quot;],
  1087. * [ 12, 10, 22],
  1088. * [ 43, 15, 96],
  1089. * function(a, b, c){
  1090. * return &quot;$&quot; + a + &quot;&quot; + b + &quot;.&quot; + c
  1091. * }
  1092. * ); // [&quot;$+12.43&quot;, &quot;$-10.15&quot;, &quot;$+22.96&quot;]
  1093. *
  1094. * @param {Array/NodeList...} arr This argument may be repeated. Array(s)
  1095. * to contribute values.
  1096. * @param {Function} zipper (optional) The last item in the argument list.
  1097. * This will drive how the items are zipped together.
  1098. * @return {Array} The zipped set.
  1099. * @deprecated 4.0.0 Will be removed in the next major version
  1100. */
  1101. zip : function(){
  1102. var parts = Ext.partition(arguments, function( val ){ return typeof val != 'function'; }),
  1103. arrs = parts[0],
  1104. fn = parts[1][0],
  1105. len = Ext.max(Ext.pluck(arrs, &quot;length&quot;)),
  1106. ret = [],
  1107. i,
  1108. j,
  1109. aLen;
  1110. for (i = 0; i &lt; len; i++) {
  1111. ret[i] = [];
  1112. if(fn){
  1113. ret[i] = fn.apply(fn, Ext.pluck(arrs, i));
  1114. }else{
  1115. for (j = 0, aLen = arrs.length; j &lt; aLen; j++){
  1116. ret[i].push( arrs[j][i] );
  1117. }
  1118. }
  1119. }
  1120. return ret;
  1121. },
  1122. <span id='Ext-method-toSentence'> /**
  1123. </span> * Turns an array into a sentence, joined by a specified connector - e.g.:
  1124. *
  1125. * Ext.toSentence(['Adama', 'Tigh', 'Roslin']); //'Adama, Tigh and Roslin'
  1126. * Ext.toSentence(['Adama', 'Tigh', 'Roslin'], 'or'); //'Adama, Tigh or Roslin'
  1127. *
  1128. * @param {String[]} items The array to create a sentence from
  1129. * @param {String} connector The string to use to connect the last two words.
  1130. * Usually 'and' or 'or' - defaults to 'and'.
  1131. * @return {String} The sentence string
  1132. * @deprecated 4.0.0 Will be removed in the next major version
  1133. */
  1134. toSentence: function(items, connector) {
  1135. var length = items.length,
  1136. head,
  1137. tail;
  1138. if (length &lt;= 1) {
  1139. return items[0];
  1140. } else {
  1141. head = items.slice(0, length - 1);
  1142. tail = items[length - 1];
  1143. return Ext.util.Format.format(&quot;{0} {1} {2}&quot;, head.join(&quot;, &quot;), connector || 'and', tail);
  1144. }
  1145. },
  1146. <span id='Ext-property-useShims'> /**
  1147. </span> * @property {Boolean} useShims
  1148. * By default, Ext intelligently decides whether floating elements should be shimmed.
  1149. * If you are using flash, you may want to set this to true.
  1150. */
  1151. useShims: isIE6
  1152. });
  1153. }());
  1154. <span id='Ext-method-application'>/**
  1155. </span> * Loads Ext.app.Application class and starts it up with given configuration after the page is ready.
  1156. *
  1157. * See Ext.app.Application for details.
  1158. *
  1159. * @param {Object} config
  1160. */
  1161. Ext.application = function(config) {
  1162. Ext.require('Ext.app.Application');
  1163. Ext.onReady(function() {
  1164. new Ext.app.Application(config);
  1165. });
  1166. };
  1167. </pre>
  1168. </body>
  1169. </html>