Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'master' of https://github.com/yui/yui3

  • Loading branch information...
commit a60d832ec7975bcd02687395cbfb2e7e34c6af27 2 parents bd63f78 + 4412b4f
Nicholas C. Zakas authored November 30, 2011

Showing 242 changed files with 9,068 additions and 3,894 deletions. Show diff stats Hide diff stats

  1. 3  .gitignore
  2. 31  LICENSE.md
  3. 38  build/arraysort/arraysort-debug.js
  4. 38  build/arraysort/arraysort.js
  5. 2  build/autocomplete-base/autocomplete-base-debug.js
  6. 2  build/autocomplete-base/autocomplete-base-min.js
  7. 2  build/autocomplete-base/autocomplete-base.js
  8. 2  build/autocomplete-list/autocomplete-list-debug.js
  9. 2  build/autocomplete-list/autocomplete-list-min.js
  10. 2  build/autocomplete-list/autocomplete-list.js
  11. 29  build/autocomplete-sources/autocomplete-sources-debug.js
  12. 2  build/autocomplete-sources/autocomplete-sources-min.js
  13. 29  build/autocomplete-sources/autocomplete-sources.js
  14. 57  build/base-base/base-base-debug.js
  15. 2  build/base-base/base-base-min.js
  16. 54  build/base-base/base-base.js
  17. BIN  build/clickable-rail/assets/thumb-x-oblong-dark.png
  18. BIN  build/clickable-rail/assets/thumb-x-oblong.png
  19. BIN  build/clickable-rail/assets/thumb-x-oblong2-dark.png
  20. BIN  build/clickable-rail/assets/thumb-x-oblong2.png
  21. BIN  build/clickable-rail/assets/thumb-y-oblong-dark.png
  22. BIN  build/clickable-rail/assets/thumb-y-oblong.png
  23. BIN  build/clickable-rail/assets/thumb-y-oblong2-dark.png
  24. BIN  build/clickable-rail/assets/thumb-y-oblong2.png
  25. 1  build/controller/controller-min.js
  26. 3  build/dd-ddm/dd-ddm-debug.js
  27. 2  build/dd-ddm/dd-ddm-min.js
  28. 3  build/dd-ddm/dd-ddm.js
  29. 6  build/dd-drag/dd-drag-debug.js
  30. 2  build/dd-drag/dd-drag-min.js
  31. 6  build/dd-drag/dd-drag.js
  32. 2  build/dd-plugin/dd-plugin-debug.js
  33. 2  build/dd-plugin/dd-plugin-min.js
  34. 2  build/dd-plugin/dd-plugin.js
  35. 2  build/dd-scroll/dd-scroll-debug.js
  36. 2  build/dd-scroll/dd-scroll-min.js
  37. 2  build/dd-scroll/dd-scroll.js
  38. 111  build/dial/dial-debug.js
  39. 6  build/dial/dial-min.js
  40. 111  build/dial/dial.js
  41. 36  build/dom-base/dom-base-debug.js
  42. 3  build/dom-base/dom-base-min.js
  43. 36  build/dom-base/dom-base.js
  44. 36  build/dom-core/dom-core-debug.js
  45. 2  build/dom-core/dom-core-min.js
  46. 36  build/dom-core/dom-core.js
  47. 65  build/dom-screen/dom-screen-debug.js
  48. 2  build/dom-screen/dom-screen-min.js
  49. 65  build/dom-screen/dom-screen.js
  50. 65  build/editor/editor-debug.js
  51. 18  build/editor/editor-min.js
  52. 56  build/editor/editor.js
  53. 7  build/escape/escape-debug.js
  54. 2  build/escape/escape-min.js
  55. 7  build/escape/escape.js
  56. 24  build/event-base/event-base-debug.js
  57. 2  build/event-base/event-base-min.js
  58. 23  build/event-base/event-base.js
  59. 21  build/event-resize/event-resize-debug.js
  60. 2  build/event-resize/event-resize-min.js
  61. 21  build/event-resize/event-resize.js
  62. 3  build/event-synthetic/event-synthetic-debug.js
  63. 3  build/event-synthetic/event-synthetic.js
  64. 2  build/exec-command/exec-command-debug.js
  65. 4  build/exec-command/exec-command-min.js
  66. 2  build/exec-command/exec-command.js
  67. 63  build/frame/frame-debug.js
  68. 4  build/frame/frame-min.js
  69. 54  build/frame/frame.js
  70. 138  build/get-nodejs/get-debug.js
  71. 1  build/get-nodejs/get-min.js
  72. 99  build/get-nodejs/get-nodejs-debug.js
  73. 1  build/get-nodejs/get-nodejs-min.js
  74. 91  build/get-nodejs/get-nodejs.js
  75. 130  build/get-nodejs/get.js
  76. 2  build/get/get-debug.js
  77. 2  build/get/get-min.js
  78. 2  build/get/get.js
  79. 341  build/handlebars-base/handlebars-base-debug.js
  80. 6  build/handlebars-base/handlebars-base-min.js
  81. 341  build/handlebars-base/handlebars-base.js
  82. 1,482  build/handlebars-compiler/handlebars-compiler-debug.js
  83. 10  build/handlebars-compiler/handlebars-compiler-min.js
  84. 1,482  build/handlebars-compiler/handlebars-compiler.js
  85. 16  build/io-upload-iframe/io-upload-iframe-debug.js
  86. 2  build/io-upload-iframe/io-upload-iframe-min.js
  87. 16  build/io-upload-iframe/io-upload-iframe.js
  88. 3  build/io-xdr/io-xdr-debug.js
  89. 2  build/io-xdr/io-xdr-min.js
  90. 3  build/io-xdr/io-xdr.js
  91. 625  build/loader-base/loader-base-debug.js
  92. 6  build/loader-base/loader-base-min.js
  93. 601  build/loader-base/loader-base.js
  94. 2  build/loader-rollup/loader-rollup-debug.js
  95. 2  build/loader-rollup/loader-rollup-min.js
  96. 2  build/loader-rollup/loader-rollup.js
  97. 71  build/loader-yui3/loader-yui3-debug.js
  98. 6  build/loader-yui3/loader-yui3-min.js
  99. 71  build/loader-yui3/loader-yui3.js
  100. 698  build/loader/loader-debug.js
  101. 12  build/loader/loader-min.js
  102. 674  build/loader/loader.js
  103. 56  build/model-list/model-list-debug.js
  104. 2  build/model-list/model-list-min.js
  105. 56  build/model-list/model-list.js
  106. 211  build/model/model-debug.js
  107. 2  build/model/model-min.js
  108. 210  build/model/model.js
  109. 2  build/node-base/node-base-debug.js
  110. 2  build/node-base/node-base-min.js
  111. 2  build/node-base/node-base.js
  112. 10  build/node-core/node-core-debug.js
  113. 4  build/node-core/node-core-min.js
  114. 10  build/node-core/node-core.js
  115. 103  build/parallel/parallel-debug.js
  116. 1  build/parallel/parallel-min.js
  117. 101  build/parallel/parallel.js
  118. 451  build/pjax-base/pjax-base-debug.js
  119. 1  build/pjax-base/pjax-base-min.js
  120. 451  build/pjax-base/pjax-base.js
  121. 30  build/pjax-plugin/pjax-plugin-debug.js
  122. 2  build/pjax-plugin/pjax-plugin-min.js
  123. 30  build/pjax-plugin/pjax-plugin.js
  124. 170  build/pjax/pjax-debug.js
  125. 2  build/pjax/pjax-min.js
  126. 170  build/pjax/pjax.js
  127. BIN  build/range-slider/assets/thumb-x-oblong-dark.png
  128. BIN  build/range-slider/assets/thumb-x-oblong.png
  129. BIN  build/range-slider/assets/thumb-x-oblong2-dark.png
  130. BIN  build/range-slider/assets/thumb-x-oblong2.png
  131. BIN  build/range-slider/assets/thumb-y-oblong-dark.png
  132. BIN  build/range-slider/assets/thumb-y-oblong.png
  133. BIN  build/range-slider/assets/thumb-y-oblong2-dark.png
  134. BIN  build/range-slider/assets/thumb-y-oblong2.png
  135. 420  build/rls/rls-debug.js
  136. 1  build/rls/rls-min.js
  137. 405  build/rls/rls.js
  138. 528  build/{controller/controller-debug.js → router/router-debug.js}
  139. 1  build/router/router-min.js
  140. 528  build/{controller/controller.js → router/router.js}
  141. 4  build/scrollview-base/scrollview-base-debug.js
  142. 4  build/scrollview-base/scrollview-base-min.js
  143. 4  build/scrollview-base/scrollview-base.js
  144. 2  build/scrollview-paginator/scrollview-paginator-debug.js
  145. 2  build/scrollview-paginator/scrollview-paginator-min.js
  146. 2  build/scrollview-paginator/scrollview-paginator.js
  147. 25  build/scrollview-scrollbars/scrollview-scrollbars-debug.js
  148. 2  build/scrollview-scrollbars/scrollview-scrollbars-min.js
  149. 25  build/scrollview-scrollbars/scrollview-scrollbars.js
  150. 2  build/selector-native/selector-native-debug.js
  151. 2  build/selector-native/selector-native-min.js
  152. 2  build/selector-native/selector-native.js
  153. BIN  build/slider-base/assets/skins/audio-light/rail-x.png
  154. BIN  build/slider-base/assets/skins/audio-light/rail-y.png
  155. BIN  build/slider-base/assets/skins/audio-light/thumb-x.png
  156. BIN  build/slider-base/assets/skins/audio-light/thumb-y.png
  157. BIN  build/slider-base/assets/skins/audio/rail-x.png
  158. BIN  build/slider-base/assets/skins/audio/rail-y.png
  159. BIN  build/slider-base/assets/skins/audio/thumb-x.png
  160. BIN  build/slider-base/assets/skins/audio/thumb-y.png
  161. BIN  build/slider-base/assets/skins/capsule-dark/rail-x-dots.png
  162. BIN  build/slider-base/assets/skins/capsule-dark/rail-x-lines.png
  163. BIN  build/slider-base/assets/skins/capsule-dark/rail-x.png
  164. BIN  build/slider-base/assets/skins/capsule-dark/rail-y-dots.png
  165. BIN  build/slider-base/assets/skins/capsule-dark/rail-y-lines.png
  166. BIN  build/slider-base/assets/skins/capsule-dark/rail-y.png
  167. BIN  build/slider-base/assets/skins/capsule-dark/thumb-x-line.png
  168. BIN  build/slider-base/assets/skins/capsule-dark/thumb-x.png
  169. BIN  build/slider-base/assets/skins/capsule-dark/thumb-y-line.png
  170. BIN  build/slider-base/assets/skins/capsule-dark/thumb-y.png
  171. BIN  build/slider-base/assets/skins/capsule/rail-x-dots.png
  172. BIN  build/slider-base/assets/skins/capsule/rail-x-lines.png
  173. BIN  build/slider-base/assets/skins/capsule/rail-x.png
  174. BIN  build/slider-base/assets/skins/capsule/rail-y-dots.png
  175. BIN  build/slider-base/assets/skins/capsule/rail-y-lines.png
  176. BIN  build/slider-base/assets/skins/capsule/rail-y.png
  177. BIN  build/slider-base/assets/skins/capsule/thumb-x-line.png
  178. BIN  build/slider-base/assets/skins/capsule/thumb-x.png
  179. BIN  build/slider-base/assets/skins/capsule/thumb-y-line.png
  180. BIN  build/slider-base/assets/skins/capsule/thumb-y-lines.png
  181. BIN  build/slider-base/assets/skins/capsule/thumb-y.png
  182. BIN  build/slider-base/assets/skins/night/rail-x-lines.png
  183. BIN  build/slider-base/assets/skins/night/rail-x.png
  184. BIN  build/slider-base/assets/skins/night/rail-y-lines.png
  185. BIN  build/slider-base/assets/skins/night/rail-y.png
  186. BIN  build/slider-base/assets/skins/night/thumb-x.png
  187. BIN  build/slider-base/assets/skins/night/thumb-y.png
  188. BIN  build/slider-base/assets/skins/round-dark/rail-x.png
  189. BIN  build/slider-base/assets/skins/round-dark/rail-y.png
  190. BIN  build/slider-base/assets/skins/round-dark/thumb-x-grip.png
  191. BIN  build/slider-base/assets/skins/round-dark/thumb-x.png
  192. BIN  build/slider-base/assets/skins/round-dark/thumb-y-grip.png
  193. BIN  build/slider-base/assets/skins/round-dark/thumb-y.png
  194. BIN  build/slider-base/assets/skins/round/rail-x.png
  195. BIN  build/slider-base/assets/skins/round/rail-y.png
  196. BIN  build/slider-base/assets/skins/round/thumb-x-grip.png
  197. BIN  build/slider-base/assets/skins/round/thumb-x.png
  198. BIN  build/slider-base/assets/skins/round/thumb-y-grip.png
  199. BIN  build/slider-base/assets/skins/round/thumb-y.png
  200. BIN  build/slider-base/assets/skins/sam-dark/rail-x-lines.png
  201. BIN  build/slider-base/assets/skins/sam-dark/rail-x.png
  202. BIN  build/slider-base/assets/skins/sam-dark/rail-y-lines.png
  203. BIN  build/slider-base/assets/skins/sam-dark/rail-y.png
  204. BIN  build/slider-base/assets/skins/sam-dark/thumb-x.png
  205. BIN  build/slider-base/assets/skins/sam-dark/thumb-y.png
  206. BIN  build/slider-base/assets/skins/sam/rail-x-lines.png
  207. BIN  build/slider-base/assets/skins/sam/rail-x.png
  208. BIN  build/slider-base/assets/skins/sam/rail-y-lines.png
  209. BIN  build/slider-base/assets/skins/sam/rail-y.png
  210. BIN  build/slider-base/assets/skins/sam/thumb-x.png
  211. BIN  build/slider-base/assets/skins/sam/thumb-y.png
  212. BIN  build/slider-base/assets/thumb-x-oblong-dark.png
  213. BIN  build/slider-base/assets/thumb-x-oblong.png
  214. BIN  build/slider-base/assets/thumb-x-oblong2-dark.png
  215. BIN  build/slider-base/assets/thumb-x-oblong2.png
  216. BIN  build/slider-base/assets/thumb-y-oblong-dark.png
  217. BIN  build/slider-base/assets/thumb-y-oblong.png
  218. BIN  build/slider-base/assets/thumb-y-oblong2-dark.png
  219. BIN  build/slider-base/assets/thumb-y-oblong2.png
  220. BIN  build/slider-value-range/assets/thumb-x-oblong-dark.png
  221. BIN  build/slider-value-range/assets/thumb-x-oblong.png
  222. BIN  build/slider-value-range/assets/thumb-x-oblong2-dark.png
  223. BIN  build/slider-value-range/assets/thumb-x-oblong2.png
  224. BIN  build/slider-value-range/assets/thumb-y-oblong-dark.png
  225. BIN  build/slider-value-range/assets/thumb-y-oblong.png
  226. BIN  build/slider-value-range/assets/thumb-y-oblong2-dark.png
  227. BIN  build/slider-value-range/assets/thumb-y-oblong2.png
  228. 58  build/test-console/assets/skins/sam/test-console-skin.css
  229. 1  build/test-console/assets/skins/sam/test-console.css
  230. 8  build/test-console/assets/test-console-core.css
  231. 98  build/test-console/test-console-debug.js
  232. 1  build/test-console/test-console-min.js
  233. 98  build/test-console/test-console.js
  234. 213  build/view/view-debug.js
  235. 2  build/view/view-min.js
  236. 213  build/view/view.js
  237. 31  build/widget-autohide/widget-autohide-debug.js
  238. 2  build/widget-autohide/widget-autohide-min.js
  239. 31  build/widget-autohide/widget-autohide.js
  240. 4  build/widget-base/widget-base-debug.js
  241. 2  build/widget-base/widget-base-min.js
3  .gitignore
@@ -11,6 +11,7 @@ CVS/
11 11
 src/build.log
12 12
 .com.apple.timemachine.supported
13 13
 src/out
  14
+node_modules
14 15
 api-js/
15 16
 build/autocomplete-base/assets/autocomplete-list-core.css
16 17
 build/autocomplete-filters-accentfold/assets/autocomplete-list-core.css
@@ -19,4 +20,4 @@ build/autocomplete-highlighters-accentfold/assets/autocomplete-list-core.css
19 20
 build/autocomplete-highlighters/assets/autocomplete-list-core.css
20 21
 build/autocomplete-list-keys/assets/autocomplete-list-core.css
21 22
 build/autocomplete-plugin/assets/autocomplete-list-core.css
22  
-build/autocomplete-sources/assets/autocomplete-list-core.css
  23
+build/autocomplete-sources/assets/autocomplete-list-core.css
31  LICENSE.md
Source Rendered
@@ -42,9 +42,40 @@ list of third party contributions to YUI.
42 42
     Utility, Douglas Crockford's JSON parsing and stringifying methods are
