dojo-rails 0.9.9 → 0.9.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (646) hide show
  1. data/lib/dojo/rails/version.rb +1 -1
  2. data/lib/dojo/version.rb +2 -2
  3. data/vendor/assets/javascripts/dojo.js +1 -1
  4. data/vendor/assets/javascripts/dojo/AdapterRegistry.js.uncompressed.js +11 -18
  5. data/vendor/assets/javascripts/dojo/Deferred.js +178 -0
  6. data/vendor/assets/javascripts/dojo/Deferred.js.uncompressed.js +314 -0
  7. data/vendor/assets/javascripts/dojo/DeferredList.js.uncompressed.js +4 -6
  8. data/vendor/assets/javascripts/dojo/Evented.js.uncompressed.js +15 -12
  9. data/vendor/assets/javascripts/dojo/LICENSE +1 -1
  10. data/vendor/assets/javascripts/dojo/NodeList-data.js.uncompressed.js +84 -73
  11. data/vendor/assets/javascripts/dojo/NodeList-dom.js +1 -1
  12. data/vendor/assets/javascripts/dojo/NodeList-dom.js.uncompressed.js +121 -66
  13. data/vendor/assets/javascripts/dojo/NodeList-fx.js +28 -27
  14. data/vendor/assets/javascripts/dojo/NodeList-fx.js.uncompressed.js +46 -47
  15. data/vendor/assets/javascripts/dojo/NodeList-html.js.uncompressed.js +19 -21
  16. data/vendor/assets/javascripts/dojo/NodeList-manipulate.js.uncompressed.js +172 -178
  17. data/vendor/assets/javascripts/dojo/NodeList-traverse.js.uncompressed.js +125 -130
  18. data/vendor/assets/javascripts/dojo/NodeList.js +10 -0
  19. data/vendor/assets/javascripts/dojo/NodeList.js.uncompressed.js +6 -0
  20. data/vendor/assets/javascripts/dojo/OpenAjax.js +13 -15
  21. data/vendor/assets/javascripts/dojo/Stateful.js +65 -41
  22. data/vendor/assets/javascripts/dojo/Stateful.js.uncompressed.js +110 -36
  23. data/vendor/assets/javascripts/dojo/_base/Color.js.uncompressed.js +34 -40
  24. data/vendor/assets/javascripts/dojo/_base/Deferred.js +84 -84
  25. data/vendor/assets/javascripts/dojo/_base/Deferred.js.uncompressed.js +57 -74
  26. data/vendor/assets/javascripts/dojo/_base/NodeList.js +2 -3
  27. data/vendor/assets/javascripts/dojo/_base/NodeList.js.uncompressed.js +58 -48
  28. data/vendor/assets/javascripts/dojo/_base/array.js +63 -67
  29. data/vendor/assets/javascripts/dojo/_base/array.js.uncompressed.js +259 -259
  30. data/vendor/assets/javascripts/dojo/_base/browser.js.uncompressed.js +10 -3
  31. data/vendor/assets/javascripts/dojo/_base/config.js.uncompressed.js +85 -72
  32. data/vendor/assets/javascripts/dojo/_base/configFirefoxExtension.js +15 -13
  33. data/vendor/assets/javascripts/dojo/_base/configNode.js +5 -5
  34. data/vendor/assets/javascripts/dojo/_base/configRhino.js +1 -1
  35. data/vendor/assets/javascripts/dojo/_base/configSpidermonkey.js +5 -9
  36. data/vendor/assets/javascripts/dojo/_base/connect.js +1 -1
  37. data/vendor/assets/javascripts/dojo/_base/connect.js.uncompressed.js +177 -203
  38. data/vendor/assets/javascripts/dojo/_base/declare.js +94 -90
  39. data/vendor/assets/javascripts/dojo/_base/declare.js.uncompressed.js +397 -402
  40. data/vendor/assets/javascripts/dojo/_base/event.js +16 -13
  41. data/vendor/assets/javascripts/dojo/_base/event.js.uncompressed.js +41 -33
  42. data/vendor/assets/javascripts/dojo/_base/fx.js +187 -183
  43. data/vendor/assets/javascripts/dojo/_base/fx.js.uncompressed.js +134 -130
  44. data/vendor/assets/javascripts/dojo/_base/html.js.uncompressed.js +14 -11
  45. data/vendor/assets/javascripts/dojo/_base/json.js.uncompressed.js +12 -6
  46. data/vendor/assets/javascripts/dojo/_base/kernel.js +35 -38
  47. data/vendor/assets/javascripts/dojo/_base/kernel.js.uncompressed.js +59 -62
  48. data/vendor/assets/javascripts/dojo/_base/lang.js +99 -98
  49. data/vendor/assets/javascripts/dojo/_base/lang.js.uncompressed.js +435 -537
  50. data/vendor/assets/javascripts/dojo/_base/loader.js +179 -154
  51. data/vendor/assets/javascripts/dojo/_base/loader.js.uncompressed.js +252 -194
  52. data/vendor/assets/javascripts/dojo/_base/query.js +2 -2
  53. data/vendor/assets/javascripts/dojo/_base/query.js.uncompressed.js +12 -2
  54. data/vendor/assets/javascripts/dojo/_base/sniff.js +6 -58
  55. data/vendor/assets/javascripts/dojo/_base/sniff.js.uncompressed.js +60 -151
  56. data/vendor/assets/javascripts/dojo/_base/unload.js +10 -9
  57. data/vendor/assets/javascripts/dojo/_base/unload.js.uncompressed.js +44 -43
  58. data/vendor/assets/javascripts/dojo/_base/url.js.uncompressed.js +1 -3
  59. data/vendor/assets/javascripts/dojo/_base/window.js +32 -35
  60. data/vendor/assets/javascripts/dojo/_base/window.js.uncompressed.js +117 -109
  61. data/vendor/assets/javascripts/dojo/_base/xhr.js +147 -263
  62. data/vendor/assets/javascripts/dojo/_base/xhr.js.uncompressed.js +253 -378
  63. data/vendor/assets/javascripts/dojo/_firebug/firebug.js +459 -458
  64. data/vendor/assets/javascripts/dojo/_firebug/firebug.js.uncompressed.js +39 -31
  65. data/vendor/assets/javascripts/dojo/aspect.js +71 -63
  66. data/vendor/assets/javascripts/dojo/aspect.js.uncompressed.js +111 -99
  67. data/vendor/assets/javascripts/dojo/back.js +11 -10
  68. data/vendor/assets/javascripts/dojo/back.js.uncompressed.js +59 -59
  69. data/vendor/assets/javascripts/dojo/behavior.js +49 -47
  70. data/vendor/assets/javascripts/dojo/behavior.js.uncompressed.js +26 -25
  71. data/vendor/assets/javascripts/dojo/cache.js +1 -1
  72. data/vendor/assets/javascripts/dojo/cache.js.uncompressed.js +2 -4
  73. data/vendor/assets/javascripts/dojo/cldr/monetary.js +13 -12
  74. data/vendor/assets/javascripts/dojo/cldr/monetary.js.uncompressed.js +15 -10
  75. data/vendor/assets/javascripts/dojo/cldr/nls/ar/buddhist.js +1 -1
  76. data/vendor/assets/javascripts/dojo/cldr/nls/ar/buddhist.js.uncompressed.js +85 -70
  77. data/vendor/assets/javascripts/dojo/cldr/nls/ar/currency.js +1 -1
  78. data/vendor/assets/javascripts/dojo/cldr/nls/ar/currency.js.uncompressed.js +6 -6
  79. data/vendor/assets/javascripts/dojo/cldr/nls/ar/gregorian.js +1 -1
  80. data/vendor/assets/javascripts/dojo/cldr/nls/ar/gregorian.js.uncompressed.js +157 -141
  81. data/vendor/assets/javascripts/dojo/cldr/nls/ar/hebrew.js +1 -1
  82. data/vendor/assets/javascripts/dojo/cldr/nls/ar/hebrew.js.uncompressed.js +62 -45
  83. data/vendor/assets/javascripts/dojo/cldr/nls/ar/islamic.js +1 -1
  84. data/vendor/assets/javascripts/dojo/cldr/nls/ar/islamic.js.uncompressed.js +112 -80
  85. data/vendor/assets/javascripts/dojo/cldr/nls/ar/number.js +1 -1
  86. data/vendor/assets/javascripts/dojo/cldr/nls/ar/number.js.uncompressed.js +11 -10
  87. data/vendor/assets/javascripts/dojo/cldr/nls/buddhist.js +1 -1
  88. data/vendor/assets/javascripts/dojo/cldr/nls/buddhist.js.uncompressed.js +110 -109
  89. data/vendor/assets/javascripts/dojo/cldr/nls/ca/currency.js +1 -1
  90. data/vendor/assets/javascripts/dojo/cldr/nls/ca/currency.js.uncompressed.js +6 -6
  91. data/vendor/assets/javascripts/dojo/cldr/nls/ca/gregorian.js +1 -1
  92. data/vendor/assets/javascripts/dojo/cldr/nls/ca/gregorian.js.uncompressed.js +176 -161
  93. data/vendor/assets/javascripts/dojo/cldr/nls/ca/number.js +1 -1
  94. data/vendor/assets/javascripts/dojo/cldr/nls/ca/number.js.uncompressed.js +9 -10
  95. data/vendor/assets/javascripts/dojo/cldr/nls/cs/buddhist.js +8 -0
  96. data/vendor/assets/javascripts/dojo/cldr/nls/cs/buddhist.js.uncompressed.js +170 -0
  97. data/vendor/assets/javascripts/dojo/cldr/nls/cs/currency.js +1 -1
  98. data/vendor/assets/javascripts/dojo/cldr/nls/cs/currency.js.uncompressed.js +9 -9
  99. data/vendor/assets/javascripts/dojo/cldr/nls/cs/gregorian.js +1 -1
  100. data/vendor/assets/javascripts/dojo/cldr/nls/cs/gregorian.js.uncompressed.js +166 -139
  101. data/vendor/assets/javascripts/dojo/cldr/nls/cs/islamic.js +8 -0
  102. data/vendor/assets/javascripts/dojo/cldr/nls/cs/islamic.js.uncompressed.js +99 -0
  103. data/vendor/assets/javascripts/dojo/cldr/nls/cs/number.js +1 -1
  104. data/vendor/assets/javascripts/dojo/cldr/nls/cs/number.js.uncompressed.js +9 -10
  105. data/vendor/assets/javascripts/dojo/cldr/nls/currency.js +1 -1
  106. data/vendor/assets/javascripts/dojo/cldr/nls/currency.js.uncompressed.js +5 -4
  107. data/vendor/assets/javascripts/dojo/cldr/nls/da/buddhist.js +1 -1
  108. data/vendor/assets/javascripts/dojo/cldr/nls/da/buddhist.js.uncompressed.js +91 -89
  109. data/vendor/assets/javascripts/dojo/cldr/nls/da/currency.js +1 -1
  110. data/vendor/assets/javascripts/dojo/cldr/nls/da/currency.js.uncompressed.js +6 -6
  111. data/vendor/assets/javascripts/dojo/cldr/nls/da/gregorian.js +1 -1
  112. data/vendor/assets/javascripts/dojo/cldr/nls/da/gregorian.js.uncompressed.js +174 -156
  113. data/vendor/assets/javascripts/dojo/cldr/nls/da/islamic.js +1 -1
  114. data/vendor/assets/javascripts/dojo/cldr/nls/da/islamic.js.uncompressed.js +60 -56
  115. data/vendor/assets/javascripts/dojo/cldr/nls/da/number.js +1 -1
  116. data/vendor/assets/javascripts/dojo/cldr/nls/da/number.js.uncompressed.js +9 -10
  117. data/vendor/assets/javascripts/dojo/cldr/nls/de/buddhist.js +1 -1
  118. data/vendor/assets/javascripts/dojo/cldr/nls/de/buddhist.js.uncompressed.js +92 -80
  119. data/vendor/assets/javascripts/dojo/cldr/nls/de/currency.js +1 -1
  120. data/vendor/assets/javascripts/dojo/cldr/nls/de/currency.js.uncompressed.js +8 -8
  121. data/vendor/assets/javascripts/dojo/cldr/nls/de/gregorian.js +1 -1
  122. data/vendor/assets/javascripts/dojo/cldr/nls/de/gregorian.js.uncompressed.js +176 -158
  123. data/vendor/assets/javascripts/dojo/cldr/nls/de/islamic.js +1 -1
  124. data/vendor/assets/javascripts/dojo/cldr/nls/de/islamic.js.uncompressed.js +63 -143
  125. data/vendor/assets/javascripts/dojo/cldr/nls/de/number.js +1 -1
  126. data/vendor/assets/javascripts/dojo/cldr/nls/de/number.js.uncompressed.js +9 -10
  127. data/vendor/assets/javascripts/dojo/cldr/nls/el/buddhist.js +1 -1
  128. data/vendor/assets/javascripts/dojo/cldr/nls/el/buddhist.js.uncompressed.js +144 -70
  129. data/vendor/assets/javascripts/dojo/cldr/nls/el/currency.js +1 -1
  130. data/vendor/assets/javascripts/dojo/cldr/nls/el/currency.js.uncompressed.js +6 -5
  131. data/vendor/assets/javascripts/dojo/cldr/nls/el/gregorian.js +1 -1
  132. data/vendor/assets/javascripts/dojo/cldr/nls/el/gregorian.js.uncompressed.js +170 -153
  133. data/vendor/assets/javascripts/dojo/cldr/nls/el/hebrew.js +1 -1
  134. data/vendor/assets/javascripts/dojo/cldr/nls/el/hebrew.js.uncompressed.js +78 -37
  135. data/vendor/assets/javascripts/dojo/cldr/nls/el/number.js +1 -1
  136. data/vendor/assets/javascripts/dojo/cldr/nls/el/number.js.uncompressed.js +9 -9
  137. data/vendor/assets/javascripts/dojo/cldr/nls/en-au/gregorian.js +1 -1
  138. data/vendor/assets/javascripts/dojo/cldr/nls/en-au/gregorian.js.uncompressed.js +15 -8
  139. data/vendor/assets/javascripts/dojo/cldr/nls/en-ca/gregorian.js +1 -1
  140. data/vendor/assets/javascripts/dojo/cldr/nls/en-ca/gregorian.js.uncompressed.js +12 -10
  141. data/vendor/assets/javascripts/dojo/cldr/nls/en-gb/buddhist.js +1 -1
  142. data/vendor/assets/javascripts/dojo/cldr/nls/en-gb/buddhist.js.uncompressed.js +69 -64
  143. data/vendor/assets/javascripts/dojo/cldr/nls/en-gb/gregorian.js +1 -1
  144. data/vendor/assets/javascripts/dojo/cldr/nls/en-gb/gregorian.js.uncompressed.js +16 -12
  145. data/vendor/assets/javascripts/dojo/cldr/nls/en-gb/islamic.js +1 -1
  146. data/vendor/assets/javascripts/dojo/cldr/nls/en-gb/islamic.js.uncompressed.js +40 -127
  147. data/vendor/assets/javascripts/dojo/cldr/nls/en/buddhist.js +1 -1
  148. data/vendor/assets/javascripts/dojo/cldr/nls/en/buddhist.js.uncompressed.js +77 -72
  149. data/vendor/assets/javascripts/dojo/cldr/nls/en/currency.js +1 -1
  150. data/vendor/assets/javascripts/dojo/cldr/nls/en/currency.js.uncompressed.js +7 -7
  151. data/vendor/assets/javascripts/dojo/cldr/nls/en/gregorian.js +1 -1
  152. data/vendor/assets/javascripts/dojo/cldr/nls/en/gregorian.js.uncompressed.js +154 -140
  153. data/vendor/assets/javascripts/dojo/cldr/nls/en/islamic.js +1 -1
  154. data/vendor/assets/javascripts/dojo/cldr/nls/en/islamic.js.uncompressed.js +52 -139
  155. data/vendor/assets/javascripts/dojo/cldr/nls/en/number.js +1 -1
  156. data/vendor/assets/javascripts/dojo/cldr/nls/en/number.js.uncompressed.js +9 -11
  157. data/vendor/assets/javascripts/dojo/cldr/nls/es/buddhist.js +1 -1
  158. data/vendor/assets/javascripts/dojo/cldr/nls/es/buddhist.js.uncompressed.js +104 -78
  159. data/vendor/assets/javascripts/dojo/cldr/nls/es/currency.js +1 -1
  160. data/vendor/assets/javascripts/dojo/cldr/nls/es/currency.js.uncompressed.js +8 -7
  161. data/vendor/assets/javascripts/dojo/cldr/nls/es/gregorian.js +1 -1
  162. data/vendor/assets/javascripts/dojo/cldr/nls/es/gregorian.js.uncompressed.js +177 -156
  163. data/vendor/assets/javascripts/dojo/cldr/nls/es/islamic.js +1 -1
  164. data/vendor/assets/javascripts/dojo/cldr/nls/es/islamic.js.uncompressed.js +74 -145
  165. data/vendor/assets/javascripts/dojo/cldr/nls/es/number.js +1 -1
  166. data/vendor/assets/javascripts/dojo/cldr/nls/es/number.js.uncompressed.js +9 -9
  167. data/vendor/assets/javascripts/dojo/cldr/nls/fi/buddhist.js +1 -1
  168. data/vendor/assets/javascripts/dojo/cldr/nls/fi/buddhist.js.uncompressed.js +150 -102
  169. data/vendor/assets/javascripts/dojo/cldr/nls/fi/currency.js +1 -1
  170. data/vendor/assets/javascripts/dojo/cldr/nls/fi/currency.js.uncompressed.js +7 -12
  171. data/vendor/assets/javascripts/dojo/cldr/nls/fi/gregorian.js +1 -1
  172. data/vendor/assets/javascripts/dojo/cldr/nls/fi/gregorian.js.uncompressed.js +163 -144
  173. data/vendor/assets/javascripts/dojo/cldr/nls/fi/hebrew.js +1 -1
  174. data/vendor/assets/javascripts/dojo/cldr/nls/fi/hebrew.js.uncompressed.js +130 -95
  175. data/vendor/assets/javascripts/dojo/cldr/nls/fi/islamic.js +1 -1
  176. data/vendor/assets/javascripts/dojo/cldr/nls/fi/islamic.js.uncompressed.js +119 -83
  177. data/vendor/assets/javascripts/dojo/cldr/nls/fi/number.js +1 -1
  178. data/vendor/assets/javascripts/dojo/cldr/nls/fi/number.js.uncompressed.js +9 -10
  179. data/vendor/assets/javascripts/dojo/cldr/nls/fr-ch/gregorian.js +1 -1
  180. data/vendor/assets/javascripts/dojo/cldr/nls/fr-ch/gregorian.js.uncompressed.js +2 -2
  181. data/vendor/assets/javascripts/dojo/cldr/nls/fr-ch/number.js +1 -1
  182. data/vendor/assets/javascripts/dojo/cldr/nls/fr-ch/number.js.uncompressed.js +2 -2
  183. data/vendor/assets/javascripts/dojo/cldr/nls/fr/buddhist.js +8 -0
  184. data/vendor/assets/javascripts/dojo/cldr/nls/fr/buddhist.js.uncompressed.js +160 -0
  185. data/vendor/assets/javascripts/dojo/cldr/nls/fr/currency.js +1 -1
  186. data/vendor/assets/javascripts/dojo/cldr/nls/fr/currency.js.uncompressed.js +11 -12
  187. data/vendor/assets/javascripts/dojo/cldr/nls/fr/gregorian.js +1 -1
  188. data/vendor/assets/javascripts/dojo/cldr/nls/fr/gregorian.js.uncompressed.js +171 -157
  189. data/vendor/assets/javascripts/dojo/cldr/nls/fr/hebrew.js +8 -0
  190. data/vendor/assets/javascripts/dojo/cldr/nls/fr/hebrew.js.uncompressed.js +139 -0
  191. data/vendor/assets/javascripts/dojo/cldr/nls/fr/islamic.js +8 -0
  192. data/vendor/assets/javascripts/dojo/cldr/nls/fr/islamic.js.uncompressed.js +177 -0
  193. data/vendor/assets/javascripts/dojo/cldr/nls/fr/number.js +1 -1
  194. data/vendor/assets/javascripts/dojo/cldr/nls/fr/number.js.uncompressed.js +9 -10
  195. data/vendor/assets/javascripts/dojo/cldr/nls/gregorian.js +1 -1
  196. data/vendor/assets/javascripts/dojo/cldr/nls/gregorian.js.uncompressed.js +127 -125
  197. data/vendor/assets/javascripts/dojo/cldr/nls/he/currency.js +1 -1
  198. data/vendor/assets/javascripts/dojo/cldr/nls/he/currency.js.uncompressed.js +6 -6
  199. data/vendor/assets/javascripts/dojo/cldr/nls/he/gregorian.js +1 -1
  200. data/vendor/assets/javascripts/dojo/cldr/nls/he/gregorian.js.uncompressed.js +168 -140
  201. data/vendor/assets/javascripts/dojo/cldr/nls/he/hebrew.js +1 -1
  202. data/vendor/assets/javascripts/dojo/cldr/nls/he/hebrew.js.uncompressed.js +83 -40
  203. data/vendor/assets/javascripts/dojo/cldr/nls/he/islamic.js +1 -1
  204. data/vendor/assets/javascripts/dojo/cldr/nls/he/islamic.js.uncompressed.js +56 -40
  205. data/vendor/assets/javascripts/dojo/cldr/nls/he/number.js +1 -1
  206. data/vendor/assets/javascripts/dojo/cldr/nls/he/number.js.uncompressed.js +9 -10
  207. data/vendor/assets/javascripts/dojo/cldr/nls/hebrew.js +1 -1
  208. data/vendor/assets/javascripts/dojo/cldr/nls/hebrew.js.uncompressed.js +138 -132
  209. data/vendor/assets/javascripts/dojo/cldr/nls/hu/buddhist.js +8 -0
  210. data/vendor/assets/javascripts/dojo/cldr/nls/hu/buddhist.js.uncompressed.js +209 -0
  211. data/vendor/assets/javascripts/dojo/cldr/nls/hu/currency.js +1 -1
  212. data/vendor/assets/javascripts/dojo/cldr/nls/hu/currency.js.uncompressed.js +7 -7
  213. data/vendor/assets/javascripts/dojo/cldr/nls/hu/gregorian.js +1 -1
  214. data/vendor/assets/javascripts/dojo/cldr/nls/hu/gregorian.js.uncompressed.js +161 -138
  215. data/vendor/assets/javascripts/dojo/cldr/nls/hu/hebrew.js +8 -0
  216. data/vendor/assets/javascripts/dojo/cldr/nls/hu/hebrew.js.uncompressed.js +187 -0
  217. data/vendor/assets/javascripts/dojo/cldr/nls/hu/islamic.js +8 -0
  218. data/vendor/assets/javascripts/dojo/cldr/nls/hu/islamic.js.uncompressed.js +199 -0
  219. data/vendor/assets/javascripts/dojo/cldr/nls/hu/number.js +1 -1
  220. data/vendor/assets/javascripts/dojo/cldr/nls/hu/number.js.uncompressed.js +8 -9
  221. data/vendor/assets/javascripts/dojo/cldr/nls/islamic.js +1 -1
  222. data/vendor/assets/javascripts/dojo/cldr/nls/islamic.js.uncompressed.js +137 -132
  223. data/vendor/assets/javascripts/dojo/cldr/nls/it/buddhist.js +8 -0
  224. data/vendor/assets/javascripts/dojo/cldr/nls/it/buddhist.js.uncompressed.js +192 -0
  225. data/vendor/assets/javascripts/dojo/cldr/nls/it/currency.js +1 -1
  226. data/vendor/assets/javascripts/dojo/cldr/nls/it/currency.js.uncompressed.js +6 -6
  227. data/vendor/assets/javascripts/dojo/cldr/nls/it/gregorian.js +1 -1
  228. data/vendor/assets/javascripts/dojo/cldr/nls/it/gregorian.js.uncompressed.js +161 -146
  229. data/vendor/assets/javascripts/dojo/cldr/nls/it/islamic.js +8 -0
  230. data/vendor/assets/javascripts/dojo/cldr/nls/it/islamic.js.uncompressed.js +104 -0
  231. data/vendor/assets/javascripts/dojo/cldr/nls/it/number.js +1 -1
  232. data/vendor/assets/javascripts/dojo/cldr/nls/it/number.js.uncompressed.js +9 -3
  233. data/vendor/assets/javascripts/dojo/cldr/nls/ja/buddhist.js +8 -0
  234. data/vendor/assets/javascripts/dojo/cldr/nls/ja/buddhist.js.uncompressed.js +101 -0
  235. data/vendor/assets/javascripts/dojo/cldr/nls/ja/currency.js +1 -1
  236. data/vendor/assets/javascripts/dojo/cldr/nls/ja/currency.js.uncompressed.js +8 -8
  237. data/vendor/assets/javascripts/dojo/cldr/nls/ja/gregorian.js +1 -1
  238. data/vendor/assets/javascripts/dojo/cldr/nls/ja/gregorian.js.uncompressed.js +159 -139
  239. data/vendor/assets/javascripts/dojo/cldr/nls/ja/hebrew.js +8 -0
  240. data/vendor/assets/javascripts/dojo/cldr/nls/ja/hebrew.js.uncompressed.js +168 -0
  241. data/vendor/assets/javascripts/dojo/cldr/nls/ja/islamic.js +8 -0
  242. data/vendor/assets/javascripts/dojo/cldr/nls/ja/islamic.js.uncompressed.js +128 -0
  243. data/vendor/assets/javascripts/dojo/cldr/nls/ja/number.js +1 -1
  244. data/vendor/assets/javascripts/dojo/cldr/nls/ja/number.js.uncompressed.js +5 -3
  245. data/vendor/assets/javascripts/dojo/cldr/nls/ko/buddhist.js +8 -0
  246. data/vendor/assets/javascripts/dojo/cldr/nls/ko/buddhist.js.uncompressed.js +127 -0
  247. data/vendor/assets/javascripts/dojo/cldr/nls/ko/currency.js +1 -1
  248. data/vendor/assets/javascripts/dojo/cldr/nls/ko/currency.js.uncompressed.js +6 -6
  249. data/vendor/assets/javascripts/dojo/cldr/nls/ko/gregorian.js +1 -1
  250. data/vendor/assets/javascripts/dojo/cldr/nls/ko/gregorian.js.uncompressed.js +153 -137
  251. data/vendor/assets/javascripts/dojo/cldr/nls/ko/number.js +1 -1
  252. data/vendor/assets/javascripts/dojo/cldr/nls/ko/number.js.uncompressed.js +9 -10
  253. data/vendor/assets/javascripts/dojo/cldr/nls/nb/buddhist.js +8 -0
  254. data/vendor/assets/javascripts/dojo/cldr/nls/nb/buddhist.js.uncompressed.js +206 -0
  255. data/vendor/assets/javascripts/dojo/cldr/nls/nb/currency.js +1 -1
  256. data/vendor/assets/javascripts/dojo/cldr/nls/nb/currency.js.uncompressed.js +6 -14
  257. data/vendor/assets/javascripts/dojo/cldr/nls/nb/gregorian.js +1 -1
  258. data/vendor/assets/javascripts/dojo/cldr/nls/nb/gregorian.js.uncompressed.js +176 -153
  259. data/vendor/assets/javascripts/dojo/cldr/nls/nb/islamic.js +8 -0
  260. data/vendor/assets/javascripts/dojo/cldr/nls/nb/islamic.js.uncompressed.js +133 -0
  261. data/vendor/assets/javascripts/dojo/cldr/nls/nb/number.js +1 -1
  262. data/vendor/assets/javascripts/dojo/cldr/nls/nb/number.js.uncompressed.js +9 -10
  263. data/vendor/assets/javascripts/dojo/cldr/nls/nl/buddhist.js +8 -0
  264. data/vendor/assets/javascripts/dojo/cldr/nls/nl/buddhist.js.uncompressed.js +133 -0
  265. data/vendor/assets/javascripts/dojo/cldr/nls/nl/currency.js +1 -1
  266. data/vendor/assets/javascripts/dojo/cldr/nls/nl/currency.js.uncompressed.js +6 -6
  267. data/vendor/assets/javascripts/dojo/cldr/nls/nl/gregorian.js +1 -1
  268. data/vendor/assets/javascripts/dojo/cldr/nls/nl/gregorian.js.uncompressed.js +180 -162
  269. data/vendor/assets/javascripts/dojo/cldr/nls/nl/hebrew.js +8 -0
  270. data/vendor/assets/javascripts/dojo/cldr/nls/nl/hebrew.js.uncompressed.js +123 -0
  271. data/vendor/assets/javascripts/dojo/cldr/nls/nl/islamic.js +8 -0
  272. data/vendor/assets/javascripts/dojo/cldr/nls/nl/islamic.js.uncompressed.js +163 -0
  273. data/vendor/assets/javascripts/dojo/cldr/nls/nl/number.js +1 -1
  274. data/vendor/assets/javascripts/dojo/cldr/nls/nl/number.js.uncompressed.js +9 -10
  275. data/vendor/assets/javascripts/dojo/cldr/nls/number.js +1 -1
  276. data/vendor/assets/javascripts/dojo/cldr/nls/number.js.uncompressed.js +17 -19
  277. data/vendor/assets/javascripts/dojo/cldr/nls/pl/buddhist.js +8 -0
  278. data/vendor/assets/javascripts/dojo/cldr/nls/pl/buddhist.js.uncompressed.js +203 -0
  279. data/vendor/assets/javascripts/dojo/cldr/nls/pl/currency.js +1 -1
  280. data/vendor/assets/javascripts/dojo/cldr/nls/pl/currency.js.uncompressed.js +6 -6
  281. data/vendor/assets/javascripts/dojo/cldr/nls/pl/gregorian.js +1 -1
  282. data/vendor/assets/javascripts/dojo/cldr/nls/pl/gregorian.js.uncompressed.js +169 -149
  283. data/vendor/assets/javascripts/dojo/cldr/nls/pl/hebrew.js +8 -0
  284. data/vendor/assets/javascripts/dojo/cldr/nls/pl/hebrew.js.uncompressed.js +166 -0
  285. data/vendor/assets/javascripts/dojo/cldr/nls/pl/islamic.js +8 -0
  286. data/vendor/assets/javascripts/dojo/cldr/nls/pl/islamic.js.uncompressed.js +196 -0
  287. data/vendor/assets/javascripts/dojo/cldr/nls/pl/number.js +1 -1
  288. data/vendor/assets/javascripts/dojo/cldr/nls/pl/number.js.uncompressed.js +9 -10
  289. data/vendor/assets/javascripts/dojo/cldr/nls/pt-pt/buddhist.js +8 -0
  290. data/vendor/assets/javascripts/dojo/cldr/nls/pt-pt/buddhist.js.uncompressed.js +127 -0
  291. data/vendor/assets/javascripts/dojo/cldr/nls/pt-pt/currency.js +8 -0
  292. data/vendor/assets/javascripts/dojo/cldr/nls/pt-pt/currency.js.uncompressed.js +8 -0
  293. data/vendor/assets/javascripts/dojo/cldr/nls/pt-pt/gregorian.js +1 -1
  294. data/vendor/assets/javascripts/dojo/cldr/nls/pt-pt/gregorian.js.uncompressed.js +78 -62
  295. data/vendor/assets/javascripts/dojo/cldr/nls/pt-pt/islamic.js +8 -0
  296. data/vendor/assets/javascripts/dojo/cldr/nls/pt-pt/islamic.js.uncompressed.js +82 -0
  297. data/vendor/assets/javascripts/dojo/cldr/nls/pt-pt/number.js +1 -1
  298. data/vendor/assets/javascripts/dojo/cldr/nls/pt-pt/number.js.uncompressed.js +3 -2
  299. data/vendor/assets/javascripts/dojo/cldr/nls/pt/buddhist.js +8 -0
  300. data/vendor/assets/javascripts/dojo/cldr/nls/pt/buddhist.js.uncompressed.js +130 -0
  301. data/vendor/assets/javascripts/dojo/cldr/nls/pt/currency.js +1 -1
  302. data/vendor/assets/javascripts/dojo/cldr/nls/pt/currency.js.uncompressed.js +6 -6
  303. data/vendor/assets/javascripts/dojo/cldr/nls/pt/gregorian.js +1 -1
  304. data/vendor/assets/javascripts/dojo/cldr/nls/pt/gregorian.js.uncompressed.js +185 -166
  305. data/vendor/assets/javascripts/dojo/cldr/nls/pt/hebrew.js +8 -0
  306. data/vendor/assets/javascripts/dojo/cldr/nls/pt/hebrew.js.uncompressed.js +137 -0
  307. data/vendor/assets/javascripts/dojo/cldr/nls/pt/islamic.js +8 -0
  308. data/vendor/assets/javascripts/dojo/cldr/nls/pt/islamic.js.uncompressed.js +101 -0
  309. data/vendor/assets/javascripts/dojo/cldr/nls/pt/number.js +1 -1
  310. data/vendor/assets/javascripts/dojo/cldr/nls/pt/number.js.uncompressed.js +9 -10
  311. data/vendor/assets/javascripts/dojo/cldr/nls/ro/buddhist.js +1 -1
  312. data/vendor/assets/javascripts/dojo/cldr/nls/ro/buddhist.js.uncompressed.js +148 -62
  313. data/vendor/assets/javascripts/dojo/cldr/nls/ro/currency.js +1 -1
  314. data/vendor/assets/javascripts/dojo/cldr/nls/ro/currency.js.uncompressed.js +6 -5
  315. data/vendor/assets/javascripts/dojo/cldr/nls/ro/gregorian.js +1 -1
  316. data/vendor/assets/javascripts/dojo/cldr/nls/ro/gregorian.js.uncompressed.js +170 -159
  317. data/vendor/assets/javascripts/dojo/cldr/nls/ro/hebrew.js +8 -0
  318. data/vendor/assets/javascripts/dojo/cldr/nls/ro/hebrew.js.uncompressed.js +169 -0
  319. data/vendor/assets/javascripts/dojo/cldr/nls/ro/islamic.js +8 -0
  320. data/vendor/assets/javascripts/dojo/cldr/nls/ro/islamic.js.uncompressed.js +117 -0
  321. data/vendor/assets/javascripts/dojo/cldr/nls/ro/number.js +1 -1
  322. data/vendor/assets/javascripts/dojo/cldr/nls/ro/number.js.uncompressed.js +9 -10
  323. data/vendor/assets/javascripts/dojo/cldr/nls/ru/buddhist.js +8 -0
  324. data/vendor/assets/javascripts/dojo/cldr/nls/ru/buddhist.js.uncompressed.js +203 -0
  325. data/vendor/assets/javascripts/dojo/cldr/nls/ru/currency.js +1 -1
  326. data/vendor/assets/javascripts/dojo/cldr/nls/ru/currency.js.uncompressed.js +7 -6
  327. data/vendor/assets/javascripts/dojo/cldr/nls/ru/gregorian.js +1 -1
  328. data/vendor/assets/javascripts/dojo/cldr/nls/ru/gregorian.js.uncompressed.js +184 -155
  329. data/vendor/assets/javascripts/dojo/cldr/nls/ru/hebrew.js +8 -0
  330. data/vendor/assets/javascripts/dojo/cldr/nls/ru/hebrew.js.uncompressed.js +169 -0
  331. data/vendor/assets/javascripts/dojo/cldr/nls/ru/islamic.js +8 -0
  332. data/vendor/assets/javascripts/dojo/cldr/nls/ru/islamic.js.uncompressed.js +197 -0
  333. data/vendor/assets/javascripts/dojo/cldr/nls/ru/number.js +1 -1
  334. data/vendor/assets/javascripts/dojo/cldr/nls/ru/number.js.uncompressed.js +10 -10
  335. data/vendor/assets/javascripts/dojo/cldr/nls/sk/currency.js +1 -1
  336. data/vendor/assets/javascripts/dojo/cldr/nls/sk/currency.js.uncompressed.js +7 -7
  337. data/vendor/assets/javascripts/dojo/cldr/nls/sk/gregorian.js +1 -1
  338. data/vendor/assets/javascripts/dojo/cldr/nls/sk/gregorian.js.uncompressed.js +172 -148
  339. data/vendor/assets/javascripts/dojo/cldr/nls/sk/number.js +1 -1
  340. data/vendor/assets/javascripts/dojo/cldr/nls/sk/number.js.uncompressed.js +5 -2
  341. data/vendor/assets/javascripts/dojo/cldr/nls/sl/currency.js +1 -1
  342. data/vendor/assets/javascripts/dojo/cldr/nls/sl/currency.js.uncompressed.js +7 -7
  343. data/vendor/assets/javascripts/dojo/cldr/nls/sl/gregorian.js +1 -1
  344. data/vendor/assets/javascripts/dojo/cldr/nls/sl/gregorian.js.uncompressed.js +157 -134
  345. data/vendor/assets/javascripts/dojo/cldr/nls/sl/number.js +1 -1
  346. data/vendor/assets/javascripts/dojo/cldr/nls/sl/number.js.uncompressed.js +9 -10
  347. data/vendor/assets/javascripts/dojo/cldr/nls/sv/buddhist.js +8 -0
  348. data/vendor/assets/javascripts/dojo/cldr/nls/sv/buddhist.js.uncompressed.js +209 -0
  349. data/vendor/assets/javascripts/dojo/cldr/nls/sv/currency.js +1 -1
  350. data/vendor/assets/javascripts/dojo/cldr/nls/sv/currency.js.uncompressed.js +7 -9
  351. data/vendor/assets/javascripts/dojo/cldr/nls/sv/gregorian.js +1 -1
  352. data/vendor/assets/javascripts/dojo/cldr/nls/sv/gregorian.js.uncompressed.js +164 -152
  353. data/vendor/assets/javascripts/dojo/cldr/nls/sv/hebrew.js +8 -0
  354. data/vendor/assets/javascripts/dojo/cldr/nls/sv/hebrew.js.uncompressed.js +167 -0
  355. data/vendor/assets/javascripts/dojo/cldr/nls/sv/islamic.js +8 -0
  356. data/vendor/assets/javascripts/dojo/cldr/nls/sv/islamic.js.uncompressed.js +189 -0
  357. data/vendor/assets/javascripts/dojo/cldr/nls/sv/number.js +1 -1
  358. data/vendor/assets/javascripts/dojo/cldr/nls/sv/number.js.uncompressed.js +9 -10
  359. data/vendor/assets/javascripts/dojo/cldr/nls/th/buddhist.js +1 -1
  360. data/vendor/assets/javascripts/dojo/cldr/nls/th/buddhist.js.uncompressed.js +91 -65
  361. data/vendor/assets/javascripts/dojo/cldr/nls/th/currency.js +1 -1
  362. data/vendor/assets/javascripts/dojo/cldr/nls/th/currency.js.uncompressed.js +7 -7
  363. data/vendor/assets/javascripts/dojo/cldr/nls/th/gregorian.js +1 -1
  364. data/vendor/assets/javascripts/dojo/cldr/nls/th/gregorian.js.uncompressed.js +161 -138
  365. data/vendor/assets/javascripts/dojo/cldr/nls/th/hebrew.js +8 -0
  366. data/vendor/assets/javascripts/dojo/cldr/nls/th/hebrew.js.uncompressed.js +139 -0
  367. data/vendor/assets/javascripts/dojo/cldr/nls/th/islamic.js +8 -0
  368. data/vendor/assets/javascripts/dojo/cldr/nls/th/islamic.js.uncompressed.js +134 -0
  369. data/vendor/assets/javascripts/dojo/cldr/nls/th/number.js +1 -1
  370. data/vendor/assets/javascripts/dojo/cldr/nls/th/number.js.uncompressed.js +9 -10
  371. data/vendor/assets/javascripts/dojo/cldr/nls/tr/buddhist.js +8 -0
  372. data/vendor/assets/javascripts/dojo/cldr/nls/tr/buddhist.js.uncompressed.js +203 -0
  373. data/vendor/assets/javascripts/dojo/cldr/nls/tr/currency.js +1 -1
  374. data/vendor/assets/javascripts/dojo/cldr/nls/tr/currency.js.uncompressed.js +8 -8
  375. data/vendor/assets/javascripts/dojo/cldr/nls/tr/gregorian.js +1 -1
  376. data/vendor/assets/javascripts/dojo/cldr/nls/tr/gregorian.js.uncompressed.js +160 -146
  377. data/vendor/assets/javascripts/dojo/cldr/nls/tr/hebrew.js +8 -0
  378. data/vendor/assets/javascripts/dojo/cldr/nls/tr/hebrew.js.uncompressed.js +161 -0
  379. data/vendor/assets/javascripts/dojo/cldr/nls/tr/islamic.js +8 -0
  380. data/vendor/assets/javascripts/dojo/cldr/nls/tr/islamic.js.uncompressed.js +181 -0
  381. data/vendor/assets/javascripts/dojo/cldr/nls/tr/number.js +1 -1
  382. data/vendor/assets/javascripts/dojo/cldr/nls/tr/number.js.uncompressed.js +9 -10
  383. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hant/buddhist.js +1 -1
  384. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hant/buddhist.js.uncompressed.js +141 -95
  385. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hant/currency.js +1 -1
  386. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hant/currency.js.uncompressed.js +7 -6
  387. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hant/gregorian.js +1 -1
  388. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hant/gregorian.js.uncompressed.js +144 -146
  389. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hant/hebrew.js +8 -0
  390. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hant/hebrew.js.uncompressed.js +182 -0
  391. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hant/islamic.js +1 -1
  392. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hant/islamic.js.uncompressed.js +153 -54
  393. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hant/number.js +1 -1
  394. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hant/number.js.uncompressed.js +2 -0
  395. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hk/currency.js +1 -1
  396. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hk/currency.js.uncompressed.js +6 -6
  397. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hk/gregorian.js +1 -1
  398. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hk/gregorian.js.uncompressed.js +34 -37
  399. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hk/number.js +1 -1
  400. data/vendor/assets/javascripts/dojo/cldr/nls/zh-hk/number.js.uncompressed.js +1 -1
  401. data/vendor/assets/javascripts/dojo/cldr/nls/zh-tw/currency.js +1 -1
  402. data/vendor/assets/javascripts/dojo/cldr/nls/zh-tw/currency.js.uncompressed.js +5 -4
  403. data/vendor/assets/javascripts/dojo/cldr/nls/zh-tw/gregorian.js +1 -1
  404. data/vendor/assets/javascripts/dojo/cldr/nls/zh-tw/gregorian.js.uncompressed.js +51 -49
  405. data/vendor/assets/javascripts/dojo/cldr/nls/zh-tw/number.js +8 -0
  406. data/vendor/assets/javascripts/dojo/cldr/nls/zh-tw/number.js.uncompressed.js +7 -0
  407. data/vendor/assets/javascripts/dojo/cldr/nls/zh/buddhist.js +8 -0
  408. data/vendor/assets/javascripts/dojo/cldr/nls/zh/buddhist.js.uncompressed.js +205 -0
  409. data/vendor/assets/javascripts/dojo/cldr/nls/zh/currency.js +1 -1
  410. data/vendor/assets/javascripts/dojo/cldr/nls/zh/currency.js.uncompressed.js +6 -6
  411. data/vendor/assets/javascripts/dojo/cldr/nls/zh/gregorian.js +1 -1
  412. data/vendor/assets/javascripts/dojo/cldr/nls/zh/gregorian.js.uncompressed.js +152 -135
  413. data/vendor/assets/javascripts/dojo/cldr/nls/zh/hebrew.js +8 -0
  414. data/vendor/assets/javascripts/dojo/cldr/nls/zh/hebrew.js.uncompressed.js +181 -0
  415. data/vendor/assets/javascripts/dojo/cldr/nls/zh/islamic.js +8 -0
  416. data/vendor/assets/javascripts/dojo/cldr/nls/zh/islamic.js.uncompressed.js +137 -0
  417. data/vendor/assets/javascripts/dojo/cldr/nls/zh/number.js +1 -1
  418. data/vendor/assets/javascripts/dojo/cldr/nls/zh/number.js.uncompressed.js +4 -3
  419. data/vendor/assets/javascripts/dojo/cldr/supplemental.js +25 -28
  420. data/vendor/assets/javascripts/dojo/cldr/supplemental.js.uncompressed.js +46 -39
  421. data/vendor/assets/javascripts/dojo/colors.js +2 -1
  422. data/vendor/assets/javascripts/dojo/colors.js.uncompressed.js +22 -22
  423. data/vendor/assets/javascripts/dojo/cookie.js.uncompressed.js +30 -30
  424. data/vendor/assets/javascripts/dojo/currency.js +14 -13
  425. data/vendor/assets/javascripts/dojo/currency.js.uncompressed.js +64 -66
  426. data/vendor/assets/javascripts/dojo/data/ItemFileReadStore.js +138 -138
  427. data/vendor/assets/javascripts/dojo/data/ItemFileReadStore.js.uncompressed.js +251 -245
  428. data/vendor/assets/javascripts/dojo/data/ItemFileWriteStore.js +1 -1
  429. data/vendor/assets/javascripts/dojo/data/ItemFileWriteStore.js.uncompressed.js +80 -69
  430. data/vendor/assets/javascripts/dojo/data/ObjectStore.js +176 -169
  431. data/vendor/assets/javascripts/dojo/data/ObjectStore.js.uncompressed.js +122 -83
  432. data/vendor/assets/javascripts/dojo/data/api/Identity.js +6 -7
  433. data/vendor/assets/javascripts/dojo/data/api/Identity.js.uncompressed.js +35 -33
  434. data/vendor/assets/javascripts/dojo/data/api/Item.js +10 -0
  435. data/vendor/assets/javascripts/dojo/data/api/Item.js.uncompressed.js +13 -0
  436. data/vendor/assets/javascripts/dojo/data/api/Notification.js +5 -6
  437. data/vendor/assets/javascripts/dojo/data/api/Notification.js.uncompressed.js +39 -51
  438. data/vendor/assets/javascripts/dojo/data/api/Read.js +2 -3
  439. data/vendor/assets/javascripts/dojo/data/api/Read.js.uncompressed.js +85 -84
  440. data/vendor/assets/javascripts/dojo/data/api/Request.js +2 -3
  441. data/vendor/assets/javascripts/dojo/data/api/Request.js.uncompressed.js +10 -13
  442. data/vendor/assets/javascripts/dojo/data/api/Write.js +9 -10
  443. data/vendor/assets/javascripts/dojo/data/api/Write.js.uncompressed.js +28 -43
  444. data/vendor/assets/javascripts/dojo/data/util/filter.js +3 -2
  445. data/vendor/assets/javascripts/dojo/data/util/filter.js.uncompressed.js +19 -16
  446. data/vendor/assets/javascripts/dojo/data/util/simpleFetch.js +37 -40
  447. data/vendor/assets/javascripts/dojo/data/util/simpleFetch.js.uncompressed.js +202 -57
  448. data/vendor/assets/javascripts/dojo/data/util/sorter.js +3 -2
  449. data/vendor/assets/javascripts/dojo/data/util/sorter.js.uncompressed.js +16 -16
  450. data/vendor/assets/javascripts/dojo/date.js +106 -105
  451. data/vendor/assets/javascripts/dojo/date.js.uncompressed.js +46 -47
  452. data/vendor/assets/javascripts/dojo/date/locale.js +196 -183
  453. data/vendor/assets/javascripts/dojo/date/locale.js.uncompressed.js +105 -81
  454. data/vendor/assets/javascripts/dojo/date/stamp.js +10 -9
  455. data/vendor/assets/javascripts/dojo/date/stamp.js.uncompressed.js +40 -42
  456. data/vendor/assets/javascripts/dojo/dnd/AutoSource.js +2 -2
  457. data/vendor/assets/javascripts/dojo/dnd/AutoSource.js.uncompressed.js +3 -4
  458. data/vendor/assets/javascripts/dojo/dnd/Avatar.js +32 -30
  459. data/vendor/assets/javascripts/dojo/dnd/Avatar.js.uncompressed.js +45 -34
  460. data/vendor/assets/javascripts/dojo/dnd/Container.js +99 -96
  461. data/vendor/assets/javascripts/dojo/dnd/Container.js.uncompressed.js +123 -99
  462. data/vendor/assets/javascripts/dojo/dnd/Manager.js +58 -52
  463. data/vendor/assets/javascripts/dojo/dnd/Manager.js.uncompressed.js +52 -42
  464. data/vendor/assets/javascripts/dojo/dnd/Moveable.js +41 -39
  465. data/vendor/assets/javascripts/dojo/dnd/Moveable.js.uncompressed.js +72 -60
  466. data/vendor/assets/javascripts/dojo/dnd/Mover.js +19 -17
  467. data/vendor/assets/javascripts/dojo/dnd/Mover.js.uncompressed.js +37 -32
  468. data/vendor/assets/javascripts/dojo/dnd/Selector.js +52 -50
  469. data/vendor/assets/javascripts/dojo/dnd/Selector.js.uncompressed.js +51 -46
  470. data/vendor/assets/javascripts/dojo/dnd/Source.js +109 -106
  471. data/vendor/assets/javascripts/dojo/dnd/Source.js.uncompressed.js +60 -67
  472. data/vendor/assets/javascripts/dojo/dnd/Target.js +3 -3
  473. data/vendor/assets/javascripts/dojo/dnd/Target.js.uncompressed.js +7 -7
  474. data/vendor/assets/javascripts/dojo/dnd/TimedMoveable.js +19 -20
  475. data/vendor/assets/javascripts/dojo/dnd/TimedMoveable.js.uncompressed.js +9 -14
  476. data/vendor/assets/javascripts/dojo/dnd/autoscroll.js +48 -39
  477. data/vendor/assets/javascripts/dojo/dnd/autoscroll.js.uncompressed.js +77 -46
  478. data/vendor/assets/javascripts/dojo/dnd/common.js +11 -10
  479. data/vendor/assets/javascripts/dojo/dnd/common.js.uncompressed.js +19 -13
  480. data/vendor/assets/javascripts/dojo/dnd/move.js +31 -34
  481. data/vendor/assets/javascripts/dojo/dnd/move.js.uncompressed.js +31 -27
  482. data/vendor/assets/javascripts/dojo/dojo.js +12 -1869
  483. data/vendor/assets/javascripts/dojo/dojo.js.uncompressed.js +7168 -5874
  484. data/vendor/assets/javascripts/dojo/dojo.profile.js +6 -6
  485. data/vendor/assets/javascripts/dojo/dom-attr.js +30 -31
  486. data/vendor/assets/javascripts/dojo/dom-attr.js.uncompressed.js +71 -89
  487. data/vendor/assets/javascripts/dojo/dom-class.js.uncompressed.js +161 -155
  488. data/vendor/assets/javascripts/dojo/dom-construct.js +1 -1
  489. data/vendor/assets/javascripts/dojo/dom-construct.js.uncompressed.js +159 -202
  490. data/vendor/assets/javascripts/dojo/dom-form.js.uncompressed.js +60 -77
  491. data/vendor/assets/javascripts/dojo/dom-geometry.js +43 -45
  492. data/vendor/assets/javascripts/dojo/dom-geometry.js.uncompressed.js +257 -403
  493. data/vendor/assets/javascripts/dojo/dom-prop.js +36 -37
  494. data/vendor/assets/javascripts/dojo/dom-prop.js.uncompressed.js +33 -42
  495. data/vendor/assets/javascripts/dojo/dom-style.js +2 -2
  496. data/vendor/assets/javascripts/dojo/dom-style.js.uncompressed.js +127 -142
  497. data/vendor/assets/javascripts/dojo/dom.js +3 -1
  498. data/vendor/assets/javascripts/dojo/dom.js.uncompressed.js +77 -85
  499. data/vendor/assets/javascripts/dojo/domReady.js +2 -2
  500. data/vendor/assets/javascripts/dojo/domReady.js.uncompressed.js +4 -2
  501. data/vendor/assets/javascripts/dojo/errors/CancelError.js +10 -0
  502. data/vendor/assets/javascripts/dojo/errors/CancelError.js.uncompressed.js +13 -0
  503. data/vendor/assets/javascripts/dojo/errors/RequestError.js +12 -0
  504. data/vendor/assets/javascripts/dojo/errors/RequestError.js.uncompressed.js +15 -0
  505. data/vendor/assets/javascripts/dojo/errors/RequestTimeoutError.js +10 -0
  506. data/vendor/assets/javascripts/dojo/errors/RequestTimeoutError.js.uncompressed.js +15 -0
  507. data/vendor/assets/javascripts/dojo/errors/create.js +36 -0
  508. data/vendor/assets/javascripts/dojo/errors/create.js.uncompressed.js +41 -0
  509. data/vendor/assets/javascripts/dojo/fx.js.uncompressed.js +27 -34
  510. data/vendor/assets/javascripts/dojo/fx/Toggler.js.uncompressed.js +9 -11
  511. data/vendor/assets/javascripts/dojo/fx/easing.js.uncompressed.js +7 -15
  512. data/vendor/assets/javascripts/dojo/gears.js +10 -9
  513. data/vendor/assets/javascripts/dojo/gears.js.uncompressed.js +18 -14
  514. data/vendor/assets/javascripts/dojo/has.js +35 -35
  515. data/vendor/assets/javascripts/dojo/has.js.uncompressed.js +55 -60
  516. data/vendor/assets/javascripts/dojo/hash.js +74 -74
  517. data/vendor/assets/javascripts/dojo/hash.js.uncompressed.js +62 -49
  518. data/vendor/assets/javascripts/dojo/hccss.js +23 -0
  519. data/vendor/assets/javascripts/dojo/hccss.js.uncompressed.js +51 -0
  520. data/vendor/assets/javascripts/dojo/html.js +81 -64
  521. data/vendor/assets/javascripts/dojo/html.js.uncompressed.js +107 -76
  522. data/vendor/assets/javascripts/dojo/i18n.js +155 -139
  523. data/vendor/assets/javascripts/dojo/i18n.js.uncompressed.js +234 -198
  524. data/vendor/assets/javascripts/dojo/io-query.js +28 -30
  525. data/vendor/assets/javascripts/dojo/io-query.js.uncompressed.js +14 -15
  526. data/vendor/assets/javascripts/dojo/io/iframe.js +49 -207
  527. data/vendor/assets/javascripts/dojo/io/iframe.js.uncompressed.js +127 -313
  528. data/vendor/assets/javascripts/dojo/io/script.js +60 -84
  529. data/vendor/assets/javascripts/dojo/io/script.js.uncompressed.js +121 -128
  530. data/vendor/assets/javascripts/dojo/jaxer.js +2 -1
  531. data/vendor/assets/javascripts/dojo/jaxer.js.uncompressed.js +2 -4
  532. data/vendor/assets/javascripts/dojo/json.js +2 -0
  533. data/vendor/assets/javascripts/dojo/json.js.uncompressed.js +38 -35
  534. data/vendor/assets/javascripts/dojo/keys.js +2 -2
  535. data/vendor/assets/javascripts/dojo/keys.js.uncompressed.js +73 -76
  536. data/vendor/assets/javascripts/dojo/main.js +10 -10
  537. data/vendor/assets/javascripts/dojo/main.js.uncompressed.js +13 -11
  538. data/vendor/assets/javascripts/dojo/mouse.js +25 -4
  539. data/vendor/assets/javascripts/dojo/mouse.js.uncompressed.js +78 -34
  540. data/vendor/assets/javascripts/dojo/nls/az/colors.js.uncompressed.js +2 -4
  541. data/vendor/assets/javascripts/dojo/nls/colors.js.uncompressed.js +1 -1
  542. data/vendor/assets/javascripts/dojo/nls/he/colors.js.uncompressed.js +2 -5
  543. data/vendor/assets/javascripts/dojo/nls/hr/colors.js +1 -1
  544. data/vendor/assets/javascripts/dojo/nls/hr/colors.js.uncompressed.js +149 -149
  545. data/vendor/assets/javascripts/dojo/nls/sl/colors.js +1 -1
  546. data/vendor/assets/javascripts/dojo/nls/sl/colors.js.uncompressed.js +7 -7
  547. data/vendor/assets/javascripts/dojo/node.js +18 -0
  548. data/vendor/assets/javascripts/dojo/node.js.uncompressed.js +27 -0
  549. data/vendor/assets/javascripts/dojo/number.js +38 -37
  550. data/vendor/assets/javascripts/dojo/number.js.uncompressed.js +94 -122
  551. data/vendor/assets/javascripts/dojo/on.js +146 -116
  552. data/vendor/assets/javascripts/dojo/on.js.uncompressed.js +135 -92
  553. data/vendor/assets/javascripts/dojo/package.json +1 -1
  554. data/vendor/assets/javascripts/dojo/parser.js +325 -200
  555. data/vendor/assets/javascripts/dojo/parser.js.uncompressed.js +677 -406
  556. data/vendor/assets/javascripts/dojo/promise/Promise.js +37 -0
  557. data/vendor/assets/javascripts/dojo/promise/Promise.js.uncompressed.js +133 -0
  558. data/vendor/assets/javascripts/dojo/promise/all.js +60 -0
  559. data/vendor/assets/javascripts/dojo/promise/all.js.uncompressed.js +76 -0
  560. data/vendor/assets/javascripts/dojo/promise/first.js +34 -0
  561. data/vendor/assets/javascripts/dojo/promise/first.js.uncompressed.js +49 -0
  562. data/vendor/assets/javascripts/dojo/promise/instrumentation.js +86 -0
  563. data/vendor/assets/javascripts/dojo/promise/instrumentation.js.uncompressed.js +103 -0
  564. data/vendor/assets/javascripts/dojo/promise/tracer.js +37 -0
  565. data/vendor/assets/javascripts/dojo/promise/tracer.js.uncompressed.js +85 -0
  566. data/vendor/assets/javascripts/dojo/query.js +8 -8
  567. data/vendor/assets/javascripts/dojo/query.js.uncompressed.js +206 -214
  568. data/vendor/assets/javascripts/dojo/ready.js +1 -7
  569. data/vendor/assets/javascripts/dojo/ready.js.uncompressed.js +31 -33
  570. data/vendor/assets/javascripts/dojo/regexp.js +14 -13
  571. data/vendor/assets/javascripts/dojo/regexp.js.uncompressed.js +15 -18
  572. data/vendor/assets/javascripts/dojo/request.js +10 -0
  573. data/vendor/assets/javascripts/dojo/request.js.uncompressed.js +75 -0
  574. data/vendor/assets/javascripts/dojo/request/default.js +28 -0
  575. data/vendor/assets/javascripts/dojo/request/default.js.uncompressed.js +32 -0
  576. data/vendor/assets/javascripts/dojo/request/handlers.js +47 -0
  577. data/vendor/assets/javascripts/dojo/request/handlers.js.uncompressed.js +62 -0
  578. data/vendor/assets/javascripts/dojo/request/iframe.js +290 -0
  579. data/vendor/assets/javascripts/dojo/request/iframe.js.uncompressed.js +429 -0
  580. data/vendor/assets/javascripts/dojo/request/node.js +81 -0
  581. data/vendor/assets/javascripts/dojo/request/node.js.uncompressed.js +188 -0
  582. data/vendor/assets/javascripts/dojo/request/notify.js +38 -0
  583. data/vendor/assets/javascripts/dojo/request/notify.js.uncompressed.js +73 -0
  584. data/vendor/assets/javascripts/dojo/request/registry.js +68 -0
  585. data/vendor/assets/javascripts/dojo/request/registry.js.uncompressed.js +85 -0
  586. data/vendor/assets/javascripts/dojo/request/script.js +111 -0
  587. data/vendor/assets/javascripts/dojo/request/script.js.uncompressed.js +211 -0
  588. data/vendor/assets/javascripts/dojo/request/util.js +113 -0
  589. data/vendor/assets/javascripts/dojo/request/util.js.uncompressed.js +145 -0
  590. data/vendor/assets/javascripts/dojo/request/watch.js +73 -0
  591. data/vendor/assets/javascripts/dojo/request/watch.js.uncompressed.js +109 -0
  592. data/vendor/assets/javascripts/dojo/request/xhr.js +184 -0
  593. data/vendor/assets/javascripts/dojo/request/xhr.js.uncompressed.js +317 -0
  594. data/vendor/assets/javascripts/dojo/resources/dnd.css +3 -3
  595. data/vendor/assets/javascripts/dojo/router.js +10 -0
  596. data/vendor/assets/javascripts/dojo/router.js.uncompressed.js +28 -0
  597. data/vendor/assets/javascripts/dojo/router/RouterBase.js +160 -0
  598. data/vendor/assets/javascripts/dojo/router/RouterBase.js.uncompressed.js +350 -0
  599. data/vendor/assets/javascripts/dojo/rpc/JsonService.js +20 -21
  600. data/vendor/assets/javascripts/dojo/rpc/JsonService.js.uncompressed.js +29 -27
  601. data/vendor/assets/javascripts/dojo/rpc/JsonpService.js +14 -15
  602. data/vendor/assets/javascripts/dojo/rpc/JsonpService.js.uncompressed.js +28 -29
  603. data/vendor/assets/javascripts/dojo/rpc/RpcService.js +50 -51
  604. data/vendor/assets/javascripts/dojo/rpc/RpcService.js.uncompressed.js +39 -36
  605. data/vendor/assets/javascripts/dojo/selector/_loader.js.uncompressed.js +4 -2
  606. data/vendor/assets/javascripts/dojo/selector/acme.js +442 -408
  607. data/vendor/assets/javascripts/dojo/selector/acme.js.uncompressed.js +160 -147
  608. data/vendor/assets/javascripts/dojo/selector/lite.js +136 -127
  609. data/vendor/assets/javascripts/dojo/selector/lite.js.uncompressed.js +62 -43
  610. data/vendor/assets/javascripts/dojo/sniff.js +41 -0
  611. data/vendor/assets/javascripts/dojo/sniff.js.uncompressed.js +70 -0
  612. data/vendor/assets/javascripts/dojo/store/Cache.js +7 -6
  613. data/vendor/assets/javascripts/dojo/store/Cache.js.uncompressed.js +48 -51
  614. data/vendor/assets/javascripts/dojo/store/DataStore.js +88 -65
  615. data/vendor/assets/javascripts/dojo/store/DataStore.js.uncompressed.js +48 -16
  616. data/vendor/assets/javascripts/dojo/store/JsonRest.js +44 -40
  617. data/vendor/assets/javascripts/dojo/store/JsonRest.js.uncompressed.js +74 -40
  618. data/vendor/assets/javascripts/dojo/store/Memory.js +30 -29
  619. data/vendor/assets/javascripts/dojo/store/Memory.js.uncompressed.js +40 -37
  620. data/vendor/assets/javascripts/dojo/store/Observable.js +90 -79
  621. data/vendor/assets/javascripts/dojo/store/Observable.js.uncompressed.js +35 -23
  622. data/vendor/assets/javascripts/dojo/store/README +5 -9
  623. data/vendor/assets/javascripts/dojo/store/api/Store.js +12 -24
  624. data/vendor/assets/javascripts/dojo/store/api/Store.js.uncompressed.js +31 -41
  625. data/vendor/assets/javascripts/dojo/store/util/QueryResults.js +4 -4
  626. data/vendor/assets/javascripts/dojo/store/util/QueryResults.js.uncompressed.js +13 -14
  627. data/vendor/assets/javascripts/dojo/store/util/SimpleQueryEngine.js +11 -10
  628. data/vendor/assets/javascripts/dojo/store/util/SimpleQueryEngine.js.uncompressed.js +18 -16
  629. data/vendor/assets/javascripts/dojo/string.js +23 -22
  630. data/vendor/assets/javascripts/dojo/string.js.uncompressed.js +38 -38
  631. data/vendor/assets/javascripts/dojo/text.js +50 -50
  632. data/vendor/assets/javascripts/dojo/text.js.uncompressed.js +129 -127
  633. data/vendor/assets/javascripts/dojo/topic.js.uncompressed.js +17 -12
  634. data/vendor/assets/javascripts/dojo/touch.js +35 -7
  635. data/vendor/assets/javascripts/dojo/touch.js.uncompressed.js +146 -34
  636. data/vendor/assets/javascripts/dojo/uacss.js +1 -1
  637. data/vendor/assets/javascripts/dojo/uacss.js.uncompressed.js +19 -10
  638. data/vendor/assets/javascripts/dojo/when.js +31 -0
  639. data/vendor/assets/javascripts/dojo/when.js.uncompressed.js +55 -0
  640. data/vendor/assets/javascripts/dojo/window.js +26 -27
  641. data/vendor/assets/javascripts/dojo/window.js.uncompressed.js +160 -161
  642. metadata +152 -6
  643. data/Gemfile +0 -4
  644. data/LICENSE +0 -22
  645. data/Rakefile +0 -3
  646. data/vendor/assets/javascripts/dojo/resources/_modules.js +0 -36
