dijit.js 56 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154
  1. /*
  2. * Copyright (c) 2004-2007, The Dojo Foundation All Rights Reserved.
  3. *
  4. * Licensed under the Academic Free License version 2.1 or above OR the modified
  5. * BSD license. For more information on Dojo licensing, see:
  6. *
  7. * http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
  8. */
  9. /*
  10. * This is a compiled version of Dojo, built for deployment and not for
  11. * development. To get an editable version, please visit:
  12. *
  13. * http://dojotoolkit.org
  14. *
  15. * for documentation and information on getting the source.
  16. */
  17. if (!dojo._hasResource["dijit._base.focus"]) {
  18. dojo._hasResource["dijit._base.focus"] = true;
  19. dojo.provide("dijit._base.focus");
  20. dojo.mixin(dijit, {
  21. _curFocus : null,
  22. _prevFocus : null,
  23. isCollapsed : function() {
  24. var _1 = dojo.global;
  25. var _2 = dojo.doc;
  26. if (_2.selection) {
  27. return !_2.selection.createRange().text;
  28. } else {
  29. if (_1.getSelection) {
  30. var _3 = _1.getSelection();
  31. if (dojo.isString(_3)) {
  32. return !_3;
  33. } else {
  34. return _3.isCollapsed || !_3.toString();
  35. }
  36. }
  37. }
  38. },
  39. getBookmark : function() {
  40. var _4, _5 = dojo.doc.selection;
  41. if (_5) {
  42. var _6 = _5.createRange();
  43. if (_5.type.toUpperCase() == "CONTROL") {
  44. _4 = _6.length ? dojo._toArray(_6) : null;
  45. } else {
  46. _4 = _6.getBookmark();
  47. }
  48. } else {
  49. if (dojo.global.getSelection) {
  50. _5 = dojo.global.getSelection();
  51. if (_5) {
  52. var _6 = _5.getRangeAt(0);
  53. _4 = _6.cloneRange();
  54. }
  55. } else {
  56. console
  57. .debug("No idea how to store the current selection for this browser!");
  58. }
  59. }
  60. return _4;
  61. },
  62. moveToBookmark : function(_7) {
  63. var _8 = dojo.doc;
  64. if (_8.selection) {
  65. var _9;
  66. if (dojo.isArray(_7)) {
  67. _9 = _8.body.createControlRange();
  68. dojo.forEach(_7, _9.addElement);
  69. } else {
  70. _9 = _8.selection.createRange();
  71. _9.moveToBookmark(_7);
  72. }
  73. _9.select();
  74. } else {
  75. var _a = dojo.global.getSelection && dojo.global.getSelection();
  76. if (_a && _a.removeAllRanges) {
  77. _a.removeAllRanges();
  78. _a.addRange(_7);
  79. } else {
  80. console
  81. .debug("No idea how to restore selection for this browser!");
  82. }
  83. }
  84. },
  85. getFocus : function(_b, _c) {
  86. return {
  87. node : _b && dojo.isDescendant(dijit._curFocus, _b.domNode)
  88. ? dijit._prevFocus
  89. : dijit._curFocus,
  90. bookmark : !dojo.withGlobal(_c || dojo.global,
  91. dijit.isCollapsed) ? dojo.withGlobal(_c || dojo.global,
  92. dijit.getBookmark) : null,
  93. openedForWindow : _c
  94. };
  95. },
  96. focus : function(_d) {
  97. if (!_d) {
  98. return;
  99. }
  100. var _e = "node" in _d ? _d.node : _d, _f = _d.bookmark, _10 = _d.openedForWindow;
  101. if (_e) {
  102. var _11 = (_e.tagName.toLowerCase() == "iframe")
  103. ? _e.contentWindow
  104. : _e;
  105. if (_11 && _11.focus) {
  106. try {
  107. _11.focus();
  108. } catch (e) {
  109. }
  110. }
  111. dijit._onFocusNode(_e);
  112. }
  113. if (_f && dojo.withGlobal(_10 || dojo.global, dijit.isCollapsed)) {
  114. if (_10) {
  115. _10.focus();
  116. }
  117. try {
  118. dojo.withGlobal(_10 || dojo.global, moveToBookmark, null,
  119. [_f]);
  120. } catch (e) {
  121. }
  122. }
  123. },
  124. _activeStack : [],
  125. registerWin : function(_12) {
  126. if (!_12) {
  127. _12 = window;
  128. }
  129. dojo.connect(_12.document, "onmousedown", null, function(evt) {
  130. dijit._justMouseDowned = true;
  131. setTimeout(function() {
  132. dijit._justMouseDowned = false;
  133. }, 0);
  134. dijit._onTouchNode(evt.target || evt.srcElement);
  135. });
  136. var _14 = _12.document.body
  137. || _12.document.getElementsByTagName("body")[0];
  138. if (_14) {
  139. if (dojo.isIE) {
  140. _14.attachEvent("onactivate", function(evt) {
  141. if (evt.srcElement.tagName.toLowerCase() != "body") {
  142. dijit._onFocusNode(evt.srcElement);
  143. }
  144. });
  145. _14.attachEvent("ondeactivate", function(evt) {
  146. dijit._onBlurNode(evt.srcElement);
  147. });
  148. } else {
  149. _14.addEventListener("focus", function(evt) {
  150. dijit._onFocusNode(evt.target);
  151. }, true);
  152. _14.addEventListener("blur", function(evt) {
  153. dijit._onBlurNode(evt.target);
  154. }, true);
  155. }
  156. }
  157. _14 = null;
  158. },
  159. _onBlurNode : function(_19) {
  160. dijit._prevFocus = dijit._curFocus;
  161. dijit._curFocus = null;
  162. var w = dijit.getEnclosingWidget(_19);
  163. if (w && w._setStateClass) {
  164. w._focused = false;
  165. w._setStateClass();
  166. }
  167. if (dijit._justMouseDowned) {
  168. return;
  169. }
  170. if (dijit._clearActiveWidgetsTimer) {
  171. clearTimeout(dijit._clearActiveWidgetsTimer);
  172. }
  173. dijit._clearActiveWidgetsTimer = setTimeout(function() {
  174. delete dijit._clearActiveWidgetsTimer;
  175. dijit._setStack([]);
  176. }, 100);
  177. },
  178. _onTouchNode : function(_1b) {
  179. if (dijit._clearActiveWidgetsTimer) {
  180. clearTimeout(dijit._clearActiveWidgetsTimer);
  181. delete dijit._clearActiveWidgetsTimer;
  182. }
  183. var _1c = [];
  184. try {
  185. while (_1b) {
  186. if (_1b.dijitPopupParent) {
  187. _1b = dijit.byId(_1b.dijitPopupParent).domNode;
  188. } else {
  189. if (_1b.tagName && _1b.tagName.toLowerCase() == "body") {
  190. if (_1b === dojo.body()) {
  191. break;
  192. }
  193. _1b = dojo.query("iframe").filter(function(_1d) {
  194. return _1d.contentDocument.body === _1b;
  195. })[0];
  196. } else {
  197. var id = _1b.getAttribute
  198. && _1b.getAttribute("widgetId");
  199. if (id) {
  200. _1c.unshift(id);
  201. }
  202. _1b = _1b.parentNode;
  203. }
  204. }
  205. }
  206. } catch (e) {
  207. }
  208. dijit._setStack(_1c);
  209. },
  210. _onFocusNode : function(_1f) {
  211. if (_1f && _1f.tagName && _1f.tagName.toLowerCase() == "body") {
  212. return;
  213. }
  214. dijit._onTouchNode(_1f);
  215. if (_1f == dijit._curFocus) {
  216. return;
  217. }
  218. dijit._prevFocus = dijit._curFocus;
  219. dijit._curFocus = _1f;
  220. dojo.publish("focusNode", [_1f]);
  221. var w = dijit.getEnclosingWidget(_1f);
  222. if (w && w._setStateClass) {
  223. w._focused = true;
  224. w._setStateClass();
  225. }
  226. },
  227. _setStack : function(_21) {
  228. var _22 = dijit._activeStack;
  229. dijit._activeStack = _21;
  230. for (var _23 = 0; _23 < Math.min(_22.length, _21.length); _23++) {
  231. if (_22[_23] != _21[_23]) {
  232. break;
  233. }
  234. }
  235. for (var i = _22.length - 1; i >= _23; i--) {
  236. var _25 = dijit.byId(_22[i]);
  237. if (_25) {
  238. dojo.publish("widgetBlur", [_25]);
  239. if (_25._onBlur) {
  240. _25._onBlur();
  241. }
  242. }
  243. }
  244. for (var i = _23; i < _21.length; i++) {
  245. var _25 = dijit.byId(_21[i]);
  246. if (_25) {
  247. dojo.publish("widgetFocus", [_25]);
  248. if (_25._onFocus) {
  249. _25._onFocus();
  250. }
  251. }
  252. }
  253. }
  254. });
  255. dojo.addOnLoad(dijit.registerWin);
  256. }
  257. if (!dojo._hasResource["dijit._base.manager"]) {
  258. dojo._hasResource["dijit._base.manager"] = true;
  259. dojo.provide("dijit._base.manager");
  260. dojo.declare("dijit.WidgetSet", null, {
  261. constructor : function() {
  262. this._hash = {};
  263. },
  264. add : function(_26) {
  265. if (this._hash[_26.id]) {
  266. throw new Error("Tried to register widget with id=="
  267. + _26.id + " but that id is already registered");
  268. }
  269. this._hash[_26.id] = _26;
  270. },
  271. remove : function(id) {
  272. delete this._hash[id];
  273. },
  274. forEach : function(_28) {
  275. for (var id in this._hash) {
  276. _28(this._hash[id]);
  277. }
  278. },
  279. filter : function(_2a) {
  280. var res = new dijit.WidgetSet();
  281. this.forEach(function(_2c) {
  282. if (_2a(_2c)) {
  283. res.add(_2c);
  284. }
  285. });
  286. return res;
  287. },
  288. byId : function(id) {
  289. return this._hash[id];
  290. },
  291. byClass : function(cls) {
  292. return this.filter(function(_2f) {
  293. return _2f.declaredClass == cls;
  294. });
  295. }
  296. });
  297. dijit.registry = new dijit.WidgetSet();
  298. dijit._widgetTypeCtr = {};
  299. dijit.getUniqueId = function(_30) {
  300. var id;
  301. do {
  302. id = _30
  303. + "_"
  304. + (dijit._widgetTypeCtr[_30] !== undefined
  305. ? ++dijit._widgetTypeCtr[_30]
  306. : dijit._widgetTypeCtr[_30] = 0);
  307. } while (dijit.byId(id));
  308. return id;
  309. };
  310. if (dojo.isIE) {
  311. dojo.addOnUnload(function() {
  312. dijit.registry.forEach(function(_32) {
  313. _32.destroy();
  314. });
  315. });
  316. }
  317. dijit.byId = function(id) {
  318. return (dojo.isString(id)) ? dijit.registry.byId(id) : id;
  319. };
  320. dijit.byNode = function(_34) {
  321. return dijit.registry.byId(_34.getAttribute("widgetId"));
  322. };
  323. dijit.getEnclosingWidget = function(_35) {
  324. while (_35) {
  325. if (_35.getAttribute && _35.getAttribute("widgetId")) {
  326. return dijit.registry.byId(_35.getAttribute("widgetId"));
  327. }
  328. _35 = _35.parentNode;
  329. }
  330. return null;
  331. };
  332. }
  333. if (!dojo._hasResource["dijit._base.place"]) {
  334. dojo._hasResource["dijit._base.place"] = true;
  335. dojo.provide("dijit._base.place");
  336. dijit.getViewport = function() {
  337. var _36 = dojo.global;
  338. var _37 = dojo.doc;
  339. var w = 0, h = 0;
  340. if (dojo.isMozilla) {
  341. var _3a, _3b, _3c, _3d;
  342. if (_37.body.clientWidth > _37.documentElement.clientWidth) {
  343. _3a = _37.documentElement.clientWidth;
  344. _3c = _37.body.clientWidth;
  345. } else {
  346. _3c = _37.documentElement.clientWidth;
  347. _3a = _37.body.clientWidth;
  348. }
  349. if (_37.body.clientHeight > _37.documentElement.clientHeight) {
  350. _3b = _37.documentElement.clientHeight;
  351. _3d = _37.body.clientHeight;
  352. } else {
  353. _3d = _37.documentElement.clientHeight;
  354. _3b = _37.body.clientHeight;
  355. }
  356. w = (_3c > _36.innerWidth) ? _3a : _3c;
  357. h = (_3d > _36.innerHeight) ? _3b : _3d;
  358. } else {
  359. if (!dojo.isOpera && _36.innerWidth) {
  360. w = _36.innerWidth;
  361. h = _36.innerHeight;
  362. } else {
  363. if (dojo.isIE && _37.documentElement
  364. && _37.documentElement.clientHeight) {
  365. w = _37.documentElement.clientWidth;
  366. h = _37.documentElement.clientHeight;
  367. } else {
  368. if (dojo.body().clientWidth) {
  369. w = dojo.body().clientWidth;
  370. h = dojo.body().clientHeight;
  371. }
  372. }
  373. }
  374. }
  375. var _3e = dojo._docScroll();
  376. return {
  377. w : w,
  378. h : h,
  379. l : _3e.x,
  380. t : _3e.y
  381. };
  382. };
  383. dijit.placeOnScreen = function(_3f, pos, _41, _42) {
  384. var _43 = dojo.map(_41, function(_44) {
  385. return {
  386. corner : _44,
  387. pos : pos
  388. };
  389. });
  390. return dijit._place(_3f, _43);
  391. };
  392. dijit._place = function(_45, _46, _47) {
  393. var _48 = dijit.getViewport();
  394. if (!_45.parentNode
  395. || String(_45.parentNode.tagName).toLowerCase() != "body") {
  396. dojo.body().appendChild(_45);
  397. }
  398. var _49 = null;
  399. for (var i = 0; i < _46.length; i++) {
  400. var _4b = _46[i].corner;
  401. var pos = _46[i].pos;
  402. if (_47) {
  403. _47(_4b);
  404. }
  405. var _4d = _45.style.display;
  406. var _4e = _45.style.visibility;
  407. _45.style.visibility = "hidden";
  408. _45.style.display = "";
  409. var mb = dojo.marginBox(_45);
  410. _45.style.display = _4d;
  411. _45.style.visibility = _4e;
  412. var _50 = (_4b.charAt(1) == "L" ? pos.x : Math.max(_48.l, pos.x
  413. - mb.w)), _51 = (_4b.charAt(0) == "T"
  414. ? pos.y
  415. : Math.max(_48.t, pos.y - mb.h)), _52 = (_4b.charAt(1) == "L"
  416. ? Math.min(_48.l + _48.w, _50 + mb.w)
  417. : pos.x), _53 = (_4b.charAt(0) == "T" ? Math.min(_48.t
  418. + _48.h, _51 + mb.h) : pos.y), _54 = _52 - _50, _55 = _53
  419. - _51, _56 = (mb.w - _54) + (mb.h - _55);
  420. if (_49 == null || _56 < _49.overflow) {
  421. _49 = {
  422. corner : _4b,
  423. aroundCorner : _46[i].aroundCorner,
  424. x : _50,
  425. y : _51,
  426. w : _54,
  427. h : _55,
  428. overflow : _56
  429. };
  430. }
  431. if (_56 == 0) {
  432. break;
  433. }
  434. }
  435. _45.style.left = _49.x + "px";
  436. _45.style.top = _49.y + "px";
  437. return _49;
  438. };
  439. dijit.placeOnScreenAroundElement = function(_57, _58, _59, _5a) {
  440. _58 = dojo.byId(_58);
  441. var _5b = _58.style.display;
  442. _58.style.display = "";
  443. var _5c = _58.offsetWidth;
  444. var _5d = _58.offsetHeight;
  445. var _5e = dojo.coords(_58, true);
  446. _58.style.display = _5b;
  447. var _5f = [];
  448. for (var _60 in _59) {
  449. _5f.push({
  450. aroundCorner : _60,
  451. corner : _59[_60],
  452. pos : {
  453. x : _5e.x + (_60.charAt(1) == "L" ? 0 : _5c),
  454. y : _5e.y + (_60.charAt(0) == "T" ? 0 : _5d)
  455. }
  456. });
  457. }
  458. return dijit._place(_57, _5f, _5a);
  459. };
  460. }
  461. if (!dojo._hasResource["dijit._base.window"]) {
  462. dojo._hasResource["dijit._base.window"] = true;
  463. dojo.provide("dijit._base.window");
  464. dijit.getDocumentWindow = function(doc) {
  465. if (dojo.isSafari && !doc._parentWindow) {
  466. var fix = function(win) {
  467. win.document._parentWindow = win;
  468. for (var i = 0; i < win.frames.length; i++) {
  469. fix(win.frames[i]);
  470. }
  471. };
  472. fix(window.top);
  473. }
  474. if (dojo.isIE && window !== document.parentWindow && !doc._parentWindow) {
  475. doc.parentWindow.execScript("document._parentWindow = window;",
  476. "Javascript");
  477. var win = doc._parentWindow;
  478. doc._parentWindow = null;
  479. return win;
  480. }
  481. return doc._parentWindow || doc.parentWindow || doc.defaultView;
  482. };
  483. }
  484. if (!dojo._hasResource["dijit._base.popup"]) {
  485. dojo._hasResource["dijit._base.popup"] = true;
  486. dojo.provide("dijit._base.popup");
  487. dijit.popup = new function() {
  488. var _66 = [], _67 = 1000, _68 = 1;
  489. this.open = function(_69) {
  490. var _6a = _69.popup, _6b = _69.orient || {
  491. "BL" : "TL",
  492. "TL" : "BL"
  493. }, _6c = _69.around, id = (_69.around && _69.around.id)
  494. ? (_69.around.id + "_dropdown")
  495. : ("popup_" + _68++);
  496. var _6e = dojo.doc.createElement("div");
  497. _6e.id = id;
  498. _6e.className = "dijitPopup";
  499. _6e.style.zIndex = _67 + _66.length;
  500. _6e.style.visibility = "hidden";
  501. if (_69.parent) {
  502. _6e.dijitPopupParent = _69.parent.id;
  503. }
  504. dojo.body().appendChild(_6e);
  505. _6a.domNode.style.display = "";
  506. _6e.appendChild(_6a.domNode);
  507. var _6f = new dijit.BackgroundIframe(_6e);
  508. var _70 = _6c ? dijit.placeOnScreenAroundElement(_6e, _6c, _6b,
  509. _6a.orient ? dojo.hitch(_6a, "orient") : null) : dijit
  510. .placeOnScreen(_6e, _69, _6b == "R" ? ["TR", "BR", "TL",
  511. "BL"] : ["TL", "BL", "TR", "BR"]);
  512. _6e.style.visibility = "visible";
  513. var _71 = [];
  514. function getTopPopup() {
  515. for (var pi = _66.length - 1; pi > 0
  516. && _66[pi].parent === _66[pi - 1].widget; pi--) {
  517. }
  518. return _66[pi];
  519. };
  520. _71.push(dojo.connect(_6e, "onkeypress", this, function(evt) {
  521. if (evt.keyCode == dojo.keys.ESCAPE && _69.onCancel) {
  522. _69.onCancel();
  523. } else {
  524. if (evt.keyCode == dojo.keys.TAB) {
  525. dojo.stopEvent(evt);
  526. var _74 = getTopPopup();
  527. if (_74 && _74.onCancel) {
  528. _74.onCancel();
  529. }
  530. }
  531. }
  532. }));
  533. if (_6a.onCancel) {
  534. _71.push(dojo.connect(_6a, "onCancel", null, _69.onCancel));
  535. }
  536. _71.push(dojo.connect(_6a,
  537. _6a.onExecute ? "onExecute" : "onChange", null, function() {
  538. var _75 = getTopPopup();
  539. if (_75 && _75.onExecute) {
  540. _75.onExecute();
  541. }
  542. }));
  543. _66.push({
  544. wrapper : _6e,
  545. iframe : _6f,
  546. widget : _6a,
  547. parent : _69.parent,
  548. onExecute : _69.onExecute,
  549. onCancel : _69.onCancel,
  550. onClose : _69.onClose,
  551. handlers : _71
  552. });
  553. if (_6a.onOpen) {
  554. _6a.onOpen(_70);
  555. }
  556. return _70;
  557. };
  558. this.close = function(_76) {
  559. while (dojo.some(_66, function(_77) {
  560. return _77.widget == _76;
  561. })) {
  562. var top = _66.pop(), _79 = top.wrapper, _7a = top.iframe, _7b = top.widget, _7c = top.onClose;
  563. if (_7b.onClose) {
  564. _7b.onClose();
  565. }
  566. dojo.forEach(top.handlers, dojo.disconnect);
  567. if (!_7b || !_7b.domNode) {
  568. return;
  569. }
  570. dojo.style(_7b.domNode, "display", "none");
  571. dojo.body().appendChild(_7b.domNode);
  572. _7a.destroy();
  573. dojo._destroyElement(_79);
  574. if (_7c) {
  575. _7c();
  576. }
  577. }
  578. };
  579. }();
  580. dijit._frames = new function() {
  581. var _7d = [];
  582. this.pop = function() {
  583. var _7e;
  584. if (_7d.length) {
  585. _7e = _7d.pop();
  586. _7e.style.display = "";
  587. } else {
  588. if (dojo.isIE) {
  589. var _7f = "<iframe src='javascript:\"\"'"
  590. + " style='position: absolute; left: 0px; top: 0px;"
  591. + "z-index: -1; filter:Alpha(Opacity=\"0\");'>";
  592. _7e = dojo.doc.createElement(_7f);
  593. } else {
  594. var _7e = dojo.doc.createElement("iframe");
  595. _7e.src = "javascript:\"\"";
  596. _7e.className = "dijitBackgroundIframe";
  597. }
  598. _7e.tabIndex = -1;
  599. dojo.body().appendChild(_7e);
  600. }
  601. return _7e;
  602. };
  603. this.push = function(_80) {
  604. _80.style.display = "";
  605. if (dojo.isIE) {
  606. _80.style.removeExpression("width");
  607. _80.style.removeExpression("height");
  608. }
  609. _7d.push(_80);
  610. };
  611. }();
  612. if (dojo.isIE && dojo.isIE < 7) {
  613. dojo.addOnLoad(function() {
  614. var f = dijit._frames;
  615. dojo.forEach([f.pop()], f.push);
  616. });
  617. }
  618. dijit.BackgroundIframe = function(_82) {
  619. if (!_82.id) {
  620. throw new Error("no id");
  621. }
  622. if ((dojo.isIE && dojo.isIE < 7)
  623. || (dojo.isFF && dojo.isFF < 3 && dojo.hasClass(dojo.body(),
  624. "dijit_a11y"))) {
  625. var _83 = dijit._frames.pop();
  626. _82.appendChild(_83);
  627. if (dojo.isIE) {
  628. _83.style.setExpression("width", "document.getElementById('"
  629. + _82.id + "').offsetWidth");
  630. _83.style.setExpression("height", "document.getElementById('"
  631. + _82.id + "').offsetHeight");
  632. }
  633. this.iframe = _83;
  634. }
  635. };
  636. dojo.extend(dijit.BackgroundIframe, {
  637. destroy : function() {
  638. if (this.iframe) {
  639. dijit._frames.push(this.iframe);
  640. delete this.iframe;
  641. }
  642. }
  643. });
  644. }
  645. if (!dojo._hasResource["dijit._base.scroll"]) {
  646. dojo._hasResource["dijit._base.scroll"] = true;
  647. dojo.provide("dijit._base.scroll");
  648. dijit.scrollIntoView = function(_84) {
  649. if (dojo.isIE) {
  650. if (dojo.marginBox(_84.parentNode).h <= _84.parentNode.scrollHeight) {
  651. _84.scrollIntoView(false);
  652. }
  653. } else {
  654. if (dojo.isMozilla) {
  655. _84.scrollIntoView(false);
  656. } else {
  657. var _85 = _84.parentNode;
  658. var _86 = _85.scrollTop + dojo.marginBox(_85).h;
  659. var _87 = _84.offsetTop + dojo.marginBox(_84).h;
  660. if (_86 < _87) {
  661. _85.scrollTop += (_87 - _86);
  662. } else {
  663. if (_85.scrollTop > _84.offsetTop) {
  664. _85.scrollTop -= (_85.scrollTop - _84.offsetTop);
  665. }
  666. }
  667. }
  668. }
  669. };
  670. }
  671. if (!dojo._hasResource["dijit._base.sniff"]) {
  672. dojo._hasResource["dijit._base.sniff"] = true;
  673. dojo.provide("dijit._base.sniff");
  674. (function() {
  675. var d = dojo;
  676. var ie = d.isIE;
  677. var _8a = d.isOpera;
  678. var maj = Math.floor;
  679. var _8c = {
  680. dj_ie : ie,
  681. dj_ie6 : maj(ie) == 6,
  682. dj_ie7 : maj(ie) == 7,
  683. dj_iequirks : ie && d.isQuirks,
  684. dj_opera : _8a,
  685. dj_opera8 : maj(_8a) == 8,
  686. dj_opera9 : maj(_8a) == 9,
  687. dj_khtml : d.isKhtml,
  688. dj_safari : d.isSafari,
  689. dj_gecko : d.isMozilla
  690. };
  691. for (var p in _8c) {
  692. if (_8c[p]) {
  693. var _8e = dojo.doc.documentElement;
  694. if (_8e.className) {
  695. _8e.className += " " + p;
  696. } else {
  697. _8e.className = p;
  698. }
  699. }
  700. }
  701. })();
  702. }
  703. if (!dojo._hasResource["dijit._base.bidi"]) {
  704. dojo._hasResource["dijit._base.bidi"] = true;
  705. dojo.provide("dijit._base.bidi");
  706. dojo.addOnLoad(function() {
  707. if (!dojo._isBodyLtr()) {
  708. dojo.addClass(dojo.body(), "dijitRtl");
  709. }
  710. });
  711. }
  712. if (!dojo._hasResource["dijit._base.typematic"]) {
  713. dojo._hasResource["dijit._base.typematic"] = true;
  714. dojo.provide("dijit._base.typematic");
  715. dijit.typematic = {
  716. _fireEventAndReload : function() {
  717. this._timer = null;
  718. this._callback(++this._count, this._node, this._evt);
  719. this._currentTimeout = (this._currentTimeout < 0)
  720. ? this._initialDelay
  721. : ((this._subsequentDelay > 1)
  722. ? this._subsequentDelay
  723. : Math.round(this._currentTimeout
  724. * this._subsequentDelay));
  725. this._timer = setTimeout(dojo.hitch(this, "_fireEventAndReload"),
  726. this._currentTimeout);
  727. },
  728. trigger : function(evt, _90, _91, _92, obj, _94, _95) {
  729. if (obj != this._obj) {
  730. this.stop();
  731. this._initialDelay = _95 || 500;
  732. this._subsequentDelay = _94 || 0.9;
  733. this._obj = obj;
  734. this._evt = evt;
  735. this._node = _91;
  736. this._currentTimeout = -1;
  737. this._count = -1;
  738. this._callback = dojo.hitch(_90, _92);
  739. this._fireEventAndReload();
  740. }
  741. },
  742. stop : function() {
  743. if (this._timer) {
  744. clearTimeout(this._timer);
  745. this._timer = null;
  746. }
  747. if (this._obj) {
  748. this._callback(-1, this._node, this._evt);
  749. this._obj = null;
  750. }
  751. },
  752. addKeyListener : function(_96, _97, _98, _99, _9a, _9b) {
  753. return [dojo.connect(_96, "onkeypress", this, function(evt) {
  754. if (evt.keyCode == _97.keyCode
  755. && (!_97.charCode || _97.charCode == evt.charCode)
  756. && (_97.ctrlKey === undefined || _97.ctrlKey == evt.ctrlKey)
  757. && (_97.altKey === undefined || _97.altKey == evt.ctrlKey)
  758. && (_97.shiftKey === undefined || _97.shiftKey == evt.ctrlKey)) {
  759. dojo.stopEvent(evt);
  760. dijit.typematic.trigger(_97, _98, _96, _99, _97, _9a, _9b);
  761. } else {
  762. if (dijit.typematic._obj == _97) {
  763. dijit.typematic.stop();
  764. }
  765. }
  766. }), dojo.connect(_96, "onkeyup", this, function(evt) {
  767. if (dijit.typematic._obj == _97) {
  768. dijit.typematic.stop();
  769. }
  770. })];
  771. },
  772. addMouseListener : function(_9e, _9f, _a0, _a1, _a2) {
  773. var dc = dojo.connect;
  774. return [dc(_9e, "mousedown", this, function(evt) {
  775. dojo.stopEvent(evt);
  776. dijit.typematic.trigger(evt, _9f, _9e, _a0, _9e, _a1,
  777. _a2);
  778. }), dc(_9e, "mouseup", this, function(evt) {
  779. dojo.stopEvent(evt);
  780. dijit.typematic.stop();
  781. }), dc(_9e, "mouseout", this, function(evt) {
  782. dojo.stopEvent(evt);
  783. dijit.typematic.stop();
  784. }), dc(_9e, "mousemove", this, function(evt) {
  785. dojo.stopEvent(evt);
  786. }), dc(_9e, "dblclick", this, function(evt) {
  787. dojo.stopEvent(evt);
  788. if (dojo.isIE) {
  789. dijit.typematic.trigger(evt, _9f, _9e, _a0, _9e,
  790. _a1, _a2);
  791. setTimeout(dijit.typematic.stop, 50);
  792. }
  793. })];
  794. },
  795. addListener : function(_a9, _aa, _ab, _ac, _ad, _ae, _af) {
  796. return this.addKeyListener(_aa, _ab, _ac, _ad, _ae, _af)
  797. .concat(this.addMouseListener(_a9, _ac, _ad, _ae, _af));
  798. }
  799. };
  800. }
  801. if (!dojo._hasResource["dijit._base.wai"]) {
  802. dojo._hasResource["dijit._base.wai"] = true;
  803. dojo.provide("dijit._base.wai");
  804. dijit.wai = {
  805. onload : function() {
  806. var div = document.createElement("div");
  807. div.id = "a11yTestNode";
  808. div.style.cssText = "border: 1px solid;"
  809. + "border-color:red green;" + "position: absolute;"
  810. + "height: 5px;" + "top: -999px;"
  811. + "background-image: url(\""
  812. + dojo.moduleUrl("dijit", "form/templates/blank.gif")
  813. + "\");";
  814. dojo.body().appendChild(div);
  815. function check() {
  816. var cs = dojo.getComputedStyle(div);
  817. if (cs) {
  818. var _b2 = cs.backgroundImage;
  819. var _b3 = (cs.borderTopColor == cs.borderRightColor)
  820. || (_b2 != null && (_b2 == "none" || _b2 == "url(invalid-url:)"));
  821. dojo[_b3 ? "addClass" : "removeClass"](dojo.body(),
  822. "dijit_a11y");
  823. }
  824. };
  825. check();
  826. if (dojo.isIE) {
  827. setInterval(check, 4000);
  828. }
  829. }
  830. };
  831. if (dojo.isIE || dojo.isMoz) {
  832. dojo._loaders.unshift(dijit.wai.onload);
  833. }
  834. dojo.mixin(dijit, {
  835. hasWaiRole : function(_b4) {
  836. if (_b4.hasAttribute) {
  837. return _b4.hasAttribute("role");
  838. } else {
  839. return _b4.getAttribute("role") ? true : false;
  840. }
  841. },
  842. getWaiRole : function(_b5) {
  843. var _b6 = _b5.getAttribute("role");
  844. if (_b6) {
  845. var _b7 = _b6.indexOf(":");
  846. return _b7 == -1 ? _b6 : _b6.substring(_b7 + 1);
  847. } else {
  848. return "";
  849. }
  850. },
  851. setWaiRole : function(_b8, _b9) {
  852. if (dojo.isFF && dojo.isFF < 3) {
  853. _b8.setAttribute("role", "wairole:" + _b9);
  854. } else {
  855. _b8.setAttribute("role", _b9);
  856. }
  857. },
  858. removeWaiRole : function(_ba) {
  859. _ba.removeAttribute("role");
  860. },
  861. hasWaiState : function(_bb, _bc) {
  862. if (dojo.isFF && dojo.isFF < 3) {
  863. return _bb.hasAttributeNS("http://www.w3.org/2005/07/aaa", _bc);
  864. } else {
  865. if (_bb.hasAttribute) {
  866. return _bb.hasAttribute("aria-" + _bc);
  867. } else {
  868. return _bb.getAttribute("aria-" + _bc) ? true : false;
  869. }
  870. }
  871. },
  872. getWaiState : function(_bd, _be) {
  873. if (dojo.isFF && dojo.isFF < 3) {
  874. return _bd.getAttributeNS("http://www.w3.org/2005/07/aaa", _be);
  875. } else {
  876. var _bf = _bd.getAttribute("aria-" + _be);
  877. return _bf ? _bf : "";
  878. }
  879. },
  880. setWaiState : function(_c0, _c1, _c2) {
  881. if (dojo.isFF && dojo.isFF < 3) {
  882. _c0.setAttributeNS("http://www.w3.org/2005/07/aaa", "aaa:"
  883. + _c1, _c2);
  884. } else {
  885. _c0.setAttribute("aria-" + _c1, _c2);
  886. }
  887. },
  888. removeWaiState : function(_c3, _c4) {
  889. if (dojo.isFF && dojo.isFF < 3) {
  890. _c3.removeAttributeNS("http://www.w3.org/2005/07/aaa", _c4);
  891. } else {
  892. _c3.removeAttribute("aria-" + _c4);
  893. }
  894. }
  895. });
  896. }
  897. if (!dojo._hasResource["dijit._base"]) {
  898. dojo._hasResource["dijit._base"] = true;
  899. dojo.provide("dijit._base");
  900. }
  901. if (!dojo._hasResource["dojo.date.stamp"]) {
  902. dojo._hasResource["dojo.date.stamp"] = true;
  903. dojo.provide("dojo.date.stamp");
  904. dojo.date.stamp.fromISOString = function(_c5, _c6) {
  905. if (!dojo.date.stamp._isoRegExp) {
  906. dojo.date.stamp._isoRegExp = /^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;
  907. }
  908. var _c7 = dojo.date.stamp._isoRegExp.exec(_c5);
  909. var _c8 = null;
  910. if (_c7) {
  911. _c7.shift();
  912. _c7[1] && _c7[1]--;
  913. _c7[6] && (_c7[6] *= 1000);
  914. if (_c6) {
  915. _c6 = new Date(_c6);
  916. dojo.map(
  917. ["FullYear", "Month", "Date", "Hours", "Minutes",
  918. "Seconds", "Milliseconds"], function(_c9) {
  919. return _c6["get" + _c9]();
  920. }).forEach(function(_ca, _cb) {
  921. if (_c7[_cb] === undefined) {
  922. _c7[_cb] = _ca;
  923. }
  924. });
  925. }
  926. _c8 = new Date(_c7[0] || 1970, _c7[1] || 0, _c7[2] || 0, _c7[3]
  927. || 0, _c7[4] || 0, _c7[5] || 0, _c7[6] || 0);
  928. var _cc = 0;
  929. var _cd = _c7[7] && _c7[7].charAt(0);
  930. if (_cd != "Z") {
  931. _cc = ((_c7[8] || 0) * 60) + (Number(_c7[9]) || 0);
  932. if (_cd != "-") {
  933. _cc *= -1;
  934. }
  935. }
  936. if (_cd) {
  937. _cc -= _c8.getTimezoneOffset();
  938. }
  939. if (_cc) {
  940. _c8.setTime(_c8.getTime() + _cc * 60000);
  941. }
  942. }
  943. return _c8;
  944. };
  945. dojo.date.stamp.toISOString = function(_ce, _cf) {
  946. var _ = function(n) {
  947. return (n < 10) ? "0" + n : n;
  948. };
  949. _cf = _cf || {};
  950. var _d2 = [];
  951. var _d3 = _cf.zulu ? "getUTC" : "get";
  952. var _d4 = "";
  953. if (_cf.selector != "time") {
  954. _d4 = [_ce[_d3 + "FullYear"](), _(_ce[_d3 + "Month"]() + 1),
  955. _(_ce[_d3 + "Date"]())].join("-");
  956. }
  957. _d2.push(_d4);
  958. if (_cf.selector != "date") {
  959. var _d5 = [_(_ce[_d3 + "Hours"]()), _(_ce[_d3 + "Minutes"]()),
  960. _(_ce[_d3 + "Seconds"]())].join(":");
  961. var _d6 = _ce[_d3 + "Milliseconds"]();
  962. if (_cf.milliseconds) {
  963. _d5 += "." + (_d6 < 100 ? "0" : "") + _(_d6);
  964. }
  965. if (_cf.zulu) {
  966. _d5 += "Z";
  967. } else {
  968. if (_cf.selector != "time") {
  969. var _d7 = _ce.getTimezoneOffset();
  970. var _d8 = Math.abs(_d7);
  971. _d5 += (_d7 > 0 ? "-" : "+") + _(Math.floor(_d8 / 60))
  972. + ":" + _(_d8 % 60);
  973. }
  974. }
  975. _d2.push(_d5);
  976. }
  977. return _d2.join("T");
  978. };
  979. }
  980. if (!dojo._hasResource["dojo.parser"]) {
  981. dojo._hasResource["dojo.parser"] = true;
  982. dojo.provide("dojo.parser");
  983. dojo.parser = new function() {
  984. var d = dojo;
  985. function val2type(_da) {
  986. if (d.isString(_da)) {
  987. return "string";
  988. }
  989. if (typeof _da == "number") {
  990. return "number";
  991. }
  992. if (typeof _da == "boolean") {
  993. return "boolean";
  994. }
  995. if (d.isFunction(_da)) {
  996. return "function";
  997. }
  998. if (d.isArray(_da)) {
  999. return "array";
  1000. }
  1001. if (_da instanceof Date) {
  1002. return "date";
  1003. }
  1004. if (_da instanceof d._Url) {
  1005. return "url";
  1006. }
  1007. return "object";
  1008. };
  1009. function str2obj(_db, _dc) {
  1010. switch (_dc) {
  1011. case "string" :
  1012. return _db;
  1013. case "number" :
  1014. return _db.length ? Number(_db) : NaN;
  1015. case "boolean" :
  1016. return typeof _db == "boolean"
  1017. ? _db
  1018. : !(_db.toLowerCase() == "false");
  1019. case "function" :
  1020. if (d.isFunction(_db)) {
  1021. _db = _db.toString();
  1022. _db = d.trim(_db.substring(_db.indexOf("{") + 1,
  1023. _db.length - 1));
  1024. }
  1025. try {
  1026. if (_db.search(/[^\w\.]+/i) != -1) {
  1027. _db = d.parser._nameAnonFunc(new Function(_db),
  1028. this);
  1029. }
  1030. return d.getObject(_db, false);
  1031. } catch (e) {
  1032. return new Function();
  1033. }
  1034. case "array" :
  1035. return _db.split(/\s*,\s*/);
  1036. case "date" :
  1037. switch (_db) {
  1038. case "" :
  1039. return new Date("");
  1040. case "now" :
  1041. return allGetServerTime();
  1042. default :
  1043. return d.date.stamp.fromISOString(_db);
  1044. }
  1045. case "url" :
  1046. return d.baseUrl + _db;
  1047. default :
  1048. return d.fromJson(_db);
  1049. }
  1050. };
  1051. var _dd = {};
  1052. function getClassInfo(_de) {
  1053. if (!_dd[_de]) {
  1054. var cls = d.getObject(_de);
  1055. if (!d.isFunction(cls)) {
  1056. throw new Error("Could not load class '"
  1057. + _de
  1058. + "'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");
  1059. }
  1060. var _e0 = cls.prototype;
  1061. var _e1 = {};
  1062. for (var _e2 in _e0) {
  1063. if (_e2.charAt(0) == "_") {
  1064. continue;
  1065. }
  1066. var _e3 = _e0[_e2];
  1067. _e1[_e2] = val2type(_e3);
  1068. }
  1069. _dd[_de] = {
  1070. cls : cls,
  1071. params : _e1
  1072. };
  1073. }
  1074. return _dd[_de];
  1075. };
  1076. this._functionFromScript = function(_e4) {
  1077. var _e5 = "";
  1078. var _e6 = "";
  1079. var _e7 = _e4.getAttribute("args");
  1080. if (_e7) {
  1081. d.forEach(_e7.split(/\s*,\s*/), function(_e8, idx) {
  1082. _e5 += "var " + _e8 + " = arguments[" + idx + "]; ";
  1083. });
  1084. }
  1085. var _ea = _e4.getAttribute("with");
  1086. if (_ea && _ea.length) {
  1087. d.forEach(_ea.split(/\s*,\s*/), function(_eb) {
  1088. _e5 += "with(" + _eb + "){";
  1089. _e6 += "}";
  1090. });
  1091. }
  1092. return new Function(_e5 + _e4.innerHTML + _e6);
  1093. };
  1094. this.instantiate = function(_ec) {
  1095. var _ed = [];
  1096. d.forEach(_ec, function(_ee) {
  1097. if (!_ee) {
  1098. return;
  1099. }
  1100. var _ef = _ee.getAttribute("dojoType");
  1101. if ((!_ef) || (!_ef.length)) {
  1102. return;
  1103. }
  1104. var _f0 = getClassInfo(_ef);
  1105. var _f1 = _f0.cls;
  1106. var ps = _f1._noScript || _f1.prototype._noScript;
  1107. var _f3 = {};
  1108. var _f4 = _ee.attributes;
  1109. for (var _f5 in _f0.params) {
  1110. var _f6 = _f4.getNamedItem(_f5);
  1111. if (!_f6
  1112. || (!_f6.specified && (!dojo.isIE || _f5
  1113. .toLowerCase() != "value"))) {
  1114. continue;
  1115. }
  1116. var _f7 = _f6.value;
  1117. switch (_f5) {
  1118. case "class" :
  1119. _f7 = _ee.className;
  1120. break;
  1121. case "style" :
  1122. _f7 = _ee.style && _ee.style.cssText;
  1123. }
  1124. var _f8 = _f0.params[_f5];
  1125. _f3[_f5] = str2obj(_f7, _f8);
  1126. }
  1127. if (!ps) {
  1128. var _f9 = [], _fa = [];
  1129. d.query("> script[type^='dojo/']", _ee).orphan()
  1130. .forEach(function(_fb) {
  1131. var _fc = _fb.getAttribute("event"), _ef = _fb
  1132. .getAttribute("type"), nf = d.parser
  1133. ._functionFromScript(_fb);
  1134. if (_fc) {
  1135. if (_ef == "dojo/connect") {
  1136. _f9.push({
  1137. event : _fc,
  1138. func : nf
  1139. });
  1140. } else {
  1141. _f3[_fc] = nf;
  1142. }
  1143. } else {
  1144. _fa.push(nf);
  1145. }
  1146. });
  1147. }
  1148. var _fe = _f1["markupFactory"];
  1149. if (!_fe && _f1["prototype"]) {
  1150. _fe = _f1.prototype["markupFactory"];
  1151. }
  1152. var _ff = _fe ? _fe(_f3, _ee, _f1) : new _f1(_f3, _ee);
  1153. _ed.push(_ff);
  1154. var _100 = _ee.getAttribute("jsId");
  1155. if (_100) {
  1156. d.setObject(_100, _ff);
  1157. }
  1158. if (!ps) {
  1159. dojo.forEach(_f9, function(_101) {
  1160. dojo.connect(_ff, _101.event, null,
  1161. _101.func);
  1162. });
  1163. dojo.forEach(_fa, function(func) {
  1164. func.call(_ff);
  1165. });
  1166. }
  1167. });
  1168. d.forEach(_ed, function(_103) {
  1169. if (_103 && (_103.startup)
  1170. && ((!_103.getParent) || (!_103.getParent()))) {
  1171. _103.startup();
  1172. }
  1173. });
  1174. return _ed;
  1175. };
  1176. this.parse = function(_104) {
  1177. var list = d.query("[dojoType]", _104);
  1178. var _106 = this.instantiate(list);
  1179. return _106;
  1180. };
  1181. }();
  1182. (function() {
  1183. var _107 = function() {
  1184. if (djConfig["parseOnLoad"] == true) {
  1185. dojo.parser.parse();
  1186. }
  1187. };
  1188. if (dojo.exists("dijit.wai.onload")
  1189. && (dijit.wai.onload === dojo._loaders[0])) {
  1190. dojo._loaders.splice(1, 0, _107);
  1191. } else {
  1192. dojo._loaders.unshift(_107);
  1193. }
  1194. })();
  1195. dojo.parser._anonCtr = 0;
  1196. dojo.parser._anon = {};
  1197. dojo.parser._nameAnonFunc = function(_108, _109) {
  1198. var jpn = "$joinpoint";
  1199. var nso = (_109 || dojo.parser._anon);
  1200. if (dojo.isIE) {
  1201. var cn = _108["__dojoNameCache"];
  1202. if (cn && nso[cn] === _108) {
  1203. return _108["__dojoNameCache"];
  1204. }
  1205. }
  1206. var ret = "__" + dojo.parser._anonCtr++;
  1207. while (typeof nso[ret] != "undefined") {
  1208. ret = "__" + dojo.parser._anonCtr++;
  1209. }
  1210. nso[ret] = _108;
  1211. return ret;
  1212. };
  1213. }
  1214. if (!dojo._hasResource["dijit._Widget"]) {
  1215. dojo._hasResource["dijit._Widget"] = true;
  1216. dojo.provide("dijit._Widget");
  1217. dojo.declare("dijit._Widget", null, {
  1218. id : "",
  1219. lang : "",
  1220. dir : "",
  1221. "class" : "",
  1222. style : "",
  1223. title : "",
  1224. srcNodeRef : null,
  1225. domNode : null,
  1226. attributeMap : {
  1227. id : "",
  1228. dir : "",
  1229. lang : "",
  1230. "class" : "",
  1231. style : "",
  1232. title : ""
  1233. },
  1234. postscript : function(_10e, _10f) {
  1235. this.create(_10e, _10f);
  1236. },
  1237. create : function(_110, _111) {
  1238. this.srcNodeRef = dojo.byId(_111);
  1239. this._connects = [];
  1240. this._attaches = [];
  1241. if (this.srcNodeRef && (typeof this.srcNodeRef.id == "string")) {
  1242. this.id = this.srcNodeRef.id;
  1243. }
  1244. if (_110) {
  1245. dojo.mixin(this, _110);
  1246. }
  1247. this.postMixInProperties();
  1248. if (!this.id) {
  1249. this.id = dijit.getUniqueId(this.declaredClass.replace(/\./g,
  1250. "_"));
  1251. }
  1252. dijit.registry.add(this);
  1253. this.buildRendering();
  1254. if (this.domNode) {
  1255. for (var attr in this.attributeMap) {
  1256. var _113 = this[this.attributeMap[attr] || "domNode"];
  1257. var _114 = this[attr];
  1258. if (typeof _114 != "object"
  1259. && (_114 !== "" || (_110 && _110[attr]))) {
  1260. switch (attr) {
  1261. case "class" :
  1262. dojo.addClass(_113, _114);
  1263. break;
  1264. case "style" :
  1265. if (_113.style.cssText) {
  1266. _113.style.cssText += "; " + _114;
  1267. } else {
  1268. _113.style.cssText = _114;
  1269. }
  1270. break;
  1271. default :
  1272. _113.setAttribute(attr, _114);
  1273. }
  1274. }
  1275. }
  1276. }
  1277. if (this.domNode) {
  1278. this.domNode.setAttribute("widgetId", this.id);
  1279. }
  1280. this.postCreate();
  1281. if (this.srcNodeRef && !this.srcNodeRef.parentNode) {
  1282. delete this.srcNodeRef;
  1283. }
  1284. },
  1285. postMixInProperties : function() {
  1286. },
  1287. buildRendering : function() {
  1288. this.domNode = this.srcNodeRef || dojo.doc.createElement("div");
  1289. },
  1290. postCreate : function() {
  1291. },
  1292. startup : function() {
  1293. },
  1294. destroyRecursive : function(_115) {
  1295. this.destroyDescendants();
  1296. this.destroy();
  1297. },
  1298. destroy : function(_116) {
  1299. this.uninitialize();
  1300. dojo.forEach(this._connects, function(_117) {
  1301. dojo.forEach(_117, dojo.disconnect);
  1302. });
  1303. this.destroyRendering(_116);
  1304. dijit.registry.remove(this.id);
  1305. },
  1306. destroyRendering : function(_118) {
  1307. if (this.bgIframe) {
  1308. this.bgIframe.destroy();
  1309. delete this.bgIframe;
  1310. }
  1311. if (this.domNode) {
  1312. dojo._destroyElement(this.domNode);
  1313. delete this.domNode;
  1314. }
  1315. if (this.srcNodeRef) {
  1316. dojo._destroyElement(this.srcNodeRef);
  1317. delete this.srcNodeRef;
  1318. }
  1319. },
  1320. destroyDescendants : function() {
  1321. dojo.forEach(this.getDescendants(), function(_119) {
  1322. _119.destroy();
  1323. });
  1324. },
  1325. uninitialize : function() {
  1326. return false;
  1327. },
  1328. toString : function() {
  1329. return "[Widget " + this.declaredClass + ", "
  1330. + (this.id || "NO ID") + "]";
  1331. },
  1332. getDescendants : function() {
  1333. var list = dojo.query("[widgetId]", this.domNode);
  1334. return list.map(dijit.byNode);
  1335. },
  1336. nodesWithKeyClick : ["input", "button"],
  1337. connect : function(obj, _11c, _11d) {
  1338. var _11e = [];
  1339. if (_11c == "ondijitclick") {
  1340. var w = this;
  1341. if (!this.nodesWithKeyClick[obj.nodeName]) {
  1342. _11e.push(dojo.connect(obj, "onkeydown", this, function(e) {
  1343. if (e.keyCode == dojo.keys.ENTER) {
  1344. return (dojo.isString(_11d))
  1345. ? w[_11d](e)
  1346. : _11d.call(w, e);
  1347. } else {
  1348. if (e.keyCode == dojo.keys.SPACE) {
  1349. dojo.stopEvent(e);
  1350. }
  1351. }
  1352. }));
  1353. _11e.push(dojo.connect(obj, "onkeyup", this, function(e) {
  1354. if (e.keyCode == dojo.keys.SPACE) {
  1355. return dojo.isString(_11d)
  1356. ? w[_11d](e)
  1357. : _11d.call(w, e);
  1358. }
  1359. }));
  1360. }
  1361. _11c = "onclick";
  1362. }
  1363. _11e.push(dojo.connect(obj, _11c, this, _11d));
  1364. this._connects.push(_11e);
  1365. return _11e;
  1366. },
  1367. disconnect : function(_122) {
  1368. for (var i = 0; i < this._connects.length; i++) {
  1369. if (this._connects[i] == _122) {
  1370. dojo.forEach(_122, dojo.disconnect);
  1371. this._connects.splice(i, 1);
  1372. return;
  1373. }
  1374. }
  1375. },
  1376. isLeftToRight : function() {
  1377. if (typeof this._ltr == "undefined") {
  1378. this._ltr = dojo.getComputedStyle(this.domNode).direction != "rtl";
  1379. }
  1380. return this._ltr;
  1381. },
  1382. isFocusable : function() {
  1383. return this.focus
  1384. && (dojo.style(this.domNode, "display") != "none");
  1385. }
  1386. });
  1387. }
  1388. if (!dojo._hasResource["dojo.string"]) {
  1389. dojo._hasResource["dojo.string"] = true;
  1390. dojo.provide("dojo.string");
  1391. dojo.string.pad = function(text, size, ch, end) {
  1392. var out = String(text);
  1393. if (!ch) {
  1394. ch = "0";
  1395. }
  1396. while (out.length < size) {
  1397. if (end) {
  1398. out += ch;
  1399. } else {
  1400. out = ch + out;
  1401. }
  1402. }
  1403. return out;
  1404. };
  1405. dojo.string.substitute = function(_129, map, _12b, _12c) {
  1406. return _129.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g, function(
  1407. _12d, key, _12f) {
  1408. var _130 = dojo.getObject(key, false, map);
  1409. if (_12f) {
  1410. _130 = dojo.getObject(_12f, false, _12c)(_130);
  1411. }
  1412. if (_12b) {
  1413. _130 = _12b(_130, key);
  1414. }
  1415. return _130.toString();
  1416. });
  1417. };
  1418. dojo.string.trim = function(str) {
  1419. str = str.replace(/^\s+/, "");
  1420. for (var i = str.length - 1; i > 0; i--) {
  1421. if (/\S/.test(str.charAt(i))) {
  1422. str = str.substring(0, i + 1);
  1423. break;
  1424. }
  1425. }
  1426. return str;
  1427. };
  1428. }
  1429. if (!dojo._hasResource["dijit._Templated"]) {
  1430. dojo._hasResource["dijit._Templated"] = true;
  1431. dojo.provide("dijit._Templated");
  1432. dojo.declare("dijit._Templated", null, {
  1433. templateNode : null,
  1434. templateString : null,
  1435. templatePath : null,
  1436. widgetsInTemplate : false,
  1437. containerNode : null,
  1438. _skipNodeCache : false,
  1439. buildRendering : function() {
  1440. var _133 = dijit._Templated.getCachedTemplate(
  1441. this.templatePath, this.templateString,
  1442. this._skipNodeCache);
  1443. var node;
  1444. if (dojo.isString(_133)) {
  1445. var _135 = this.declaredClass, _136 = this;
  1446. var tstr = dojo.string.substitute(_133, this, function(
  1447. _138, key) {
  1448. if (key.charAt(0) == "!") {
  1449. _138 = _136[key.substr(1)];
  1450. }
  1451. if (typeof _138 == "undefined") {
  1452. throw new Error(_135 + " template:"
  1453. + key);
  1454. }
  1455. if (!_138) {
  1456. return "";
  1457. }
  1458. return key.charAt(0) == "!" ? _138 : _138
  1459. .toString().replace(/"/g, "&quot;");
  1460. }, this);
  1461. node = dijit._Templated._createNodesFromText(tstr)[0];
  1462. } else {
  1463. node = _133.cloneNode(true);
  1464. }
  1465. this._attachTemplateNodes(node);
  1466. var _13a = this.srcNodeRef;
  1467. if (_13a && _13a.parentNode) {
  1468. _13a.parentNode.replaceChild(node, _13a);
  1469. }
  1470. this.domNode = node;
  1471. if (this.widgetsInTemplate) {
  1472. var _13b = dojo.parser.parse(node);
  1473. this._attachTemplateNodes(_13b, function(n, p) {
  1474. return n[p];
  1475. });
  1476. }
  1477. this._fillContent(_13a);
  1478. },
  1479. _fillContent : function(_13e) {
  1480. var dest = this.containerNode;
  1481. if (_13e && dest) {
  1482. while (_13e.hasChildNodes()) {
  1483. dest.appendChild(_13e.firstChild);
  1484. }
  1485. }
  1486. },
  1487. _attachTemplateNodes : function(_140, _141) {
  1488. _141 = _141 || function(n, p) {
  1489. return n.getAttribute(p);
  1490. };
  1491. var _144 = dojo.isArray(_140) ? _140 : (_140.all || _140
  1492. .getElementsByTagName("*"));
  1493. var x = dojo.isArray(_140) ? 0 : -1;
  1494. for (; x < _144.length; x++) {
  1495. var _146 = (x == -1) ? _140 : _144[x];
  1496. if (this.widgetsInTemplate && _141(_146, "dojoType")) {
  1497. continue;
  1498. }
  1499. var _147 = _141(_146, "dojoAttachPoint");
  1500. if (_147) {
  1501. var _148, _149 = _147.split(/\s*,\s*/);
  1502. while (_148 = _149.shift()) {
  1503. if (dojo.isArray(this[_148])) {
  1504. this[_148].push(_146);
  1505. } else {
  1506. this[_148] = _146;
  1507. }
  1508. }
  1509. }
  1510. var _14a = _141(_146, "dojoAttachEvent");
  1511. if (_14a) {
  1512. var _14b, _14c = _14a.split(/\s*,\s*/);
  1513. var trim = dojo.trim;
  1514. while (_14b = _14c.shift()) {
  1515. if (_14b) {
  1516. var _14e = null;
  1517. if (_14b.indexOf(":") != -1) {
  1518. var _14f = _14b.split(":");
  1519. _14b = trim(_14f[0]);
  1520. _14e = trim(_14f[1]);
  1521. } else {
  1522. _14b = trim(_14b);
  1523. }
  1524. if (!_14e) {
  1525. _14e = _14b;
  1526. }
  1527. this.connect(_146, _14b, _14e);
  1528. }
  1529. }
  1530. }
  1531. var role = _141(_146, "waiRole");
  1532. if (role) {
  1533. dijit.setWaiRole(_146, role);
  1534. }
  1535. var _151 = _141(_146, "waiState");
  1536. if (_151) {
  1537. dojo.forEach(_151.split(/\s*,\s*/), function(_152) {
  1538. if (_152.indexOf("-") != -1) {
  1539. var pair = _152.split("-");
  1540. dijit.setWaiState(_146, pair[0],
  1541. pair[1]);
  1542. }
  1543. });
  1544. }
  1545. }
  1546. }
  1547. });
  1548. dijit._Templated._templateCache = {};
  1549. dijit._Templated.getCachedTemplate = function(_154, _155, _156) {
  1550. var _157 = dijit._Templated._templateCache;
  1551. var key = _155 || _154;
  1552. var _159 = _157[key];
  1553. if (_159) {
  1554. return _159;
  1555. }
  1556. if (!_155) {
  1557. _155 = dijit._Templated
  1558. ._sanitizeTemplateString(dojo._getText(_154));
  1559. }
  1560. _155 = dojo.string.trim(_155);
  1561. if (_155.match(/\$\{([^\}]+)\}/g) || _156) {
  1562. return (_157[key] = _155);
  1563. } else {
  1564. return (_157[key] = dijit._Templated._createNodesFromText(_155)[0]);
  1565. }
  1566. };
  1567. dijit._Templated._sanitizeTemplateString = function(_15a) {
  1568. if (_15a) {
  1569. _15a = _15a.replace(
  1570. /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,
  1571. "");
  1572. var _15b = _15a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
  1573. if (_15b) {
  1574. _15a = _15b[1];
  1575. }
  1576. } else {
  1577. _15a = "";
  1578. }
  1579. return _15a;
  1580. };
  1581. if (dojo.isIE) {
  1582. dojo.addOnUnload(function() {
  1583. var _15c = dijit._Templated._templateCache;
  1584. for (var key in _15c) {
  1585. var _15e = _15c[key];
  1586. if (!isNaN(_15e.nodeType)) {
  1587. dojo._destroyElement(_15e);
  1588. }
  1589. delete _15c[key];
  1590. }
  1591. });
  1592. }
  1593. (function() {
  1594. var _15f = {
  1595. cell : {
  1596. re : /^<t[dh][\s\r\n>]/i,
  1597. pre : "<table><tbody><tr>",
  1598. post : "</tr></tbody></table>"
  1599. },
  1600. row : {
  1601. re : /^<tr[\s\r\n>]/i,
  1602. pre : "<table><tbody>",
  1603. post : "</tbody></table>"
  1604. },
  1605. section : {
  1606. re : /^<(thead|tbody|tfoot)[\s\r\n>]/i,
  1607. pre : "<table>",
  1608. post : "</table>"
  1609. }
  1610. };
  1611. var tn;
  1612. dijit._Templated._createNodesFromText = function(text) {
  1613. if (!tn) {
  1614. tn = dojo.doc.createElement("div");
  1615. tn.style.display = "none";
  1616. dojo.body().appendChild(tn);
  1617. }
  1618. var _162 = "none";
  1619. var _163 = text.replace(/^\s+/, "");
  1620. for (var type in _15f) {
  1621. var map = _15f[type];
  1622. if (map.re.test(_163)) {
  1623. _162 = type;
  1624. text = map.pre + text + map.post;
  1625. break;
  1626. }
  1627. }
  1628. tn.innerHTML = text;
  1629. if (tn.normalize) {
  1630. tn.normalize();
  1631. }
  1632. var tag = {
  1633. cell : "tr",
  1634. row : "tbody",
  1635. section : "table"
  1636. }[_162];
  1637. var _167 = (typeof tag != "undefined") ? tn
  1638. .getElementsByTagName(tag)[0] : tn;
  1639. var _168 = [];
  1640. while (_167.firstChild) {
  1641. _168.push(_167.removeChild(_167.firstChild));
  1642. }
  1643. tn.innerHTML = "";
  1644. return _168;
  1645. };
  1646. })();
  1647. dojo.extend(dijit._Widget, {
  1648. dojoAttachEvent : "",
  1649. dojoAttachPoint : "",
  1650. waiRole : "",
  1651. waiState : ""
  1652. });
  1653. }
  1654. if (!dojo._hasResource["dijit._Container"]) {
  1655. dojo._hasResource["dijit._Container"] = true;
  1656. dojo.provide("dijit._Container");
  1657. dojo.declare("dijit._Contained", null, {
  1658. getParent : function() {
  1659. for (var p = this.domNode.parentNode; p; p = p.parentNode) {
  1660. var id = p.getAttribute && p.getAttribute("widgetId");
  1661. if (id) {
  1662. var _16b = dijit.byId(id);
  1663. return _16b.isContainer ? _16b : null;
  1664. }
  1665. }
  1666. return null;
  1667. },
  1668. _getSibling : function(_16c) {
  1669. var node = this.domNode;
  1670. do {
  1671. node = node[_16c + "Sibling"];
  1672. } while (node && node.nodeType != 1);
  1673. if (!node) {
  1674. return null;
  1675. }
  1676. var id = node.getAttribute("widgetId");
  1677. return dijit.byId(id);
  1678. },
  1679. getPreviousSibling : function() {
  1680. return this._getSibling("previous");
  1681. },
  1682. getNextSibling : function() {
  1683. return this._getSibling("next");
  1684. }
  1685. });
  1686. dojo.declare("dijit._Container", null, {
  1687. isContainer : true,
  1688. addChild : function(_16f, _170) {
  1689. if (_170 === undefined) {
  1690. _170 = "last";
  1691. }
  1692. var _171 = this.containerNode || this.domNode;
  1693. if (_170 && typeof _170 == "number") {
  1694. var _172 = dojo.query("> [widgetid]", _171);
  1695. if (_172 && _172.length >= _170) {
  1696. _171 = _172[_170 - 1];
  1697. _170 = "after";
  1698. }
  1699. }
  1700. dojo.place(_16f.domNode, _171, _170);
  1701. if (this._started && !_16f._started) {
  1702. _16f.startup();
  1703. }
  1704. },
  1705. removeChild : function(_173) {
  1706. var node = _173.domNode;
  1707. node.parentNode.removeChild(node);
  1708. },
  1709. _nextElement : function(node) {
  1710. do {
  1711. node = node.nextSibling;
  1712. } while (node && node.nodeType != 1);
  1713. return node;
  1714. },
  1715. _firstElement : function(node) {
  1716. node = node.firstChild;
  1717. if (node && node.nodeType != 1) {
  1718. node = this._nextElement(node);
  1719. }
  1720. return node;
  1721. },
  1722. getChildren : function() {
  1723. return dojo.query("> [widgetId]",
  1724. this.containerNode || this.domNode)
  1725. .map(dijit.byNode);
  1726. },
  1727. hasChildren : function() {
  1728. var cn = this.containerNode || this.domNode;
  1729. return !!this._firstElement(cn);
  1730. },
  1731. _getSiblingOfChild : function(_178, dir) {
  1732. var node = _178.domNode;
  1733. var _17b = (dir > 0 ? "nextSibling" : "previousSibling");
  1734. do {
  1735. node = node[_17b];
  1736. } while (node
  1737. && (node.nodeType != 1 || !dijit.byNode(node)));
  1738. return node ? dijit.byNode(node) : null;
  1739. }
  1740. });
  1741. dojo.declare("dijit._KeyNavContainer", [dijit._Container], {
  1742. _keyNavCodes : {},
  1743. connectKeyNavHandlers : function(_17c, _17d) {
  1744. var _17e = this._keyNavCodes = {};
  1745. var prev = dojo.hitch(this, this.focusPrev);
  1746. var next = dojo.hitch(this, this.focusNext);
  1747. dojo.forEach(_17c, function(code) {
  1748. _17e[code] = prev;
  1749. });
  1750. dojo.forEach(_17d, function(code) {
  1751. _17e[code] = next;
  1752. });
  1753. this.connect(this.domNode, "onkeypress",
  1754. "_onContainerKeypress");
  1755. if (dojo.isIE) {
  1756. this.connect(this.domNode, "onactivate",
  1757. "_onContainerFocus");
  1758. this.connect(this.domNode, "ondeactivate",
  1759. "_onContainerBlur");
  1760. } else {
  1761. this.connect(this.domNode, "onfocus",
  1762. "_onContainerFocus");
  1763. this
  1764. .connect(this.domNode, "onblur",
  1765. "_onContainerBlur");
  1766. }
  1767. },
  1768. startupKeyNavChildren : function() {
  1769. dojo.forEach(this.getChildren(), dojo.hitch(this,
  1770. "_setTabIndexMinusOne"));
  1771. },
  1772. addChild : function(_183, _184) {
  1773. dijit._KeyNavContainer.superclass.addChild.apply(this,
  1774. arguments);
  1775. this._setTabIndexMinusOne(_183);
  1776. },
  1777. focus : function() {
  1778. this.focusFirstChild();
  1779. },
  1780. focusFirstChild : function() {
  1781. this.focusChild(this._getFirstFocusableChild());
  1782. },
  1783. focusNext : function() {
  1784. if (this.focusedChild && this.focusedChild.hasNextFocalNode
  1785. && this.focusedChild.hasNextFocalNode()) {
  1786. this.focusedChild.focusNext();
  1787. return;
  1788. }
  1789. var _185 = this
  1790. ._getNextFocusableChild(this.focusedChild, 1);
  1791. if (_185.getFocalNodes) {
  1792. this.focusChild(_185, _185.getFocalNodes()[0]);
  1793. } else {
  1794. this.focusChild(_185);
  1795. }
  1796. },
  1797. focusPrev : function() {
  1798. if (this.focusedChild && this.focusedChild.hasPrevFocalNode
  1799. && this.focusedChild.hasPrevFocalNode()) {
  1800. this.focusedChild.focusPrev();
  1801. return;
  1802. }
  1803. var _186 = this._getNextFocusableChild(this.focusedChild,
  1804. -1);
  1805. if (_186.getFocalNodes) {
  1806. var _187 = _186.getFocalNodes();
  1807. this.focusChild(_186, _187[_187.length - 1]);
  1808. } else {
  1809. this.focusChild(_186);
  1810. }
  1811. },
  1812. focusChild : function(_188, node) {
  1813. if (_188) {
  1814. if (this.focusedChild && _188 !== this.focusedChild) {
  1815. this._onChildBlur(this.focusedChild);
  1816. }
  1817. this.focusedChild = _188;
  1818. if (node && _188.focusFocalNode) {
  1819. _188.focusFocalNode(node);
  1820. } else {
  1821. _188.focus();
  1822. }
  1823. }
  1824. },
  1825. _setTabIndexMinusOne : function(_18a) {
  1826. if (_18a.getFocalNodes) {
  1827. dojo.forEach(_18a.getFocalNodes(), function(node) {
  1828. node.setAttribute("tabIndex", -1);
  1829. });
  1830. } else {
  1831. (_18a.focusNode || _18a.domNode).setAttribute(
  1832. "tabIndex", -1);
  1833. }
  1834. },
  1835. _onContainerFocus : function(evt) {
  1836. this.domNode.setAttribute("tabIndex", -1);
  1837. if (evt.target === this.domNode) {
  1838. this.focusFirstChild();
  1839. } else {
  1840. var _18d = dijit.getEnclosingWidget(evt.target);
  1841. if (_18d && _18d.isFocusable()) {
  1842. this.focusedChild = _18d;
  1843. }
  1844. }
  1845. },
  1846. _onContainerBlur : function(evt) {
  1847. if (this.tabIndex) {
  1848. this.domNode.setAttribute("tabIndex", this.tabIndex);
  1849. }
  1850. },
  1851. _onContainerKeypress : function(evt) {
  1852. if (evt.ctrlKey || evt.altKey) {
  1853. return;
  1854. }
  1855. var func = this._keyNavCodes[evt.keyCode];
  1856. if (func) {
  1857. func();
  1858. dojo.stopEvent(evt);
  1859. }
  1860. },
  1861. _onChildBlur : function(_191) {
  1862. },
  1863. _getFirstFocusableChild : function() {
  1864. return this._getNextFocusableChild(null, 1);
  1865. },
  1866. _getNextFocusableChild : function(_192, dir) {
  1867. if (_192) {
  1868. _192 = this._getSiblingOfChild(_192, dir);
  1869. }
  1870. var _194 = this.getChildren();
  1871. for (var i = 0; i < _194.length; i++) {
  1872. if (!_192) {
  1873. _192 = _194[(dir > 0) ? 0 : (_194.length - 1)];
  1874. }
  1875. if (_192.isFocusable()) {
  1876. return _192;
  1877. }
  1878. _192 = this._getSiblingOfChild(_192, dir);
  1879. }
  1880. }
  1881. });
  1882. }
  1883. if (!dojo._hasResource["dijit.layout._LayoutWidget"]) {
  1884. dojo._hasResource["dijit.layout._LayoutWidget"] = true;
  1885. dojo.provide("dijit.layout._LayoutWidget");
  1886. dojo.declare("dijit.layout._LayoutWidget", [dijit._Widget,
  1887. dijit._Container, dijit._Contained], {
  1888. isLayoutContainer : true,
  1889. postCreate : function() {
  1890. dojo.addClass(this.domNode, "dijitContainer");
  1891. },
  1892. startup : function() {
  1893. if (this._started) {
  1894. return;
  1895. }
  1896. this._started = true;
  1897. if (this.getChildren) {
  1898. dojo.forEach(this.getChildren(), function(_196) {
  1899. _196.startup();
  1900. });
  1901. }
  1902. if (!this.getParent || !this.getParent()) {
  1903. this.resize();
  1904. this.connect(window, "onresize", function() {
  1905. this.resize();
  1906. });
  1907. }
  1908. },
  1909. resize : function(args) {
  1910. var node = this.domNode;
  1911. if (args) {
  1912. dojo.marginBox(node, args);
  1913. if (args.t) {
  1914. node.style.top = args.t + "px";
  1915. }
  1916. if (args.l) {
  1917. node.style.left = args.l + "px";
  1918. }
  1919. }
  1920. var mb = dojo.mixin(dojo.marginBox(node), args || {});
  1921. this._contentBox = dijit.layout.marginBox2contentBox(node,
  1922. mb);
  1923. this.layout();
  1924. },
  1925. layout : function() {
  1926. }
  1927. });
  1928. dijit.layout.marginBox2contentBox = function(node, mb) {
  1929. var cs = dojo.getComputedStyle(node);
  1930. var me = dojo._getMarginExtents(node, cs);
  1931. var pb = dojo._getPadBorderExtents(node, cs);
  1932. return {
  1933. l : dojo._toPixelValue(node, cs.paddingLeft),
  1934. t : dojo._toPixelValue(node, cs.paddingTop),
  1935. w : mb.w - (me.w + pb.w),
  1936. h : mb.h - (me.h + pb.h)
  1937. };
  1938. };
  1939. (function() {
  1940. var _19f = function(word) {
  1941. return word.substring(0, 1).toUpperCase() + word.substring(1);
  1942. };
  1943. var size = function(_1a2, dim) {
  1944. _1a2.resize ? _1a2.resize(dim) : dojo.marginBox(_1a2.domNode, dim);
  1945. dojo.mixin(_1a2, dojo.marginBox(_1a2.domNode));
  1946. dojo.mixin(_1a2, dim);
  1947. };
  1948. dijit.layout.layoutChildren = function(_1a4, dim, _1a6) {
  1949. dim = dojo.mixin({}, dim);
  1950. dojo.addClass(_1a4, "dijitLayoutContainer");
  1951. _1a6 = dojo.filter(_1a6, function(item) {
  1952. return item.layoutAlign != "client";
  1953. }).concat(dojo.filter(_1a6, function(item) {
  1954. return item.layoutAlign == "client";
  1955. }));
  1956. dojo.forEach(_1a6, function(_1a9) {
  1957. var elm = _1a9.domNode, pos = _1a9.layoutAlign;
  1958. var _1ac = elm.style;
  1959. _1ac.left = dim.l + "px";
  1960. _1ac.top = dim.t + "px";
  1961. _1ac.bottom = _1ac.right = "auto";
  1962. dojo.addClass(elm, "dijitAlign" + _19f(pos));
  1963. if (pos == "top" || pos == "bottom") {
  1964. size(_1a9, {
  1965. w : dim.w
  1966. });
  1967. dim.h -= _1a9.h;
  1968. if (pos == "top") {
  1969. dim.t += _1a9.h;
  1970. } else {
  1971. _1ac.top = dim.t + dim.h + "px";
  1972. }
  1973. } else {
  1974. if (pos == "left" || pos == "right") {
  1975. size(_1a9, {
  1976. h : dim.h
  1977. });
  1978. dim.w -= _1a9.w;
  1979. if (pos == "left") {
  1980. dim.l += _1a9.w;
  1981. } else {
  1982. _1ac.left = dim.l + dim.w + "px";
  1983. }
  1984. } else {
  1985. if (pos == "client") {
  1986. size(_1a9, dim);
  1987. }
  1988. }
  1989. }
  1990. });
  1991. };
  1992. })();
  1993. }
  1994. if (!dojo._hasResource["dijit.form._FormWidget"]) {
  1995. dojo._hasResource["dijit.form._FormWidget"] = true;
  1996. dojo.provide("dijit.form._FormWidget");
  1997. dojo.declare("dijit.form._FormWidget", [dijit._Widget, dijit._Templated], {
  1998. baseClass : "",
  1999. value : "",
  2000. name : "",
  2001. id : "",
  2002. alt : "",
  2003. type : "text",
  2004. tabIndex : "0",
  2005. disabled : false,
  2006. intermediateChanges : false,
  2007. attributeMap : dojo.mixin(dojo
  2008. .clone(dijit._Widget.prototype.attributeMap), {
  2009. id : "focusNode",
  2010. tabIndex : "focusNode",
  2011. alt : "focusNode"
  2012. }),
  2013. setDisabled : function(_1ad) {
  2014. this.domNode.disabled = this.disabled = _1ad;
  2015. if (this.focusNode) {
  2016. this.focusNode.disabled = _1ad;
  2017. }
  2018. if (_1ad) {
  2019. this._hovering = false;
  2020. this._active = false;
  2021. }
  2022. dijit.setWaiState(this.focusNode || this.domNode, "disabled", _1ad);
  2023. this._setStateClass();
  2024. },
  2025. _onMouse : function(_1ae) {
  2026. var _1af = _1ae.target;
  2027. if (_1af && _1af.getAttribute) {
  2028. this.stateModifier = _1af.getAttribute("stateModifier") || "";
  2029. }
  2030. if (!this.disabled) {
  2031. switch (_1ae.type) {
  2032. case "mouseenter" :
  2033. case "mouseover" :
  2034. this._hovering = true;
  2035. break;
  2036. case "mouseout" :
  2037. case "mouseleave" :
  2038. this._hovering = false;
  2039. break;
  2040. case "mousedown" :
  2041. this._active = true;
  2042. var self = this;
  2043. var _1b1 = this.connect(dojo.body(), "onmouseup",
  2044. function() {
  2045. self._active = false;
  2046. self._setStateClass();
  2047. self.disconnect(_1b1);
  2048. });
  2049. break;
  2050. }
  2051. this._setStateClass();
  2052. }
  2053. },
  2054. isFocusable : function() {
  2055. return !this.disabled
  2056. && (dojo.style(this.domNode, "display") != "none");
  2057. },
  2058. focus : function() {
  2059. dijit.focus(this.focusNode);
  2060. },
  2061. _setStateClass : function() {
  2062. if (!("staticClass" in this)) {
  2063. this.staticClass = (this.stateNode || this.domNode).className;
  2064. }
  2065. var _1b2 = [this.baseClass];
  2066. function multiply(_1b3) {
  2067. _1b2 = _1b2.concat(dojo.map(_1b2, function(c) {
  2068. return c + _1b3;
  2069. }));
  2070. };
  2071. if (this.checked) {
  2072. multiply("Checked");
  2073. }
  2074. if (this.state) {
  2075. multiply(this.state);
  2076. }
  2077. if (this.selected) {
  2078. multiply("Selected");
  2079. }
  2080. if (this.disabled) {
  2081. multiply("Disabled");
  2082. } else {
  2083. if (this._active) {
  2084. multiply(this.stateModifier + "Active");
  2085. } else {
  2086. if (this._focused) {
  2087. multiply("Focused");
  2088. }
  2089. if ((this.stateModifier || !this._focused)
  2090. && this._hovering) {
  2091. multiply(this.stateModifier + "Hover");
  2092. }
  2093. }
  2094. }
  2095. (this.stateNode || this.domNode).className = this.staticClass + " "
  2096. + _1b2.join(" ");
  2097. },
  2098. onChange : function(_1b5) {
  2099. },
  2100. postCreate : function() {
  2101. this.setValue(this.value, null);
  2102. this.setDisabled(this.disabled);
  2103. this._setStateClass();
  2104. },
  2105. setValue : function(_1b6, _1b7) {
  2106. this._lastValue = _1b6;
  2107. dijit.setWaiState(this.focusNode || this.domNode, "valuenow", this
  2108. .forWaiValuenow());
  2109. if (_1b7 === undefined) {
  2110. _1b7 = true;
  2111. }
  2112. if (this._lastValueReported == undefined && _1b7 === null) {
  2113. this._lastValueReported = _1b6;
  2114. }
  2115. if ((this.intermediateChanges || _1b7)
  2116. && ((_1b6 && _1b6.toString) ? _1b6.toString() : _1b6) !== ((this._lastValueReported && this._lastValueReported.toString)
  2117. ? this._lastValueReported.toString()
  2118. : this._lastValueReported)) {
  2119. this._lastValueReported = _1b6;
  2120. this.onChange(_1b6);
  2121. }
  2122. },
  2123. getValue : function() {
  2124. return this._lastValue;
  2125. },
  2126. undo : function() {
  2127. this.setValue(this._lastValueReported, false);
  2128. },
  2129. _onKeyPress : function(e) {
  2130. if (e.keyCode == dojo.keys.ESCAPE && !e.shiftKey && !e.ctrlKey
  2131. && !e.altKey) {
  2132. var v = this.getValue();
  2133. var lv = this._lastValueReported;
  2134. if ((typeof lv != "undefined")
  2135. && ((v !== null && v.toString) ? v.toString() : null) !== lv
  2136. .toString()) {
  2137. this.undo();
  2138. dojo.stopEvent(e);
  2139. return false;
  2140. }
  2141. }
  2142. return true;
  2143. },
  2144. forWaiValuenow : function() {
  2145. return this.getValue();
  2146. }
  2147. });
  2148. }
  2149. if (!dojo._hasResource["dijit.dijit"]) {
  2150. dojo._hasResource["dijit.dijit"] = true;
  2151. dojo.provide("dijit.dijit");
  2152. }