43 43
     adapted from work published at [JSON.org](http://json.org/). The adapted
44 44
     work is in the public domain.
  45
+
45 46
   * **Robert Penner's animation-easing algorithms:** In the Animation Utility,
46 47
     YUI makes use of Robert Penner's algorithms for easing.
  48
+
47 49
   * **Diego Perini's IEContentLoaded technique:** The Event Utility employs
48 50
     [a technique developed by Diego Perini](http://javascript.nwbox.com/IEContentLoaded/)
49 51
     and licensed under GPL. YUI's use of this technique is included under our
50 52
     BSD license with the author's permission.
  53
+
  54
+  * **Handlebars.js**: The Handlebars component is a YUI port of
  55
+    [Handlebars.js](https://github.com/wycats/handlebars.js) by Yehuda Katz. It
  56
+    is distributed with YUI under the terms of the MIT License below.
  57
+
  58
+
  59
+Handlebars.js MIT License
  60
+-------------------------
  61
+
  62
+Copyright (C) 2011 by Yehuda Katz
  63
+<https://github.com/wycats/handlebars.js>
  64
+
  65
+Permission is hereby granted, free of charge, to any person obtaining a copy
  66
+of this software and associated documentation files (the "Software"), to deal
  67
+in the Software without restriction, including without limitation the rights
  68
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  69
+copies of the Software, and to permit persons to whom the Software is
  70
+furnished to do so, subject to the following conditions:
  71
+
  72
+The above copyright notice and this permission notice shall be included in
  73
+all copies or substantial portions of the Software.
  74
+
  75
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  76
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  77
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  78
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  79
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  80
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  81
+THE SOFTWARE.
38  build/arraysort/arraysort-debug.js
... ...
@@ -1,33 +1,34 @@
1 1
 YUI.add('arraysort', function(Y) {
2 2
 
3 3
 /**
4  
- * Provides a case-insenstive comparator which can be used for array sorting.
5  
- * 
6  
- * @module arraysort
7  
- */
  4
+Provides a case-insenstive comparator which can be used for array sorting.
  5
+
  6
+@module arraysort
  7
+*/
8 8
 
9 9
 var LANG = Y.Lang,
10 10
     ISVALUE = LANG.isValue,
11 11
     ISSTRING = LANG.isString;
12 12
 
13 13
 /**
14  
- * Provides a case-insenstive comparator which can be used for array sorrting.
15  
- *
16  
- * @class ArraySort
17  
- */
  14
+Provides a case-insenstive comparator which can be used for array sorting.
  15
+
  16
+@class ArraySort
  17
+*/
18 18
 
19 19
 Y.ArraySort = {
  20
+
20 21
     /**
21  
-     * Comparator function for simple case-insensitive string sorting.
22  
-     *
23  
-     * @method compare
24  
-     * @param a {Object} First sort argument.
25  
-     * @param b {Object} Second sort argument.
26  
-     * @param desc {Boolean} True if sort direction is descending, false if
27  
-     * sort direction is ascending.
28  
-     * @return {Boolean} Return -1 when a < b. Return 0 when a = b.
29  
-     * Return 1 when a > b.
30  
-     */
  22
+    Comparator function for simple case-insensitive sorting of an array of
  23
+    strings.
  24
+
  25
+    @method compare
  26
+    @param a {Object} First sort argument.
  27
+    @param b {Object} Second sort argument.
  28
+    @param desc {Boolean} `true` if sort direction is descending, `false` if
  29
+        sort direction is ascending.
  30
+    @return {Boolean} -1 when a < b. 0 when a == b. 1 when a > b.
  31
+    */
31 32
     compare: function(a, b, desc) {
32 33
         if(!ISVALUE(a)) {
33 34
             if(!ISVALUE(b)) {
@@ -57,6 +58,7 @@ Y.ArraySort = {
57 58
             return 0;
58 59
         }
59 60
     }
  61
+
60 62
 };
61 63
 
62 64
 
38  build/arraysort/arraysort.js
... ...
@@ -1,33 +1,34 @@
1 1
 YUI.add('arraysort', function(Y) {
2 2
 
3 3
 /**
4  
- * Provides a case-insenstive comparator which can be used for array sorting.
5  
- * 
6  
- * @module arraysort
7  
- */
  4
+Provides a case-insenstive comparator which can be used for array sorting.
  5
+
  6
+@module arraysort
  7
+*/
8 8
 
9 9
 var LANG = Y.Lang,
10 10
     ISVALUE = LANG.isValue,
11 11
     ISSTRING = LANG.isString;
12 12
 
13 13
 /**
14  
- * Provides a case-insenstive comparator which can be used for array sorrting.
15  
- *
16  
- * @class ArraySort
17  
- */
  14
+Provides a case-insenstive comparator which can be used for array sorting.
  15
+
  16
+@class ArraySort
  17
+*/
18 18
 
19 19
 Y.ArraySort = {
  20
+
20 21
     /**
21  
-     * Comparator function for simple case-insensitive string sorting.
22  
-     *
23  
-     * @method compare
24  
-     * @param a {Object} First sort argument.
25  
-     * @param b {Object} Second sort argument.
26  
-     * @param desc {Boolean} True if sort direction is descending, false if
27  
-     * sort direction is ascending.
28  
-     * @return {Boolean} Return -1 when a < b. Return 0 when a = b.
29  
-     * Return 1 when a > b.
30  
-     */
  22
+    Comparator function for simple case-insensitive sorting of an array of
  23
+    strings.
  24
+
  25
+    @method compare
  26
+    @param a {Object} First sort argument.
  27
+    @param b {Object} Second sort argument.
  28
+    @param desc {Boolean} `true` if sort direction is descending, `false` if
  29
+        sort direction is ascending.
  30
+    @return {Boolean} -1 when a < b. 0 when a == b. 1 when a > b.
  31
+    */
31 32
     compare: function(a, b, desc) {
32 33
         if(!ISVALUE(a)) {
33 34
             if(!ISVALUE(b)) {
@@ -57,6 +58,7 @@ Y.ArraySort = {
57 58
             return 0;
58 59
         }
59 60
     }
  61
+
60 62
 };
61 63
 
62 64
 
2  build/autocomplete-base/autocomplete-base-debug.js
@@ -1633,4 +1633,4 @@ AutoCompleteBase.prototype = {
1633 1633
 Y.AutoCompleteBase = AutoCompleteBase;
1634 1634
 
1635 1635
 
1636  
-}, '@VERSION@' ,{optional:['autocomplete-sources'], requires:['array-extras', 'base-build', 'escape', 'event-valuechange', 'node-base']});
  1636
+}, '@VERSION@' ,{requires:['array-extras', 'base-build', 'escape', 'event-valuechange', 'node-base'], optional:['autocomplete-sources']});
2  build/autocomplete-base/autocomplete-base-min.js
... ...
@@ -1,2 +1,2 @@
1 1
 YUI.add("autocomplete-base",function(f){var g=f.Escape,j=f.Lang,q=f.Array,i=f.Object,d=j.isFunction,r=j.isString,u=j.trim,l=f.Attribute.INVALID_VALUE,o="_functionValidator",x="_sourceSuccess",c="allowBrowserAutocomplete",h="inputNode",w="query",e="queryDelimiter",b="requestTemplate",m="results",n="resultListLocator",k="value",s="valueChange",a="clear",t=w,p=m;function v(){f.before(this._bindUIACBase,this,"bindUI");f.before(this._destructorACBase,this,"destructor");f.before(this._syncUIACBase,this,"syncUI");this.publish(a,{defaultFn:this._defClearFn});this.publish(t,{defaultFn:this._defQueryFn});this.publish(p,{defaultFn:this._defResultsFn});}v.ATTRS={allowBrowserAutocomplete:{value:false},allowTrailingDelimiter:{value:false},inputNode:{setter:f.one,writeOnce:"initOnly"},maxResults:{value:0},minQueryLength:{value:1},query:{readOnly:true,value:null},queryDelay:{value:100},queryDelimiter:{value:null},requestTemplate:{setter:"_setRequestTemplate",value:null},resultFilters:{setter:"_setResultFilters",value:[]},resultFormatter:{validator:o},resultHighlighter:{setter:"_setResultHighlighter"},resultListLocator:{setter:"_setLocator"},results:{readOnly:true,value:[]},resultTextLocator:{setter:"_setLocator"},source:{setter:"_setSource"},sourceType:{value:null},tokenInput:{readOnly:true},value:{value:""}};v.CSS_PREFIX="ac";v.UI_SRC=(f.Widget&&f.Widget.UI_SRC)||"ui";v.SOURCE_TYPES={array:"_createArraySource","function":"_createFunctionSource",object:"_createObjectSource"};v.prototype={sendRequest:function(A,B){var y,z=this.get("source");if(A||A===""){this._set(w,A);}else{A=this.get(w)||"";}if(z){if(!B){B=this.get(b);}y=B?B.call(this,A):A;z.sendRequest({query:A,request:y,callback:{success:f.bind(this._onResponse,this,A)}});}return this;},_bindUIACBase:function(){var z=this.get(h),y=z&&z.tokenInput;if(y){z=y.get(h);this._set("tokenInput",y);}if(!z){f.error("No inputNode specified.");return;}this._inputNode=z;this._acBaseEvents=new f.EventHandle([z.on(s,this._onInputValueChange,this),z.on("blur",this._onInputBlur,this),this.after(c+"Change",this._syncBrowserAutocomplete),this.after("sourceTypeChange",this._afterSourceTypeChange),this.after(s,this._afterValueChange)]);},_destructorACBase:function(){this._acBaseEvents.detach();},_syncUIACBase:function(){this._syncBrowserAutocomplete();this.set(k,this.get(h).get(k));},_createArraySource:function(z){var y=this;return{type:"array",sendRequest:function(A){y[x](z.concat(),A);}};},_createFunctionSource:function(z){var y=this;return{type:"function",sendRequest:function(A){var B;function C(D){y[x](D||[],A);}if((B=z(A.query,C))){C(B);}}};},_createObjectSource:function(z){var y=this;return{type:"object",sendRequest:function(A){var B=A.query;y[x](i.owns(z,B)?z[B]:[],A);}};},_functionValidator:function(y){return y===null||d(y);},_getObjectValue:function(B,A){if(!B){return;}for(var z=0,y=A.length;B&&z<y;z++){B=B[A[z]];}return B;},_parseResponse:function(A,y,P){var G={data:P,query:A,results:[]},I=this.get(n),H=[],F=y&&y.results,C,z,J,B,O,K,L,M,D,E,N;if(F&&I){F=I.call(this,F);}if(F&&F.length){C=this.get("resultFilters");N=this.get("resultTextLocator");for(K=0,L=F.length;K<L;++K){D=F[K];E=N?N.call(this,D):D.toString();H.push({display:g.html(E),raw:D,text:E});}for(K=0,L=C.length;K<L;++K){H=C[K].call(this,A,H.concat());if(!H){return;}if(!H.length){break;}}if(H.length){J=this.get("resultFormatter");O=this.get("resultHighlighter");M=this.get("maxResults");if(M&&M>0&&H.length>M){H.length=M;}if(O){B=O.call(this,A,H.concat());if(!B){return;}for(K=0,L=B.length;K<L;++K){D=H[K];D.highlighted=B[K];D.display=D.highlighted;}}if(J){z=J.call(this,A,H.concat());if(!z){return;}for(K=0,L=z.length;K<L;++K){H[K].display=z[K];}}}}G.results=H;this.fire(p,G);},_parseValue:function(y){var z=this.get(e);if(z){y=y.split(z);y=y[y.length-1];}return j.trimLeft(y);},_setLocator:function(y){if(this[o](y)){return y;}var z=this;y=y.toString().split(".");return function(A){return A&&z._getObjectValue(A,y);};},_setRequestTemplate:function(y){if(this[o](y)){return y;}y=y.toString();return function(z){return j.sub(y,{query:encodeURIComponent(z)});};},_setResultFilters:function(A){var y,z;if(A===null){return[];}y=f.AutoCompleteFilters;z=function(B){if(d(B)){return B;}if(r(B)&&y&&d(y[B])){return y[B];}return false;};if(j.isArray(A)){A=q.map(A,z);return q.every(A,function(B){return !!B;})?A:l;}else{A=z(A);return A?[A]:l;}},_setResultHighlighter:function(y){var z;if(this._functionValidator(y)){return y;}z=f.AutoCompleteHighlighters;if(r(y)&&z&&d(z[y])){return z[y];}return l;},_setSource:function(A){var y=this.get("sourceType")||j.type(A),z;if((A&&d(A.sendRequest))||A===null||y==="datasource"){this._rawSource=A;return A;}if((z=v.SOURCE_TYPES[y])){this._rawSource=A;return j.isString(z)?this[z](A):z(A);}f.error("Unsupported source type '"+y+"'. Maybe autocomplete-sources isn't loaded?");return l;},_sourceSuccess:function(z,y){y.callback.success({data:z,response:{results:z}});},_syncBrowserAutocomplete:function(){var y=this.get(h);if(y.get("nodeName").toLowerCase()==="input"){y.setAttribute("autocomplete",this.get(c)?"on":"off");}},_updateValue:function(z){var B=this.get(e),A,y,C;z=j.trimLeft(z);if(B){A=u(B);C=q.map(u(this.get(k)).split(B),u);y=C.length;if(y>1){C[y-1]=z;z=C.join(A+" ");}z=z+A+" ";}this.set(k,z);},_afterSourceTypeChange:function(y){if(this._rawSource){this.set("source",this._rawSource);}},_afterValueChange:function(E){var A,B,y,z=E.newVal,D,C;if(E.src!==v.UI_SRC){this._inputNode.set(k,z);return;}y=this.get("minQueryLength");D=this._parseValue(z)||"";if(y>=0&&D.length>=y){A=this.get("queryDelay");C=this;B=function(){C.fire(t,{inputValue:z,query:D});};if(A){clearTimeout(this._delay);this._delay=setTimeout(B,A);}else{B();}}else{clearTimeout(this._delay);this.fire(a,{prevVal:E.prevVal?this._parseValue(E.prevVal):null});}},_onInputBlur:function(B){var C=this.get(e),y,z,A;if(C&&!this.get("allowTrailingDelimiter")){C=j.trimRight(C);A=z=this._inputNode.get(k);if(C){while((z=j.trimRight(z))&&(y=z.length-C.length)&&z.lastIndexOf(C)===y){z=z.substring(0,y);
2  
-}}else{z=j.trimRight(z);}if(z!==A){this.set(k,z);}}},_onInputValueChange:function(z){var y=z.newVal;if(y===this.get(k)){return;}this.set(k,y,{src:v.UI_SRC});},_onResponse:function(y,z){if(y===(this.get(w)||"")){this._parseResponse(y||"",z.response,z.data);}},_defClearFn:function(){this._set(w,null);this._set(m,[]);},_defQueryFn:function(z){var y=z.query;this.sendRequest(y);},_defResultsFn:function(y){this._set(m,y[m]);}};f.AutoCompleteBase=v;},"@VERSION@",{optional:["autocomplete-sources"],requires:["array-extras","base-build","escape","event-valuechange","node-base"]});
  2
+}}else{z=j.trimRight(z);}if(z!==A){this.set(k,z);}}},_onInputValueChange:function(z){var y=z.newVal;if(y===this.get(k)){return;}this.set(k,y,{src:v.UI_SRC});},_onResponse:function(y,z){if(y===(this.get(w)||"")){this._parseResponse(y||"",z.response,z.data);}},_defClearFn:function(){this._set(w,null);this._set(m,[]);},_defQueryFn:function(z){var y=z.query;this.sendRequest(y);},_defResultsFn:function(y){this._set(m,y[m]);}};f.AutoCompleteBase=v;},"@VERSION@",{requires:["array-extras","base-build","escape","event-valuechange","node-base"],optional:["autocomplete-sources"]});
2  build/autocomplete-base/autocomplete-base.js
@@ -1626,4 +1626,4 @@ AutoCompleteBase.prototype = {
1626 1626
 Y.AutoCompleteBase = AutoCompleteBase;
1627 1627
 
1628 1628
 
1629  
-}, '@VERSION@' ,{optional:['autocomplete-sources'], requires:['array-extras', 'base-build', 'escape', 'event-valuechange', 'node-base']});
  1629
+}, '@VERSION@' ,{requires:['array-extras', 'base-build', 'escape', 'event-valuechange', 'node-base'], optional:['autocomplete-sources']});
2  build/autocomplete-list/autocomplete-list-debug.js
@@ -892,4 +892,4 @@ Y.AutoCompleteList = List;
892 892
 Y.AutoComplete = List;
893 893
 
894 894
 
895  
-}, '@VERSION@' ,{lang:['en'], after:['autocomplete-sources'], requires:['autocomplete-base', 'event-resize', 'node-screen', 'selector-css3', 'shim-plugin', 'widget', 'widget-position', 'widget-position-align'], skinnable:true});
  895
+}, '@VERSION@' ,{requires:['autocomplete-base', 'event-resize', 'node-screen', 'selector-css3', 'shim-plugin', 'widget', 'widget-position', 'widget-position-align'], skinnable:true, lang:['en'], after:['autocomplete-sources']});
2  build/autocomplete-list/autocomplete-list-min.js
... ...
@@ -1,2 +1,2 @@
1 1
 YUI.add("autocomplete-list",function(b){var i=b.Lang,v=b.Node,l=b.Array,h=b.UA.ie&&b.UA.ie<7,p=9,s="_CLASS_ITEM",t="_CLASS_ITEM_ACTIVE",d="_CLASS_ITEM_HOVER",u="_SELECTOR_ITEM",f="activeItem",k="alwaysShowList",o="circular",r="hoveredItem",m="id",e="item",c="list",w="result",j="results",q="visible",g="width",n="select",a=b.Base.create("autocompleteList",b.Widget,[b.AutoCompleteBase,b.WidgetPosition,b.WidgetPositionAlign],{ARIA_TEMPLATE:"<div/>",ITEM_TEMPLATE:"<li/>",LIST_TEMPLATE:"<ul/>",initializer:function(){var x=this.get("inputNode");if(!x){b.error("No inputNode specified.");return;}this._inputNode=x;this._listEvents=[];this.DEF_PARENT_NODE=x.get("parentNode");this[s]=this.getClassName(e);this[t]=this.getClassName(e,"active");this[d]=this.getClassName(e,"hover");this[u]="."+this[s];this.publish(n,{defaultFn:this._defSelectFn});},destructor:function(){while(this._listEvents.length){this._listEvents.pop().detach();}if(this._ariaNode){this._ariaNode.remove().destroy(true);}},bindUI:function(){this._bindInput();this._bindList();},renderUI:function(){var C=this._createAriaNode(),z=this.get("boundingBox"),y=this.get("contentBox"),B=this._inputNode,A=this._createListNode(),x=B.get("parentNode");B.addClass(this.getClassName("input")).setAttrs({"aria-autocomplete":c,"aria-expanded":false,"aria-owns":A.get("id")});x.append(C);if(h){z.plug(b.Plugin.Shim);}z.setStyle("position","absolute");this._ariaNode=C;this._boundingBox=z;this._contentBox=y;this._listNode=A;this._parentNode=x;},syncUI:function(){this._syncResults();this._syncVisibility();},hide:function(){return this.get(k)?this:this.set(q,false);},selectItem:function(y,x){if(y){if(!y.hasClass(this[s])){return this;}}else{y=this.get(f);if(!y){return this;}}this.fire(n,{itemNode:y,originEvent:x||null,result:y.getData(w)});return this;},_activateNextItem:function(){var y=this.get(f),x;if(y){x=y.next(this[u])||(this.get(o)?null:y);}else{x=this._getFirstItemNode();}this.set(f,x);return this;},_activatePrevItem:function(){var y=this.get(f),x=y?y.previous(this[u]):this.get(o)&&this._getLastItemNode();this.set(f,x||null);return this;},_add:function(x){var y=[];l.each(i.isArray(x)?x:[x],function(z){y.push(this._createItemNode(z).setData(w,z));},this);y=b.all(y);this._listNode.append(y.toFrag());return y;},_ariaSay:function(z,x){var y=this.get("strings."+z);this._ariaNode.setContent(x?i.sub(y,x):y);},_bindInput:function(){var A=this._inputNode,y,z,x;if(this.get("align")===null){x=this.get("tokenInput");y=(x&&x.get("boundingBox"))||A;this.set("align",{node:y,points:["tl","bl"]});if(!this.get(g)&&(z=y.get("offsetWidth"))){this.set(g,z);}}this._listEvents.concat([A.after("blur",this._afterListInputBlur,this),A.after("focus",this._afterListInputFocus,this)]);},_bindList:function(){this._listEvents.concat([b.on("windowresize",this._syncPosition,this),this.after({blur:this._afterListBlur,focus:this._afterListFocus,mouseover:this._afterMouseOver,mouseout:this._afterMouseOut,activeItemChange:this._afterActiveItemChange,alwaysShowListChange:this._afterAlwaysShowListChange,hoveredItemChange:this._afterHoveredItemChange,resultsChange:this._afterResultsChange,visibleChange:this._afterVisibleChange}),this._listNode.delegate("click",this._onItemClick,this[u],this)]);},_clear:function(){this.set(f,null);this._set(r,null);this._listNode.get("children").remove(true);},_createAriaNode:function(){var x=v.create(this.ARIA_TEMPLATE);return x.addClass(this.getClassName("aria")).setAttrs({"aria-live":"polite",role:"status"});},_createItemNode:function(x){var y=v.create(this.ITEM_TEMPLATE);return y.addClass(this[s]).setAttrs({id:b.stamp(y),role:"option"}).setAttribute("data-text",x.text).append(x.display);},_createListNode:function(){var x=this.get("listNode")||v.create(this.LIST_TEMPLATE);x.addClass(this.getClassName(c)).setAttrs({id:b.stamp(x),role:"listbox"});this._set("listNode",x);this.get("contentBox").append(x);return x;},_getFirstItemNode:function(){return this._listNode.one(this[u]);},_getLastItemNode:function(){return this._listNode.one(this[u]+":last-child");},_syncPosition:function(){this._syncUIPosAlign();this._syncShim();},_syncResults:function(x){if(!x){x=this.get(j);}this._clear();if(x.length){this._add(x);this._ariaSay("items_available");}this._syncPosition();if(this.get("activateFirstItem")&&!this.get(f)){this.set(f,this._getFirstItemNode());}},_syncShim:h?function(){this._boundingBox.shim.sync();}:function(){},_syncVisibility:function(x){if(this.get(k)){x=true;this.set(q,x);}if(typeof x==="undefined"){x=this.get(q);}this._inputNode.set("aria-expanded",x);this._boundingBox.set("aria-hidden",!x);if(x){this._syncPosition();}else{this.set(f,null);this._set(r,null);this._boundingBox.get("offsetWidth");}},_afterActiveItemChange:function(A){var z=this._inputNode,x=A.newVal,B=A.prevVal,y;if(B&&B._node){B.removeClass(this[t]);}if(x){x.addClass(this[t]);z.set("aria-activedescendant",x.get(m));}else{z.removeAttribute("aria-activedescendant");}if(this.get("scrollIntoView")){y=x||z;if(!y.inRegion(b.DOM.viewportRegion(),true)||!y.inRegion(this._contentBox,true)){y.scrollIntoView();}}},_afterAlwaysShowListChange:function(x){this.set(q,x.newVal||this.get(j).length>0);},_afterHoveredItemChange:function(y){var x=y.newVal,z=y.prevVal;if(z){z.removeClass(this[d]);}if(x){x.addClass(this[d]);}},_afterListBlur:function(){this._listFocused=false;if(!this._listInputFocused){this.hide();}},_afterListFocus:function(){this._listFocused=true;},_afterListInputBlur:function(){this._listInputFocused=false;if((!this._mouseOverList&&!this._listFocused)||this._lastInputKey===p){this.hide();}},_afterListInputFocus:function(){this._listInputFocused=true;},_afterMouseOver:function(x){var y=x.domEvent.target.ancestor(this[u],true);this._mouseOverList=true;if(y){this._set(r,y);}},_afterMouseOut:function(){this._mouseOverList=false;this._set(r,null);if(!this._listFocused&&!this._listInputFocused){this.hide();}},_afterResultsChange:function(x){this._syncResults(x.newVal);if(!this.get(k)){this.set(q,!!x.newVal.length);
2  
-}},_afterVisibleChange:function(x){this._syncVisibility(!!x.newVal);},_onItemClick:function(x){var y=x.currentTarget;this.set(f,y);this.selectItem(y,x);},_defSelectFn:function(x){var y=x.result.text;this._inputNode.focus();this._updateValue(y);this._ariaSay("item_selected",{item:y});this.hide();}},{ATTRS:{activateFirstItem:{value:false},activeItem:{setter:b.one,value:null},alwaysShowList:{value:false},circular:{value:true},hoveredItem:{readOnly:true,value:null},listNode:{writeOnce:"initOnly",value:null},scrollIntoView:{value:false},strings:{valueFn:function(){return b.Intl.get("autocomplete-list");}},tabSelect:{value:true},visible:{value:false}},CSS_PREFIX:b.ClassNameManager.getClassName("aclist")});b.AutoCompleteList=a;b.AutoComplete=a;},"@VERSION@",{lang:["en"],after:["autocomplete-sources"],requires:["autocomplete-base","event-resize","node-screen","selector-css3","shim-plugin","widget","widget-position","widget-position-align"],skinnable:true});
  2