@@ -1,149 +1,222 @@
1
1
  define(
2
- "dojo/parser", ["./_base/kernel", "./_base/lang", "./_base/array", "./_base/html", "./_base/window", "./_base/url",
3
- "./_base/json", "./aspect", "./date/stamp", "./query", "./on", "./ready"],
4
- function(dojo, dlang, darray, dhtml, dwindow, _Url, djson, aspect, dates, query, don){
5
-
6
- // module:
7
- // dojo/parser
8
- // summary:
9
- // The Dom/Widget parsing package
10
-
11
- new Date("X"); // workaround for #11279, new Date("") == NaN
12
-
13
- var features = {
14
- // Feature detection for when node.attributes only lists the attributes specified in the markup
15
- // rather than old IE/quirks behavior where it lists every default value too
16
- "dom-attributes-explicit": document.createElement("div").attributes.length < 40
17
- };
18
- function has(feature){
19
- return features[feature];
20
- }
21
-
22
-
23
- dojo.parser = new function(){
24
- // summary:
25
- // The Dom/Widget parsing package
26
-
27
- var _nameMap = {
28
- // Map from widget name (ex: "dijit.form.Button") to structure mapping
29
- // lowercase version of attribute names to the version in the widget ex:
30
- // {
31
- // label: "label",
32
- // onclick: "onClick"
33
- // }
34
- };
35
- function getNameMap(proto){
36
- // summary:
37
- // Returns map from lowercase name to attribute name in class, ex: {onclick: "onClick"}
38
- var map = {};
39
- for(var name in proto){
40
- if(name.charAt(0)=="_"){ continue; } // skip internal properties
41
- map[name.toLowerCase()] = name;
42
- }
43
- return map;
44
- }
2
+ "dojo/parser", ["./_base/kernel", "./_base/lang", "./_base/array", "./_base/config", "./_base/html", "./_base/window", "./_base/url",
3
+ "./_base/json", "./aspect", "./date/stamp", "./Deferred", "./has", "./query", "./on", "./ready"],
4
+ function(dojo, dlang, darray, config, dhtml, dwindow, _Url, djson, aspect, dates, Deferred, has, query, don, ready){
5
+
6
+ // module:
7
+ // dojo/parser
8
+
9
+ new Date("X"); // workaround for #11279, new Date("") == NaN
10
+
11
+
45
12
  // Widgets like BorderContainer add properties to _Widget via dojo.extend().
46
13
  // If BorderContainer is loaded after _Widget's parameter list has been cached,
47
14
  // we need to refresh that parameter list (for _Widget and all widgets that extend _Widget).
15
+ var extendCnt = 0;
48
16
  aspect.after(dlang, "extend", function(){
49
- _nameMap = {};
17
+ extendCnt++;
50
18
  }, true);
51
19
 
52
- // Map from widget name (ex: "dijit.form.Button") to constructor
20
+ function getNameMap(ctor){
21
+ // summary:
22
+ // Returns map from lowercase name to attribute name in class, ex: {onclick: "onClick"}
23
+ var map = ctor._nameCaseMap, proto = ctor.prototype;
24
+
25
+ // Create the map if it's undefined.
26
+ // Refresh the map if a superclass was possibly extended with new methods since the map was created.
27
+ if(!map || map._extendCnt < extendCnt){
28
+ map = ctor._nameCaseMap = {};
29
+ for(var name in proto){
30
+ if(name.charAt(0) === "_"){ continue; } // skip internal properties
31
+ map[name.toLowerCase()] = name;
32
+ }
33
+ map._extendCnt = extendCnt;
34
+ }
35
+ return map;
36
+ }
37
+
38
+ // Map from widget name or list of widget names(ex: "dijit/form/Button,acme/MyMixin") to a constructor.
53
39
  var _ctorMap = {};
54
40
 
55
- this._functionFromScript = function(script, attrData){
41
+ function getCtor(/*String[]*/ types){
56
42
  // summary:
57
- // Convert a <script type="dojo/method" args="a, b, c"> ... </script>
58
- // into a function
59
- // script: DOMNode
60
- // The <script> DOMNode
61
- // attrData: String
62
- // For HTML5 compliance, searches for attrData + "args" (typically
63
- // "data-dojo-args") instead of "args"
64
- var preamble = "";
65
- var suffix = "";
66
- var argsStr = (script.getAttribute(attrData + "args") || script.getAttribute("args"));
67
- if(argsStr){
68
- darray.forEach(argsStr.split(/\s*,\s*/), function(part, idx){
69
- preamble += "var "+part+" = arguments["+idx+"]; ";
70
- });
71
- }
72
- var withStr = script.getAttribute("with");
73
- if(withStr && withStr.length){
74
- darray.forEach(withStr.split(/\s*,\s*/), function(part){
75
- preamble += "with("+part+"){";
76
- suffix += "}";
77
- });
43
+ // Retrieves a constructor. If the types array contains more than one class/MID then the
44
+ // subsequent classes will be mixed into the first class and a unique constructor will be
45
+ // returned for that array.
46
+
47
+ var ts = types.join();
48
+ if(!_ctorMap[ts]){
49
+ var mixins = [];
50
+ for(var i = 0, l = types.length; i < l; i++){
51
+ var t = types[i];
52
+ // TODO: Consider swapping getObject and require in the future
53
+ mixins[mixins.length] = (_ctorMap[t] = _ctorMap[t] || (dlang.getObject(t) || (~t.indexOf('/') && require(t))));
54
+ }
55
+ var ctor = mixins.shift();
56
+ _ctorMap[ts] = mixins.length ? (ctor.createSubclass ? ctor.createSubclass(mixins) : ctor.extend.apply(ctor, mixins)) : ctor;
78
57
  }
79
- return new Function(preamble+script.innerHTML+suffix);
80
- };
81
58
 
82
- this.instantiate = /*====== dojo.parser.instantiate= ======*/function(nodes, mixin, args){
59
+ return _ctorMap[ts];
60
+ }
61
+
62
+ var parser = {
83
63
  // summary:
84
- // Takes array of nodes, and turns them into class instances and
85
- // potentially calls a startup method to allow them to connect with
86
- // any children.
87
- // nodes: Array
88
- // Array of nodes or objects like
89
- // | {
90
- // | type: "dijit.form.Button",
91
- // | node: DOMNode,
92
- // | scripts: [ ... ], // array of <script type="dojo/..."> children of node
93
- // | inherited: { ... } // settings inherited from ancestors like dir, theme, etc.
94
- // | }
95
- // mixin: Object?
96
- // An object that will be mixed in with each node in the array.
97
- // Values in the mixin will override values in the node, if they
98
- // exist.
99
- // args: Object?
100
- // An object used to hold kwArgs for instantiation.
101
- // See parse.args argument for details.
102
-
103
- var thelist = [],
104
- mixin = mixin||{};
105
- args = args||{};
106
-
107
- // Precompute names of special attributes we are looking for
108
- // TODO: for 2.0 default to data-dojo- regardless of scopeName (or maybe scopeName won't exist in 2.0)
109
- var dojoType = (args.scope || dojo._scopeName) + "Type", // typically "dojoType"
110
- attrData = "data-" + (args.scope || dojo._scopeName) + "-",// typically "data-dojo-"
111
- dataDojoType = attrData + "type", // typically "data-dojo-type"
112
- dataDojoProps = attrData + "props", // typically "data-dojo-props"
113
- dataDojoAttachPoint = attrData + "attach-point",
114
- dataDojoAttachEvent = attrData + "attach-event",
115
- dataDojoId = attrData + "id";
116
-
117
- // And make hash to quickly check if a given attribute is special, and to map the name to something friendly
118
- var specialAttrs = {};
119
- darray.forEach([dataDojoProps, dataDojoType, dojoType, dataDojoId, "jsId", dataDojoAttachPoint,
120
- dataDojoAttachEvent, "dojoAttachPoint", "dojoAttachEvent", "class", "style"], function(name){
121
- specialAttrs[name.toLowerCase()] = name.replace(args.scope, "dojo");
122
- });
123
-
124
- darray.forEach(nodes, function(obj){
125
- if(!obj){ return; }
126
-
127
- var node = obj.node || obj,
128
- type = dojoType in mixin ? mixin[dojoType] : obj.node ? obj.type : (node.getAttribute(dataDojoType) || node.getAttribute(dojoType)),
129
- ctor = _ctorMap[type] || (_ctorMap[type] = dlang.getObject(type)),
130
- proto = ctor && ctor.prototype;
131
- if(!ctor){
132
- throw new Error("Could not load class '" + type);
64
+ // The Dom/Widget parsing package
65
+
66
+ _clearCache: function(){
67
+ // summary:
68
+ // Clear cached data. Used mainly for benchmarking.
69
+ extendCnt++;
70
+ _ctorMap = {};
71
+ },
72
+
73
+ _functionFromScript: function(script, attrData){
74
+ // summary:
75
+ // Convert a `<script type="dojo/method" args="a, b, c"> ... </script>`
76
+ // into a function
77
+ // script: DOMNode
78
+ // The `<script>` DOMNode
79
+ // attrData: String
80
+ // For HTML5 compliance, searches for attrData + "args" (typically
81
+ // "data-dojo-args") instead of "args"
82
+ var preamble = "",
83
+ suffix = "",
84
+ argsStr = (script.getAttribute(attrData + "args") || script.getAttribute("args")),
85
+ withStr = script.getAttribute("with");
86
+
87
+ // Convert any arguments supplied in script tag into an array to be passed to the
88
+ var fnArgs = (argsStr || "").split(/\s*,\s*/);
89
+
90
+ if(withStr && withStr.length){
91
+ darray.forEach(withStr.split(/\s*,\s*/), function(part){
92
+ preamble += "with("+part+"){";
93
+ suffix += "}";
94
+ });
133
95
  }
134
96
 
97
+ return new Function(fnArgs, preamble + script.innerHTML + suffix);
98
+ },
99
+
100
+ instantiate: function(nodes, mixin, options){
101
+ // summary:
102
+ // Takes array of nodes, and turns them into class instances and
103
+ // potentially calls a startup method to allow them to connect with
104
+ // any children.
105
+ // nodes: Array
106
+ // Array of DOM nodes
107
+ // mixin: Object?
108
+ // An object that will be mixed in with each node in the array.
109
+ // Values in the mixin will override values in the node, if they
110
+ // exist.
111
+ // options: Object?
112
+ // An object used to hold kwArgs for instantiation.
113
+ // See parse.options argument for details.
114
+
115
+ mixin = mixin || {};
116
+ options = options || {};
117
+
118
+ var dojoType = (options.scope || dojo._scopeName) + "Type", // typically "dojoType"
119
+ attrData = "data-" + (options.scope || dojo._scopeName) + "-",// typically "data-dojo-"
120
+ dataDojoType = attrData + "type", // typically "data-dojo-type"
121
+ dataDojoMixins = attrData + "mixins"; // typically "data-dojo-mixins"
122
+
123
+ var list = [];
124
+ darray.forEach(nodes, function(node){
125
+ var type = dojoType in mixin ? mixin[dojoType] : node.getAttribute(dataDojoType) || node.getAttribute(dojoType);
126
+ if(type){
127
+ var mixinsValue = node.getAttribute(dataDojoMixins),
128
+ types = mixinsValue ? [type].concat(mixinsValue.split(/\s*,\s*/)) : [type];
129
+
130
+ list.push({
131
+ node: node,
132
+ types: types
133
+ });
134
+ }
135
+ });
136
+
137
+ // Instantiate the nodes and return the objects
138
+ return this._instantiate(list, mixin, options);
139
+ },
140
+
141
+ _instantiate: function(nodes, mixin, options){
142
+ // summary:
143
+ // Takes array of objects representing nodes, and turns them into class instances and
144
+ // potentially calls a startup method to allow them to connect with
145
+ // any children.
146
+ // nodes: Array
147
+ // Array of objects like
148
+ // | {
149
+ // | ctor: Function (may be null)
150
+ // | types: ["dijit/form/Button", "acme/MyMixin"] (used if ctor not specified)
151
+ // | node: DOMNode,
152
+ // | scripts: [ ... ], // array of <script type="dojo/..."> children of node
153
+ // | inherited: { ... } // settings inherited from ancestors like dir, theme, etc.
154
+ // | }
155
+ // mixin: Object
156
+ // An object that will be mixed in with each node in the array.
157
+ // Values in the mixin will override values in the node, if they
158
+ // exist.
159
+ // options: Object
160
+ // An options object used to hold kwArgs for instantiation.
161
+ // See parse.options argument for details.
162
+
163
+ // Call widget constructors
164
+ var thelist = darray.map(nodes, function(obj){
165
+ var ctor = obj.ctor || getCtor(obj.types);
166
+ // If we still haven't resolved a ctor, it is fatal now
167
+ if(!ctor){
168
+ throw new Error("Unable to resolve constructor for: '" + obj.types.join() + "'");
169
+ }
170
+ return this.construct(ctor, obj.node, mixin, options, obj.scripts, obj.inherited);
171
+ }, this);
172
+
173
+ // Call startup on each top level instance if it makes sense (as for
174
+ // widgets). Parent widgets will recursively call startup on their
175
+ // (non-top level) children
176
+ if(!mixin._started && !options.noStart){
177
+ darray.forEach(thelist, function(instance){
178
+ if(typeof instance.startup === "function" && !instance._started){
179
+ instance.startup();
180
+ }
181
+ });
182
+ }
183
+
184
+ return thelist;
185
+ },
186
+
187
+ construct: function(ctor, node, mixin, options, scripts, inherited){
188
+ // summary:
189
+ // Calls new ctor(params, node), where params is the hash of parameters specified on the node,
190
+ // excluding data-dojo-type and data-dojo-mixins. Does not call startup(). Returns the widget.
191
+ // ctor: Function
192
+ // Widget constructor.
193
+ // node: DOMNode
194
+ // This node will be replaced/attached to by the widget. It also specifies the arguments to pass to ctor.
195
+ // mixin: Object?
196
+ // Attributes in this object will be passed as parameters to ctor,
197
+ // overriding attributes specified on the node.
198
+ // options: Object?
199
+ // An options object used to hold kwArgs for instantiation. See parse.options argument for details.
200
+ // scripts: DomNode[]?
201
+ // Array of `<script type="dojo/*">` DOMNodes. If not specified, will search for `<script>` tags inside node.
202
+ // inherited: Object?
203
+ // Settings from dir=rtl or lang=... on a node above this node. Overrides options.inherited.
204
+
205
+ var proto = ctor && ctor.prototype;
206
+ options = options || {};
207
+
135
208
  // Setup hash to hold parameter settings for this widget. Start with the parameter
136
209
  // settings inherited from ancestors ("dir" and "lang").
137
210
  // Inherited setting may later be overridden by explicit settings on node itself.
138
211
  var params = {};
139
212
 
140
- if(args.defaults){
213
+ if(options.defaults){
141
214
  // settings for the document itself (or whatever subtree is being parsed)
142
- dlang.mixin(params, args.defaults);
215
+ dlang.mixin(params, options.defaults);
143
216
  }
144
- if(obj.inherited){
217
+ if(inherited){
145
218
  // settings from dir=rtl or lang=... on a node above this node
146
- dlang.mixin(params, obj.inherited);
219
+ dlang.mixin(params, inherited);
147
220
  }
148
221
 
149
222
  // Get list of attributes explicitly listed in the markup
@@ -151,10 +224,13 @@ dojo.parser = new function(){
151
224
  if(has("dom-attributes-explicit")){
152
225
  // Standard path to get list of user specified attributes
153
226
  attributes = node.attributes;
227
+ }else if(has("dom-attributes-specified-flag")){
228
+ // Special processing needed for IE8, to skip a few faux values in attributes[]
229
+ attributes = darray.filter(node.attributes, function(a){ return a.specified;});
154
230
  }else{
155
- // Special path for IE, avoid (sometimes >100) bogus entries in node.attributes
231
+ // Special path for IE6-7, avoid (sometimes >100) bogus entries in node.attributes
156
232
  var clone = /^input$|^img$/i.test(node.nodeName) ? node : node.cloneNode(false),
157
- attrs = clone.outerHTML.replace(/=[^\s"']+|="[^"]*"|='[^']*'/g, "").replace(/^\s*<[a-zA-Z0-9]*/, "").replace(/>.*$/, "");
233
+ attrs = clone.outerHTML.replace(/=[^\s"']+|="[^"]*"|='[^']*'/g, "").replace(/^\s*<[a-zA-Z0-9]*\s*/, "").replace(/\s*>.*$/, "");
158
234
 
159
235
  attributes = darray.map(attrs.split(/\s+/), function(name){
160
236
  var lcName = name.toLowerCase();
@@ -163,63 +239,74 @@ dojo.parser = new function(){
163
239
  // getAttribute() doesn't work for button.value, returns innerHTML of button.
164
240
  // but getAttributeNode().value doesn't work for the form.encType or li.value
165
241
  value: (node.nodeName == "LI" && name == "value") || lcName == "enctype" ?
166
- node.getAttribute(lcName) : node.getAttributeNode(lcName).value,
167
- specified: true
242
+ node.getAttribute(lcName) : node.getAttributeNode(lcName).value
168
243
  };
169
244
  });
170
245
  }
171
246
 
247
+ // Hash to convert scoped attribute name (ex: data-dojo17-params) to something friendly (ex: data-dojo-params)
248
+ // TODO: remove scope for 2.0
249
+ var scope = options.scope || dojo._scopeName,
250
+ attrData = "data-" + scope + "-", // typically "data-dojo-"
251
+ hash = {};
252
+ if(scope !== "dojo"){
253
+ hash[attrData + "props"] = "data-dojo-props";
254
+ hash[attrData + "type"] = "data-dojo-type";
255
+ hash[attrData + "mixins"] = "data-dojo-mixins";
256
+ hash[scope + "type"] = "dojoType";
257
+ hash[attrData + "id"] = "data-dojo-id";
258
+ }
259
+
172
260
  // Read in attributes and process them, including data-dojo-props, data-dojo-type,
173
261
  // dojoAttachPoint, etc., as well as normal foo=bar attributes.
174
- var i=0, item;
262
+ var i=0, item, funcAttrs=[], jsname, extra;
175
263
  while(item = attributes[i++]){
176
- if(!item || !item.specified){
177
- continue;
178
- }
179
-
180
264
  var name = item.name,
181
265
  lcName = name.toLowerCase(),
182
266
  value = item.value;
183
267
 
184
- if(lcName in specialAttrs){
185
- switch(specialAttrs[lcName]){
268
+ switch(hash[lcName] || lcName){
269
+ // Already processed, just ignore
270
+ case "data-dojo-type":
271
+ case "dojotype":
272
+ case "data-dojo-mixins":
273
+ break;
186
274
 
187
- // Data-dojo-props. Save for later to make sure it overrides direct foo=bar settings
188
- case "data-dojo-props":
189
- var extra = value;
190
- break;
275
+ // Data-dojo-props. Save for later to make sure it overrides direct foo=bar settings
276
+ case "data-dojo-props":
277
+ extra = value;
278
+ break;
191
279
 
192
- // data-dojo-id or jsId. TODO: drop jsId in 2.0
193
- case "data-dojo-id":
194
- case "jsId":
195
- var jsname = value;
196
- break;
280
+ // data-dojo-id or jsId. TODO: drop jsId in 2.0
281
+ case "data-dojo-id":
282
+ case "jsid":
283
+ jsname = value;
284
+ break;
197
285
 
198
- // For the benefit of _Templated
199
- case "data-dojo-attach-point":
200
- case "dojoAttachPoint":
201
- params.dojoAttachPoint = value;
202
- break;
203
- case "data-dojo-attach-event":
204
- case "dojoAttachEvent":
205
- params.dojoAttachEvent = value;
206
- break;
286
+ // For the benefit of _Templated
287
+ case "data-dojo-attach-point":
288
+ case "dojoattachpoint":
289
+ params.dojoAttachPoint = value;
290
+ break;
291
+ case "data-dojo-attach-event":
292
+ case "dojoattachevent":
293
+ params.dojoAttachEvent = value;
294
+ break;
207
295
 
208
- // Special parameter handling needed for IE
209
- case "class":
210
- params["class"] = node.className;
211
- break;
212
- case "style":
213
- params["style"] = node.style && node.style.cssText;
214
- break;
215
- }
216
- }else{
296
+ // Special parameter handling needed for IE
297
+ case "class":
298
+ params["class"] = node.className;
299
+ break;
300
+ case "style":
301
+ params["style"] = node.style && node.style.cssText;
302
+ break;
303
+ default:
217
304
  // Normal attribute, ex: value="123"
218
305
 
219
306
  // Find attribute in widget corresponding to specified name.
220
307
  // May involve case conversion, ex: onclick --> onClick
221
308
  if(!(name in proto)){
222
- var map = (_nameMap[type] || (_nameMap[type] = getNameMap(proto)));
309
+ var map = getNameMap(ctor);
223
310
  name = map[lcName] || name;
224
311
  }
225
312
 
@@ -241,10 +328,11 @@ dojo.parser = new function(){
241
328
  // The user has specified some text for a function like "return x+5"
242
329
  params[name] = new Function(value);
243
330
  }else{
244
- // The user has specified the name of a function like "myOnClick"
331
+ // The user has specified the name of a global function like "myOnClick"
245
332
  // or a single word function "return"
246
333
  params[name] = dlang.getObject(value, false) || new Function(value);
247
334
  }
335
+ funcAttrs.push(name); // prevent "double connect", see #15026
248
336
  break;
249
337
  default:
250
338
  var pVal = proto[name];
@@ -254,7 +342,7 @@ dojo.parser = new function(){
254
342
  (value == "" ? new Date("") : // the NaN of dates
255
343
  value == "now" ? new Date() : // current date
256
344
  dates.fromISOString(value)) :
257
- (pVal instanceof dojo._Url) ? (dojo.baseUrl + value) :
345
+ (pVal instanceof _Url) ? (dojo.baseUrl + value) :
258
346
  djson.fromJson(value);
259
347
  }
260
348
  }else{
@@ -263,10 +351,18 @@ dojo.parser = new function(){
263
351
  }
264
352
  }
265
353
 
354
+ // Remove function attributes from DOMNode to prevent "double connect" problem, see #15026.
355
+ // Do this as a separate loop since attributes[] is often a live collection (depends on the browser though).
356
+ for(var j=0; j<funcAttrs.length; j++){
357
+ var lcfname = funcAttrs[j].toLowerCase();
358
+ node.removeAttribute(lcfname);
359
+ node[lcfname] = null;
360
+ }
361
+
266
362
  // Mix things found in data-dojo-props into the params, overriding any direct settings
267
363
  if(extra){
268
364
  try{
269
- extra = djson.fromJson.call(args.propsThis, "{" + extra + "}");
365
+ extra = djson.fromJson.call(options.propsThis, "{" + extra + "}");
270
366
  dlang.mixin(params, extra);
271
367
  }catch(e){
272
368
  // give the user a pointer to their invalid parameters. FIXME: can we kill this in production?
@@ -277,8 +373,10 @@ dojo.parser = new function(){
277
373
  // Any parameters specified in "mixin" override everything else.
278
374
  dlang.mixin(params, mixin);
279
375
 
280
- var scripts = obj.node ? obj.scripts : (ctor && (ctor._noScript || proto._noScript) ? [] :
281
- query("> script[type^='dojo/']", node));
376
+ // Get <script> nodes associated with this widget, if they weren't specified explicitly
377
+ if(!scripts){
378
+ scripts = (ctor && (ctor._noScript || proto._noScript) ? [] : query("> script[type^='dojo/']", node));
379
+ }
282
380
 
283
381
  // Process <script type="dojo/*"> script tags
284
382
  // <script type="dojo/method" event="foo"> tags are added to params, and passed to
@@ -288,10 +386,10 @@ dojo.parser = new function(){
288
386
  // <script type="dojo/watch" data-dojo-prop="foo"> tags are dojo.watch after instantiation
289
387
  // <script type="dojo/on" data-dojo-event="foo"> tags are dojo.on after instantiation
290
388
  // note: dojo/* script tags cannot exist in self closing widgets, like <input />
291
- var connects = [], // functions to connect after instantiation
389
+ var aspects = [], // aspects to connect after instantiation
292
390
  calls = [], // functions to call after instantiation
293
- watch = [], //functions to watch after instantiation
294
- on = []; //functions to on after instantiation
391
+ watches = [], // functions to watch after instantiation
392
+ ons = []; // functions to on after instantiation
295
393
 
296
394
  if(scripts){
297
395
  for(i=0; i<scripts.length; i++){
@@ -300,18 +398,22 @@ dojo.parser = new function(){
300
398
  // FIXME: drop event="" support in 2.0. use data-dojo-event="" instead
301
399
  var event = (script.getAttribute(attrData + "event") || script.getAttribute("event")),
302
400
  prop = script.getAttribute(attrData + "prop"),
303
- type = script.getAttribute("type"),
401
+ method = script.getAttribute(attrData + "method"),
402
+ advice = script.getAttribute(attrData + "advice"),
403
+ scriptType = script.getAttribute("type"),
304
404
  nf = this._functionFromScript(script, attrData);
305
405
  if(event){
306
- if(type == "dojo/connect"){
307
- connects.push({event: event, func: nf});
308
- }else if(type == "dojo/on"){
309
- on.push({event: event, func: nf});
406
+ if(scriptType == "dojo/connect"){
407
+ aspects.push({ method: event, func: nf });
408
+ }else if(scriptType == "dojo/on"){
409
+ ons.push({ event: event, func: nf });
310
410
  }else{
311
411
  params[event] = nf;
312
412
  }
313
- }else if(type == "dojo/watch"){
314
- watch.push({prop: prop, func: nf});
413
+ }else if(scriptType == "dojo/aspect"){
414
+ aspects.push({ method: method, advice: advice, func: nf });
415
+ }else if(scriptType == "dojo/watch"){
416
+ watches.push({ prop: prop, func: nf });
315
417
  }else{
316
418
  calls.push(nf);
317
419
  }
@@ -321,7 +423,6 @@ dojo.parser = new function(){
321
423
  // create the instance
322
424
  var markupFactory = ctor.markupFactory || proto.markupFactory;
323
425
  var instance = markupFactory ? markupFactory(params, node, ctor) : new ctor(params, node);
324
- thelist.push(instance);
325
426
 
326
427
  // map it to the JS namespace if that makes sense
327
428
  if(jsname){
@@ -329,266 +430,436 @@ dojo.parser = new function(){
329
430
  }
330
431
 
331
432
  // process connections and startup functions
332
- for(i=0; i<connects.length; i++){
333
- aspect.after(instance, connects[i].event, dojo.hitch(instance, connects[i].func), true);
433
+ for(i=0; i<aspects.length; i++){
434
+ aspect[aspects[i].advice || "after"](instance, aspects[i].method, dlang.hitch(instance, aspects[i].func), true);
334
435
  }
335
436
  for(i=0; i<calls.length; i++){
336
437
  calls[i].call(instance);
337
438
  }
338
- for(i=0; i<watch.length; i++){
339
- instance.watch(watch[i].prop, watch[i].func);
439
+ for(i=0; i<watches.length; i++){
440
+ instance.watch(watches[i].prop, watches[i].func);
340
441
  }
341
- for(i=0; i<on.length; i++){
342
- don(instance, on[i].event, on[i].func);
442
+ for(i=0; i<ons.length; i++){
443
+ don(instance, ons[i].event, ons[i].func);
343
444
  }
344
- }, this);
345
-
346
- // Call startup on each top level instance if it makes sense (as for
347
- // widgets). Parent widgets will recursively call startup on their
348
- // (non-top level) children
349
- if(!mixin._started){
350
- darray.forEach(thelist, function(instance){
351
- if( !args.noStart && instance &&
352
- dlang.isFunction(instance.startup) &&
353
- !instance._started
354
- ){
355
- instance.startup();
356
- }
357
- });
358
- }
359
- return thelist;
360
- };
361
445
 
362
- this.parse = /*====== dojo.parser.parse= ======*/ function(rootNode, args){
363
- // summary:
364
- // Scan the DOM for class instances, and instantiate them.
365
- //
366
- // description:
367
- // Search specified node (or root node) recursively for class instances,
368
- // and instantiate them. Searches for either data-dojo-type="Class" or
369
- // dojoType="Class" where "Class" is a a fully qualified class name,
370
- // like `dijit.form.Button`
371
- //
372
- // Using `data-dojo-type`:
373
- // Attributes using can be mixed into the parameters used to instantiate the
374
- // Class by using a `data-dojo-props` attribute on the node being converted.
375
- // `data-dojo-props` should be a string attribute to be converted from JSON.
376
- //
377
- // Using `dojoType`:
378
- // Attributes are read from the original domNode and converted to appropriate
379
- // types by looking up the Class prototype values. This is the default behavior
380
- // from Dojo 1.0 to Dojo 1.5. `dojoType` support is deprecated, and will
381
- // go away in Dojo 2.0.
382
- //
383
- // rootNode: DomNode?
384
- // A default starting root node from which to start the parsing. Can be
385
- // omitted, defaulting to the entire document. If omitted, the `args`
386
- // object can be passed in this place. If the `args` object has a
387
- // `rootNode` member, that is used.
388
- //
389
- // args: Object
390
- // a kwArgs object passed along to instantiate()
391
- //
392
- // * noStart: Boolean?
393
- // when set will prevent the parser from calling .startup()
394
- // when locating the nodes.
395
- // * rootNode: DomNode?
396
- // identical to the function's `rootNode` argument, though
397
- // allowed to be passed in via this `args object.
398
- // * template: Boolean
399
- // If true, ignores ContentPane's stopParser flag and parses contents inside of
400
- // a ContentPane inside of a template. This allows dojoAttachPoint on widgets/nodes
401
- // nested inside the ContentPane to work.
402
- // * inherited: Object
403
- // Hash possibly containing dir and lang settings to be applied to
404
- // parsed widgets, unless there's another setting on a sub-node that overrides
405
- // * scope: String
406
- // Root for attribute names to search for. If scopeName is dojo,
407
- // will search for data-dojo-type (or dojoType). For backwards compatibility
408
- // reasons defaults to dojo._scopeName (which is "dojo" except when
409
- // multi-version support is used, when it will be something like dojo16, dojo20, etc.)
410
- // * propsThis: Object
411
- // If specified, "this" referenced from data-dojo-props will refer to propsThis.
412
- // Intended for use from the widgets-in-template feature of `dijit._WidgetsInTemplateMixin`
413
- //
414
- // example:
415
- // Parse all widgets on a page:
416
- // | dojo.parser.parse();
417
- //
418
- // example:
419
- // Parse all classes within the node with id="foo"
420
- // | dojo.parser.parse(dojo.byId('foo'));
421
- //
422
- // example:
423
- // Parse all classes in a page, but do not call .startup() on any
424
- // child
425
- // | dojo.parser.parse({ noStart: true })
426
- //
427
- // example:
428
- // Parse all classes in a node, but do not call .startup()
429
- // | dojo.parser.parse(someNode, { noStart:true });
430
- // | // or
431
- // | dojo.parser.parse({ noStart:true, rootNode: someNode });
432
-
433
- // determine the root node based on the passed arguments.
434
- var root;
435
- if(!args && rootNode && rootNode.rootNode){
436
- args = rootNode;
437
- root = args.rootNode;
438
- }else{
439
- root = rootNode;
440
- }
441
- root = root ? dhtml.byId(root) : dwindow.body();
442
- args = args || {};
443
-
444
- var dojoType = (args.scope || dojo._scopeName) + "Type", // typically "dojoType"
445
- attrData = "data-" + (args.scope || dojo._scopeName) + "-", // typically "data-dojo-"
446
- dataDojoType = attrData + "type", // typically "data-dojo-type"
447
- dataDojoTextDir = attrData + "textdir"; // typically "data-dojo-textdir"
448
-
449
- // List of all nodes on page w/dojoType specified
450
- var list = [];
451
-
452
- // Info on DOMNode currently being processed
453
- var node = root.firstChild;
454
-
455
- // Info on parent of DOMNode currently being processed
456
- // - inherited: dir, lang, and textDir setting of parent, or inherited by parent
457
- // - parent: pointer to identical structure for my parent (or null if no parent)
458
- // - scripts: if specified, collects <script type="dojo/..."> type nodes from children
459
- var inherited = args && args.inherited;
460
- if(!inherited){
461
- function findAncestorAttr(node, attr){
462
- return (node.getAttribute && node.getAttribute(attr)) ||
463
- (node !== dwindow.doc && node !== dwindow.doc.documentElement && node.parentNode ? findAncestorAttr(node.parentNode, attr) : null);
446
+ return instance;
447
+ },
448
+
449
+ scan: function(root, options){
450
+ // summary:
451
+ // Scan a DOM tree and return an array of objects representing the DOMNodes
452
+ // that need to be turned into widgets.
453
+ // description:
454
+ // Search specified node (or document root node) recursively for class instances
455
+ // and return an array of objects that represent potential widgets to be
456
+ // instantiated. Searches for either data-dojo-type="MID" or dojoType="MID" where
457
+ // "MID" is a module ID like "dijit/form/Button" or a fully qualified Class name
458
+ // like "dijit/form/Button". If the MID is not currently available, scan will
459
+ // attempt to require() in the module.
460
+ //
461
+ // See parser.parse() for details of markup.
462
+ // root: DomNode?
463
+ // A default starting root node from which to start the parsing. Can be
464
+ // omitted, defaulting to the entire document. If omitted, the `options`
465
+ // object can be passed in this place. If the `options` object has a
466
+ // `rootNode` member, that is used.
467
+ // options: Object
468
+ // a kwArgs options object, see parse() for details
469
+ //
470
+ // returns: Promise
471
+ // A promise that is resolved with the nodes that have been parsed.
472
+
473
+ var list = [], // Output List
474
+ mids = [], // An array of modules that are not yet loaded
475
+ midsHash = {}; // Used to keep the mids array unique
476
+
477
+ var dojoType = (options.scope || dojo._scopeName) + "Type", // typically "dojoType"
478
+ attrData = "data-" + (options.scope || dojo._scopeName) + "-", // typically "data-dojo-"
479
+ dataDojoType = attrData + "type", // typically "data-dojo-type"
480
+ dataDojoTextDir = attrData + "textdir", // typically "data-dojo-textdir"
481
+ dataDojoMixins = attrData + "mixins"; // typically "data-dojo-mixins"
482
+
483
+ // Info on DOMNode currently being processed
484
+ var node = root.firstChild;
485
+
486
+ // Info on parent of DOMNode currently being processed
487
+ // - inherited: dir, lang, and textDir setting of parent, or inherited by parent
488
+ // - parent: pointer to identical structure for my parent (or null if no parent)
489
+ // - scripts: if specified, collects <script type="dojo/..."> type nodes from children
490
+ var inherited = options.inherited;
491
+ if(!inherited){
492
+ function findAncestorAttr(node, attr){
493
+ return (node.getAttribute && node.getAttribute(attr)) ||
494
+ (node.parentNode && findAncestorAttr(node.parentNode, attr));
495
+ }
496
+ inherited = {
497
+ dir: findAncestorAttr(root, "dir"),
498
+ lang: findAncestorAttr(root, "lang"),
499
+ textDir: findAncestorAttr(root, dataDojoTextDir)
500
+ };
501
+ for(var key in inherited){
502
+ if(!inherited[key]){ delete inherited[key]; }
503
+ }
464
504
  }
465
- inherited = {
466
- dir: findAncestorAttr(root, "dir"),
467
- lang: findAncestorAttr(root, "lang"),
468
- textDir: findAncestorAttr(root, dataDojoTextDir)
505
+
506
+ // Metadata about parent node
507
+ var parent = {
508
+ inherited: inherited
469
509
  };
470
- for(var key in inherited){
471
- if(!inherited[key]){ delete inherited[key]; }
510
+
511
+ // For collecting <script type="dojo/..."> type nodes (when null, we don't need to collect)
512
+ var scripts;
513
+
514
+ // when true, only look for <script type="dojo/..."> tags, and don't recurse to children
515
+ var scriptsOnly;
516
+
517
+ function getEffective(parent){
518
+ // summary:
519
+ // Get effective dir, lang, textDir settings for specified obj
520
+ // (matching "parent" object structure above), and do caching.
521
+ // Take care not to return null entries.
522
+ if(!parent.inherited){
523
+ parent.inherited = {};
524
+ var node = parent.node,
525
+ grandparent = getEffective(parent.parent);
526
+ var inherited = {
527
+ dir: node.getAttribute("dir") || grandparent.dir,
528
+ lang: node.getAttribute("lang") || grandparent.lang,
529
+ textDir: node.getAttribute(dataDojoTextDir) || grandparent.textDir
530
+ };
531
+ for(var key in inherited){
532
+ if(inherited[key]){
533
+ parent.inherited[key] = inherited[key];
534
+ }
535
+ }
536
+ }
537
+ return parent.inherited;
472
538
  }
473
- }
474
- var parent = {
475
- inherited: inherited
476
- };
477
539
 
478
- // For collecting <script type="dojo/..."> type nodes (when null, we don't need to collect)
479
- var scripts;
540
+ // DFS on DOM tree, collecting nodes with data-dojo-type specified.
541
+ while(true){
542
+ if(!node){
543
+ // Finished this level, continue to parent's next sibling
544
+ if(!parent || !parent.node){
545
+ break;
546
+ }
547
+ node = parent.node.nextSibling;
548
+ scripts = parent.scripts;
549
+ scriptsOnly = false;
550
+ parent = parent.parent;
551
+ continue;
552
+ }
480
553
 
481
- // when true, only look for <script type="dojo/..."> tags, and don't recurse to children
482
- var scriptsOnly;
554
+ if(node.nodeType != 1){
555
+ // Text or comment node, skip to next sibling
556
+ node = node.nextSibling;
557
+ continue;
558
+ }
483
559
 
484
- function getEffective(parent){
485
- // summary:
486
- // Get effective dir, lang, textDir settings for specified obj
487
- // (matching "parent" object structure above), and do caching.
488
- // Take care not to return null entries.
489
- if(!parent.inherited){
490
- parent.inherited = {};
491
- var node = parent.node,
492
- grandparent = getEffective(parent.parent);
493
- var inherited = {
494
- dir: node.getAttribute("dir") || grandparent.dir,
495
- lang: node.getAttribute("lang") || grandparent.lang,
496
- textDir: node.getAttribute(dataDojoTextDir) || grandparent.textDir
497
- };
498
- for(var key in inherited){
499
- if(inherited[key]){
500
- parent.inherited[key] = inherited[key];
560
+ if(scripts && node.nodeName.toLowerCase() == "script"){
561
+ // Save <script type="dojo/..."> for parent, then continue to next sibling
562
+ type = node.getAttribute("type");
563
+ if(type && /^dojo\/\w/i.test(type)){
564
+ scripts.push(node);
501
565
  }
566
+ node = node.nextSibling;
567
+ continue;
568
+ }
569
+ if(scriptsOnly){
570
+ // scriptsOnly flag is set, we have already collected scripts if the parent wants them, so now we shouldn't
571
+ // continue further analysis of the node and will continue to the next sibling
572
+ node = node.nextSibling;
573
+ continue;
502
574
  }
503
- }
504
- return parent.inherited;
505
- }
506
575
 
507
- // DFS on DOM tree, collecting nodes with data-dojo-type specified.
508
- while(true){
509
- if(!node){
510
- // Finished this level, continue to parent's next sibling
511
- if(!parent || !parent.node){
512
- break;
576
+ // Check for data-dojo-type attribute, fallback to backward compatible dojoType
577
+ // TODO: Remove dojoType in 2.0
578
+ var type = node.getAttribute(dataDojoType) || node.getAttribute(dojoType);
579
+
580
+ // Short circuit for leaf nodes containing nothing [but text]
581
+ var firstChild = node.firstChild;
582
+ if(!type && (!firstChild || (firstChild.nodeType == 3 && !firstChild.nextSibling))){
583
+ node = node.nextSibling;
584
+ continue;
513
585
  }
514
- node = parent.node.nextSibling;
515
- scripts = parent.scripts;
516
- scriptsOnly = false;
517
- parent = parent.parent;
518
- continue;
519
- }
520
586
 
521
- if(node.nodeType != 1){
522
- // Text or comment node, skip to next sibling
523
- node = node.nextSibling;
524
- continue;
525
- }
587
+ // Meta data about current node
588
+ var current;
589
+
590
+ var ctor = null;
591
+ if(type){
592
+ // If dojoType/data-dojo-type specified, add to output array of nodes to instantiate.
593
+ var mixinsValue = node.getAttribute(dataDojoMixins),
594
+ types = mixinsValue ? [type].concat(mixinsValue.split(/\s*,\s*/)) : [type];
595
+
596
+ // Note: won't find classes declared via dojo/Declaration or any modules that haven't been
597
+ // loaded yet so use try/catch to avoid throw from require()
598
+ try{
599
+ ctor = getCtor(types);
600
+ }catch(e){}
601
+
602
+ // If the constructor was not found, check to see if it has modules that can be loaded
603
+ if(!ctor){
604
+ darray.forEach(types, function(t){
605
+ if(~t.indexOf('/') && !midsHash[t]){
606
+ // If the type looks like a MID and it currently isn't in the array of MIDs to load, add it.
607
+ midsHash[t] = true;
608
+ mids[mids.length] = t;
609
+ }
610
+ });
611
+ }
526
612
 
527
- if(scripts && node.nodeName.toLowerCase() == "script"){
528
- // Save <script type="dojo/..."> for parent, then continue to next sibling
529
- type = node.getAttribute("type");
530
- if(type && /^dojo\/\w/i.test(type)){
531
- scripts.push(node);
613
+ var childScripts = ctor && !ctor.prototype._noScript ? [] : null; // <script> nodes that are parent's children
614
+
615
+ // Setup meta data about this widget node, and save it to list of nodes to instantiate
616
+ current = {
617
+ types: types,
618
+ ctor: ctor,
619
+ parent: parent,
620
+ node: node,
621
+ scripts: childScripts
622
+ };
623
+ current.inherited = getEffective(current); // dir & lang settings for current node, explicit or inherited
624
+ list.push(current);
625
+ }else{
626
+ // Meta data about this non-widget node
627
+ current = {
628
+ node: node,
629
+ scripts: scripts,
630
+ parent: parent
631
+ };
532
632
  }
533
- node = node.nextSibling;
534
- continue;
535
- }
536
- if(scriptsOnly){
537
- node = node.nextSibling;
538
- continue;
633
+
634
+ // Recurse, collecting <script type="dojo/..."> children, and also looking for
635
+ // descendant nodes with dojoType specified (unless the widget has the stopParser flag).
636
+ // When finished with children, go to my next sibling.
637
+ node = firstChild;
638
+ scripts = childScripts;
639
+ scriptsOnly = ctor && ctor.prototype.stopParser && !(options.template);
640
+ parent = current;
539
641
  }
540
642
 
541
- // Check for data-dojo-type attribute, fallback to backward compatible dojoType
542
- var type = node.getAttribute(dataDojoType) || node.getAttribute(dojoType);
643
+ var d = new Deferred();
543
644
 
544
- // Short circuit for leaf nodes containing nothing [but text]
545
- var firstChild = node.firstChild;
546
- if(!type && (!firstChild || (firstChild.nodeType == 3 && !firstChild.nextSibling))){
547
- node = node.nextSibling;
548
- continue;
549
- }
645
+ // If there are modules to load then require them in
646
+ if(mids.length){
647
+ // Warn that there are modules being auto-required
648
+ if(has("dojo-debug-messages")){
649
+ console.warn("WARNING: Modules being Auto-Required: " + mids.join(", "));
650
+ }
651
+ require(mids, function(){
652
+ // Go through list of widget nodes, filling in missing constructors, and filtering out nodes that shouldn't
653
+ // be instantiated due to a stopParser flag on an ancestor that we belatedly learned about due to
654
+ // auto-require of a module like ContentPane. Assumes list is in DFS order.
655
+ d.resolve(darray.filter(list, function(widget){
656
+ if(!widget.ctor){
657
+ // Attempt to find the constructor again. Still won't find classes defined via
658
+ // dijit/Declaration so need to try/catch.
659
+ try{
660
+ widget.ctor = getCtor(widget.types);
661
+ }catch(e){}
662
+ }
550
663
 
551
- // Setup data structure to save info on current node for when we return from processing descendant nodes
552
- var current = {
553
- node: node,
554
- scripts: scripts,
555
- parent: parent
556
- };
664
+ // Get the parent widget
665
+ var parent = widget.parent;
666
+ while(parent && !parent.types){
667
+ parent = parent.parent;
668
+ }
557
669
 
558
- // If dojoType/data-dojo-type specified, add to output array of nodes to instantiate
559
- var ctor = type && (_ctorMap[type] || (_ctorMap[type] = dlang.getObject(type))), // note: won't find classes declared via dojo.Declaration
560
- childScripts = ctor && !ctor.prototype._noScript ? [] : null; // <script> nodes that are parent's children
561
- if(type){
562
- list.push({
563
- "type": type,
564
- node: node,
565
- scripts: childScripts,
566
- inherited: getEffective(current) // dir & lang settings for current node, explicit or inherited
670
+ // Return false if this node should be skipped due to stopParser on an ancestor.
671
+ // Since list[] is in DFS order, this loop will always set parent.instantiateChildren before
672
+ // trying to compute widget.instantiate.
673
+ var proto = widget.ctor && widget.ctor.prototype;
674
+ widget.instantiateChildren = !(proto && proto.stopParser && !(options.template));
675
+ widget.instantiate = !parent || (parent.instantiate && parent.instantiateChildren);
676
+ return widget.instantiate;
677
+ }));
567
678
  });
679
+ }else{
680
+ // There were no modules to load, so just resolve with the parsed nodes. This separate code path is for
681
+ // efficiency, to avoid running the require() and the callback code above.
682
+ d.resolve(list);
568
683
  }
569
684
 
570
- // Recurse, collecting <script type="dojo/..."> children, and also looking for
571
- // descendant nodes with dojoType specified (unless the widget has the stopParser flag).
572
- // When finished with children, go to my next sibling.
573
- node = firstChild;
574
- scripts = childScripts;
575
- scriptsOnly = ctor && ctor.prototype.stopParser && !(args && args.template);
576
- parent = current;
685
+ // Return the promise
686
+ return d.promise;
687
+ },
577
688
 
578
- }
689
+ _require: function(/*DOMNode*/ script){
690
+ // summary:
691
+ // Helper for _scanAMD(). Takes a `<script type=dojo/require>bar: "acme/bar", ...</script>` node,
692
+ // calls require() to load the specified modules and (asynchronously) assign them to the specified global
693
+ // variables, and returns a Promise for when that operation completes.
694
+ //
695
+ // In the example above, it is effectively doing a require(["acme/bar", ...], function(a){ bar = a; }).
696
+
697
+ var hash = djson.fromJson("{" + script.innerHTML + "}"),
698
+ vars = [],
699
+ mids = [],
700
+ d = new Deferred();
701
+
702
+ for(var name in hash){
703
+ vars.push(name);
704
+ mids.push(hash[name]);
705
+ }
706
+
707
+ require(mids, function(){
708
+ for(var i=0; i<vars.length; i++){
709
+ dlang.setObject(vars[i], arguments[i]);
710
+ }
711
+ d.resolve(arguments);
712
+ });
713
+
714
+ return d.promise;
715
+ },
716
+
717
+ _scanAmd: function(root){
718
+ // summary:
719
+ // Scans the DOM for any declarative requires and returns their values.
720
+ // description:
721
+ // Looks for `<script type=dojo/require>bar: "acme/bar", ...</script>` node, calls require() to load the
722
+ // specified modules and (asynchronously) assign them to the specified global variables,
723
+ // and returns a Promise for when those operations complete.
724
+ // root: DomNode
725
+ // The node to base the scan from.
726
+
727
+ // Promise that resolves when all the <script type=dojo/require> nodes have finished loading.
728
+ var deferred = new Deferred(),
729
+ promise = deferred.promise;
730
+ deferred.resolve(true);
731
+
732
+ var self = this;
733
+ query("script[type='dojo/require']", root).forEach(function(node){
734
+ // Fire off require() call for specified modules. Chain this require to fire after
735
+ // any previous requires complete, so that layers can be loaded before individual module require()'s fire.
736
+ promise = promise.then(function(){ return self._require(node); });
737
+
738
+ // Remove from DOM so it isn't seen again
739
+ node.parentNode.removeChild(node);
740
+ });
741
+
742
+ return promise;
743
+ },
579
744
 
580
- // go build the object instances
581
- var mixin = args && args.template ? {template: true} : null;
582
- return this.instantiate(list, mixin, args); // Array
745
+ parse: function(rootNode, options){
746
+ // summary:
747
+ // Scan the DOM for class instances, and instantiate them.
748
+ // description:
749
+ // Search specified node (or root node) recursively for class instances,
750
+ // and instantiate them. Searches for either data-dojo-type="Class" or
751
+ // dojoType="Class" where "Class" is a a fully qualified class name,
752
+ // like `dijit/form/Button`
753
+ //
754
+ // Using `data-dojo-type`:
755
+ // Attributes using can be mixed into the parameters used to instantiate the
756
+ // Class by using a `data-dojo-props` attribute on the node being converted.
757
+ // `data-dojo-props` should be a string attribute to be converted from JSON.
758
+ //
759
+ // Using `dojoType`:
760
+ // Attributes are read from the original domNode and converted to appropriate
761
+ // types by looking up the Class prototype values. This is the default behavior
762
+ // from Dojo 1.0 to Dojo 1.5. `dojoType` support is deprecated, and will
763
+ // go away in Dojo 2.0.
764
+ // rootNode: DomNode?
765
+ // A default starting root node from which to start the parsing. Can be
766
+ // omitted, defaulting to the entire document. If omitted, the `options`
767
+ // object can be passed in this place. If the `options` object has a
768
+ // `rootNode` member, that is used.
769
+ // options: Object?
770
+ // A hash of options.
771
+ //
772
+ // - noStart: Boolean?:
773
+ // when set will prevent the parser from calling .startup()
774
+ // when locating the nodes.
775
+ // - rootNode: DomNode?:
776
+ // identical to the function's `rootNode` argument, though
777
+ // allowed to be passed in via this `options object.
778
+ // - template: Boolean:
779
+ // If true, ignores ContentPane's stopParser flag and parses contents inside of
780
+ // a ContentPane inside of a template. This allows dojoAttachPoint on widgets/nodes
781
+ // nested inside the ContentPane to work.
782
+ // - inherited: Object:
783
+ // Hash possibly containing dir and lang settings to be applied to
784
+ // parsed widgets, unless there's another setting on a sub-node that overrides
785
+ // - scope: String:
786
+ // Root for attribute names to search for. If scopeName is dojo,
787
+ // will search for data-dojo-type (or dojoType). For backwards compatibility
788
+ // reasons defaults to dojo._scopeName (which is "dojo" except when
789
+ // multi-version support is used, when it will be something like dojo16, dojo20, etc.)
790
+ // - propsThis: Object:
791
+ // If specified, "this" referenced from data-dojo-props will refer to propsThis.
792
+ // Intended for use from the widgets-in-template feature of `dijit._WidgetsInTemplateMixin`
793
+ // returns: Mixed
794
+ // Returns a blended object that is an array of the instantiated objects, but also can include
795
+ // a promise that is resolved with the instantiated objects. This is done for backwards
796
+ // compatibility. If the parser auto-requires modules, it will always behave in a promise
797
+ // fashion and `parser.parse().then(function(instances){...})` should be used.
798
+ // example:
799
+ // Parse all widgets on a page:
800
+ // | parser.parse();
801
+ // example:
802
+ // Parse all classes within the node with id="foo"
803
+ // | parser.parse(dojo.byId('foo'));
804
+ // example:
805
+ // Parse all classes in a page, but do not call .startup() on any
806
+ // child
807
+ // | parser.parse({ noStart: true })
808
+ // example:
809
+ // Parse all classes in a node, but do not call .startup()
810
+ // | parser.parse(someNode, { noStart:true });
811
+ // | // or
812
+ // | parser.parse({ noStart:true, rootNode: someNode });
813
+
814
+ // determine the root node and options based on the passed arguments.
815
+ var root;
816
+ if(!options && rootNode && rootNode.rootNode){
817
+ options = rootNode;
818
+ root = options.rootNode;
819
+ }else if(rootNode && dlang.isObject(rootNode) && !("nodeType" in rootNode)){
820
+ options = rootNode;
821
+ }else{
822
+ root = rootNode;
823
+ }
824
+ root = root ? dhtml.byId(root) : dwindow.body();
825
+
826
+ options = options || {};
827
+
828
+ var mixin = options.template ? { template: true } : {},
829
+ instances = [],
830
+ self = this;
831
+
832
+ // First scan for any <script type=dojo/require> nodes, and execute.
833
+ // Then scan for all nodes with data-dojo-type, and load any unloaded modules.
834
+ // Then build the object instances. Add instances to already existing (but empty) instances[] array,
835
+ // which may already have been returned to caller. Also, use otherwise to collect and throw any errors
836
+ // that occur during the parse().
837
+ var p =
838
+ this._scanAmd(root, options).then(function(){
839
+ return self.scan(root, options);
840
+ }).then(function(parsedNodes){
841
+ return instances = instances.concat(self._instantiate(parsedNodes, mixin, options));
842
+ }).otherwise(function(e){
843
+ // TODO Modify to follow better pattern for promise error managment when available
844
+ console.error("dojo/parser::parse() error", e);
845
+ throw e;
846
+ });
847
+
848
+ // Blend the array with the promise
849
+ dlang.mixin(instances, p);
850
+ return instances;
851
+ }
583
852
  };
584
- }();
585
853
 
854
+ if( 1 ){
855
+ dojo.parser = parser;
856
+ }
586
857
 
587
- //Register the parser callback. It should be the first callback
588
- //after the a11y test.
589
- if(dojo.config.parseOnLoad){
590
- dojo.ready(100, dojo.parser, "parse");
591
- }
858
+ // Register the parser callback. It should be the first callback
859
+ // after the a11y test.
860
+ if(config.parseOnLoad){
861
+ ready(100, parser, "parse");
862
+ }
592
863
 
593
- return dojo.parser;
864
+ return parser;
594
865
  });