+}},_afterVisibleChange:function(x){this._syncVisibility(!!x.newVal);},_onItemClick:function(x){var y=x.currentTarget;this.set(f,y);this.selectItem(y,x);},_defSelectFn:function(x){var y=x.result.text;this._inputNode.focus();this._updateValue(y);this._ariaSay("item_selected",{item:y});this.hide();}},{ATTRS:{activateFirstItem:{value:false},activeItem:{setter:b.one,value:null},alwaysShowList:{value:false},circular:{value:true},hoveredItem:{readOnly:true,value:null},listNode:{writeOnce:"initOnly",value:null},scrollIntoView:{value:false},strings:{valueFn:function(){return b.Intl.get("autocomplete-list");}},tabSelect:{value:true},visible:{value:false}},CSS_PREFIX:b.ClassNameManager.getClassName("aclist")});b.AutoCompleteList=a;b.AutoComplete=a;},"@VERSION@",{requires:["autocomplete-base","event-resize","node-screen","selector-css3","shim-plugin","widget","widget-position","widget-position-align"],skinnable:true,lang:["en"],after:["autocomplete-sources"]});
2  build/autocomplete-list/autocomplete-list.js
@@ -892,4 +892,4 @@ Y.AutoCompleteList = List;
892 892
 Y.AutoComplete = List;
893 893
 
894 894
 
895  
-}, '@VERSION@' ,{lang:['en'], after:['autocomplete-sources'], requires:['autocomplete-base', 'event-resize', 'node-screen', 'selector-css3', 'shim-plugin', 'widget', 'widget-position', 'widget-position-align'], skinnable:true});
  895
+}, '@VERSION@' ,{requires:['autocomplete-base', 'event-resize', 'node-screen', 'selector-css3', 'shim-plugin', 'widget', 'widget-position', 'widget-position-align'], skinnable:true, lang:['en'], after:['autocomplete-sources']});
29  build/autocomplete-sources/autocomplete-sources-debug.js
@@ -290,30 +290,29 @@ Y.mix(ACBase.prototype, {
290 290
         }
291 291
 
292 292
         function _sendRequest(request) {
293  
-            var cacheKey = request.request,
294  
-                query    = request.query,
295  
-                callback, env, maxResults, opts, yqlQuery;
  293
+            var query      = request.query,
  294
+                env        = that.get('yqlEnv'),
  295
+                maxResults = that.get(MAX_RESULTS),
  296
+                callback, opts, yqlQuery;
296 297
 
297  
-            if (cache[cacheKey]) {
298  
-                that[_SOURCE_SUCCESS](cache[cacheKey], request);
  298
+            yqlQuery = Lang.sub(source, {
  299
+                maxResults: maxResults > 0 ? maxResults : 1000,
  300
+                request   : request.request,
  301
+                query     : query
  302
+            });
  303
+
  304
+            if (cache[yqlQuery]) {
  305
+                that[_SOURCE_SUCCESS](cache[yqlQuery], request);
299 306
                 return;
300 307
             }
301 308
 
302 309
             callback = function (data) {
303  
-                cache[cacheKey] = data;
  310
+                cache[yqlQuery] = data;
304 311
                 that[_SOURCE_SUCCESS](data, request);
305 312
             };
306 313
 
307  
-            env        = that.get('yqlEnv');
308  
-            maxResults = that.get(MAX_RESULTS);
309  
-
310 314
             opts = {proto: that.get('yqlProtocol')};
311 315
 
312  
-            yqlQuery = Lang.sub(source, {
313  
-                maxResults: maxResults > 0 ? maxResults : 1000,
314  
-                query     : query
315  
-            });
316  
-
317 316
             // Only create a new YQLRequest instance if this is the
318 317
             // first request. For subsequent requests, we'll reuse the
319 318
             // original instance.
@@ -481,4 +480,4 @@ Y.mix(ACBase.SOURCE_TYPES, {
481 480
 }, true);
482 481
 
483 482
 
484  
-}, '@VERSION@' ,{optional:['io-base', 'json-parse', 'jsonp', 'yql'], requires:['autocomplete-base']});
  483
+}, '@VERSION@' ,{requires:['autocomplete-base'], optional:['io-base', 'json-parse', 'jsonp', 'yql']});
2  build/autocomplete-sources/autocomplete-sources-min.js
... ...
@@ -1 +1 @@
1  
-YUI.add("autocomplete-sources",function(g){var a=g.AutoCompleteBase,f=g.Lang,b="_sourceSuccess",d="maxResults",e="requestTemplate",c="resultListLocator";g.mix(a.prototype,{_YQL_SOURCE_REGEX:/^(?:select|set|use)\s+/i,_beforeCreateObjectSource:function(h){if(h instanceof g.Node&&h.get("nodeName").toLowerCase()==="select"){return this._createSelectSource(h);}if(g.JSONPRequest&&h instanceof g.JSONPRequest){return this._createJSONPSource(h);}return this._createObjectSource(h);},_createIOSource:function(m){var j={},k={type:"io"},l=this,o,i,n;function h(p){var r=p.request,q=p.query;if(j[r]){l[b](j[r],p);return;}if(o&&o.isInProgress()){o.abort();}o=g.io(l._getXHRUrl(m,p),{on:{success:function(v,s){var u;try{u=g.JSON.parse(s.responseText);}catch(t){g.error("JSON parse error",t);}if(u){j[r]=u;l[b](u,p);}}}});}k.sendRequest=function(p){i=p;if(n){return;}n=true;g.use("io-base","json-parse",function(){k.sendRequest=h;h(i);});};return k;},_createJSONPSource:function(m){var j={},k={type:"jsonp"},l=this,i,n;function h(o){var q=o.request,p=o.query;if(j[q]){l[b](j[q],o);return;}m._config.on.success=function(r){j[q]=r;l[b](r,o);};m.send(p);}k.sendRequest=function(o){i=o;if(n){return;}n=true;g.use("jsonp",function(){if(!(m instanceof g.JSONPRequest)){m=new g.JSONPRequest(m,{format:g.bind(l._jsonpFormatter,l)});}k.sendRequest=h;h(i);});};return k;},_createSelectSource:function(i){var h=this;return{type:"select",sendRequest:function(k){var j=[];i.get("options").each(function(l){j.push({html:l.get("innerHTML"),index:l.get("index"),node:l,selected:l.get("selected"),text:l.get("text"),value:l.get("value")});});h[b](j,k);}};},_createStringSource:function(h){if(this._YQL_SOURCE_REGEX.test(h)){return this._createYQLSource(h);}else{if(h.indexOf("{callback}")!==-1){return this._createJSONPSource(h);}else{return this._createIOSource(h);}}},_createYQLSource:function(m){var j={},n={type:"yql"},l=this,i,o,k;if(!this.get(c)){this.set(c,this._defaultYQLLocator);}function h(t){var v=t.request,u=t.query,w,r,p,s,q;if(j[v]){l[b](j[v],t);return;}w=function(x){j[v]=x;l[b](x,t);};r=l.get("yqlEnv");p=l.get(d);s={proto:l.get("yqlProtocol")};q=f.sub(m,{maxResults:p>0?p:1000,query:u});if(k){k._callback=w;k._opts=s;k._params.q=q;if(r){k._params.env=r;}}else{k=new g.YQLRequest(q,{on:{success:w},allowCache:false},r?{env:r}:null,s);}k.send();}n.sendRequest=function(p){i=p;if(!o){o=true;g.use("yql",function(){n.sendRequest=h;h(i);});}};return n;},_defaultYQLLocator:function(i){var j=i&&i.query&&i.query.results,h;if(j&&f.isObject(j)){h=g.Object.values(j)||[];j=h.length===1?h[0]:h;if(!f.isArray(j)){j=[j];}}else{j=[];}return j;},_getXHRUrl:function(i,j){var h=this.get(d);if(j.query!==j.request){i+=j.request;}return f.sub(i,{maxResults:h>0?h:1000,query:encodeURIComponent(j.query)});},_jsonpFormatter:function(i,j,k){var h=this.get(d),l=this.get(e);if(l){i+=l(k);}return f.sub(i,{callback:j,maxResults:h>0?h:1000,query:encodeURIComponent(k)});}});g.mix(a.ATTRS,{yqlEnv:{value:null},yqlProtocol:{value:"http"}});g.mix(a.SOURCE_TYPES,{io:"_createIOSource",jsonp:"_createJSONPSource",object:"_beforeCreateObjectSource",select:"_createSelectSource",string:"_createStringSource",yql:"_createYQLSource"},true);},"@VERSION@",{optional:["io-base","json-parse","jsonp","yql"],requires:["autocomplete-base"]});
  1
+YUI.add("autocomplete-sources",function(g){var a=g.AutoCompleteBase,f=g.Lang,b="_sourceSuccess",d="maxResults",e="requestTemplate",c="resultListLocator";g.mix(a.prototype,{_YQL_SOURCE_REGEX:/^(?:select|set|use)\s+/i,_beforeCreateObjectSource:function(h){if(h instanceof g.Node&&h.get("nodeName").toLowerCase()==="select"){return this._createSelectSource(h);}if(g.JSONPRequest&&h instanceof g.JSONPRequest){return this._createJSONPSource(h);}return this._createObjectSource(h);},_createIOSource:function(m){var j={},k={type:"io"},l=this,o,i,n;function h(p){var r=p.request,q=p.query;if(j[r]){l[b](j[r],p);return;}if(o&&o.isInProgress()){o.abort();}o=g.io(l._getXHRUrl(m,p),{on:{success:function(v,s){var u;try{u=g.JSON.parse(s.responseText);}catch(t){g.error("JSON parse error",t);}if(u){j[r]=u;l[b](u,p);}}}});}k.sendRequest=function(p){i=p;if(n){return;}n=true;g.use("io-base","json-parse",function(){k.sendRequest=h;h(i);});};return k;},_createJSONPSource:function(m){var j={},k={type:"jsonp"},l=this,i,n;function h(o){var q=o.request,p=o.query;if(j[q]){l[b](j[q],o);return;}m._config.on.success=function(r){j[q]=r;l[b](r,o);};m.send(p);}k.sendRequest=function(o){i=o;if(n){return;}n=true;g.use("jsonp",function(){if(!(m instanceof g.JSONPRequest)){m=new g.JSONPRequest(m,{format:g.bind(l._jsonpFormatter,l)});}k.sendRequest=h;h(i);});};return k;},_createSelectSource:function(i){var h=this;return{type:"select",sendRequest:function(k){var j=[];i.get("options").each(function(l){j.push({html:l.get("innerHTML"),index:l.get("index"),node:l,selected:l.get("selected"),text:l.get("text"),value:l.get("value")});});h[b](j,k);}};},_createStringSource:function(h){if(this._YQL_SOURCE_REGEX.test(h)){return this._createYQLSource(h);}else{if(h.indexOf("{callback}")!==-1){return this._createJSONPSource(h);}else{return this._createIOSource(h);}}},_createYQLSource:function(m){var j={},n={type:"yql"},l=this,i,o,k;if(!this.get(c)){this.set(c,this._defaultYQLLocator);}function h(t){var u=t.query,r=l.get("yqlEnv"),p=l.get(d),v,s,q;q=f.sub(m,{maxResults:p>0?p:1000,request:t.request,query:u});if(j[q]){l[b](j[q],t);return;}v=function(w){j[q]=w;l[b](w,t);};s={proto:l.get("yqlProtocol")};if(k){k._callback=v;k._opts=s;k._params.q=q;if(r){k._params.env=r;}}else{k=new g.YQLRequest(q,{on:{success:v},allowCache:false},r?{env:r}:null,s);}k.send();}n.sendRequest=function(p){i=p;if(!o){o=true;g.use("yql",function(){n.sendRequest=h;h(i);});}};return n;},_defaultYQLLocator:function(i){var j=i&&i.query&&i.query.results,h;if(j&&f.isObject(j)){h=g.Object.values(j)||[];j=h.length===1?h[0]:h;if(!f.isArray(j)){j=[j];}}else{j=[];}return j;},_getXHRUrl:function(i,j){var h=this.get(d);if(j.query!==j.request){i+=j.request;}return f.sub(i,{maxResults:h>0?h:1000,query:encodeURIComponent(j.query)});},_jsonpFormatter:function(i,j,k){var h=this.get(d),l=this.get(e);if(l){i+=l(k);}return f.sub(i,{callback:j,maxResults:h>0?h:1000,query:encodeURIComponent(k)});}});g.mix(a.ATTRS,{yqlEnv:{value:null},yqlProtocol:{value:"http"}});g.mix(a.SOURCE_TYPES,{io:"_createIOSource",jsonp:"_createJSONPSource",object:"_beforeCreateObjectSource",select:"_createSelectSource",string:"_createStringSource",yql:"_createYQLSource"},true);},"@VERSION@",{requires:["autocomplete-base"],optional:["io-base","json-parse","jsonp","yql"]});
29  build/autocomplete-sources/autocomplete-sources.js
@@ -290,30 +290,29 @@ Y.mix(ACBase.prototype, {
290 290
         }
291 291
 
292 292
         function _sendRequest(request) {
293  
-            var cacheKey = request.request,
294  
-                query    = request.query,
295  
-                callback, env, maxResults, opts, yqlQuery;
  293
+            var query      = request.query,
  294
+                env        = that.get('yqlEnv'),
  295
+                maxResults = that.get(MAX_RESULTS),
  296
+                callback, opts, yqlQuery;
296 297
 
297  
-            if (cache[cacheKey]) {
298  
-                that[_SOURCE_SUCCESS](cache[cacheKey], request);
  298
+            yqlQuery = Lang.sub(source, {
  299
+                maxResults: maxResults > 0 ? maxResults : 1000,
  300
+                request   : request.request,
  301
+                query     : query
  302
+            });
  303
+
  304
+            if (cache[yqlQuery]) {
  305
+                that[_SOURCE_SUCCESS](cache[yqlQuery], request);
299 306
                 return;
300 307
             }
301 308
 
302 309
             callback = function (data) {
303  
-                cache[cacheKey] = data;
  310
+                cache[yqlQuery] = data;
304 311
                 that[_SOURCE_SUCCESS](data, request);
305 312
             };
306 313
 
307  
-            env        = that.get('yqlEnv');
308  
-            maxResults = that.get(MAX_RESULTS);
309  
-
310 314
             opts = {proto: that.get('yqlProtocol')};
311 315
 
312  
-            yqlQuery = Lang.sub(source, {
313  
-                maxResults: maxResults > 0 ? maxResults : 1000,
314  
-                query     : query
315  
-            });
316  
-
317 316
             // Only create a new YQLRequest instance if this is the
318 317
             // first request. For subsequent requests, we'll reuse the
319 318
             // original instance.
@@ -481,4 +480,4 @@ Y.mix(ACBase.SOURCE_TYPES, {
481 480
 }, true);
482 481
 
483 482
 
484  
-}, '@VERSION@' ,{optional:['io-base', 'json-parse', 'jsonp', 'yql'], requires:['autocomplete-base']});
  483
+}, '@VERSION@' ,{requires:['autocomplete-base'], optional:['io-base', 'json-parse', 'jsonp', 'yql']});
57  build/base-base/base-base-debug.js
@@ -82,33 +82,38 @@ YUI.add('base-base', function(Y) {
82 82
      * </dl>
83 83
      */
84 84
     function Base() {
85  
-        Y.log('constructor called', 'life', 'base');
86  
-
87  
-        // So the object can be used as a hash key (as DD does)
88  
-        Y.stamp(this);
89  
-
90  
-        Attribute.call(this);
91  
-
92  
-        // If Plugin.Host has been augmented [ through base-pluginhost ], setup it's
93  
-        // initial state, but don't initialize Plugins yet. That's done after initialization.
94  
-        var PluginHost = Y.Plugin && Y.Plugin.Host;  
95  
-        if (this._initPlugins && PluginHost) {
96  
-            PluginHost.call(this);
  85
+        if (!this._BaseInvoked) {
  86
+            this._BaseInvoked = true;
  87
+
  88
+            Y.log('constructor called', 'life', 'base');
  89
+    
  90
+            // So the object can be used as a hash key (as DD does)
  91
+            Y.stamp(this);
  92
+    
  93
+            Attribute.call(this);
  94
+    
  95
+            // If Plugin.Host has been augmented [ through base-pluginhost ], setup it's
  96
+            // initial state, but don't initialize Plugins yet. That's done after initialization.
  97
+            var PluginHost = Y.Plugin && Y.Plugin.Host;  
  98
+            if (this._initPlugins && PluginHost) {
  99
+                PluginHost.call(this);
  100
+            }
  101
+    
  102
+            if (this._lazyAddAttrs !== false) { this._lazyAddAttrs = true; }
  103
+    
  104
+            /**
  105
+             * The string used to identify the class of this object.
  106
+             *
  107
+             * @deprecated Use this.constructor.NAME
  108
+             * @property name
  109
+             * @type String
  110
+             */
  111
+            this.name = this.constructor.NAME;
  112
+            this._eventPrefix = this.constructor.EVENT_PREFIX || this.constructor.NAME;
  113
+    
  114
+            this.init.apply(this, arguments);
97 115
         }
98  
-
99  
-        if (this._lazyAddAttrs !== false) { this._lazyAddAttrs = true; }
100  
-
101  
-        /**
102  
-         * The string used to identify the class of this object.
103  
-         *
104  
-         * @deprecated Use this.constructor.NAME
105  
-         * @property name
106  
-         * @type String
107  
-         */
108  
-        this.name = this.constructor.NAME;
109  
-        this._eventPrefix = this.constructor.EVENT_PREFIX || this.constructor.NAME;
110  
-
111  
-        this.init.apply(this, arguments);
  116
+        else { Y.log('Based constructor called more than once. Ignoring duplicate calls', 'life', 'base'); }
112 117
     }
113 118
 
114 119
     /**
2  build/base-base/base-base-min.js
... ...
@@ -1 +1 @@
1  
-YUI.add("base-base",function(d){var g=d.Object,h=d.Lang,o=".",q="destroy",b="init",r="initialized",m="destroyed",n="initializer",j="bubbleTargets",e="_bubbleTargets",a=Object.prototype.constructor,c="deep",p="shallow",k="destructor",f=d.Attribute,l=function(v,u,t){var w;for(w in u){if(t[w]){v[w]=u[w];}}return v;};function i(){d.stamp(this);f.call(this);var s=d.Plugin&&d.Plugin.Host;if(this._initPlugins&&s){s.call(this);}if(this._lazyAddAttrs!==false){this._lazyAddAttrs=true;}this.name=this.constructor.NAME;this._eventPrefix=this.constructor.EVENT_PREFIX||this.constructor.NAME;this.init.apply(this,arguments);}i._ATTR_CFG=f._ATTR_CFG.concat("cloneDefaultValue");i._ATTR_CFG_HASH=d.Array.hash(i._ATTR_CFG);i.NAME="base";i.ATTRS={initialized:{readOnly:true,value:false},destroyed:{readOnly:true,value:false}};i.prototype={init:function(s){this._yuievt.config.prefix=this._eventPrefix;this.publish(b,{queuable:false,fireOnce:true,defaultTargetOnly:true,defaultFn:this._defInitFn});this._preInitEventCfg(s);this.fire(b,{cfg:s});return this;},_preInitEventCfg:function(t){if(t){if(t.on){this.on(t.on);}if(t.after){this.after(t.after);}}var u,s,w,v=(t&&j in t);if(v||e in this){w=v?(t&&t.bubbleTargets):this._bubbleTargets;if(h.isArray(w)){for(u=0,s=w.length;u<s;u++){this.addTarget(w[u]);}}else{if(w){this.addTarget(w);}}}},destroy:function(){this.publish(q,{queuable:false,fireOnce:true,defaultTargetOnly:true,defaultFn:this._defDestroyFn});this.fire(q);this.detachAll();return this;},_defInitFn:function(s){this._initHierarchy(s.cfg);if(this._initPlugins){this._initPlugins(s.cfg);}this._set(r,true);},_defDestroyFn:function(s){if(this._destroyPlugins){this._destroyPlugins();}this._destroyHierarchy();this._set(m,true);},_getClasses:function(){if(!this._classes){this._initHierarchyData();}return this._classes;},_getAttrCfgs:function(){if(!this._attrs){this._initHierarchyData();}return this._attrs;},_filterAttrCfgs:function(w,t){var u=null,s,v=w.ATTRS;if(v){for(s in v){if(t[s]){u=u||{};u[s]=t[s];t[s]=null;}}}return u;},_initHierarchyData:function(){var u=this.constructor,t=[],s=[];while(u){t[t.length]=u;if(u.ATTRS){s[s.length]=u.ATTRS;}u=u.superclass?u.superclass.constructor:null;}this._classes=t;this._attrs=this._aggregateAttrs(s);},_aggregateAttrs:function(z){var v,A,u,s,B,t,y,x=i._ATTR_CFG_HASH,w={};if(z){for(t=z.length-1;t>=0;--t){A=z[t];for(v in A){if(A.hasOwnProperty(v)){u=l({},A[v],x);s=u.value;y=u.cloneDefaultValue;if(s){if((y===undefined&&(a===s.constructor||h.isArray(s)))||y===c||y===true){u.value=d.clone(s);}else{if(y===p){u.value=d.merge(s);}}}B=null;if(v.indexOf(o)!==-1){B=v.split(o);v=B.shift();}if(B&&w[v]&&w[v].value){g.setValue(w[v].value,B,s);}else{if(!B){if(!w[v]){w[v]=u;}else{l(w[v],u,x);}}}}}}}return w;},_initHierarchy:function(y){var u=this._lazyAddAttrs,z,A,C,w,t,B,x,v=this._getClasses(),s=this._getAttrCfgs();for(C=v.length-1;C>=0;C--){z=v[C];A=z.prototype;x=z._yuibuild&&z._yuibuild.exts;if(x){for(w=0,t=x.length;w<t;w++){x[w].apply(this,arguments);}}this.addAttrs(this._filterAttrCfgs(z,s),y,u);if(A.hasOwnProperty(n)){A.initializer.apply(this,arguments);}if(x){for(w=0;w<t;w++){B=x[w].prototype;if(B.hasOwnProperty(n)){B.initializer.apply(this,arguments);}}}}},_destroyHierarchy:function(){var w,x,A,y,u,s,v,z,t=this._getClasses();for(A=0,y=t.length;A<y;A++){w=t[A];x=w.prototype;v=w._yuibuild&&w._yuibuild.exts;if(v){for(u=0,s=v.length;u<s;u++){z=v[u].prototype;if(z.hasOwnProperty(k)){z.destructor.apply(this,arguments);}}}if(x.hasOwnProperty(k)){x.destructor.apply(this,arguments);}}},toString:function(){return this.name+"["+d.stamp(this,true)+"]";}};d.mix(i,f,false,null,1);i.prototype.constructor=i;d.Base=i;},"@VERSION@",{requires:["attribute-base"]});
  1
+YUI.add("base-base",function(d){var g=d.Object,h=d.Lang,o=".",q="destroy",b="init",r="initialized",m="destroyed",n="initializer",j="bubbleTargets",e="_bubbleTargets",a=Object.prototype.constructor,c="deep",p="shallow",k="destructor",f=d.Attribute,l=function(v,u,t){var w;for(w in u){if(t[w]){v[w]=u[w];}}return v;};function i(){if(!this._BaseInvoked){this._BaseInvoked=true;d.stamp(this);f.call(this);var s=d.Plugin&&d.Plugin.Host;if(this._initPlugins&&s){s.call(this);}if(this._lazyAddAttrs!==false){this._lazyAddAttrs=true;}this.name=this.constructor.NAME;this._eventPrefix=this.constructor.EVENT_PREFIX||this.constructor.NAME;this.init.apply(this,arguments);}}i._ATTR_CFG=f._ATTR_CFG.concat("cloneDefaultValue");i._ATTR_CFG_HASH=d.Array.hash(i._ATTR_CFG);i.NAME="base";i.ATTRS={initialized:{readOnly:true,value:false},destroyed:{readOnly:true,value:false}};i.prototype={init:function(s){this._yuievt.config.prefix=this._eventPrefix;this.publish(b,{queuable:false,fireOnce:true,defaultTargetOnly:true,defaultFn:this._defInitFn});this._preInitEventCfg(s);this.fire(b,{cfg:s});return this;},_preInitEventCfg:function(t){if(t){if(t.on){this.on(t.on);}if(t.after){this.after(t.after);}}var u,s,w,v=(t&&j in t);if(v||e in this){w=v?(t&&t.bubbleTargets):this._bubbleTargets;if(h.isArray(w)){for(u=0,s=w.length;u<s;u++){this.addTarget(w[u]);}}else{if(w){this.addTarget(w);}}}},destroy:function(){this.publish(q,{queuable:false,fireOnce:true,defaultTargetOnly:true,defaultFn:this._defDestroyFn});this.fire(q);this.detachAll();return this;},_defInitFn:function(s){this._initHierarchy(s.cfg);if(this._initPlugins){this._initPlugins(s.cfg);}this._set(r,true);},_defDestroyFn:function(s){if(this._destroyPlugins){this._destroyPlugins();}this._destroyHierarchy();this._set(m,true);},_getClasses:function(){if(!this._classes){this._initHierarchyData();}return this._classes;},_getAttrCfgs:function(){if(!this._attrs){this._initHierarchyData();}return this._attrs;},_filterAttrCfgs:function(w,t){var u=null,s,v=w.ATTRS;if(v){for(s in v){if(t[s]){u=u||{};u[s]=t[s];t[s]=null;}}}return u;},_initHierarchyData:function(){var u=this.constructor,t=[],s=[];while(u){t[t.length]=u;if(u.ATTRS){s[s.length]=u.ATTRS;}u=u.superclass?u.superclass.constructor:null;}this._classes=t;this._attrs=this._aggregateAttrs(s);},_aggregateAttrs:function(z){var v,A,u,s,B,t,y,x=i._ATTR_CFG_HASH,w={};if(z){for(t=z.length-1;t>=0;--t){A=z[t];for(v in A){if(A.hasOwnProperty(v)){u=l({},A[v],x);s=u.value;y=u.cloneDefaultValue;if(s){if((y===undefined&&(a===s.constructor||h.isArray(s)))||y===c||y===true){u.value=d.clone(s);}else{if(y===p){u.value=d.merge(s);}}}B=null;if(v.indexOf(o)!==-1){B=v.split(o);v=B.shift();}if(B&&w[v]&&w[v].value){g.setValue(w[v].value,B,s);}else{if(!B){if(!w[v]){w[v]=u;}else{l(w[v],u,x);}}}}}}}return w;},_initHierarchy:function(y){var u=this._lazyAddAttrs,z,A,C,w,t,B,x,v=this._getClasses(),s=this._getAttrCfgs();for(C=v.length-1;C>=0;C--){z=v[C];A=z.prototype;x=z._yuibuild&&z._yuibuild.exts;if(x){for(w=0,t=x.length;w<t;w++){x[w].apply(this,arguments);}}this.addAttrs(this._filterAttrCfgs(z,s),y,u);if(A.hasOwnProperty(n)){A.initializer.apply(this,arguments);}if(x){for(w=0;w<t;w++){B=x[w].prototype;if(B.hasOwnProperty(n)){B.initializer.apply(this,arguments);}}}}},_destroyHierarchy:function(){var w,x,A,y,u,s,v,z,t=this._getClasses();for(A=0,y=t.length;A<y;A++){w=t[A];x=w.prototype;v=w._yuibuild&&w._yuibuild.exts;if(v){for(u=0,s=v.length;u<s;u++){z=v[u].prototype;if(z.hasOwnProperty(k)){z.destructor.apply(this,arguments);}}}if(x.hasOwnProperty(k)){x.destructor.apply(this,arguments);}}},toString:function(){return this.name+"["+d.stamp(this,true)+"]";}};d.mix(i,f,false,null,1);i.prototype.constructor=i;d.Base=i;},"@VERSION@",{requires:["attribute-base"]});
54  build/base-base/base-base.js
@@ -82,32 +82,36 @@ YUI.add('base-base', function(Y) {
82 82
      * </dl>
83 83
      */
84 84
     function Base() {
85  
-
86  
-        // So the object can be used as a hash key (as DD does)
87  
-        Y.stamp(this);
88  
-
89  
-        Attribute.call(this);
90  
-
91  
-        // If Plugin.Host has been augmented [ through base-pluginhost ], setup it's
92  
-        // initial state, but don't initialize Plugins yet. That's done after initialization.
93  
-        var PluginHost = Y.Plugin && Y.Plugin.Host;  
94  
-        if (this._initPlugins && PluginHost) {
95  
-            PluginHost.call(this);
  85
+        if (!this._BaseInvoked) {
  86
+            this._BaseInvoked = true;
  87
+
  88
+    
  89
+            // So the object can be used as a hash key (as DD does)
  90
+            Y.stamp(this);
  91
+    
  92
+            Attribute.call(this);
  93
+    
  94
+            // If Plugin.Host has been augmented [ through base-pluginhost ], setup it's
  95
+            // initial state, but don't initialize Plugins yet. That's done after initialization.
  96
+            var PluginHost = Y.Plugin && Y.Plugin.Host;  
  97
+            if (this._initPlugins && PluginHost) {
  98
+                PluginHost.call(this);
  99
+            }
  100
+    
  101
+            if (this._lazyAddAttrs !== false) { this._lazyAddAttrs = true; }
  102
+    
  103
+            /**
  104
+             * The string used to identify the class of this object.
  105
+             *
  106
+             * @deprecated Use this.constructor.NAME
  107
+             * @property name
  108
+             * @type String
  109
+             */
  110
+            this.name = this.constructor.NAME;
  111
+            this._eventPrefix = this.constructor.EVENT_PREFIX || this.constructor.NAME;
  112
+    
  113
+            this.init.apply(this, arguments);
96 114
         }
97  
-
98  
-        if (this._lazyAddAttrs !== false) { this._lazyAddAttrs = true; }
99  
-
100  
-        /**
101  
-         * The string used to identify the class of this object.
102  
-         *
103  
-         * @deprecated Use this.constructor.NAME
104  
-         * @property name
105  
-         * @type String
106  
-         */
107  
-        this.name = this.constructor.NAME;
108  
-        this._eventPrefix = this.constructor.EVENT_PREFIX || this.constructor.NAME;
109  
-
110  
-        this.init.apply(this, arguments);
111 115
     }
112 116
 
113 117
     /**
BIN  build/clickable-rail/assets/thumb-x-oblong-dark.png
BIN  build/clickable-rail/assets/thumb-x-oblong.png
BIN  build/clickable-rail/assets/thumb-x-oblong2-dark.png
BIN  build/clickable-rail/assets/thumb-x-oblong2.png
BIN  build/clickable-rail/assets/thumb-y-oblong-dark.png
BIN  build/clickable-rail/assets/thumb-y-oblong.png
BIN  build/clickable-rail/assets/thumb-y-oblong2-dark.png
BIN  build/clickable-rail/assets/thumb-y-oblong2.png
1  build/controller/controller-min.js
... ...
@@ -1 +0,0 @@
1  
-YUI.add("controller",function(a){var h=a.HistoryHash,e=a.Lang,b=a.QueryString,j=a.Array,f=a.HistoryBase.html5&&(!a.UA.android||a.UA.android>=3),g=a.config.win,k=g.location,i=[],d="ready";function c(){c.superclass.constructor.apply(this,arguments);}a.Controller=a.extend(c,a.Base,{html5:f,root:"",routes:[],_regexPathParam:/([:*])([\w-]+)/g,_regexUrlQuery:/\?([^#]*).*$/,_regexUrlStrip:/^https?:\/\/[^\/]*/i,initializer:function(m){var l=this;m||(m={});m.routes&&(l.routes=m.routes);e.isValue(m.root)&&(l.root=m.root);l._routes=[];j.each(l.routes,function(n){l.route(n.path,n.callback);});if(f){l._history=new a.HistoryHTML5({force:true});l._history.after("change",l._afterHistoryChange,l);}else{a.on("hashchange",l._afterHistoryChange,g,l);}l.publish(d,{defaultFn:l._defReadyFn,fireOnce:true,preventable:false});l.once("initializedChange",function(){a.once("load",function(){setTimeout(function(){l.fire(d,{dispatched:!!l._dispatched});},20);});});},destructor:function(){if(f){this._history.detachAll();}else{a.detach("hashchange",this._afterHistoryChange,g);}},dispatch:function(){this.once(d,function(){this._ready=true;if(f&&this.upgrade()){return;}else{this._dispatch(this._getPath());}});return this;},getPath:function(){return this._getPath();},hasRoute:function(l){return !!this.match(l).length;},match:function(l){return j.filter(this._routes,function(m){return l.search(m.regex)>-1;});},removeRoot:function(m){var l=this.root;m=m.replace(this._regexUrlStrip,"");if(l&&m.indexOf(l)===0){m=m.substring(l.length);}return m.charAt(0)==="/"?m:"/"+m;},replace:function(l){return this._queue(l,true);},route:function(m,n){var l=[];this._routes.push({callback:n,keys:l,path:m,regex:this._getRegex(m,l)});return this;},save:function(l){return this._queue(l);},upgrade:f?function(){var l=this._getHashPath();if(l&&l.charAt(0)==="/"){this.once(d,function(){this.replace(l);});return true;}return false;}:function(){return false;},_decode:function(l){return decodeURIComponent(l.replace(/\+/g," "));},_dequeue:function(){var l=this,m;if(!YUI.Env.windowLoaded){a.once("load",function(){l._dequeue();});return this;}m=i.shift();return m?m():this;},_dispatch:function(o){var m=this,l=m.match(o),n;m._dispatching=m._dispatched=true;if(!l||!l.length){m._dispatching=false;return m;}n=m._getRequest(o);n.next=function(q){var s,r,p;if(q){a.error(q);}else{if((p=l.shift())){r=p.regex.exec(o);s=typeof p.callback==="string"?m[p.callback]:p.callback;if(r.length===p.keys.length+1){n.params=j.hash(p.keys,r.slice(1));}else{n.params=r.concat();}s.call(m,n,n.next);}}};n.next();m._dispatching=false;return m._dequeue();},_getHashPath:function(){return h.getHash().replace(this._regexUrlQuery,"");},_getPath:f?function(){return this.removeRoot(k.pathname);}:function(){return this._getHashPath()||this.removeRoot(k.pathname);},_getQuery:f?function(){return k.search.substring(1);}:function(){var m=h.getHash(),l=m.match(this._regexUrlQuery);return m&&l?l[1]:k.search.substring(1);},_getRegex:function(m,l){if(m instanceof RegExp){return m;}m=m.replace(this._regexPathParam,function(o,n,p){l.push(p);return n==="*"?"(.*?)":"([^/]*)";});return new RegExp("^"+m+"$");},_getRequest:function(l){return{path:l,query:this._parseQuery(this._getQuery())};},_joinURL:function(m){var l=this.root;if(m.charAt(0)==="/"){m=m.substring(1);}return l&&l.charAt(l.length-1)==="/"?l+m:l+"/"+m;},_parseQuery:b&&b.parse?b.parse:function(o){var p=this._decode,r=o.split("&"),n=0,m=r.length,l={},q;for(;n<m;++n){q=r[n].split("=");if(q[0]){l[p(q[0])]=p(q[1]||"");}}return l;},_queue:function(){var m=arguments,l=this;i.push(function(){if(f){if(a.UA.ios&&a.UA.ios<5){l._save.apply(l,m);}else{setTimeout(function(){l._save.apply(l,m);},1);}}else{l._dispatching=true;l._save.apply(l,m);}return l;});return !this._dispatching?this._dequeue():this;},_save:f?function(l,m){this._ready=true;this._history[m?"replace":"add"](null,{url:typeof l==="string"?this._joinURL(l):l});return this;}:function(l,m){this._ready=true;if(typeof l==="string"&&l.charAt(0)!=="/"){l="/"+l;}h[m?"replaceHash":"setHash"](l);return this;},_afterHistoryChange:function(m){var l=this;if(l._ready){l._dispatch(l._getPath());}},_defReadyFn:function(l){this._ready=true;}},{NAME:"controller"});},"@VERSION@",{optional:["querystring-parse"],requires:["array-extras","base-build","history"]});
3  build/dd-ddm/dd-ddm-debug.js
@@ -50,6 +50,9 @@ YUI.add('dd-ddm', function(Y) {
50 50
         * @description Activates the shim
51 51
         */
52 52
         _pg_activate: function() {
  53
+            if (!this._pg) {
  54
+                this._createPG();
  55
+            }
53 56
             var ah = this.activeDrag.get('activeHandle'), cur = 'auto';
54 57
             if (ah) {
55 58
                 cur = ah.getStyle('cursor');
2  build/dd-ddm/dd-ddm-min.js
... ...
@@ -1 +1 @@
1  
-YUI.add("dd-ddm",function(a){a.mix(a.DD.DDM,{_pg:null,_debugShim:false,_activateTargets:function(){},_deactivateTargets:function(){},_startDrag:function(){if(this.activeDrag&&this.activeDrag.get("useShim")){this._pg_activate();this._activateTargets();}},_endDrag:function(){this._pg_deactivate();this._deactivateTargets();},_pg_deactivate:function(){this._pg.setStyle("display","none");},_pg_activate:function(){var b=this.activeDrag.get("activeHandle"),c="auto";if(b){c=b.getStyle("cursor");}if(c=="auto"){c=this.get("dragCursor");}this._pg_size();this._pg.setStyles({top:0,left:0,display:"block",opacity:((this._debugShim)?".5":"0"),cursor:c});},_pg_size:function(){if(this.activeDrag){var c=a.one("body"),e=c.get("docHeight"),d=c.get("docWidth");this._pg.setStyles({height:e+"px",width:d+"px"});}},_createPG:function(){var d=a.Node.create("<div></div>"),b=a.one("body"),c;d.setStyles({top:"0",left:"0",position:"absolute",zIndex:"9999",overflow:"hidden",backgroundColor:"red",display:"none",height:"5px",width:"5px"});d.set("id",a.stamp(d));d.addClass(a.DD.DDM.CSS_PREFIX+"-shim");b.prepend(d);this._pg=d;this._pg.on("mousemove",a.throttle(a.bind(this._move,this),this.get("throttleTime")));this._pg.on("mouseup",a.bind(this._end,this));c=a.one("win");a.on("window:resize",a.bind(this._pg_size,this));c.on("scroll",a.bind(this._pg_size,this));}},true);},"@VERSION@",{skinnable:false,requires:["dd-ddm-base","event-resize"]});
  1
+YUI.add("dd-ddm",function(a){a.mix(a.DD.DDM,{_pg:null,_debugShim:false,_activateTargets:function(){},_deactivateTargets:function(){},_startDrag:function(){if(this.activeDrag&&this.activeDrag.get("useShim")){this._pg_activate();this._activateTargets();}},_endDrag:function(){this._pg_deactivate();this._deactivateTargets();},_pg_deactivate:function(){this._pg.setStyle("display","none");},_pg_activate:function(){if(!this._pg){this._createPG();}var b=this.activeDrag.get("activeHandle"),c="auto";if(b){c=b.getStyle("cursor");}if(c=="auto"){c=this.get("dragCursor");}this._pg_size();this._pg.setStyles({top:0,left:0,display:"block",opacity:((this._debugShim)?".5":"0"),cursor:c});},_pg_size:function(){if(this.activeDrag){var c=a.one("body"),e=c.get("docHeight"),d=c.get("docWidth");this._pg.setStyles({height:e+"px",width:d+"px"});}},_createPG:function(){var d=a.Node.create("<div></div>"),b=a.one("body"),c;d.setStyles({top:"0",left:"0",position:"absolute",zIndex:"9999",overflow:"hidden",backgroundColor:"red",display:"none",height:"5px",width:"5px"});d.set("id",a.stamp(d));d.addClass(a.DD.DDM.CSS_PREFIX+"-shim");b.prepend(d);this._pg=d;this._pg.on("mousemove",a.throttle(a.bind(this._move,this),this.get("throttleTime")));this._pg.on("mouseup",a.bind(this._end,this));c=a.one("win");a.on("window:resize",a.bind(this._pg_size,this));c.on("scroll",a.bind(this._pg_size,this));}},true);},"@VERSION@",{skinnable:false,requires:["dd-ddm-base","event-resize"]});
3  build/dd-ddm/dd-ddm.js
@@ -50,6 +50,9 @@ YUI.add('dd-ddm', function(Y) {
50 50
         * @description Activates the shim
51 51
         */
52 52
         _pg_activate: function() {
  53
+            if (!this._pg) {
  54
+                this._createPG();
  55
+            }
53 56
             var ah = this.activeDrag.get('activeHandle'), cur = 'auto';
54 57
             if (ah) {
55 58
                 cur = ah.getStyle('cursor');
6  build/dd-drag/dd-drag-debug.js
@@ -969,6 +969,7 @@ YUI.add('dd-drag', function(Y) {
969 969
         * @description Internal init handler
970 970
         */
971 971
         initializer: function(cfg) {
  972
+
972 973
             this.get(NODE).dd = this;
973 974
 
974 975
             if (!this.get(NODE).get('id')) {
@@ -1014,7 +1015,9 @@ YUI.add('dd-drag', function(Y) {
1014 1015
         _unprep: function() {
1015 1016
             var node = this.get(NODE);
1016 1017
             node.removeClass(DDM.CSS_PREFIX + '-draggable');
1017  
-            node.detachAll();
  1018
+            node.detachAll('mouseup');
  1019
+            node.detachAll('dragstart');
  1020
+            node.detachAll(Drag.START_EVENT);
1018 1021
         },
1019 1022
         /**
1020 1023
         * @method start
@@ -1238,7 +1241,6 @@ YUI.add('dd-drag', function(Y) {
1238 1241
         */
1239 1242
         destructor: function() {
1240 1243
             this._unprep();
1241  
-            this.detachAll();
1242 1244
             if (this.target) {
1243 1245
                 this.target.destroy();
1244 1246
             }
2  build/dd-drag/dd-drag-min.js
... ...
@@ -1,2 +1,2 @@
1 1
 YUI.add("dd-drag",function(d){var e=d.DD.DDM,r="node",g="dragging",m="dragNode",c="offsetHeight",k="offsetWidth",h="drag:mouseDown",b="drag:afterMouseDown",f="drag:removeHandle",l="drag:addHandle",p="drag:removeInvalid",q="drag:addInvalid",j="drag:start",i="drag:end",n="drag:drag",o="drag:align",a=function(t){this._lazyAddAttrs=false;a.superclass.constructor.apply(this,arguments);var s=e._regDrag(this);if(!s){d.error("Failed to register node, already in use: "+t.node);}};a.NAME="drag";a.START_EVENT="mousedown";a.ATTRS={node:{setter:function(s){if(this._canDrag(s)){return s;}var t=d.one(s);if(!t){d.error("DD.Drag: Invalid Node Given: "+s);}return t;}},dragNode:{setter:function(s){if(this._canDrag(s)){return s;}var t=d.one(s);if(!t){d.error("DD.Drag: Invalid dragNode Given: "+s);}return t;}},offsetNode:{value:true},startCentered:{value:false},clickPixelThresh:{value:e.get("clickPixelThresh")},clickTimeThresh:{value:e.get("clickTimeThresh")},lock:{value:false,setter:function(s){if(s){this.get(r).addClass(e.CSS_PREFIX+"-locked");}else{this.get(r).removeClass(e.CSS_PREFIX+"-locked");}return s;}},data:{value:false},move:{value:true},useShim:{value:true},activeHandle:{value:false},primaryButtonOnly:{value:true},dragging:{value:false},parent:{value:false},target:{value:false,setter:function(s){this._handleTarget(s);return s;}},dragMode:{value:null,setter:function(s){return e._setDragMode(s);}},groups:{value:["default"],getter:function(){if(!this._groups){this._groups={};}var s=[];d.each(this._groups,function(u,t){s[s.length]=t;});return s;},setter:function(s){this._groups={};d.each(s,function(u,t){this._groups[u]=true;},this);return s;}},handles:{value:null,setter:function(s){if(s){this._handles={};d.each(s,function(u,t){var w=u;if(u instanceof d.Node||u instanceof d.NodeList){w=u._yuid;}this._handles[w]=u;},this);}else{this._handles=null;}return s;}},bubbles:{setter:function(s){this.addTarget(s);return s;}},haltDown:{value:true}};d.extend(a,d.Base,{_canDrag:function(s){if(s&&s.setXY&&s.getXY&&s.test&&s.contains){return true;}return false;},_bubbleTargets:d.DD.DDM,addToGroup:function(s){this._groups[s]=true;e._activateTargets();return this;},removeFromGroup:function(s){delete this._groups[s];e._activateTargets();return this;},target:null,_handleTarget:function(s){if(d.DD.Drop){if(s===false){if(this.target){e._unregTarget(this.target);this.target=null;}return false;}else{if(!d.Lang.isObject(s)){s={};}s.bubbleTargets=("bubbleTargets" in s)?s.bubbleTargets:d.Object.values(this._yuievt.targets);s.node=this.get(r);s.groups=s.groups||this.get("groups");this.target=new d.DD.Drop(s);}}else{return false;}},_groups:null,_createEvents:function(){this.publish(h,{defaultFn:this._defMouseDownFn,queuable:false,emitFacade:true,bubbles:true,prefix:"drag"});this.publish(o,{defaultFn:this._defAlignFn,queuable:false,emitFacade:true,bubbles:true,prefix:"drag"});this.publish(n,{defaultFn:this._defDragFn,queuable:false,emitFacade:true,bubbles:true,prefix:"drag"});this.publish(i,{defaultFn:this._defEndFn,preventedFn:this._prevEndFn,queuable:false,emitFacade:true,bubbles:true,prefix:"drag"});var s=[b,f,l,p,q,j,"drag:drophit","drag:dropmiss","drag:over","drag:enter","drag:exit"];d.each(s,function(u,t){this.publish(u,{type:u,emitFacade:true,bubbles:true,preventable:false,queuable:false,prefix:"drag"});},this);},_ev_md:null,_startTime:null,_endTime:null,_handles:null,_invalids:null,_invalidsDefault:{"textarea":true,"input":true,"a":true,"button":true,"select":true},_dragThreshMet:null,_fromTimeout:null,_clickTimeout:null,deltaXY:null,startXY:null,nodeXY:null,lastXY:null,actXY:null,realXY:null,mouseXY:null,region:null,_handleMouseUp:function(s){this.fire("drag:mouseup");this._fixIEMouseUp();if(e.activeDrag){e._end();}},_fixDragStart:function(s){s.preventDefault();},_ieSelectFix:function(){return false;},_ieSelectBack:null,_fixIEMouseDown:function(s){if(d.UA.ie){this._ieSelectBack=d.config.doc.body.onselectstart;d.config.doc.body.onselectstart=this._ieSelectFix;}},_fixIEMouseUp:function(){if(d.UA.ie){d.config.doc.body.onselectstart=this._ieSelectBack;}},_handleMouseDownEvent:function(s){this.fire(h,{ev:s});},_defMouseDownFn:function(t){var s=t.ev;this._dragThreshMet=false;this._ev_md=s;if(this.get("primaryButtonOnly")&&s.button>1){return false;}if(this.validClick(s)){this._fixIEMouseDown(s);if(this.get("haltDown")){s.halt();}else{s.preventDefault();}this._setStartPosition([s.pageX,s.pageY]);e.activeDrag=this;this._clickTimeout=d.later(this.get("clickTimeThresh"),this,this._timeoutCheck);}this.fire(b,{ev:s});},validClick:function(w){var v=false,z=false,s=w.target,u=null,t=null,x=null,y=false;if(this._handles){d.each(this._handles,function(A,B){if(A instanceof d.Node||A instanceof d.NodeList){if(!v){x=A;if(x instanceof d.Node){x=new d.NodeList(A._node);}x.each(function(C){if(C.contains(s)){v=true;}});}}else{if(d.Lang.isString(B)){if(s.test(B+", "+B+" *")&&!u){u=B;v=true;}}}});}else{z=this.get(r);if(z.contains(s)||z.compareTo(s)){v=true;}}if(v){if(this._invalids){d.each(this._invalids,function(A,B){if(d.Lang.isString(B)){if(s.test(B+", "+B+" *")){v=false;}}});}}if(v){if(u){t=w.currentTarget.all(u);y=false;t.each(function(B,A){if((B.contains(s)||B.compareTo(s))&&!y){y=true;this.set("activeHandle",B);}},this);}else{this.set("activeHandle",this.get(r));}}return v;},_setStartPosition:function(s){this.startXY=s;this.nodeXY=this.lastXY=this.realXY=this.get(r).getXY();if(this.get("offsetNode")){this.deltaXY=[(this.startXY[0]-this.nodeXY[0]),(this.startXY[1]-this.nodeXY[1])];}else{this.deltaXY=[0,0];}},_timeoutCheck:function(){if(!this.get("lock")&&!this._dragThreshMet&&this._ev_md){this._fromTimeout=this._dragThreshMet=true;this.start();this._alignNode([this._ev_md.pageX,this._ev_md.pageY],true);}},removeHandle:function(t){var s=t;if(t instanceof d.Node||t instanceof d.NodeList){s=t._yuid;}if(this._handles[s]){delete this._handles[s];this.fire(f,{handle:t});}return this;},addHandle:function(t){if(!this._handles){this._handles={};}var s=t;
2  
-if(t instanceof d.Node||t instanceof d.NodeList){s=t._yuid;}this._handles[s]=t;this.fire(l,{handle:t});return this;},removeInvalid:function(s){if(this._invalids[s]){this._invalids[s]=null;delete this._invalids[s];this.fire(p,{handle:s});}return this;},addInvalid:function(s){if(d.Lang.isString(s)){this._invalids[s]=true;this.fire(q,{handle:s});}return this;},initializer:function(s){this.get(r).dd=this;if(!this.get(r).get("id")){var t=d.stamp(this.get(r));this.get(r).set("id",t);}this.actXY=[];this._invalids=d.clone(this._invalidsDefault,true);this._createEvents();if(!this.get(m)){this.set(m,this.get(r));}this.on("initializedChange",d.bind(this._prep,this));this.set("groups",this.get("groups"));},_prep:function(){this._dragThreshMet=false;var s=this.get(r);s.addClass(e.CSS_PREFIX+"-draggable");s.on(a.START_EVENT,d.bind(this._handleMouseDownEvent,this));s.on("mouseup",d.bind(this._handleMouseUp,this));s.on("dragstart",d.bind(this._fixDragStart,this));},_unprep:function(){var s=this.get(r);s.removeClass(e.CSS_PREFIX+"-draggable");s.detachAll();},start:function(){if(!this.get("lock")&&!this.get(g)){var t=this.get(r),s,u,v;this._startTime=(new Date()).getTime();e._start();t.addClass(e.CSS_PREFIX+"-dragging");this.fire(j,{pageX:this.nodeXY[0],pageY:this.nodeXY[1],startTime:this._startTime});t=this.get(m);v=this.nodeXY;s=t.get(k);u=t.get(c);if(this.get("startCentered")){this._setStartPosition([v[0]+(s/2),v[1]+(u/2)]);}this.region={"0":v[0],"1":v[1],area:0,top:v[1],right:v[0]+s,bottom:v[1]+u,left:v[0]};this.set(g,true);}return this;},end:function(){this._endTime=(new Date()).getTime();if(this._clickTimeout){this._clickTimeout.cancel();}this._dragThreshMet=this._fromTimeout=false;if(!this.get("lock")&&this.get(g)){this.fire(i,{pageX:this.lastXY[0],pageY:this.lastXY[1],startTime:this._startTime,endTime:this._endTime});}this.get(r).removeClass(e.CSS_PREFIX+"-dragging");this.set(g,false);this.deltaXY=[0,0];return this;},_defEndFn:function(s){this._fixIEMouseUp();this._ev_md=null;},_prevEndFn:function(s){this._fixIEMouseUp();this.get(m).setXY(this.nodeXY);this._ev_md=null;this.region=null;},_align:function(s){this.fire(o,{pageX:s[0],pageY:s[1]});},_defAlignFn:function(s){this.actXY=[s.pageX-this.deltaXY[0],s.pageY-this.deltaXY[1]];},_alignNode:function(s){this._align(s);this._moveNode();},_moveNode:function(s){var t=[],u=[],w=this.nodeXY,v=this.actXY;t[0]=(v[0]-this.lastXY[0]);t[1]=(v[1]-this.lastXY[1]);u[0]=(v[0]-this.nodeXY[0]);u[1]=(v[1]-this.nodeXY[1]);this.region={"0":v[0],"1":v[1],area:0,top:v[1],right:v[0]+this.get(m).get(k),bottom:v[1]+this.get(m).get(c),left:v[0]};this.fire(n,{pageX:v[0],pageY:v[1],scroll:s,info:{start:w,xy:v,delta:t,offset:u}});this.lastXY=v;},_defDragFn:function(s){if(this.get("move")){if(s.scroll){s.scroll.node.set("scrollTop",s.scroll.top);s.scroll.node.set("scrollLeft",s.scroll.left);}this.get(m).setXY([s.pageX,s.pageY]);this.realXY=[s.pageX,s.pageY];}},_move:function(u){if(this.get("lock")){return false;}else{this.mouseXY=[u.pageX,u.pageY];if(!this._dragThreshMet){var t=Math.abs(this.startXY[0]-u.pageX),s=Math.abs(this.startXY[1]-u.pageY);if(t>this.get("clickPixelThresh")||s>this.get("clickPixelThresh")){this._dragThreshMet=true;this.start();this._alignNode([u.pageX,u.pageY]);}}else{if(this._clickTimeout){this._clickTimeout.cancel();}this._alignNode([u.pageX,u.pageY]);}}},stopDrag:function(){if(this.get(g)){e._end();}return this;},destructor:function(){this._unprep();this.detachAll();if(this.target){this.target.destroy();}e._unregDrag(this);}});d.namespace("DD");d.DD.Drag=a;},"@VERSION@",{skinnable:false,requires:["dd-ddm-base"]});
  2
+if(t instanceof d.Node||t instanceof d.NodeList){s=t._yuid;}this._handles[s]=t;this.fire(l,{handle:t});return this;},removeInvalid:function(s){if(this._invalids[s]){this._invalids[s]=null;delete this._invalids[s];this.fire(p,{handle:s});}return this;},addInvalid:function(s){if(d.Lang.isString(s)){this._invalids[s]=true;this.fire(q,{handle:s});}return this;},initializer:function(s){this.get(r).dd=this;if(!this.get(r).get("id")){var t=d.stamp(this.get(r));this.get(r).set("id",t);}this.actXY=[];this._invalids=d.clone(this._invalidsDefault,true);this._createEvents();if(!this.get(m)){this.set(m,this.get(r));}this.on("initializedChange",d.bind(this._prep,this));this.set("groups",this.get("groups"));},_prep:function(){this._dragThreshMet=false;var s=this.get(r);s.addClass(e.CSS_PREFIX+"-draggable");s.on(a.START_EVENT,d.bind(this._handleMouseDownEvent,this));s.on("mouseup",d.bind(this._handleMouseUp,this));s.on("dragstart",d.bind(this._fixDragStart,this));},_unprep:function(){var s=this.get(r);s.removeClass(e.CSS_PREFIX+"-draggable");s.detachAll("mouseup");s.detachAll("dragstart");s.detachAll(a.START_EVENT);},start:function(){if(!this.get("lock")&&!this.get(g)){var t=this.get(r),s,u,v;this._startTime=(new Date()).getTime();e._start();t.addClass(e.CSS_PREFIX+"-dragging");this.fire(j,{pageX:this.nodeXY[0],pageY:this.nodeXY[1],startTime:this._startTime});t=this.get(m);v=this.nodeXY;s=t.get(k);u=t.get(c);if(this.get("startCentered")){this._setStartPosition([v[0]+(s/2),v[1]+(u/2)]);}this.region={"0":v[0],"1":v[1],area:0,top:v[1],right:v[0]+s,bottom:v[1]+u,left:v[0]};this.set(g,true);}return this;},end:function(){this._endTime=(new Date()).getTime();if(this._clickTimeout){this._clickTimeout.cancel();}this._dragThreshMet=this._fromTimeout=false;if(!this.get("lock")&&this.get(g)){this.fire(i,{pageX:this.lastXY[0],pageY:this.lastXY[1],startTime:this._startTime,endTime:this._endTime});}this.get(r).removeClass(e.CSS_PREFIX+"-dragging");this.set(g,false);this.deltaXY=[0,0];return this;},_defEndFn:function(s){this._fixIEMouseUp();this._ev_md=null;},_prevEndFn:function(s){this._fixIEMouseUp();this.get(m).setXY(this.nodeXY);this._ev_md=null;this.region=null;},_align:function(s){this.fire(o,{pageX:s[0],pageY:s[1]});},_defAlignFn:function(s){this.actXY=[s.pageX-this.deltaXY[0],s.pageY-this.deltaXY[1]];},_alignNode:function(s){this._align(s);this._moveNode();},_moveNode:function(s){var t=[],u=[],w=this.nodeXY,v=this.actXY;t[0]=(v[0]-this.lastXY[0]);t[1]=(v[1]-this.lastXY[1]);u[0]=(v[0]-this.nodeXY[0]);u[1]=(v[1]-this.nodeXY[1]);this.region={"0":v[0],"1":v[1],area:0,top:v[1],right:v[0]+this.get(m).get(k),bottom:v[1]+this.get(m).get(c),left:v[0]};this.fire(n,{pageX:v[0],pageY:v[1],scroll:s,info:{start:w,xy:v,delta:t,offset:u}});this.lastXY=v;},_defDragFn:function(s){if(this.get("move")){if(s.scroll){s.scroll.node.set("scrollTop",s.scroll.top);s.scroll.node.set("scrollLeft",s.scroll.left);}this.get(m).setXY([s.pageX,s.pageY]);this.realXY=[s.pageX,s.pageY];}},_move:function(u){if(this.get("lock")){return false;}else{this.mouseXY=[u.pageX,u.pageY];if(!this._dragThreshMet){var t=Math.abs(this.startXY[0]-u.pageX),s=Math.abs(this.startXY[1]-u.pageY);if(t>this.get("clickPixelThresh")||s>this.get("clickPixelThresh")){this._dragThreshMet=true;this.start();this._alignNode([u.pageX,u.pageY]);}}else{if(this._clickTimeout){this._clickTimeout.cancel();}this._alignNode([u.pageX,u.pageY]);}}},stopDrag:function(){if(this.get(g)){e._end();}return this;},destructor:function(){this._unprep();if(this.target){this.target.destroy();}e._unregDrag(this);}});d.namespace("DD");d.DD.Drag=a;},"@VERSION@",{skinnable:false,requires:["dd-ddm-base"]});
6  build/dd-drag/dd-drag.js
@@ -966,6 +966,7 @@ YUI.add('dd-drag', function(Y) {
966 966
         * @description Internal init handler
967 967
         */
968 968
         initializer: function(cfg) {
  969
+
969 970
             this.get(NODE).dd = this;
970 971
 
971 972
             if (!this.get(NODE).get('id')) {
@@ -1011,7 +1012,9 @@ YUI.add('dd-drag', function(Y) {
1011 1012
         _unprep: function() {
1012 1013
             var node = this.get(NODE);
1013 1014
             node.removeClass(DDM.CSS_PREFIX + '-draggable');
1014  
-            node.detachAll();
  1015
+            node.detachAll('mouseup');
  1016
+            node.detachAll('dragstart');
  1017
+            node.detachAll(Drag.START_EVENT);
1015 1018
         },
1016 1019
         /**
1017 1020
         * @method start
@@ -1235,7 +1238,6 @@ YUI.add('dd-drag', function(Y) {
1235 1238
         */
1236 1239
         destructor: function() {
1237 1240
             this._unprep();
1238  
-            this.detachAll();
1239 1241
             if (this.target) {
1240 1242
                 this.target.destroy();
1241 1243
             }
2  build/dd-plugin/dd-plugin-debug.js
@@ -154,4 +154,4 @@ YUI.add('dd-plugin', function(Y) {
154 154
 
155 155
 
156 156
 
157  
-}, '@VERSION@' ,{optional:['dd-constrain', 'dd-proxy'], requires:['dd-drag'], skinnable:false});
  157
+}, '@VERSION@' ,{skinnable:false, optional:['dd-constrain', 'dd-proxy'], requires:['dd-drag']});
2  build/dd-plugin/dd-plugin-min.js
... ...
@@ -1 +1 @@
1  
-YUI.add("dd-plugin",function(c){var a=function(e){if(c.Widget&&e.host instanceof c.Widget){e.node=e.host.get("boundingBox");e.widget=e.host;}else{e.node=e.host;e.widget=false;}a.superclass.constructor.call(this,e);},b="drag:drag",d="drag:end";a.NAME="dd-plugin";a.NS="dd";c.extend(a,c.DD.Drag,{_widget:undefined,_stoppedPosition:undefined,_usesWidgetPosition:function(f){var e=false;if(f){e=(f.hasImpl&&f.hasImpl(c.WidgetPosition))?true:false;}return e;},initializer:function(e){this._widget=e.widget;if(this._usesWidgetPosition(this._widget)){this.on(b,this._setWidgetCoords);this.on(d,this._updateStopPosition);}},_setWidgetCoords:function(i){var h=this._stoppedPosition||i.target.nodeXY,f=i.target.realXY,g=[f[0]-h[0],f[1]-h[0]];if(g[0]!==0&&g[1]!==0){this._widget.set("xy",f);}else{if(g[0]===0){this._widget.set("y",f[1]);}else{if(g[1]===0){this._widget.set("x",f[0]);}}}},updateStopPosition:function(f){this._stoppedPosition=f.target.realXY;}});c.namespace("Plugin");c.Plugin.Drag=a;},"@VERSION@",{optional:["dd-constrain","dd-proxy"],requires:["dd-drag"],skinnable:false});
  1
+YUI.add("dd-plugin",function(c){var a=function(e){if(c.Widget&&e.host instanceof c.Widget){e.node=e.host.get("boundingBox");e.widget=e.host;}else{e.node=e.host;e.widget=false;}a.superclass.constructor.call(this,e);},b="drag:drag",d="drag:end";a.NAME="dd-plugin";a.NS="dd";c.extend(a,c.DD.Drag,{_widget:undefined,_stoppedPosition:undefined,_usesWidgetPosition:function(f){var e=false;if(f){e=(f.hasImpl&&f.hasImpl(c.WidgetPosition))?true:false;}return e;},initializer:function(e){this._widget=e.widget;if(this._usesWidgetPosition(this._widget)){this.on(b,this._setWidgetCoords);this.on(d,this._updateStopPosition);}},_setWidgetCoords:function(i){var h=this._stoppedPosition||i.target.nodeXY,f=i.target.realXY,g=[f[0]-h[0],f[1]-h[0]];if(g[0]!==0&&g[1]!==0){this._widget.set("xy",f);}else{if(g[0]===0){this._widget.set("y",f[1]);}else{if(g[1]===0){this._widget.set("x",f[0]);}}}},updateStopPosition:function(f){this._stoppedPosition=f.target.realXY;}});c.namespace("Plugin");c.Plugin.Drag=a;},"@VERSION@",{skinnable:false,optional:["dd-constrain","dd-proxy"],requires:["dd-drag"]});
2  build/dd-plugin/dd-plugin.js
@@ -154,4 +154,4 @@ YUI.add('dd-plugin', function(Y) {
154 154
 
155 155
 
156 156
 
157  
-}, '@VERSION@' ,{optional:['dd-constrain', 'dd-proxy'], requires:['dd-drag'], skinnable:false});
  157
+}, '@VERSION@' ,{skinnable:false, optional:['dd-constrain', 'dd-proxy'], requires:['dd-drag']});
2  build/dd-scroll/dd-scroll-debug.js
@@ -424,4 +424,4 @@ YUI.add('dd-scroll', function(Y) {
424 424
 
425 425
 
426 426
 
427  
-}, '@VERSION@' ,{optional:['dd-proxy'], requires:['dd-drag'], skinnable:false});
  427
+}, '@VERSION@' ,{skinnable:false, optional:['dd-proxy'], requires:['dd-drag']});
2  build/dd-scroll/dd-scroll-min.js
... ...
@@ -1 +1 @@
1  
-YUI.add("dd-scroll",function(b){var h=function(){h.superclass.constructor.apply(this,arguments);},c,d,l="host",a="buffer",j="parentScroll",g="windowScroll",i="scrollTop",f="scrollLeft",e="offsetWidth",k="offsetHeight";h.ATTRS={parentScroll:{value:false,setter:function(m){if(m){return m;}return false;}},buffer:{value:30,validator:b.Lang.isNumber},scrollDelay:{value:235,validator:b.Lang.isNumber},host:{value:null},windowScroll:{value:false,validator:b.Lang.isBoolean},vertical:{value:true,validator:b.Lang.isBoolean},horizontal:{value:true,validator:b.Lang.isBoolean}};b.extend(h,b.Base,{_scrolling:null,_vpRegionCache:null,_dimCache:null,_scrollTimer:null,_getVPRegion:function(){var m={},o=this.get(j),u=this.get(a),s=this.get(g),y=((s)?[]:o.getXY()),v=((s)?"winWidth":e),q=((s)?"winHeight":k),x=((s)?o.get(i):y[1]),p=((s)?o.get(f):y[0]);m={top:x+u,right:(o.get(v)+p)-u,bottom:(o.get(q)+x)-u,left:p+u};this._vpRegionCache=m;return m;},initializer:function(){var m=this.get(l);m.after("drag:start",b.bind(this.start,this));m.after("drag:end",b.bind(this.end,this));m.on("drag:align",b.bind(this.align,this));b.one("win").on("scroll",b.bind(function(){this._vpRegionCache=null;},this));},_checkWinScroll:function(A){var z=this._getVPRegion(),m=this.get(l),o=this.get(g),t=m.lastXY,n=false,F=this.get(a),s=this.get(j),H=s.get(i),v=s.get(f),x=this._dimCache.w,C=this._dimCache.h,u=t[1]+C,y=t[1],E=t[0]+x,q=t[0],G=y,p=q,B=H,D=v;if(this.get("horizontal")){if(q<=z.left){n=true;p=t[0]-((o)?F:0);D=v-F;}if(E>=z.right){n=true;p=t[0]+((o)?F:0);D=v+F;}}if(this.get("vertical")){if(u>=z.bottom){n=true;G=t[1]+((o)?F:0);B=H+F;}if(y<=z.top){n=true;G=t[1]-((o)?F:0);B=H-F;}}if(B<0){B=0;G=t[1];}if(D<0){D=0;p=t[0];}if(G<0){G=t[1];}if(p<0){p=t[0];}if(A){m.actXY=[p,G];m._moveNode({node:s,top:B,left:D});if(!B&&!D){this._cancelScroll();}}else{if(n){this._initScroll();}else{this._cancelScroll();}}},_initScroll:function(){this._cancelScroll();this._scrollTimer=b.Lang.later(this.get("scrollDelay"),this,this._checkWinScroll,[true],true);},_cancelScroll:function(){this._scrolling=false;if(this._scrollTimer){this._scrollTimer.cancel();delete this._scrollTimer;}},align:function(m){if(this._scrolling){this._cancelScroll();m.preventDefault();}if(!this._scrolling){this._checkWinScroll();}},_setDimCache:function(){var m=this.get(l).get("dragNode");this._dimCache={h:m.get(k),w:m.get(e)};},start:function(){this._setDimCache();},end:function(m){this._dimCache=null;this._cancelScroll();},toString:function(){return h.NAME+" #"+this.get("node").get("id");}});b.namespace("Plugin");c=function(){c.superclass.constructor.apply(this,arguments);};c.ATTRS=b.merge(h.ATTRS,{windowScroll:{value:true,setter:function(m){if(m){this.set(j,b.one("win"));}return m;}}});b.extend(c,h,{initializer:function(){this.set("windowScroll",this.get("windowScroll"));}});c.NAME=c.NS="winscroll";b.Plugin.DDWinScroll=c;d=function(){d.superclass.constructor.apply(this,arguments);};d.ATTRS=b.merge(h.ATTRS,{node:{value:false,setter:function(m){var o=b.one(m);if(!o){if(m!==false){b.error("DDNodeScroll: Invalid Node Given: "+m);}}else{this.set(j,o);}return o;}}});b.extend(d,h,{initializer:function(){this.set("node",this.get("node"));}});d.NAME=d.NS="nodescroll";b.Plugin.DDNodeScroll=d;b.DD.Scroll=h;},"@VERSION@",{optional:["dd-proxy"],requires:["dd-drag"],skinnable:false});
  1
+YUI.add("dd-scroll",function(b){var h=function(){h.superclass.constructor.apply(this,arguments);},c,d,l="host",a="buffer",j="parentScroll",g="windowScroll",i="scrollTop",f="scrollLeft",e="offsetWidth",k="offsetHeight";h.ATTRS={parentScroll:{value:false,setter:function(m){if(m){return m;}return false;}},buffer:{value:30,validator:b.Lang.isNumber},scrollDelay:{value:235,validator:b.Lang.isNumber},host:{value:null},windowScroll:{value:false,validator:b.Lang.isBoolean},vertical:{value:true,validator:b.Lang.isBoolean},horizontal:{value:true,validator:b.Lang.isBoolean}};b.extend(h,b.Base,{_scrolling:null,_vpRegionCache:null,_dimCache:null,_scrollTimer:null,_getVPRegion:function(){var m={},o=this.get(j),u=this.get(a),s=this.get(g),y=((s)?[]:o.getXY()),v=((s)?"winWidth":e),q=((s)?"winHeight":k),x=((s)?o.get(i):y[1]),p=((s)?o.get(f):y[0]);m={top:x+u,right:(o.get(v)+p)-u,bottom:(o.get(q)+x)-u,left:p+u};this._vpRegionCache=m;return m;},initializer:function(){var m=this.get(l);m.after("drag:start",b.bind(this.start,this));m.after("drag:end",b.bind(this.end,this));m.on("drag:align",b.bind(this.align,this));b.one("win").on("scroll",b.bind(function(){this._vpRegionCache=null;},this));},_checkWinScroll:function(A){var z=this._getVPRegion(),m=this.get(l),o=this.get(g),t=m.lastXY,n=false,F=this.get(a),s=this.get(j),H=s.get(i),v=s.get(f),x=this._dimCache.w,C=this._dimCache.h,u=t[1]+C,y=t[1],E=t[0]+x,q=t[0],G=y,p=q,B=H,D=v;if(this.get("horizontal")){if(q<=z.left){n=true;p=t[0]-((o)?F:0);D=v-F;}if(E>=z.right){n=true;p=t[0]+((o)?F:0);D=v+F;}}if(this.get("vertical")){if(u>=z.bottom){n=true;G=t[1]+((o)?F:0);B=H+F;}if(y<=z.top){n=true;G=t[1]-((o)?F:0);B=H-F;}}if(B<0){B=0;G=t[1];}if(D<0){D=0;p=t[0];}if(G<0){G=t[1];}if(p<0){p=t[0];}if(A){m.actXY=[p,G];m._moveNode({node:s,top:B,left:D});if(!B&&!D){this._cancelScroll();}}else{if(n){this._initScroll();}else{this._cancelScroll();}}},_initScroll:function(){this._cancelScroll();this._scrollTimer=b.Lang.later(this.get("scrollDelay"),this,this._checkWinScroll,[true],true);},_cancelScroll:function(){this._scrolling=false;if(this._scrollTimer){this._scrollTimer.cancel();delete this._scrollTimer;}},align:function(m){if(this._scrolling){this._cancelScroll();m.preventDefault();}if(!this._scrolling){this._checkWinScroll();}},_setDimCache:function(){var m=this.get(l).get("dragNode");this._dimCache={h:m.get(k),w:m.get(e)};},start:function(){this._setDimCache();},end:function(m){this._dimCache=null;this._cancelScroll();},toString:function(){return h.NAME+" #"+this.get("node").get("id");}});b.namespace("Plugin");c=function(){c.superclass.constructor.apply(this,arguments);};c.ATTRS=b.merge(h.ATTRS,{windowScroll:{value:true,setter:function(m){if(m){this.set(j,b.one("win"));}return m;}}});b.extend(c,h,{initializer:function(){this.set("windowScroll",this.get("windowScroll"));}});c.NAME=c.NS="winscroll";b.Plugin.DDWinScroll=c;d=function(){d.superclass.constructor.apply(this,arguments);};d.ATTRS=b.merge(h.ATTRS,{node:{value:false,setter:function(m){var o=b.one(m);if(!o){if(m!==false){b.error("DDNodeScroll: Invalid Node Given: "+m);}}else{this.set(j,o);}return o;}}});b.extend(d,h,{initializer:function(){this.set("node",this.get("node"));}});d.NAME=d.NS="nodescroll";b.Plugin.DDNodeScroll=d;b.DD.Scroll=h;},"@VERSION@",{skinnable:false,optional:["dd-proxy"],requires:["dd-drag"]});
2  build/dd-scroll/dd-scroll.js
@@ -424,4 +424,4 @@ YUI.add('dd-scroll', function(Y) {
424 424
 
425 425
 
426 426
 
427  
-}, '@VERSION@' ,{optional:['dd-proxy'], requires:['dd-drag'], skinnable:false});
  427
+}, '@VERSION@' ,{skinnable:false, optional:['dd-proxy'], requires:['dd-drag']});
111  build/dial/dial-debug.js
@@ -414,6 +414,26 @@ YUI.add('dial', function(Y) {
414 414
         },
415 415
         
416 416
         /**
  417
+         * Handles the mouseenter on the centerButton
  418
+         * 
  419
+         * @method _handleCenterButtonEnter
  420
+         * @protected
  421
+         */
  422
+        _handleCenterButtonEnter : function(){
  423
+            this._resetString.removeClass(Dial.CSS_CLASSES.hidden);    
  424
+        },                                                     
  425
+        
  426
+        /**
  427
+         * Handles the mouseleave on the centerButton
  428
+         * 
  429
+         * @method _handleCenterButtonLeave
  430
+         * @protected
  431
+         */
  432
+        _handleCenterButtonLeave : function(){
  433
+            this._resetString.addClass(Dial.CSS_CLASSES.hidden);    
  434
+        },                                                     
  435
+        
  436
+        /**
417 437
          * Creates the Y.DD.Drag instance used for the handle movement and
418 438
          * binds Dial interaction to the configured value model.
419 439
          *
@@ -435,14 +455,15 @@ YUI.add('dial', function(Y) {
435 455
 
436 456
             Y.on("key", Y.bind(this._onDirectionKey, this), boundingBox, keyEventSpec);
437 457
             Y.on("key", Y.bind(this._onLeftRightKey, this), boundingBox, keyLeftRightSpec);
438  
-            Y.on('mouseenter', function(){this.one('.' + Dial.CSS_CLASSES.resetString).removeClass(Dial.CSS_CLASSES.hidden);}, this._centerButtonNode);
439  
-            Y.on('mouseleave', function(){this.one('.' + Dial.CSS_CLASSES.resetString).addClass(Dial.CSS_CLASSES.hidden);}, this._centerButtonNode);
  458
+            Y.on('mouseenter', Y.bind(this._handleCenterButtonEnter, this), this._centerButtonNode);
  459
+            Y.on('mouseleave', Y.bind(this._handleCenterButtonLeave, this), this._centerButtonNode);
440 460
             // Needed to replace mousedown/up with gesturemovestart/end to make behavior on touch devices work the same.
441 461
             Y.on('gesturemovestart', Y.bind(this._resetDial, this), this._centerButtonNode);  //[#2530441]    
442  
-            Y.on('gesturemoveend', Y.bind(function(){this._handleNode.focus();}, this), this._centerButtonNode); 
443  
-            Y.on('gesturemovestart', Y.bind(function(){this._handleNode.focus();}, this), this._handleNode);
  462
+            Y.on('gesturemoveend', Y.bind(this._handleCenterButtonMouseup, this), this._centerButtonNode); 
  463
+            Y.on('gesturemovestart', Y.bind(this._handleHandleMousedown, this), this._handleNode);
  464
+
444 465
             Y.on('gesturemovestart', Y.bind(this._handleMousedown, this), this._ringNode); // [#2530766] 
445  
-            Y.on('gesturemoveend', Y.bind(function(){this._handleNode.focus();}, this), this._ringNode); // [#2530206] // need to re-focus on the handle so keyboard is accessible
  466
+            Y.on('gesturemoveend', Y.bind(this._handleRingMouseup, this), this._ringNode);
446 467
 
447 468
             this._dd1 = new Y.DD.Drag({ //// [#2530206] changed global this._dd1 from just var dd1 = new Y.DD.drag so 
448 469
                 node: this._handleNode,
@@ -481,24 +502,56 @@ YUI.add('dial', function(Y) {
481 502
          * @protected
482 503
          */
483 504
         _getAngleFromHandleCenter : function(handleCenterX, handleCenterY){
484  
-            var ang = Math.atan( (this._centerYOnPage - handleCenterY)  /  (this._centerXOnPage - handleCenterX)  ) * (180 / Math.PI); 
485  
-            ang = ((this._centerXOnPage - handleCenterX) < 0) ? ang + 90 : ang + 90 + 180; // Compensate for neg angles from Math.atan
  505
+            var ang = Math.atan( (this._dialCenterY - handleCenterY)  /  (this._dialCenterX - handleCenterX)  ) * (180 / Math.PI); 
  506
+            ang = ((this._dialCenterX - handleCenterX) < 0) ? ang + 90 : ang + 90 + 180; // Compensate for neg angles from Math.atan
486 507
             return ang;
487 508
         },
488 509
         
489 510
         /**
490  
-         * recalculates the XY of the center of the dial. 
  511
+         * calculates the XY of the center of the dial relative to the ring node. 
491 512
          * This is needed for calculating the angle of the handle
492 513
          *
493  
-         * @method _recalculateDialCenter
  514
+         * @method _calculateDialCenter
494 515
          * @protected
495 516
          */
496  
-        _recalculateDialCenter : function(){ // #2531111 value, and marker don't track handle when dial position changes on page (resize when inline)
497  
-            this._centerYOnPage = (this._ringNode.getY() + this._ringNodeRadius);
498  
-            this._centerXOnPage = (this._ringNode.getX() + this._ringNodeRadius);                     
  517
+        _calculateDialCenter : function(){ // #2531111 value, and marker don't track handle when dial position changes on page (resize when inline)
  518
+            this._dialCenterX = this._ringNode.get('offsetWidth') / 2;                     
  519
+            this._dialCenterY = this._ringNode.get('offsetHeight') / 2;
499 520
         },
500 521
         
501 522
         /**
  523
+         * Handles the mouseup on the ring
  524
+         * 
  525
+         * @method _handleRingMouseup
  526
+         * @protected
  527
+         */
  528
+        _handleRingMouseup : function(){
  529
+            this._handleNode.focus();  // need to re-focus on the handle so keyboard is accessible [#2530206] 
  530
+        },                                                     
  531
+        
  532
+        /**
  533
+         * Handles the mouseup on the centerButton
  534
+         * 
  535
+         * @method _handleCenterButtonMouseup
  536
+         * @protected
  537
+         */
  538
+        _handleCenterButtonMouseup : function(){
  539
+            this._handleNode.focus();  // need to re-focus on the handle so keyboard is accessible [#2530206]  
  540
+        },                                                     
  541
+        
  542
+        /**
  543
+         * Handles the mousedown on the handle
  544
+         * 
  545
+         * @method _handleHandleMousedown
  546
+         * @protected
  547
+         */
  548
+        _handleHandleMousedown : function(){
  549
+            this._handleNode.focus();  // need to re-focus on the handle so keyboard is accessible [#2530206]
  550
+            // this is better done here instead of on _handleDragEnd 
  551
+            // because we should make the keyboard accessible after a click of the handle  
  552
+        },                                                     
  553
+        
  554
+        /**
502 555
          * handles the user dragging the handle around the Dial, gets the angle, 
503 556
          * checks for wrapping around top center.
504 557
          * Sets the new value of the Dial
@@ -508,15 +561,16 @@ YUI.add('dial', function(Y) {
508 561
          * @protected
509 562
          */
510 563
         _handleDrag : function(e){
511  
-            var handleCenterX,   // changes for [#2530206]
512  
-            handleCenterY,   // changes for [#2530206]
  564
+            var handleCenterX,
  565
+            handleCenterY,
513 566
             ang,
514 567
             newValue;
515 568
 
516  
-            // [#2530206] The center of the handle is different relative to the XY of the mousedown event, compared to the drag:drag event. 
517  
-            // the event was emitted from drag:drag of handle. The center of the handle is e.pageX + radius, e.pageY + radius
518  
-            handleCenterX = e.pageX + this._handleNodeRadius;
519  
-            handleCenterY = e.pageY + this._handleNodeRadius;
  569
+            // The event was emitted from drag:drag of handle. 
  570
+            // The center of the handle is top left position of the handle node + radius of handle.
  571
+            // This is different than a mousedown on the ring.
  572
+            handleCenterX = (parseInt(this._handleNode.getStyle('left'),10) + this._handleNodeRadius);
  573
+            handleCenterY = (parseInt(this._handleNode.getStyle('top'),10) + this._handleNodeRadius);
520 574
             ang = this._getAngleFromHandleCenter(handleCenterX, handleCenterY);
521 575
 
522 576
             // check for need to set timesWrapped
@@ -548,7 +602,7 @@ YUI.add('dial', function(Y) {
548 602
         },
549 603
 
550 604
         /**
551  
-         * handles a mousedown or gesturemovestart event on the ringNode
  605
+         * handles a mousedown or gesturemovestart event on the ring node
552 606
          *
553 607
          * @method _handleMousedown
554 608
          * @param e {DOMEvent} the event object
@@ -558,12 +612,18 @@ YUI.add('dial', function(Y) {
558 612
             var minAng = this._getAngleFromValue(this._minValue),
559 613
             maxAng = this._getAngleFromValue(this._maxValue),
560 614
             newValue, oppositeMidRangeAngle,
  615
+            handleCenterX, handleCenterY, 
561 616
             ang;
562  
-            
563  
-            this._recalculateDialCenter(); // #2531111 in case the Dial has moved to a new XY due to browser resize, etc.
564  
-            // the event was emitted from mousedown on ring, so center should be the XY of mousedown.
565  
-            var handleCenterX = e.pageX,
566  
-            handleCenterY = e.pageY;
  617
+
  618
+            // The event was emitted from mousedown on the ring node,
  619
+            // so the center of the handle should be the XY of mousedown. 
  620
+            if(Y.UA.ios){  // ios adds the scrollLeft and top onto clientX and Y in a native click
  621
+                handleCenterX = (e.clientX - this._ringNode.getX());
  622
+                handleCenterY = (e.clientY - this._ringNode.getY());
  623
+            }else{
  624
+                handleCenterX = (e.clientX + Y.one('document').get('scrollLeft') - this._ringNode.getX());
  625
+                handleCenterY = (e.clientY + Y.one('document').get('scrollTop') - this._ringNode.getY());
  626
+            }
567 627
             ang = this._getAngleFromHandleCenter(handleCenterX, handleCenterY);
568 628
              
569 629
             /* ///////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -704,7 +764,6 @@ YUI.add('dial', function(Y) {
704 764
          */
705 765
         _handleDragStart : function(e){
706 766
             this._markerNode.removeClass(Dial.CSS_CLASSES.hidden);
707  
-            this._recalculateDialCenter(); // #2531111 in case the Dial has moved to a new XY due to browser resize, etc.
708 767
         },
709 768
 
710 769
         /*
@@ -778,7 +837,7 @@ YUI.add('dial', function(Y) {
778 837
             // We would have used visibility:hidden in the css of this class, 
779 838
             // but IE8 VML never returns to visible after applying visibility:hidden then removing it.
780 839
             this._setSizes();
781  
-            this._recalculateDialCenter(); // #2531111 initialize center of dial
  840
+            this._calculateDialCenter(); // #2531111 initialize center of dial
782 841
             this._setBorderRadius();
783 842
             this._uiSetValue(this.get("value"));
784 843
             this._markerNode.addClass(Dial.CSS_CLASSES.hidden);
6  build/dial/dial-min.js
... ...
@@ -1,3 +1,3 @@
1  
-YUI.add("dial",function(h){var g=false;if(h.UA.ie&&h.UA.ie<9){g=true;}var e=h.Lang,d=h.Widget,b=h.Node;function a(i){a.superclass.constructor.apply(this,arguments);}a.NAME="dial";a.ATTRS={min:{value:-220},max:{value:220},diameter:{value:100},handleDiameter:{value:0.2},markerDiameter:{value:0.1},centerButtonDiameter:{value:0.5},value:{value:0,validator:function(i){return this._validateValue(i);}},minorStep:{value:1},majorStep:{value:10},stepsPerRevolution:{value:100},decimalPlaces:{value:0},strings:{valueFn:function(){return h.Intl.get("dial");}},handleDistance:{value:0.75}};function c(i){return h.ClassNameManager.getClassName(a.NAME,i);}a.CSS_CLASSES={label:c("label"),labelString:c("label-string"),valueString:c("value-string"),northMark:c("north-mark"),ring:c("ring"),ringVml:c("ring-vml"),marker:c("marker"),markerVml:c("marker-vml"),markerMaxMin:c("marker-max-min"),centerButton:c("center-button"),centerButtonVml:c("center-button-vml"),resetString:c("reset-string"),handle:c("handle"),handleVml:c("handle-vml"),hidden:c("hidden"),dragging:h.ClassNameManager.getClassName("dd-dragging")};var f=a.CSS_CLASSES.label+h.guid();a.LABEL_TEMPLATE='<div id="'+f+'" class="'+a.CSS_CLASSES.label+'"><span class="'+a.CSS_CLASSES.labelString+'">{label}</span><span class="'+a.CSS_CLASSES.valueString+'"></span></div>';if(g===false){a.RING_TEMPLATE='<div class="'+a.CSS_CLASSES.ring+'"><div class="'+a.CSS_CLASSES.northMark+'"></div></div>';a.MARKER_TEMPLATE='<div class="'+a.CSS_CLASSES.marker+" "+a.CSS_CLASSES.hidden+'"></div>';a.CENTER_BUTTON_TEMPLATE='<div class="'+a.CSS_CLASSES.centerButton+'"><div class="'+a.CSS_CLASSES.resetString+" "+a.CSS_CLASSES.hidden+'">{resetStr}</div></div>';a.HANDLE_TEMPLATE='<div class="'+a.CSS_CLASSES.handle+'" aria-labelledby="'+f+'" aria-valuetext="" aria-valuemax="" aria-valuemin="" aria-valuenow="" role="slider"  tabindex="0" title="{tooltipHandle}">';}else{a.RING_TEMPLATE='<div class="'+a.CSS_CLASSES.ring+" "+a.CSS_CLASSES.ringVml+'">'+'<div class="'+a.CSS_CLASSES.northMark+'"></div>'+'<v:oval strokecolor="#ceccc0" strokeweight="1px"><v:fill type=gradient color="#8B8A7F" color2="#EDEDEB" angle="45"/></v:oval>'+"</div>"+"";a.MARKER_TEMPLATE='<div class="'+a.CSS_CLASSES.markerVml+" "+a.CSS_CLASSES.hidden+'">'+'<v:oval stroked="false">'+'<v:fill opacity="20%" color="#000"/>'+"</v:oval>"+"</div>"+"";a.CENTER_BUTTON_TEMPLATE='<div class="'+a.CSS_CLASSES.centerButton+" "+a.CSS_CLASSES.centerButtonVml+'">'+'<v:oval strokecolor="#ceccc0" strokeweight="1px">'+'<v:fill type=gradient color="#C7C5B9" color2="#fefcf6" colors="35% #d9d7cb, 65% #fefcf6" angle="45"/>'+'<v:shadow on="True" color="#000" opacity="10%" offset="2px, 2px"/>'+"</v:oval>"+'<div class="'+a.CSS_CLASSES.resetString+" "+a.CSS_CLASSES.hidden+'">{resetStr}</div>'+"</div>"+"";a.HANDLE_TEMPLATE='<div class="'+a.CSS_CLASSES.handleVml+'" aria-labelledby="'+f+'" aria-valuetext="" aria-valuemax="" aria-valuemin="" aria-valuenow="" role="slider"  tabindex="0" title="{tooltipHandle}">'+'<v:oval stroked="false">'+'<v:fill opacity="20%" color="#6C3A3A"/>'+"</v:oval>"+"</div>"+"";}h.extend(a,d,{renderUI:function(){this._renderLabel();this._renderRing();this._renderMarker();this._renderCenterButton();this._renderHandle();this.contentBox=this.get("contentBox");this._originalValue=this.get("value");this._minValue=this.get("min");this._maxValue=this.get("max");this._stepsPerRevolution=this.get("stepsPerRevolution");this._minTimesWrapped=(Math.floor(this._minValue/this._stepsPerRevolution-1));this._maxTimesWrapped=(Math.floor(this._maxValue/this._stepsPerRevolution+1));this._timesWrapped=0;this._angle=this._getAngleFromValue(this.get("value"));this._prevAng=this._angle;this._setTimesWrappedFromValue(this._originalValue);this._handleNode.set("aria-valuemin",this._minValue);this._handleNode.set("aria-valuemax",this._maxValue);},_setBorderRadius:function(){this._ringNode.setStyles({"WebkitBorderRadius":this._ringNodeRadius+"px","MozBorderRadius":this._ringNodeRadius+"px","borderRadius":this._ringNodeRadius+"px"});this._handleNode.setStyles({"WebkitBorderRadius":this._handleNodeRadius+"px","MozBorderRadius":this._handleNodeRadius+"px","borderRadius":this._handleNodeRadius+"px"});this._markerNode.setStyles({"WebkitBorderRadius":this._markerNodeRadius+"px","MozBorderRadius":this._markerNodeRadius+"px","borderRadius":this._markerNodeRadius+"px"});this._centerButtonNode.setStyles({"WebkitBorderRadius":this._centerButtonNodeRadius+"px","MozBorderRadius":this._centerButtonNodeRadius+"px","borderRadius":this._centerButtonNodeRadius+"px"});},bindUI:function(){this.after("valueChange",this._afterValueChange);var i=this.get("boundingBox"),j=(!h.UA.opera)?"down:":"press:",k=(!h.UA.opera)?"down:":"press:";j+="38,40,33,34,35,36";k+="37,39";h.on("key",h.bind(this._onDirectionKey,this),i,j);h.on("key",h.bind(this._onLeftRightKey,this),i,k);h.on("mouseenter",function(){this.one("."+a.CSS_CLASSES.resetString).removeClass(a.CSS_CLASSES.hidden);},this._centerButtonNode);h.on("mouseleave",function(){this.one("."+a.CSS_CLASSES.resetString).addClass(a.CSS_CLASSES.hidden);},this._centerButtonNode);h.on("gesturemovestart",h.bind(this._resetDial,this),this._centerButtonNode);h.on("gesturemoveend",h.bind(function(){this._handleNode.focus();},this),this._centerButtonNode);h.on("gesturemovestart",h.bind(function(){this._handleNode.focus();},this),this._handleNode);h.on("gesturemovestart",h.bind(this._handleMousedown,this),this._ringNode);h.on("gesturemoveend",h.bind(function(){this._handleNode.focus();},this),this._ringNode);this._dd1=new h.DD.Drag({node:this._handleNode,on:{"drag:drag":h.bind(this._handleDrag,this),"drag:start":h.bind(this._handleDragStart,this),"drag:end":h.bind(this._handleDragEnd,this)}});h.bind(this._dd1.addHandle(this._ringNode),this);},_setTimesWrappedFromValue:function(i){if(i%this._stepsPerRevolution===0){this._timesWrapped=(i/this._stepsPerRevolution);}else{this._timesWrapped=Math.floor(i/this._stepsPerRevolution);}},_getAngleFromHandleCenter:function(k,j){var i=Math.atan((this._centerYOnPage-j)/(this._centerXOnPage-k))*(180/Math.PI);
2  
-i=((this._centerXOnPage-k)<0)?i+90:i+90+180;return i;},_recalculateDialCenter:function(){this._centerYOnPage=(this._ringNode.getY()+this._ringNodeRadius);this._centerXOnPage=(this._ringNode.getX()+this._ringNodeRadius);},_handleDrag:function(k){var m,l,i,j;m=k.pageX+this._handleNodeRadius;l=k.pageY+this._handleNodeRadius;i=this._getAngleFromHandleCenter(m,l);if((this._prevAng>270)&&(i<90)){if(this._timesWrapped<this._maxTimesWrapped){this._timesWrapped=(this._timesWrapped+1);}}else{if((this._prevAng<90)&&(i>270)){if(this._timesWrapped>this._minTimesWrapped){this._timesWrapped=(this._timesWrapped-1);}}}j=this._getValueFromAngle(i);if(j>(this._maxValue+this._stepsPerRevolution)){this._timesWrapped--;}else{if(j<(this._minValue-this._stepsPerRevolution)){this._timesWrapped++;}}this._prevAng=i;this._handleValuesBeyondMinMax(k,j);},_handleMousedown:function(n){var l=this._getAngleFromValue(this._minValue),k=this._getAngleFromValue(this._maxValue),m,j,i;this._recalculateDialCenter();var p=n.pageX,o=n.pageY;i=this._getAngleFromHandleCenter(p,o);if(this._maxValue-this._minValue>this._stepsPerRevolution){if(Math.abs(this._prevAng-i)>180){if((this._timesWrapped>this._minTimesWrapped)&&(this._timesWrapped<this._maxTimesWrapped)){this._timesWrapped=((this._prevAng-i)>0)?(this._timesWrapped+1):(this._timesWrapped-1);}}else{if((this._timesWrapped===this._minTimesWrapped)&&(i-this._prevAng<180)){this._timesWrapped++;}}}else{if(this._maxValue-this._minValue===this._stepsPerRevolution){if(i<l){this._timesWrapped=1;}else{this._timesWrapped=0;}}else{if(l>k){if((this._prevAng>=l)&&(i<=(l+k)/2)){this._timesWrapped++;}else{if((this._prevAng<=k)&&(i>(l+k)/2)){this._timesWrapped--;}}}else{if((i<l)||(i>k)){j=(((l+k)/2)+180)%360;if(j>180){m=((k<i)&&(i<j))?this.get("max"):this.get("min");}else{m=((l>i)&&(i>j))?this.get("min"):this.get("max");}this._prevAng=this._getAngleFromValue(m);this.set("value",m);this._setTimesWrappedFromValue(m);return;}}}}m=this._getValueFromAngle(i);this._prevAng=i;this._handleValuesBeyondMinMax(n,m);},_handleValuesBeyondMinMax:function(j,i){if((i>=this._minValue)&&(i<=this._maxValue)){this.set("value",i);if(j.currentTarget===this._ringNode){this._dd1._handleMouseDownEvent(j);}}else{if(i>this._maxValue){this.set("value",this._maxValue);if(j.type==="gesturemovestart"){this._prevAng=this._getAngleFromValue(this._maxValue);}}else{if(i<this._minValue){this.set("value",this._minValue);if(j.type==="gesturemovestart"){this._prevAng=this._getAngleFromValue(this._minValue);}}}}},_handleDragStart:function(i){this._markerNode.removeClass(a.CSS_CLASSES.hidden);this._recalculateDialCenter();},_handleDragEnd:function(){var i=this._handleNode;i.transition({duration:0.08,easing:"ease-in",left:this._setNodeToFixedRadius(this._handleNode,true)[0]+"px",top:this._setNodeToFixedRadius(this._handleNode,true)[1]+"px"},h.bind(function(){var j=this.get("value");if((j>this._minValue)&&(j<this._maxValue)){this._markerNode.addClass(a.CSS_CLASSES.hidden);}else{this._setTimesWrappedFromValue(j);this._prevAng=this._getAngleFromValue(j);}},this));},_setNodeToFixedRadius:function(l,o){var j=(this._angle-90),i=(Math.PI/180),k=Math.round(Math.sin(j*i)*this._handleDistance),n=Math.round(Math.cos(j*i)*this._handleDistance),m=l.get("offsetWidth");k=k-(m*0.5);n=n-(m*0.5);if(o){return[(this._ringNodeRadius+n),(this._ringNodeRadius+k)];}else{l.setStyle("left",(this._ringNodeRadius+n)+"px");l.setStyle("top",(this._ringNodeRadius+k)+"px");}},syncUI:function(){this._setSizes();this._recalculateDialCenter();this._setBorderRadius();this._uiSetValue(this.get("value"));this._markerNode.addClass(a.CSS_CLASSES.hidden);this._resetString.addClass(a.CSS_CLASSES.hidden);},_setSizes:function(){var l=this.get("diameter"),k,m,j,i=function(o,q,n){var p="px";o.getElementsByTagName("oval").setStyle("width",(q*n)+p);o.getElementsByTagName("oval").setStyle("height",(q*n)+p);o.setStyle("width",(q*n)+p);o.setStyle("height",(q*n)+p);};i(this._ringNode,l,1);i(this._handleNode,l,this.get("handleDiameter"));i(this._markerNode,l,this.get("markerDiameter"));i(this._centerButtonNode,l,this.get("centerButtonDiameter"));this._ringNodeRadius=this._ringNode.get("offsetWidth")*0.5;this._handleNodeRadius=this._handleNode.get("offsetWidth")*0.5;this._markerNodeRadius=this._markerNode.get("offsetWidth")*0.5;this._centerButtonNodeRadius=this._centerButtonNode.get("offsetWidth")*0.5;this._handleDistance=this._ringNodeRadius*this.get("handleDistance");k=(this._ringNodeRadius-this._centerButtonNodeRadius);this._centerButtonNode.setStyle("left",k+"px");this._centerButtonNode.setStyle("top",k+"px");m=(this._centerButtonNodeRadius-(this._resetString.get("offsetWidth")*0.5));j=(this._centerButtonNodeRadius-(this._resetString.get("offsetHeight")*0.5));this._resetString.setStyles({"left":m+"px","top":j+"px"});},_renderLabel:function(){var i=this.get("contentBox"),j=i.one("."+a.CSS_CLASSES.label);if(!j){j=b.create(h.substitute(a.LABEL_TEMPLATE,this.get("strings")));i.append(j);}this._labelNode=j;this._valueStringNode=this._labelNode.one("."+a.CSS_CLASSES.valueString);},_renderRing:function(){var i=this.get("contentBox"),j=i.one("."+a.CSS_CLASSES.ring);if(!j){j=i.appendChild(a.RING_TEMPLATE);j.setStyles({width:this.get("diameter")+"px",height:this.get("diameter")+"px"});}this._ringNode=j;},_renderMarker:function(){var j=this.get("contentBox"),i=j.one("."+a.CSS_CLASSES.marker);if(!i){i=j.one("."+a.CSS_CLASSES.ring).appendChild(a.MARKER_TEMPLATE);}this._markerNode=i;},_renderCenterButton:function(){var i=this.get("contentBox"),j=i.one("."+a.CSS_CLASSES.centerButton);if(!j){j=b.create(h.substitute(a.CENTER_BUTTON_TEMPLATE,this.get("strings")));i.one("."+a.CSS_CLASSES.ring).append(j);}this._centerButtonNode=j;this._resetString=this._centerButtonNode.one("."+a.CSS_CLASSES.resetString);},_renderHandle:function(){var i=this.get("contentBox"),j=i.one("."+a.CSS_CLASSES.handle);if(!j){j=b.create(h.substitute(a.HANDLE_TEMPLATE,this.get("strings")));i.one("."+a.CSS_CLASSES.ring).append(j);}this._handleNode=j;
3  
-},_setLabelString:function(i){this.get("contentBox").one("."+a.CSS_CLASSES.labelString).setContent(i);},_setResetString:function(i){this.get("contentBox").one("."+a.CSS_CLASSES.resetString).setContent(i);},_setTooltipString:function(i){this._handleNode.set("title",i);},_onDirectionKey:function(i){i.preventDefault();switch(i.charCode){case 38:this._incrMinor();break;case 40:this._decrMinor();break;case 36:this._resetDial();break;case 35:this._setToMax();break;case 33:this._incrMajor();break;case 34:this._decrMajor();break;}},_onLeftRightKey:function(i){i.preventDefault();switch(i.charCode){case 37:this._decrMinor();break;case 39:this._incrMinor();break;}},_incrMinor:function(){var i=(this.get("value")+this.get("minorStep"));i=Math.min(i,this.get("max"));this.set("value",i.toFixed(this.get("decimalPlaces"))-0);},_decrMinor:function(){var i=(this.get("value")-this.get("minorStep"));i=Math.max(i,this.get("min"));this.set("value",i.toFixed(this.get("decimalPlaces"))-0);},_incrMajor:function(){var i=(this.get("value")+this.get("majorStep"));i=Math.min(i,this.get("max"));this.set("value",i.toFixed(this.get("decimalPlaces"))-0);},_decrMajor:function(){var i=(this.get("value")-this.get("majorStep"));i=Math.max(i,this.get("min"));this.set("value",i.toFixed(this.get("decimalPlaces"))-0);},_setToMax:function(){this.set("value",this.get("max"));},_setToMin:function(){this.set("value",this.get("min"));},_resetDial:function(i){if(i){i.stopPropagation();}this.set("value",this._originalValue);this._resetString.addClass(a.CSS_CLASSES.hidden);this._handleNode.focus();},_getAngleFromValue:function(i){var k=i%this._stepsPerRevolution,j=k/this._stepsPerRevolution*360;return(j<0)?(j+360):j;},_getValueFromAngle:function(j){if(j<0){j=(360+j);}else{if(j===0){j=360;}}var i=(j/360)*this._stepsPerRevolution;i=(i+(this._timesWrapped*this._stepsPerRevolution));return i.toFixed(this.get("decimalPlaces"))-0;},_afterValueChange:function(i){this._uiSetValue(i.newVal);},_valueToDecimalPlaces:function(i){},_uiSetValue:function(i){this._angle=this._getAngleFromValue(i);if(this._handleNode.hasClass(a.CSS_CLASSES.dragging)===false){this._setTimesWrappedFromValue(i);this._setNodeToFixedRadius(this._handleNode,false);this._prevAng=this._getAngleFromValue(this.get("value"));}this._valueStringNode.setContent(i.toFixed(this.get("decimalPlaces")));this._handleNode.set("aria-valuenow",i);this._handleNode.set("aria-valuetext",i);this._setNodeToFixedRadius(this._markerNode,false);if((i===this._maxValue)||(i===this._minValue)){this._markerNode.addClass(a.CSS_CLASSES.markerMaxMin);if(g===true){this._markerNode.getElementsByTagName("fill").set("color","#AB3232");}this._markerNode.removeClass(a.CSS_CLASSES.hidden);}else{if(g===true){this._markerNode.getElementsByTagName("fill").set("color","#000");}this._markerNode.removeClass(a.CSS_CLASSES.markerMaxMin);if(this._handleNode.hasClass(a.CSS_CLASSES.dragging)===false){this._markerNode.addClass(a.CSS_CLASSES.hidden);}}},_validateValue:function(k){var j=this.get("min"),i=this.get("max");return(e.isNumber(k)&&k>=j&&k<=i);}});h.Dial=a;},"@VERSION@",{requires:["widget","dd-drag","substitute","event-mouseenter","event-move","event-key","transition","intl"],lang:["en","es"],skinnable:true});
  1
+YUI.add("dial",function(h){var g=false;if(h.UA.ie&&h.UA.ie<9){g=true;}var e=h.Lang,d=h.Widget,b=h.Node;function a(i){a.superclass.constructor.apply(this,arguments);}a.NAME="dial";a.ATTRS={min:{value:-220},max:{value:220},diameter:{value:100},handleDiameter:{value:0.2},markerDiameter:{value:0.1},centerButtonDiameter:{value:0.5},value:{value:0,validator:function(i){return this._validateValue(i);}},minorStep:{value:1},majorStep:{value:10},stepsPerRevolution:{value:100},decimalPlaces:{value:0},strings:{valueFn:function(){return h.Intl.get("dial");}},handleDistance:{value:0.75}};function c(i){return h.ClassNameManager.getClassName(a.NAME,i);}a.CSS_CLASSES={label:c("label"),labelString:c("label-string"),valueString:c("value-string"),northMark:c("north-mark"),ring:c("ring"),ringVml:c("ring-vml"),marker:c("marker"),markerVml:c("marker-vml"),markerMaxMin:c("marker-max-min"),centerButton:c("center-button"),centerButtonVml:c("center-button-vml"),resetString:c("reset-string"),handle:c("handle"),handleVml:c("handle-vml"),hidden:c("hidden"),dragging:h.ClassNameManager.getClassName("dd-dragging")};var f=a.CSS_CLASSES.label+h.guid();a.LABEL_TEMPLATE='<div id="'+f+'" class="'+a.CSS_CLASSES.label+'"><span class="'+a.CSS_CLASSES.labelString+'">{label}</span><span class="'+a.CSS_CLASSES.valueString+'"></span></div>';if(g===false){a.RING_TEMPLATE='<div class="'+a.CSS_CLASSES.ring+'"><div class="'+a.CSS_CLASSES.northMark+'"></div></div>';a.MARKER_TEMPLATE='<div class="'+a.CSS_CLASSES.marker+" "+a.CSS_CLASSES.hidden+'"></div>';a.CENTER_BUTTON_TEMPLATE='<div class="'+a.CSS_CLASSES.centerButton+'"><div class="'+a.CSS_CLASSES.resetString+" "+a.CSS_CLASSES.hidden+'">{resetStr}</div></div>';a.HANDLE_TEMPLATE='<div class="'+a.CSS_CLASSES.handle+'" aria-labelledby="'+f+'" aria-valuetext="" aria-valuemax="" aria-valuemin="" aria-valuenow="" role="slider"  tabindex="0" title="{tooltipHandle}">';}else{a.RING_TEMPLATE='<div class="'+a.CSS_CLASSES.ring+" "+a.CSS_CLASSES.ringVml+'">'+'<div class="'+a.CSS_CLASSES.northMark+'"></div>'+'<v:oval strokecolor="#ceccc0" strokeweight="1px"><v:fill type=gradient color="#8B8A7F" color2="#EDEDEB" angle="45"/></v:oval>'+"</div>"+"";a.MARKER_TEMPLATE='<div class="'+a.CSS_CLASSES.markerVml+" "+a.CSS_CLASSES.hidden+'">'+'<v:oval stroked="false">'+'<v:fill opacity="20%" color="#000"/>'+"</v:oval>"+"</div>"+"";a.CENTER_BUTTON_TEMPLATE='<div class="'+a.CSS_CLASSES.centerButton+" "+a.CSS_CLASSES.centerButtonVml+'">'+'<v:oval strokecolor="#ceccc0" strokeweight="1px">'+'<v:fill type=gradient color="#C7C5B9" color2="#fefcf6" colors="35% #d9d7cb, 65% #fefcf6" angle="45"/>'+'<v:shadow on="True" color="#000" opacity="10%" offset="2px, 2px"/>'+"</v:oval>"+'<div class="'+a.CSS_CLASSES.resetString+" "+a.CSS_CLASSES.hidden+'">{resetStr}</div>'+"</div>"+"";a.HANDLE_TEMPLATE='<div class="'+a.CSS_CLASSES.handleVml+'" aria-labelledby="'+f+'" aria-valuetext="" aria-valuemax="" aria-valuemin="" aria-valuenow="" role="slider"  tabindex="0" title="{tooltipHandle}">'+'<v:oval stroked="false">'+'<v:fill opacity="20%" color="#6C3A3A"/>'+"</v:oval>"+"</div>"+"";}h.extend(a,d,{renderUI:function(){this._renderLabel();this._renderRing();this._renderMarker();this._renderCenterButton();this._renderHandle();this.contentBox=this.get("contentBox");this._originalValue=this.get("value");this._minValue=this.get("min");this._maxValue=this.get("max");this._stepsPerRevolution=this.get("stepsPerRevolution");this._minTimesWrapped=(Math.floor(this._minValue/this._stepsPerRevolution-1));this._maxTimesWrapped=(Math.floor(this._maxValue/this._stepsPerRevolution+1));this._timesWrapped=0;this._angle=this._getAngleFromValue(this.get("value"));this._prevAng=this._angle;this._setTimesWrappedFromValue(this._originalValue);this._handleNode.set("aria-valuemin",this._minValue);this._handleNode.set("aria-valuemax",this._maxValue);},_setBorderRadius:function(){this._ringNode.setStyles({"WebkitBorderRadius":this._ringNodeRadius+"px","MozBorderRadius":this._ringNodeRadius+"px","borderRadius":this._ringNodeRadius+"px"});this._handleNode.setStyles({"WebkitBorderRadius":this._handleNodeRadius+"px","MozBorderRadius":this._handleNodeRadius+"px","borderRadius":this._handleNodeRadius+"px"});this._markerNode.setStyles({"WebkitBorderRadius":this._markerNodeRadius+"px","MozBorderRadius":this._markerNodeRadius+"px","borderRadius":this._markerNodeRadius+"px"});this._centerButtonNode.setStyles({"WebkitBorderRadius":this._centerButtonNodeRadius+"px","MozBorderRadius":this._centerButtonNodeRadius+"px","borderRadius":this._centerButtonNodeRadius+"px"});},_handleCenterButtonEnter:function(){this._resetString.removeClass(a.CSS_CLASSES.hidden);},_handleCenterButtonLeave:function(){this._resetString.addClass(a.CSS_CLASSES.hidden);},bindUI:function(){this.after("valueChange",this._afterValueChange);var i=this.get("boundingBox"),j=(!h.UA.opera)?"down:":"press:",k=(!h.UA.opera)?"down:":"press:";j+="38,40,33,34,35,36";k+="37,39";h.on("key",h.bind(this._onDirectionKey,this),i,j);h.on("key",h.bind(this._onLeftRightKey,this),i,k);h.on("mouseenter",h.bind(this._handleCenterButtonEnter,this),this._centerButtonNode);h.on("mouseleave",h.bind(this._handleCenterButtonLeave,this),this._centerButtonNode);h.on("gesturemovestart",h.bind(this._resetDial,this),this._centerButtonNode);h.on("gesturemoveend",h.bind(this._handleCenterButtonMouseup,this),this._centerButtonNode);h.on("gesturemovestart",h.bind(this._handleHandleMousedown,this),this._handleNode);h.on("gesturemovestart",h.bind(this._handleMousedown,this),this._ringNode);h.on("gesturemoveend",h.bind(this._handleRingMouseup,this),this._ringNode);this._dd1=new h.DD.Drag({node:this._handleNode,on:{"drag:drag":h.bind(this._handleDrag,this),"drag:start":h.bind(this._handleDragStart,this),"drag:end":h.bind(this._handleDragEnd,this)}});h.bind(this._dd1.addHandle(this._ringNode),this);},_setTimesWrappedFromValue:function(i){if(i%this._stepsPerRevolution===0){this._timesWrapped=(i/this._stepsPerRevolution);}else{this._timesWrapped=Math.floor(i/this._stepsPerRevolution);
  2
+}},_getAngleFromHandleCenter:function(k,j){var i=Math.atan((this._dialCenterY-j)/(this._dialCenterX-k))*(180/Math.PI);i=((this._dialCenterX-k)<0)?i+90:i+90+180;return i;},_calculateDialCenter:function(){this._dialCenterX=this._ringNode.get("offsetWidth")/2;this._dialCenterY=this._ringNode.get("offsetHeight")/2;},_handleRingMouseup:function(){this._handleNode.focus();},_handleCenterButtonMouseup:function(){this._handleNode.focus();},_handleHandleMousedown:function(){this._handleNode.focus();},_handleDrag:function(k){var m,l,i,j;m=(parseInt(this._handleNode.getStyle("left"),10)+this._handleNodeRadius);l=(parseInt(this._handleNode.getStyle("top"),10)+this._handleNodeRadius);i=this._getAngleFromHandleCenter(m,l);if((this._prevAng>270)&&(i<90)){if(this._timesWrapped<this._maxTimesWrapped){this._timesWrapped=(this._timesWrapped+1);}}else{if((this._prevAng<90)&&(i>270)){if(this._timesWrapped>this._minTimesWrapped){this._timesWrapped=(this._timesWrapped-1);}}}j=this._getValueFromAngle(i);if(j>(this._maxValue+this._stepsPerRevolution)){this._timesWrapped--;}else{if(j<(this._minValue-this._stepsPerRevolution)){this._timesWrapped++;}}this._prevAng=i;this._handleValuesBeyondMinMax(k,j);},_handleMousedown:function(n){var l=this._getAngleFromValue(this._minValue),k=this._getAngleFromValue(this._maxValue),m,j,p,o,i;if(h.UA.ios){p=(n.clientX-this._ringNode.getX());o=(n.clientY-this._ringNode.getY());}else{p=(n.clientX+h.one("document").get("scrollLeft")-this._ringNode.getX());o=(n.clientY+h.one("document").get("scrollTop")-this._ringNode.getY());}i=this._getAngleFromHandleCenter(p,o);if(this._maxValue-this._minValue>this._stepsPerRevolution){if(Math.abs(this._prevAng-i)>180){if((this._timesWrapped>this._minTimesWrapped)&&(this._timesWrapped<this._maxTimesWrapped)){this._timesWrapped=((this._prevAng-i)>0)?(this._timesWrapped+1):(this._timesWrapped-1);}}else{if((this._timesWrapped===this._minTimesWrapped)&&(i-this._prevAng<180)){this._timesWrapped++;}}}else{if(this._maxValue-this._minValue===this._stepsPerRevolution){if(i<l){this._timesWrapped=1;}else{this._timesWrapped=0;}}else{if(l>k){if((this._prevAng>=l)&&(i<=(l+k)/2)){this._timesWrapped++;}else{if((this._prevAng<=k)&&(i>(l+k)/2)){this._timesWrapped--;}}}else{if((i<l)||(i>k)){j=(((l+k)/2)+180)%360;if(j>180){m=((k<i)&&(i<j))?this.get("max"):this.get("min");}else{m=((l>i)&&(i>j))?this.get("min"):this.get("max");}this._prevAng=this._getAngleFromValue(m);this.set("value",m);this._setTimesWrappedFromValue(m);return;}}}}m=this._getValueFromAngle(i);this._prevAng=i;this._handleValuesBeyondMinMax(n,m);},_handleValuesBeyondMinMax:function(j,i){if((i>=this._minValue)&&(i<=this._maxValue)){this.set("value",i);if(j.currentTarget===this._ringNode){this._dd1._handleMouseDownEvent(j);}}else{if(i>this._maxValue){this.set("value",this._maxValue);if(j.type==="gesturemovestart"){this._prevAng=this._getAngleFromValue(this._maxValue);}}else{if(i<this._minValue){this.set("value",this._minValue);if(j.type==="gesturemovestart"){this._prevAng=this._getAngleFromValue(this._minValue);}}}}},_handleDragStart:function(i){this._markerNode.removeClass(a.CSS_CLASSES.hidden);},_handleDragEnd:function(){var i=this._handleNode;i.transition({duration:0.08,easing:"ease-in",left:this._setNodeToFixedRadius(this._handleNode,true)[0]+"px",top:this._setNodeToFixedRadius(this._handleNode,true)[1]+"px"},h.bind(function(){var j=this.get("value");if((j>this._minValue)&&(j<this._maxValue)){this._markerNode.addClass(a.CSS_CLASSES.hidden);}else{this._setTimesWrappedFromValue(j);this._prevAng=this._getAngleFromValue(j);}},this));},_setNodeToFixedRadius:function(l,o){var j=(this._angle-90),i=(Math.PI/180),k=Math.round(Math.sin(j*i)*this._handleDistance),n=Math.round(Math.cos(j*i)*this._handleDistance),m=l.get("offsetWidth");k=k-(m*0.5);n=n-(m*0.5);if(o){return[(this._ringNodeRadius+n),(this._ringNodeRadius+k)];}else{l.setStyle("left",(this._ringNodeRadius+n)+"px");l.setStyle("top",(this._ringNodeRadius+k)+"px");}},syncUI:function(){this._setSizes();this._calculateDialCenter();this._setBorderRadius();this._uiSetValue(this.get("value"));this._markerNode.addClass(a.CSS_CLASSES.hidden);this._resetString.addClass(a.CSS_CLASSES.hidden);},_setSizes:function(){var l=this.get("diameter"),k,m,j,i=function(o,q,n){var p="px";o.getElementsByTagName("oval").setStyle("width",(q*n)+p);o.getElementsByTagName("oval").setStyle("height",(q*n)+p);o.setStyle("width",(q*n)+p);o.setStyle("height",(q*n)+p);};i(this._ringNode,l,1);i(this._handleNode,l,this.get("handleDiameter"));i(this._markerNode,l,this.get("markerDiameter"));i(this._centerButtonNode,l,this.get("centerButtonDiameter"));this._ringNodeRadius=this._ringNode.get("offsetWidth")*0.5;this._handleNodeRadius=this._handleNode.get("offsetWidth")*0.5;this._markerNodeRadius=this._markerNode.get("offsetWidth")*0.5;this._centerButtonNodeRadius=this._centerButtonNode.get("offsetWidth")*0.5;this._handleDistance=this._ringNodeRadius*this.get("handleDistance");k=(this._ringNodeRadius-this._centerButtonNodeRadius);this._centerButtonNode.setStyle("left",k+"px");this._centerButtonNode.setStyle("top",k+"px");m=(this._centerButtonNodeRadius-(this._resetString.get("offsetWidth")*0.5));j=(this._centerButtonNodeRadius-(this._resetString.get("offsetHeight")*0.5));this._resetString.setStyles({"left":m+"px","top":j+"px"});},_renderLabel:function(){var i=this.get("contentBox"),j=i.one("."+a.CSS_CLASSES.label);if(!j){j=b.create(h.substitute(a.LABEL_TEMPLATE,this.get("strings")));i.append(j);}this._labelNode=j;this._valueStringNode=this._labelNode.one("."+a.CSS_CLASSES.valueString);},_renderRing:function(){var i=this.get("contentBox"),j=i.one("."+a.CSS_CLASSES.ring);if(!j){j=i.appendChild(a.RING_TEMPLATE);j.setStyles({width:this.get("diameter")+"px",height:this.get("diameter")+"px"});}this._ringNode=j;},_renderMarker:function(){var j=this.get("contentBox"),i=j.one("."+a.CSS_CLASSES.marker);if(!i){i=j.one("."+a.CSS_CLASSES.ring).appendChild(a.MARKER_TEMPLATE);}this._markerNode=i;},_renderCenterButton:function(){var i=this.get("contentBox"),j=i.one("."+a.CSS_CLASSES.centerButton);
  3
+if(!j){j=b.create(h.substitute(a.CENTER_BUTTON_TEMPLATE,this.get("strings")));i.one("."+a.CSS_CLASSES.ring).append(j);}this._centerButtonNode=j;this._resetString=this._centerButtonNode.one("."+a.CSS_CLASSES.resetString);},_renderHandle:function(){var i=this.get("contentBox"),j=i.one("."+a.CSS_CLASSES.handle);if(!j){j=b.create(h.substitute(a.HANDLE_TEMPLATE,this.get("strings")));i.one("."+a.CSS_CLASSES.ring).append(j);}this._handleNode=j;},_setLabelString:function(i){this.get("contentBox").one("."+a.CSS_CLASSES.labelString).setContent(i);},_setResetString:function(i){this.get("contentBox").one("."+a.CSS_CLASSES.resetString).setContent(i);},_setTooltipString:function(i){this._handleNode.set("title",i);},_onDirectionKey:function(i){i.preventDefault();switch(i.charCode){case 38:this._incrMinor();break;case 40:this._decrMinor();break;case 36:this._resetDial();break;case 35:this._setToMax();break;case 33:this._incrMajor();break;case 34:this._decrMajor();break;}},_onLeftRightKey:function(i){i.preventDefault();switch(i.charCode){case 37:this._decrMinor();break;case 39:this._incrMinor();break;}},_incrMinor:function(){var i=(this.get("value")+this.get("minorStep"));i=Math.min(i,this.get("max"));this.set("value",i.toFixed(this.get("decimalPlaces"))-0);},_decrMinor:function(){var i=(this.get("value")-this.get("minorStep"));i=Math.max(i,this.get("min"));this.set("value",i.toFixed(this.get("decimalPlaces"))-0);},_incrMajor:function(){var i=(this.get("value")+this.get("majorStep"));i=Math.min(i,this.get("max"));this.set("value",i.toFixed(this.get("decimalPlaces"))-0);},_decrMajor:function(){var i=(this.get("value")-this.get("majorStep"));i=Math.max(i,this.get("min"));this.set("value",i.toFixed(this.get("decimalPlaces"))-0);},_setToMax:function(){this.set("value",this.get("max"));},_setToMin:function(){this.set("value",this.get("min"));},_resetDial:function(i){if(i){i.stopPropagation();}this.set("value",this._originalValue);this._resetString.addClass(a.CSS_CLASSES.hidden);this._handleNode.focus();},_getAngleFromValue:function(i){var k=i%this._stepsPerRevolution,j=k/this._stepsPerRevolution*360;return(j<0)?(j+360):j;},_getValueFromAngle:function(j){if(j<0){j=(360+j);}else{if(j===0){j=360;}}var i=(j/360)*this._stepsPerRevolution;i=(i+(this._timesWrapped*this._stepsPerRevolution));return i.toFixed(this.get("decimalPlaces"))-0;},_afterValueChange:function(i){this._uiSetValue(i.newVal);},_valueToDecimalPlaces:function(i){},_uiSetValue:function(i){this._angle=this._getAngleFromValue(i);if(this._handleNode.hasClass(a.CSS_CLASSES.dragging)===false){this._setTimesWrappedFromValue(i);this._setNodeToFixedRadius(this._handleNode,false);this._prevAng=this._getAngleFromValue(this.get("value"));}this._valueStringNode.setContent(i.toFixed(this.get("decimalPlaces")));this._handleNode.set("aria-valuenow",i);this._handleNode.set("aria-valuetext",i);this._setNodeToFixedRadius(this._markerNode,false);if((i===this._maxValue)||(i===this._minValue)){this._markerNode.addClass(a.CSS_CLASSES.markerMaxMin);if(g===true){this._markerNode.getElementsByTagName("fill").set("color","#AB3232");}this._markerNode.removeClass(a.CSS_CLASSES.hidden);}else{if(g===true){this._markerNode.getElementsByTagName("fill").set("color","#000");}this._markerNode.removeClass(a.CSS_CLASSES.markerMaxMin);if(this._handleNode.hasClass(a.CSS_CLASSES.dragging)===false){this._markerNode.addClass(a.CSS_CLASSES.hidden);}}},_validateValue:function(k){var j=this.get("min"),i=this.get("max");return(e.isNumber(k)&&k>=j&&k<=i);}});h.Dial=a;},"@VERSION@",{requires:["widget","dd-drag","substitute","event-mouseenter","event-move","event-key","transition","intl"],lang:["en","es"],skinnable:true});
111  build/dial/dial.js
@@ -414,6 +414,26 @@ YUI.add('dial', function(Y) {
414 414
         },
415 415
         
416 416
         /**
  417
+         * Handles the mouseenter on the centerButton
  418
+         * 
  419
+         * @method _handleCenterButtonEnter
  420
+         * @protected
  421
+         */
  422
+        _handleCenterButtonEnter : function(){
  423
+            this._resetString.removeClass(Dial.CSS_CLASSES.hidden);    
  424
+        },                                                     
  425
+        
  426
+        /**
  427
+         * Handles the mouseleave on the centerButton
  428
+         * 
  429
+         * @method _handleCenterButtonLeave
  430
+         * @protected
  431
+         */
  432
+        _handleCenterButtonLeave : function(){
  433
+            this._resetString.addClass(Dial.CSS_CLASSES.hidden);    
  434
+        },                                                     
  435
+        
  436
+        /**
417 437
          * Creates the Y.DD.Drag instance used for the handle movement and
418 438
          * binds Dial interaction to the configured value model.
419 439
          *
@@ -435,14 +455,15 @@ YUI.add('dial', function(Y) {
435 455
 
436 456
             Y.on("key", Y.bind(this._onDirectionKey, this), boundingBox, keyEventSpec);
437 457
             Y.on("key", Y.bind(this._onLeftRightKey, this), boundingBox, keyLeftRightSpec);
438  
-            Y.on('mouseenter', function(){this.one('.' + Dial.CSS_CLASSES.resetString).removeClass(Dial.CSS_CLASSES.hidden);}, this._centerButtonNode);
439  
-            Y.on('mouseleave', function(){this.one('.' + Dial.CSS_CLASSES.resetString).addClass(Dial.CSS_CLASSES.hidden);}, this._centerButtonNode);
  458
+            Y.on('mouseenter', Y.bind(this._handleCenterButtonEnter, this), this._centerButtonNode);
  459
+            Y.on('mouseleave', Y.bind(this._handleCenterButtonLeave, this), this._centerButtonNode);
440 460
             // Needed to replace mousedown/up with gesturemovestart/end to make behavior on touch devices work the same.
441 461
             Y.on('gesturemovestart', Y.bind(this._resetDial, this), this._centerButtonNode);  //[#2530441]    
442  
-            Y.on('gesturemoveend', Y.bind(function(){this._handleNode.focus();}, this), this._centerButtonNode); 
443  
-            Y.on('gesturemovestart', Y.bind(function(){this._handleNode.focus();}, this), this._handleNode);
  462
+            Y.on('gesturemoveend', Y.bind(this._handleCenterButtonMouseup, this), this._centerButtonNode); 
  463
+            Y.on('gesturemovestart', Y.bind(this._handleHandleMousedown, this), this._handleNode);
  464
+
444 465
             Y.on('gesturemovestart', Y.bind(this._handleMousedown, this), this._ringNode); // [#2530766] 
445  
-            Y.on('gesturemoveend', Y.bind(function(){this._handleNode.focus();}, this), this._ringNode); // [#2530206] // need to re-focus on the handle so keyboard is accessible
  466
+            Y.on('gesturemoveend', Y.bind(this._handleRingMouseup, this), this._ringNode);
446 467
 
447 468
             this._dd1 = new Y.DD.Drag({ //// [#2530206] changed global this._dd1 from just var dd1 = new Y.DD.drag so 
448 469
                 node: this._handleNode,
@@ -481,24 +502,56 @@ YUI.add('dial', function(Y) {
481 502
          * @protected
482 503
          */
483 504
         _getAngleFromHandleCenter : function(handleCenterX, handleCenterY){
484  
-            var ang = Math.atan( (this._centerYOnPage - handleCenterY)  /  (this._centerXOnPage - handleCenterX)  ) * (180 / Math.PI); 
485  
-            ang = ((this._centerXOnPage - handleCenterX) < 0) ? ang + 90 : ang + 90 + 180; // Compensate for neg angles from Math.atan
  505
+            var ang = Math.atan( (this._dialCenterY - handleCenterY)  /  (this._dialCenterX - handleCenterX)  ) * (180 / Math.PI); 
  506
+            ang = ((this._dialCenterX - handleCenterX) < 0) ? ang + 90 : ang + 90 + 180; // Compensate for neg angles from Math.atan
486 507
             return ang;
487 508
         },
488