Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Gallery Build Tag: gallery-2012.05.16-20-37

  • Loading branch information...
commit 11b959a882cab6623ceebc55d0bdf3fb856d3900 1 parent c83ee9d
YUI Builder authored
Showing with 5,901 additions and 2,752 deletions.
  1. +43 −21 build/gallery-accordion-horiz-vert/gallery-accordion-horiz-vert-debug.js
  2. +1 −1  build/gallery-accordion-horiz-vert/gallery-accordion-horiz-vert-min.js
  3. +43 −21 build/gallery-accordion-horiz-vert/gallery-accordion-horiz-vert.js
  4. +25 −21 build/gallery-algorithms/gallery-algorithms-debug.js
  5. +1 −1  build/gallery-algorithms/gallery-algorithms-min.js
  6. +25 −21 build/gallery-algorithms/gallery-algorithms.js
  7. +6 −6 build/gallery-anim-class/gallery-anim-class-debug.js
  8. +1 −1  build/gallery-anim-class/gallery-anim-class-min.js
  9. +6 −6 build/gallery-anim-class/gallery-anim-class.js
  10. +97 −33 build/gallery-bulkedit/gallery-bulkedit-debug.js
  11. +2 −2 build/gallery-bulkedit/gallery-bulkedit-min.js
  12. +97 −33 build/gallery-bulkedit/gallery-bulkedit.js
  13. +1 −1  build/gallery-busyoverlay/assets/skins/sam/gallery-busyoverlay.css
  14. +22 −5 build/gallery-busyoverlay/gallery-busyoverlay-debug.js
  15. +1 −1  build/gallery-busyoverlay/gallery-busyoverlay-min.js
  16. +22 −5 build/gallery-busyoverlay/gallery-busyoverlay.js
  17. +16 −10 build/gallery-canvas/gallery-canvas-debug.js
  18. +1 −1  build/gallery-canvas/gallery-canvas-min.js
  19. +16 −10 build/gallery-canvas/gallery-canvas.js
  20. +77 −12 build/gallery-checkboxgroups/gallery-checkboxgroups-debug.js
  21. +1 −1  build/gallery-checkboxgroups/gallery-checkboxgroups-min.js
  22. +77 −12 build/gallery-checkboxgroups/gallery-checkboxgroups.js
  23. +7 −3 build/gallery-chipper/gallery-chipper-debug.js
  24. +1 −1  build/gallery-chipper/gallery-chipper-min.js
  25. +7 −3 build/gallery-chipper/gallery-chipper.js
  26. +101 −15 build/gallery-complexnumber/gallery-complexnumber-debug.js
  27. +1 −1  build/gallery-complexnumber/gallery-complexnumber-min.js
  28. +101 −15 build/gallery-complexnumber/gallery-complexnumber.js
  29. +7 −3 build/gallery-console-test/gallery-console-test-debug.js
  30. +1 −1  build/gallery-console-test/gallery-console-test-min.js
  31. +7 −3 build/gallery-console-test/gallery-console-test.js
  32. +9 −5 build/gallery-datasource-async-function/gallery-datasource-async-function-debug.js
  33. +1 −1  build/gallery-datasource-async-function/gallery-datasource-async-function-min.js
  34. +9 −5 build/gallery-datasource-async-function/gallery-datasource-async-function.js
  35. +16 −10 build/gallery-datatable-row-expansion/gallery-datatable-row-expansion-debug.js
  36. +1 −1  build/gallery-datatable-row-expansion/gallery-datatable-row-expansion-min.js
  37. +16 −10 build/gallery-datatable-row-expansion/gallery-datatable-row-expansion.js
  38. +11 −7 build/gallery-datatable-state/gallery-datatable-state-debug.js
  39. +1 −1  build/gallery-datatable-state/gallery-datatable-state-min.js
  40. +11 −7 build/gallery-datatable-state/gallery-datatable-state.js
  41. +590 −306 build/gallery-deferred/gallery-deferred-debug.js
  42. +1 −1  build/gallery-deferred/gallery-deferred-min.js
  43. +590 −306 build/gallery-deferred/gallery-deferred.js
  44. +8 −5 build/gallery-dimensions/gallery-dimensions-debug.js
  45. +1 −1  build/gallery-dimensions/gallery-dimensions-min.js
  46. +8 −5 build/gallery-dimensions/gallery-dimensions.js
  47. +20 −14 build/gallery-expiration-cache/gallery-expiration-cache-debug.js
  48. +1 −1  build/gallery-expiration-cache/gallery-expiration-cache-min.js
  49. +20 −14 build/gallery-expiration-cache/gallery-expiration-cache.js
  50. +1 −1  build/gallery-exprbuilder/assets/skins/sam/gallery-exprbuilder.css
  51. +30 −21 build/gallery-exprbuilder/gallery-exprbuilder-debug.js
  52. +1 −1  build/gallery-exprbuilder/gallery-exprbuilder-min.js
  53. +30 −21 build/gallery-exprbuilder/gallery-exprbuilder.js
  54. +29 −0 build/gallery-focus-position/gallery-focus-position-debug.js
  55. +1 −0  build/gallery-focus-position/gallery-focus-position-min.js
  56. +29 −0 build/gallery-focus-position/gallery-focus-position.js
  57. +25 −21 build/gallery-formmgr-css-validation/gallery-formmgr-css-validation-debug.js
  58. +1 −1  build/gallery-formmgr-css-validation/gallery-formmgr-css-validation-min.js
  59. +25 −21 build/gallery-formmgr-css-validation/gallery-formmgr-css-validation.js
  60. +10 −4 build/gallery-formmgr-overlay-plugin/gallery-formmgr-overlay-plugin-debug.js
  61. +1 −1  build/gallery-formmgr-overlay-plugin/gallery-formmgr-overlay-plugin-min.js
  62. +10 −4 build/gallery-formmgr-overlay-plugin/gallery-formmgr-overlay-plugin.js
  63. +104 −62 build/gallery-formmgr/gallery-formmgr-debug.js
  64. +1 −1  build/gallery-formmgr/gallery-formmgr-min.js
  65. +104 −62 build/gallery-formmgr/gallery-formmgr.js
  66. +38 −24 build/gallery-funcprog/gallery-funcprog-debug.js
  67. +1 −1  build/gallery-funcprog/gallery-funcprog-min.js
  68. +38 −24 build/gallery-funcprog/gallery-funcprog.js
  69. +325 −366 build/gallery-icello-button/gallery-icello-button-debug.js
  70. +2 −2 build/gallery-icello-button/gallery-icello-button-min.js
  71. +321 −348 build/gallery-icello-button/gallery-icello-button.js
  72. +3 −1 build/gallery-icello-date/gallery-icello-date-debug.js
  73. +1 −1  build/gallery-icello-date/gallery-icello-date-min.js
  74. +3 −1 build/gallery-icello-date/gallery-icello-date.js
  75. +151 −110 build/gallery-icello-datechooser/gallery-icello-datechooser-debug.js
  76. +2 −2 build/gallery-icello-datechooser/gallery-icello-datechooser-min.js
  77. +123 −82 build/gallery-icello-datechooser/gallery-icello-datechooser.js
  78. +15 −3 build/gallery-instancemanager/gallery-instancemanager-debug.js
  79. +1 −1  build/gallery-instancemanager/gallery-instancemanager-min.js
  80. +15 −3 build/gallery-instancemanager/gallery-instancemanager.js
  81. +2 −3 build/gallery-io-multiresponse/gallery-io-multiresponse-debug.js
  82. +1 −1  build/gallery-io-multiresponse/gallery-io-multiresponse-min.js
  83. +2 −3 build/gallery-io-multiresponse/gallery-io-multiresponse.js
  84. +10 −4 build/gallery-iterable-extras/gallery-iterable-extras-debug.js
  85. +1 −1  build/gallery-iterable-extras/gallery-iterable-extras-min.js
  86. +10 −4 build/gallery-iterable-extras/gallery-iterable-extras.js
  87. +1 −1  build/gallery-layout-cols/gallery-layout-cols-debug.js
  88. +1 −1  build/gallery-layout-cols/gallery-layout-cols-min.js
  89. +1 −1  build/gallery-layout-cols/gallery-layout-cols.js
  90. +8 −4 build/gallery-layout-datatable/gallery-layout-datatable-debug.js
  91. +1 −1  build/gallery-layout-datatable/gallery-layout-datatable-min.js
  92. +8 −4 build/gallery-layout-datatable/gallery-layout-datatable.js
  93. +1 −1  build/gallery-layout-rows/gallery-layout-rows-debug.js
  94. +1 −1  build/gallery-layout-rows/gallery-layout-rows-min.js
  95. +1 −1  build/gallery-layout-rows/gallery-layout-rows.js
  96. +77 −33 build/gallery-layout/gallery-layout-debug.js
  97. +1 −1  build/gallery-layout/gallery-layout-min.js
  98. +77 −33 build/gallery-layout/gallery-layout.js
  99. +48 −10 build/gallery-linkedlist/gallery-linkedlist-debug.js
  100. +1 −1  build/gallery-linkedlist/gallery-linkedlist-min.js
  101. +48 −10 build/gallery-linkedlist/gallery-linkedlist.js
  102. +32 −2 build/gallery-math/gallery-math-debug.js
  103. +1 −1  build/gallery-math/gallery-math-min.js
  104. +32 −2 build/gallery-math/gallery-math.js
  105. +1 −0  build/gallery-mathcanvas/assets/skins/sam/gallery-mathcanvas-skin.css
  106. +563 −23 build/gallery-mathcanvas/gallery-mathcanvas-debug.js
  107. +1 −1  build/gallery-mathcanvas/gallery-mathcanvas-min.js
  108. +563 −23 build/gallery-mathcanvas/gallery-mathcanvas.js
  109. +66 −34 build/gallery-model-sync-rest/gallery-model-sync-rest-debug.js
  110. +1 −1  build/gallery-model-sync-rest/gallery-model-sync-rest-min.js
  111. +66 −34 build/gallery-model-sync-rest/gallery-model-sync-rest.js
  112. +24 −10 build/gallery-mojito-rpc/gallery-mojito-rpc-debug.js
  113. +1 −1  build/gallery-mojito-rpc/gallery-mojito-rpc-min.js
  114. +24 −10 build/gallery-mojito-rpc/gallery-mojito-rpc.js
  115. +17 −13 build/gallery-mru-cache/gallery-mru-cache-debug.js
  116. +1 −1  build/gallery-mru-cache/gallery-mru-cache-min.js
  117. +17 −13 build/gallery-mru-cache/gallery-mru-cache.js
  118. +12 −9 build/gallery-neon/gallery-neon-debug.js
  119. +1 −1  build/gallery-neon/gallery-neon-min.js
  120. +12 −9 build/gallery-neon/gallery-neon.js
  121. +10 −5 build/gallery-node-optimizations/gallery-node-optimizations-debug.js
  122. +1 −1  build/gallery-node-optimizations/gallery-node-optimizations-min.js
  123. +10 −5 build/gallery-node-optimizations/gallery-node-optimizations.js
  124. +13 −4 build/gallery-nodelist-extras2/gallery-nodelist-extras2-debug.js
  125. +1 −1  build/gallery-nodelist-extras2/gallery-nodelist-extras2-min.js
  126. +13 −4 build/gallery-nodelist-extras2/gallery-nodelist-extras2.js
  127. +37 −20 build/gallery-object-extras/gallery-object-extras-debug.js
  128. +1 −1  build/gallery-object-extras/gallery-object-extras-min.js
  129. +37 −20 build/gallery-object-extras/gallery-object-extras.js
  130. +41 −1 build/gallery-paginator/gallery-paginator-debug.js
  131. +1 −1  build/gallery-paginator/gallery-paginator-min.js
  132. +41 −1 build/gallery-paginator/gallery-paginator.js
  133. +23 −6 build/gallery-popup-calendar/gallery-popup-calendar-debug.js
  134. +1 −1  build/gallery-popup-calendar/gallery-popup-calendar-min.js
  135. +22 −6 build/gallery-popup-calendar/gallery-popup-calendar.js
  136. +56 −48 build/gallery-querybuilder/gallery-querybuilder-debug.js
  137. +1 −1  build/gallery-querybuilder/gallery-querybuilder-min.js
  138. +56 −48 build/gallery-querybuilder/gallery-querybuilder.js
  139. +38 −16 build/gallery-quickedit/gallery-quickedit-debug.js
  140. +1 −1  build/gallery-quickedit/gallery-quickedit-min.js
  141. +38 −16 build/gallery-quickedit/gallery-quickedit.js
  142. +12 −3 build/gallery-scrollintoview/gallery-scrollintoview-debug.js
  143. +1 −1  build/gallery-scrollintoview/gallery-scrollintoview-min.js
  144. +12 −3 build/gallery-scrollintoview/gallery-scrollintoview.js
  145. +22 −12 build/gallery-sort-extras/gallery-sort-extras-debug.js
  146. +1 −1  build/gallery-sort-extras/gallery-sort-extras-min.js
  147. +22 −12 build/gallery-sort-extras/gallery-sort-extras.js
  148. +11 −3 build/gallery-test-extras/gallery-test-extras-debug.js
  149. +1 −1  build/gallery-test-extras/gallery-test-extras-min.js
  150. +11 −3 build/gallery-test-extras/gallery-test-extras.js
  151. +29 −18 build/gallery-treeble/gallery-treeble-debug.js
  152. +3 −3 build/gallery-treeble/gallery-treeble-min.js
  153. +29 −18 build/gallery-treeble/gallery-treeble.js
View
64 build/gallery-accordion-horiz-vert/gallery-accordion-horiz-vert-debug.js
@@ -12,18 +12,19 @@ var use_nonzero_empty_div = (0 < Y.UA.ie && Y.UA.ie < 8),
* Provides option to always force at least one item to be open.</p>
*
* @module gallery-accordion-horiz-vert
+ * @main gallery-accordion-horiz-vert
*/
/**
* <p>An accordion can be constructed from existing markup or from strings
* containing HTML. Existing markup can be provided either by setting
- * <code>contentBox</code> or by specifying CSS selectors. See the
- * <code>titles</code> and <code>sections</code> attributes.</p>
+ * `contentBox` or by specifying CSS selectors. See the `titles` and
+ * `sections` attributes.</p>
*
- * <p>When constructing from existing markup via <code>contentBox</code>,
- * use an unordered list (&lt;ul&gt;). Each item must contain two
- * &lt;div&gt;'s. The first one is used as the section title, and the
- * second one is used as the section content.</p>
+ * <p>When constructing from existing markup via `contentBox`, use an
+ * unordered list (&lt;ul&gt;). Each item must contain two &lt;div&gt;'s.
+ * The first one is used as the section title, and the second one is used
+ * as the section content.</p>
*
* <p>Animation is optional. If the anim module is not available,
* animation is automatically turned off.</p>
@@ -43,7 +44,6 @@ var use_nonzero_empty_div = (0 < Y.UA.ie && Y.UA.ie < 8),
* @constructor
* @param config {Object} Widget configuration
*/
-
function Accordion(config)
{
config = config || {};
@@ -76,7 +76,7 @@ Accordion.ATTRS =
/**
* Whether or not the accordion is horizontal.
*
- * @config horizontal
+ * @attribute horizontal
* @type {boolean}
* @default false
* @writeonce
@@ -92,7 +92,7 @@ Accordion.ATTRS =
* of strings containing markup. This is used to define the initial
* set of section titles.
*
- * @config titles
+ * @attribute titles
* @type {String|Array}
* @writeonce
*/
@@ -106,7 +106,7 @@ Accordion.ATTRS =
* supplied title is a node. (If the supplied title is markup, it is
* always inserted inside the default title container.)
*
- * @config replaceTitleContainer
+ * @attribute replaceTitleContainer
* @type {boolean}
* @default true
*/
@@ -121,7 +121,7 @@ Accordion.ATTRS =
* of strings containing markup. This is used to define the initial
* set of section contents.
*
- * @config sections
+ * @attribute sections
* @type {String|Array}
* @writeonce
*/
@@ -135,7 +135,7 @@ Accordion.ATTRS =
* the supplied title is a node. (If the supplied content is markup,
* it is always inserted inside the default section container.)
*
- * @config replaceSectionContainer
+ * @attribute replaceSectionContainer
* @type {boolean}
* @default true
*/
@@ -149,7 +149,7 @@ Accordion.ATTRS =
* Whether or not to allow all sections to be closed at the same time.
* If not, at least one section will always be open.
*
- * @config allowAllClosed
+ * @attribute allowAllClosed
* @type {boolean}
* @default false
*/
@@ -169,7 +169,7 @@ Accordion.ATTRS =
* Whether or not to allow multiple sections to be open at the same
* time. If not, at most one section at a time will be open.
*
- * @config allowMultipleOpen
+ * @attribute allowMultipleOpen
* @type {boolean}
* @default false
*/
@@ -182,7 +182,7 @@ Accordion.ATTRS =
/**
* Whether or not to animate the initial rendering of the widget.
*
- * @config animateRender
+ * @attribute animateRender
* @type {boolean}
* @default false
*/
@@ -197,7 +197,7 @@ Accordion.ATTRS =
/**
* Whether or not to animate insertion and removal of sections.
*
- * @config animateInsertRemove
+ * @attribute animateInsertRemove
* @type {boolean}
* @default true
*/
@@ -211,7 +211,7 @@ Accordion.ATTRS =
/**
* Whether or not to animate opening and closing of sections.
*
- * @config animateOpenClose
+ * @attribute animateOpenClose
* @type {boolean}
* @default true
*/
@@ -225,7 +225,7 @@ Accordion.ATTRS =
/**
* Duration of all animations.
*
- * @config animateDuration
+ * @attribute animateDuration
* @type {int}
* @default whatever Y.Anim default is
*/
@@ -241,7 +241,7 @@ Accordion.ATTRS =
/**
* Easing applied to all animations.
*
- * @config animateEasing
+ * @attribute animateEasing
* @type {function}
* @default whatever Y.Anim default is
*/
@@ -423,6 +423,7 @@ Y.extend(Accordion, Y.Widget,
},
/**
+ * @method getSectionCount
* @return {int} total number of sections
*/
getSectionCount: function()
@@ -431,6 +432,7 @@ Y.extend(Accordion, Y.Widget,
},
/**
+ * @method getTitle
* @param index {int} the section index
* @return {Node} the container for the section title
*/
@@ -443,6 +445,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Sets the contents of the specified section title.
*
+ * @method setTitle
* @param index {int} the section index
* @param title {String|Node} the title content
*/
@@ -498,6 +501,7 @@ Y.extend(Accordion, Y.Widget,
},
/**
+ * @method getSection
* @param index {int} the section index
* @return {Node} the container for the section content
*/
@@ -510,6 +514,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Sets the contents of the specified section.
*
+ * @method setSection
* @param index {int} the section index
* @param content {String|Node} the section content
*/
@@ -563,6 +568,7 @@ Y.extend(Accordion, Y.Widget,
},
/**
+ * @method _getClip
* @protected
* @param index {int} the section index
* @return {Node} the clipping container for the section content
@@ -576,6 +582,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Prepends the section to the accordion.
*
+ * @method prependSection
* @param title {String|Node} the section title content
* @param content {String|Node} the section content
*/
@@ -589,6 +596,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Appends the section to the accordion.
*
+ * @method appendSection
* @param title {String|Node} the section title content
* @param content {String|Node} the section content
*/
@@ -602,6 +610,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Inserts the section into the accordion at the specified location.
*
+ * @method insertSection
* @param index {int} the insertion index
* @param title {String|Node} the section title content
* @param content {String|Node} the section content
@@ -727,6 +736,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Removes the specified section.
*
+ * @method removeSection
* @param index {int} the section index
*/
removeSection: function(
@@ -800,6 +810,7 @@ Y.extend(Accordion, Y.Widget,
},
/**
+ * @method findSection
* @param {String|Node} any element inside the section or title
* @return {int} the index of the containing section, or -1 if not found
*/
@@ -824,6 +835,7 @@ Y.extend(Accordion, Y.Widget,
},
/**
+ * @method isSectionOpen
* @return {boolean} <code>true</code> if the section is open
*/
isSectionOpen: function(
@@ -835,6 +847,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Open the specified section.
*
+ * @method openSection
* @param index {int} the section index
*/
openSection: function(
@@ -849,6 +862,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Close the specified section.
*
+ * @method closeSection
* @param index {int} the section index
*/
closeSection: function(
@@ -861,6 +875,7 @@ Y.extend(Accordion, Y.Widget,
},
/**
+ * @method allSectionsOpen
* @return {boolean} <code>true</code> if all sections are open
*/
allSectionsOpen: function()
@@ -878,6 +893,7 @@ Y.extend(Accordion, Y.Widget,
},
/**
+ * @method allSectionsClosed
* @return {boolean} <code>true</code> if all sections are closed
*/
allSectionsClosed: function()
@@ -897,6 +913,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Show/hide the section content.
*
+ * @method toggleSection
* @param index {int} the section index
*/
toggleSection: function(
@@ -1011,6 +1028,8 @@ Y.extend(Accordion, Y.Widget,
/**
* Open all sections, if possible.
+ *
+ * @method openAllSections
*/
openAllSections: function()
{
@@ -1029,6 +1048,8 @@ Y.extend(Accordion, Y.Widget,
/**
* Close all sections, if possible.
+ *
+ * @method closeAllSections
*/
closeAllSections: function()
{
@@ -1118,8 +1139,9 @@ Y.Accordion = Accordion;
* <p>If/when the widget is given a fixed size, all animations are turned
* off.</p>
*
- * @namespace Plugin
* @class FixedSizeAccordion
+ * @namespace Plugin
+ * @constructor
*/
function FixedSizeAccordionPlugin()
{
@@ -1245,4 +1267,4 @@ Y.namespace("Plugin");
Y.Plugin.FixedSizeAccordion = FixedSizeAccordionPlugin;
-}, 'gallery-2012.03.23-18-00' ,{skinnable:true, optional:['anim-base'], requires:['widget','selector-css3','plugin','gallery-dimensions']});
+}, 'gallery-2012.05.16-20-37' ,{skinnable:true, optional:['anim-base'], requires:['widget','selector-css3','plugin','gallery-dimensions']});
View
2  build/gallery-accordion-horiz-vert/gallery-accordion-horiz-vert-min.js
@@ -1,2 +1,2 @@
YUI.add("gallery-accordion-horiz-vert",function(b){var l=(0<b.UA.ie&&b.UA.ie<8),n=!(0<b.UA.ie&&b.UA.ie<8),q=(l?1:0);function m(r){r=r||{};if(b.Lang.isUndefined(r.tabIndex)){r.tabIndex=null;}if(b.Lang.isUndefined(r.horizontal)){r.horizontal=false;}m.superclass.constructor.call(this,r);}function g(){return !b.Lang.isUndefined(b.Anim);}function j(r){return(r&&n&&!b.Lang.isUndefined(b.Anim));}m.NAME="accordion";m.ATTRS={horizontal:{value:false,writeOnce:true},titles:{writeOnce:true},replaceTitleContainer:{value:true,validator:b.Lang.isBoolean},sections:{writeOnce:true},replaceSectionContainer:{value:true,validator:b.Lang.isBoolean},allowAllClosed:{value:false,validator:b.Lang.isBoolean,setter:function(r){this.allow_all_closed=r;return r;}},allowMultipleOpen:{value:false,validator:b.Lang.isBoolean},animateRender:{value:false,writeOnce:true,validator:b.Lang.isBoolean,setter:j},animateInsertRemove:{valueFn:g,validator:b.Lang.isBoolean,setter:j},animateOpenClose:{valueFn:g,validator:b.Lang.isBoolean,setter:j},animateDuration:{value:null,validator:function(r){return(r===null||b.Lang.isNumber(r));}},animateEasing:{value:null,validator:function(r){return(r===null||b.Lang.isFunction(r));}}};m.HTML_PARSER={titles:function(r){return r.all("li > div:nth-child(1)");},sections:function(r){return r.all("li > div:nth-child(2)");}};var a=b.ClassNameManager.getClassName(m.NAME,"open");var f=b.ClassNameManager.getClassName(m.NAME,"closed");function o(r){b.Event.purgeElement(r,true);while(r.hasChildNodes()){r.removeChild(r.lastChild);}}b.extend(m,b.Widget,{initializer:function(r){this.section_list=[];this.get("allowAllClosed");if(this.get("horizontal")){this.slide_style_name="width";this.slide_size_name="offsetWidth";this.fixed_style_name="height";this.fixed_size_name="offsetHeight";}else{this.slide_style_name="height";this.slide_size_name="offsetHeight";this.fixed_style_name="width";this.fixed_size_name="offsetWidth";}this.after("allowMultipleOpenChange",function(s){if(this.section_list&&this.section_list.length>0&&!s.newVal){this.closeAllSections();}});this.after("allowAllClosedChange",function(s){if(this.section_list&&this.section_list.length>0&&!s.newVal&&this.allSectionsClosed()){this.toggleSection(0);}});},renderUI:function(){this.get("boundingBox").addClass(this.getClassName(this.get("horizontal")?"horiz":"vert"));var u=this.get("titles");if(b.Lang.isString(u)){u=b.all(u);}var v=this.get("sections");if(b.Lang.isString(v)){v=b.all(v);}if(u instanceof b.NodeList&&v instanceof b.NodeList&&u.size()==v.size()){var s=this.get("animateInsertRemove");this.set("animateInsertRemove",this.get("animateRender"));var t=u.size();for(var r=0;r<t;r++){this.appendSection(u.item(r),v.item(r));}this.set("animateInsertRemove",s);}else{if(u instanceof Array&&v instanceof Array&&u.length==v.length){var s=this.get("animateInsertRemove");this.set("animateInsertRemove",this.get("animateRender"));var t=u.length;for(var r=0;r<t;r++){this.appendSection(u[r],v[r]);}this.set("animateInsertRemove",s);}else{}}this.get("contentBox").all("> li").remove();},getSectionCount:function(){return this.section_list.length;},getTitle:function(r){return this.section_list[r].title;},setTitle:function(r,w){var s=this.section_list[r].title;o(s);var u;if(b.Lang.isString(w)){var u=b.one(w);if(!u){s.set("innerHTML",w);}}else{u=w;}if(u&&this.get("replaceTitleContainer")){var v=s.get("parentNode");var x=s.get("nextSibling");v.removeChild(s);if(x){v.insertBefore(u,x);}else{v.appendChild(u);}this.section_list[r].title=u;u.addClass(this.getClassName("title"));u.addClass(this.section_list[r].open?a:f);}else{if(u){s.appendChild(u);}}if(l){s.setStyle("display",s.get("innerHTML")?"":"none");}},getSection:function(r){return this.section_list[r].content;},setSection:function(r,t){var w=this.section_list[r].content;o(w);var s;if(b.Lang.isString(t)){var s=b.one(t);if(!s){w.set("innerHTML",t);}}else{s=t;}if(s&&this.get("replaceSectionContainer")){var v=w.getStyle("display");var u=w.get("parentNode");var x=w.get("nextSibling");u.removeChild(w);if(x){u.insertBefore(s,x);}else{u.appendChild(s);}this.section_list[r].content=s;s.addClass(this.getClassName("section"));s.addClass(this.section_list[r].open?a:f);s.setStyle("display",v);}else{if(s){w.appendChild(s);}}},_getClip:function(r){return this.section_list[r].clip;},prependSection:function(s,r){return this.insertSection(0,s,r);},appendSection:function(s,r){return this.insertSection(this.section_list.length,s,r);},insertSection:function(u,y,v){this.fire("beforeInsert",u);var z=b.Node.create("<div/>");z.addClass(this.getClassName("title"));z.addClass(f);var x=b.Node.create("<div/>");x.addClass(this.getClassName("section-clip"));x.setStyle(this.slide_style_name,q+"px");if(this.get("animateOpenClose")){x.setStyle("opacity",0);}var w=b.Node.create("<div/>");w.addClass(this.getClassName("section"));w.addClass(f);w.setStyle("display","none");x.appendChild(w);this.section_list.splice(u,0,{title:z,clip:x,content:w,open:false,anim:null});if(u<this.section_list.length-1){this.get("contentBox").insertBefore(z,this.section_list[u+1].title);}else{this.get("contentBox").appendChild(z);}this.setTitle(u,y);z=this.section_list[u].title;var A=z.get(this.slide_size_name);if(this.get("animateInsertRemove")){z.setStyle(this.slide_style_name,q+"px");var s={node:z,from:{opacity:0},to:{opacity:1}};s.to[this.slide_style_name]=A;var r=this._createAnimator(s);r.on("end",function(B,t){this.section_list[t].title.setStyle(this.slide_style_name,"auto");},this,u);r.run();}if(v){this.setSection(u,v);w=this.section_list[u].content;}if(u<this.section_list.length-1){this.get("contentBox").insertBefore(x,this.section_list[u+1].title);}else{this.get("contentBox").appendChild(x);}this.fire("insert",u,A);if(!this.allow_all_closed&&this.allSectionsClosed()){this.toggleSection(0);}return{title:z,content:w};},removeSection:function(t){this.fire("beforeRemove",t);function r(x,w){w[0].removeChild(w[1]);w[0].removeChild(w[2]);if(w[3]){this.fire("remove",t);}}var s=[this.get("contentBox"),this.section_list[t].title,this.section_list[t].clip,true];
-if(this.get("animateInsertRemove")){var v={node:this.section_list[t].clip,from:{opacity:1},to:{opacity:0}};v.to[this.slide_style_name]=q;if(this.section_list[t].open){this._startAnimator(t,v);}v.node=this.section_list[t].title;var u=this._createAnimator(v);u.on("end",r,this,s);u.run();}else{s[3]=false;r.call(this,null,s);}this.section_list.splice(t,1);if(!s[3]){this.fire("remove",t);}if(!this.allow_all_closed&&this.allSectionsClosed()){this.toggleSection(0);}},findSection:function(s){s=b.Node.getDOMNode(b.one(s));var u=this.section_list.length;for(var r=0;r<u;r++){var v=b.Node.getDOMNode(this.section_list[r].title);var t=b.Node.getDOMNode(this.section_list[r].content);if(s==v||b.DOM.contains(v,s)||s==t||b.DOM.contains(t,s)){return r;}}return -1;},isSectionOpen:function(r){return this.section_list[r].open;},openSection:function(r){if(!this.section_list[r].open){this.toggleSection(r);}},closeSection:function(r){if(this.section_list[r].open){this.toggleSection(r);}},allSectionsOpen:function(){var s=this.section_list.length;for(var r=0;r<s;r++){if(!this.section_list[r].open){return false;}}return true;},allSectionsClosed:function(){var s=this.section_list.length;for(var r=0;r<s;r++){if(this.section_list[r].open){return false;}}return true;},toggleSection:function(r){if(!this.section_list[r].open&&!this.get("allowMultipleOpen")){var u=this.allow_all_closed;this.allow_all_closed=true;this.closeAllSections();this.allow_all_closed=u;}else{if(this.section_list[r].open&&!this.allow_all_closed){this.section_list[r].open=false;if(this.allSectionsClosed()){this.section_list[r].open=true;return;}this.section_list[r].open=true;}}function w(A,z){this.section_list[z].clip.setStyle(this.slide_style_name,"auto");this.fire("open",z);}function y(A,z){this.section_list[z].content.setStyle("display","none");this.fire("close",z);}if(!this.section_list[r].open){this.section_list[r].content.setStyle("display","block");this.fire("beforeOpen",r);this.section_list[r].open=true;this.section_list[r].title.replaceClass(f,a);this.section_list[r].content.replaceClass(f,a);var s=this.section_list[r].content.get(this.slide_size_name);if(this.get("animateOpenClose")){var x={node:this.section_list[r].clip,from:{opacity:0},to:{opacity:1}};x.to[this.slide_style_name]=s;var v=this._startAnimator(r,x);v.on("end",w,this,r);}else{var t=this.section_list[r].clip;if(t.getStyle("opacity")=="0"){t.setStyle("opacity",1);}w.call(this,null,r);}}else{this.fire("beforeClose",r);this.section_list[r].open=false;this.section_list[r].title.replaceClass(a,f);this.section_list[r].content.replaceClass(a,f);if(this.get("animateOpenClose")){var x={node:this.section_list[r].clip,from:{opacity:1},to:{opacity:0}};x.to[this.slide_style_name]=q;var v=this._startAnimator(r,x);v.on("end",y,this,r);}else{this.section_list[r].clip.setStyle(this.slide_style_name,q+"px");y.call(this,null,r);}}},openAllSections:function(){if(this.get("allowMultipleOpen")){var s=this.section_list.length;for(var r=0;r<s;r++){if(!this.section_list[r].open){this.toggleSection(r);}}}},closeAllSections:function(){var s=this.section_list.length;var t=true;for(var r=0;r<s;r++){if(this.section_list[r].open){if(!this.allow_all_closed&&t){t=false;}else{this.toggleSection(r);}}}if(!this.allow_all_closed&&t){this.toggleSection(0);}},_createAnimator:function(s){var r=this.get("animateDuration");if(r!==null){s.duration=r;}var t=this.get("animateEasing");if(t!==null){s.easing=t;}return new b.Anim(s);},_startAnimator:function(r,t){var s=this.section_list[r].anim;if(s){s.stop(true);}this.section_list[r].anim=s=this._createAnimator(t);s.on("end",function(v,u,w){if(u<this.section_list.length&&this.section_list[u].anim==w){this.section_list[u].anim=null;}},this,r,s);s.run();return s;}});b.Accordion=m;function k(){k.superclass.constructor.apply(this,arguments);}k.NAME="FixedSizeAccordionPlugin";k.NS="fixedsize";k.ATTRS={};var i=["animateRender","animateInsertRemove","animateOpenClose"];var e={width:"totalWidth",height:"totalHeight"};var d={width:"overflowX",height:"overflowY"};var h={width:"horizMarginBorderPadding",height:"vertMarginBorderPadding"};function c(r){this.set(r,false);this.modifyAttr(r,{readOnly:true});}function p(){var z=this.get("host");if(!this.init_fixed_size){b.Array.each(i,c,z);if(!z.get("rendered")){this.afterHostEvent("render",p,this);}this.onHostEvent("insert",function(){b.later(1,this,p);},this);this.onHostEvent("remove",p,this);this.onHostEvent("open",p,this);this.onHostEvent("close",p,this);this.init_fixed_size=true;}var t=z.slide_style_name;var w=z.get("boundingBox").parseDimensionStyle(t);var v=z.getSectionCount();var u=[];for(var s=0;s<v;s++){w-=z.getTitle(s)[e[t]]();if(z.isSectionOpen(s)){u.push(s);}}v=u.length;var A=Math.floor(w/v);var r=w%v;for(s=0;s<v;s++){var x=z.getSection(u[s]);var y=A-x[h[t]]();if(s===v-1){y+=r;}x.setStyle(t,y+"px");x.setStyle(d[t],"auto");}}b.extend(k,b.Plugin.Base,{initializer:function(r){var s=this.get("host");var t=s.slide_style_name;this.init_fixed_size=false;if(s.get(t)){p.call(this);}this.afterHostEvent(t+"Change",function(){b.later(1,this,p);},this);}});b.namespace("Plugin");b.Plugin.FixedSizeAccordion=k;},"gallery-2012.03.23-18-00",{skinnable:true,optional:["anim-base"],requires:["widget","selector-css3","plugin","gallery-dimensions"]});
+if(this.get("animateInsertRemove")){var v={node:this.section_list[t].clip,from:{opacity:1},to:{opacity:0}};v.to[this.slide_style_name]=q;if(this.section_list[t].open){this._startAnimator(t,v);}v.node=this.section_list[t].title;var u=this._createAnimator(v);u.on("end",r,this,s);u.run();}else{s[3]=false;r.call(this,null,s);}this.section_list.splice(t,1);if(!s[3]){this.fire("remove",t);}if(!this.allow_all_closed&&this.allSectionsClosed()){this.toggleSection(0);}},findSection:function(s){s=b.Node.getDOMNode(b.one(s));var u=this.section_list.length;for(var r=0;r<u;r++){var v=b.Node.getDOMNode(this.section_list[r].title);var t=b.Node.getDOMNode(this.section_list[r].content);if(s==v||b.DOM.contains(v,s)||s==t||b.DOM.contains(t,s)){return r;}}return -1;},isSectionOpen:function(r){return this.section_list[r].open;},openSection:function(r){if(!this.section_list[r].open){this.toggleSection(r);}},closeSection:function(r){if(this.section_list[r].open){this.toggleSection(r);}},allSectionsOpen:function(){var s=this.section_list.length;for(var r=0;r<s;r++){if(!this.section_list[r].open){return false;}}return true;},allSectionsClosed:function(){var s=this.section_list.length;for(var r=0;r<s;r++){if(this.section_list[r].open){return false;}}return true;},toggleSection:function(r){if(!this.section_list[r].open&&!this.get("allowMultipleOpen")){var u=this.allow_all_closed;this.allow_all_closed=true;this.closeAllSections();this.allow_all_closed=u;}else{if(this.section_list[r].open&&!this.allow_all_closed){this.section_list[r].open=false;if(this.allSectionsClosed()){this.section_list[r].open=true;return;}this.section_list[r].open=true;}}function w(A,z){this.section_list[z].clip.setStyle(this.slide_style_name,"auto");this.fire("open",z);}function y(A,z){this.section_list[z].content.setStyle("display","none");this.fire("close",z);}if(!this.section_list[r].open){this.section_list[r].content.setStyle("display","block");this.fire("beforeOpen",r);this.section_list[r].open=true;this.section_list[r].title.replaceClass(f,a);this.section_list[r].content.replaceClass(f,a);var s=this.section_list[r].content.get(this.slide_size_name);if(this.get("animateOpenClose")){var x={node:this.section_list[r].clip,from:{opacity:0},to:{opacity:1}};x.to[this.slide_style_name]=s;var v=this._startAnimator(r,x);v.on("end",w,this,r);}else{var t=this.section_list[r].clip;if(t.getStyle("opacity")=="0"){t.setStyle("opacity",1);}w.call(this,null,r);}}else{this.fire("beforeClose",r);this.section_list[r].open=false;this.section_list[r].title.replaceClass(a,f);this.section_list[r].content.replaceClass(a,f);if(this.get("animateOpenClose")){var x={node:this.section_list[r].clip,from:{opacity:1},to:{opacity:0}};x.to[this.slide_style_name]=q;var v=this._startAnimator(r,x);v.on("end",y,this,r);}else{this.section_list[r].clip.setStyle(this.slide_style_name,q+"px");y.call(this,null,r);}}},openAllSections:function(){if(this.get("allowMultipleOpen")){var s=this.section_list.length;for(var r=0;r<s;r++){if(!this.section_list[r].open){this.toggleSection(r);}}}},closeAllSections:function(){var s=this.section_list.length;var t=true;for(var r=0;r<s;r++){if(this.section_list[r].open){if(!this.allow_all_closed&&t){t=false;}else{this.toggleSection(r);}}}if(!this.allow_all_closed&&t){this.toggleSection(0);}},_createAnimator:function(s){var r=this.get("animateDuration");if(r!==null){s.duration=r;}var t=this.get("animateEasing");if(t!==null){s.easing=t;}return new b.Anim(s);},_startAnimator:function(r,t){var s=this.section_list[r].anim;if(s){s.stop(true);}this.section_list[r].anim=s=this._createAnimator(t);s.on("end",function(v,u,w){if(u<this.section_list.length&&this.section_list[u].anim==w){this.section_list[u].anim=null;}},this,r,s);s.run();return s;}});b.Accordion=m;function k(){k.superclass.constructor.apply(this,arguments);}k.NAME="FixedSizeAccordionPlugin";k.NS="fixedsize";k.ATTRS={};var i=["animateRender","animateInsertRemove","animateOpenClose"];var e={width:"totalWidth",height:"totalHeight"};var d={width:"overflowX",height:"overflowY"};var h={width:"horizMarginBorderPadding",height:"vertMarginBorderPadding"};function c(r){this.set(r,false);this.modifyAttr(r,{readOnly:true});}function p(){var z=this.get("host");if(!this.init_fixed_size){b.Array.each(i,c,z);if(!z.get("rendered")){this.afterHostEvent("render",p,this);}this.onHostEvent("insert",function(){b.later(1,this,p);},this);this.onHostEvent("remove",p,this);this.onHostEvent("open",p,this);this.onHostEvent("close",p,this);this.init_fixed_size=true;}var t=z.slide_style_name;var w=z.get("boundingBox").parseDimensionStyle(t);var v=z.getSectionCount();var u=[];for(var s=0;s<v;s++){w-=z.getTitle(s)[e[t]]();if(z.isSectionOpen(s)){u.push(s);}}v=u.length;var A=Math.floor(w/v);var r=w%v;for(s=0;s<v;s++){var x=z.getSection(u[s]);var y=A-x[h[t]]();if(s===v-1){y+=r;}x.setStyle(t,y+"px");x.setStyle(d[t],"auto");}}b.extend(k,b.Plugin.Base,{initializer:function(r){var s=this.get("host");var t=s.slide_style_name;this.init_fixed_size=false;if(s.get(t)){p.call(this);}this.afterHostEvent(t+"Change",function(){b.later(1,this,p);},this);}});b.namespace("Plugin");b.Plugin.FixedSizeAccordion=k;},"gallery-2012.05.16-20-37",{skinnable:true,optional:["anim-base"],requires:["widget","selector-css3","plugin","gallery-dimensions"]});
View
64 build/gallery-accordion-horiz-vert/gallery-accordion-horiz-vert.js
@@ -12,18 +12,19 @@ var use_nonzero_empty_div = (0 < Y.UA.ie && Y.UA.ie < 8),
* Provides option to always force at least one item to be open.</p>
*
* @module gallery-accordion-horiz-vert
+ * @main gallery-accordion-horiz-vert
*/
/**
* <p>An accordion can be constructed from existing markup or from strings
* containing HTML. Existing markup can be provided either by setting
- * <code>contentBox</code> or by specifying CSS selectors. See the
- * <code>titles</code> and <code>sections</code> attributes.</p>
+ * `contentBox` or by specifying CSS selectors. See the `titles` and
+ * `sections` attributes.</p>
*
- * <p>When constructing from existing markup via <code>contentBox</code>,
- * use an unordered list (&lt;ul&gt;). Each item must contain two
- * &lt;div&gt;'s. The first one is used as the section title, and the
- * second one is used as the section content.</p>
+ * <p>When constructing from existing markup via `contentBox`, use an
+ * unordered list (&lt;ul&gt;). Each item must contain two &lt;div&gt;'s.
+ * The first one is used as the section title, and the second one is used
+ * as the section content.</p>
*
* <p>Animation is optional. If the anim module is not available,
* animation is automatically turned off.</p>
@@ -43,7 +44,6 @@ var use_nonzero_empty_div = (0 < Y.UA.ie && Y.UA.ie < 8),
* @constructor
* @param config {Object} Widget configuration
*/
-
function Accordion(config)
{
config = config || {};
@@ -76,7 +76,7 @@ Accordion.ATTRS =
/**
* Whether or not the accordion is horizontal.
*
- * @config horizontal
+ * @attribute horizontal
* @type {boolean}
* @default false
* @writeonce
@@ -92,7 +92,7 @@ Accordion.ATTRS =
* of strings containing markup. This is used to define the initial
* set of section titles.
*
- * @config titles
+ * @attribute titles
* @type {String|Array}
* @writeonce
*/
@@ -106,7 +106,7 @@ Accordion.ATTRS =
* supplied title is a node. (If the supplied title is markup, it is
* always inserted inside the default title container.)
*
- * @config replaceTitleContainer
+ * @attribute replaceTitleContainer
* @type {boolean}
* @default true
*/
@@ -121,7 +121,7 @@ Accordion.ATTRS =
* of strings containing markup. This is used to define the initial
* set of section contents.
*
- * @config sections
+ * @attribute sections
* @type {String|Array}
* @writeonce
*/
@@ -135,7 +135,7 @@ Accordion.ATTRS =
* the supplied title is a node. (If the supplied content is markup,
* it is always inserted inside the default section container.)
*
- * @config replaceSectionContainer
+ * @attribute replaceSectionContainer
* @type {boolean}
* @default true
*/
@@ -149,7 +149,7 @@ Accordion.ATTRS =
* Whether or not to allow all sections to be closed at the same time.
* If not, at least one section will always be open.
*
- * @config allowAllClosed
+ * @attribute allowAllClosed
* @type {boolean}
* @default false
*/
@@ -169,7 +169,7 @@ Accordion.ATTRS =
* Whether or not to allow multiple sections to be open at the same
* time. If not, at most one section at a time will be open.
*
- * @config allowMultipleOpen
+ * @attribute allowMultipleOpen
* @type {boolean}
* @default false
*/
@@ -182,7 +182,7 @@ Accordion.ATTRS =
/**
* Whether or not to animate the initial rendering of the widget.
*
- * @config animateRender
+ * @attribute animateRender
* @type {boolean}
* @default false
*/
@@ -197,7 +197,7 @@ Accordion.ATTRS =
/**
* Whether or not to animate insertion and removal of sections.
*
- * @config animateInsertRemove
+ * @attribute animateInsertRemove
* @type {boolean}
* @default true
*/
@@ -211,7 +211,7 @@ Accordion.ATTRS =
/**
* Whether or not to animate opening and closing of sections.
*
- * @config animateOpenClose
+ * @attribute animateOpenClose
* @type {boolean}
* @default true
*/
@@ -225,7 +225,7 @@ Accordion.ATTRS =
/**
* Duration of all animations.
*
- * @config animateDuration
+ * @attribute animateDuration
* @type {int}
* @default whatever Y.Anim default is
*/
@@ -241,7 +241,7 @@ Accordion.ATTRS =
/**
* Easing applied to all animations.
*
- * @config animateEasing
+ * @attribute animateEasing
* @type {function}
* @default whatever Y.Anim default is
*/
@@ -422,6 +422,7 @@ Y.extend(Accordion, Y.Widget,
},
/**
+ * @method getSectionCount
* @return {int} total number of sections
*/
getSectionCount: function()
@@ -430,6 +431,7 @@ Y.extend(Accordion, Y.Widget,
},
/**
+ * @method getTitle
* @param index {int} the section index
* @return {Node} the container for the section title
*/
@@ -442,6 +444,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Sets the contents of the specified section title.
*
+ * @method setTitle
* @param index {int} the section index
* @param title {String|Node} the title content
*/
@@ -497,6 +500,7 @@ Y.extend(Accordion, Y.Widget,
},
/**
+ * @method getSection
* @param index {int} the section index
* @return {Node} the container for the section content
*/
@@ -509,6 +513,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Sets the contents of the specified section.
*
+ * @method setSection
* @param index {int} the section index
* @param content {String|Node} the section content
*/
@@ -562,6 +567,7 @@ Y.extend(Accordion, Y.Widget,
},
/**
+ * @method _getClip
* @protected
* @param index {int} the section index
* @return {Node} the clipping container for the section content
@@ -575,6 +581,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Prepends the section to the accordion.
*
+ * @method prependSection
* @param title {String|Node} the section title content
* @param content {String|Node} the section content
*/
@@ -588,6 +595,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Appends the section to the accordion.
*
+ * @method appendSection
* @param title {String|Node} the section title content
* @param content {String|Node} the section content
*/
@@ -601,6 +609,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Inserts the section into the accordion at the specified location.
*
+ * @method insertSection
* @param index {int} the insertion index
* @param title {String|Node} the section title content
* @param content {String|Node} the section content
@@ -726,6 +735,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Removes the specified section.
*
+ * @method removeSection
* @param index {int} the section index
*/
removeSection: function(
@@ -799,6 +809,7 @@ Y.extend(Accordion, Y.Widget,
},
/**
+ * @method findSection
* @param {String|Node} any element inside the section or title
* @return {int} the index of the containing section, or -1 if not found
*/
@@ -823,6 +834,7 @@ Y.extend(Accordion, Y.Widget,
},
/**
+ * @method isSectionOpen
* @return {boolean} <code>true</code> if the section is open
*/
isSectionOpen: function(
@@ -834,6 +846,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Open the specified section.
*
+ * @method openSection
* @param index {int} the section index
*/
openSection: function(
@@ -848,6 +861,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Close the specified section.
*
+ * @method closeSection
* @param index {int} the section index
*/
closeSection: function(
@@ -860,6 +874,7 @@ Y.extend(Accordion, Y.Widget,
},
/**
+ * @method allSectionsOpen
* @return {boolean} <code>true</code> if all sections are open
*/
allSectionsOpen: function()
@@ -877,6 +892,7 @@ Y.extend(Accordion, Y.Widget,
},
/**
+ * @method allSectionsClosed
* @return {boolean} <code>true</code> if all sections are closed
*/
allSectionsClosed: function()
@@ -896,6 +912,7 @@ Y.extend(Accordion, Y.Widget,
/**
* Show/hide the section content.
*
+ * @method toggleSection
* @param index {int} the section index
*/
toggleSection: function(
@@ -1010,6 +1027,8 @@ Y.extend(Accordion, Y.Widget,
/**
* Open all sections, if possible.
+ *
+ * @method openAllSections
*/
openAllSections: function()
{
@@ -1028,6 +1047,8 @@ Y.extend(Accordion, Y.Widget,
/**
* Close all sections, if possible.
+ *
+ * @method closeAllSections
*/
closeAllSections: function()
{
@@ -1117,8 +1138,9 @@ Y.Accordion = Accordion;
* <p>If/when the widget is given a fixed size, all animations are turned
* off.</p>
*
- * @namespace Plugin
* @class FixedSizeAccordion
+ * @namespace Plugin
+ * @constructor
*/
function FixedSizeAccordionPlugin()
{
@@ -1244,4 +1266,4 @@ Y.namespace("Plugin");
Y.Plugin.FixedSizeAccordion = FixedSizeAccordionPlugin;
-}, 'gallery-2012.03.23-18-00' ,{skinnable:true, optional:['anim-base'], requires:['widget','selector-css3','plugin','gallery-dimensions']});
+}, 'gallery-2012.05.16-20-37' ,{skinnable:true, optional:['anim-base'], requires:['widget','selector-css3','plugin','gallery-dimensions']});
View
46 build/gallery-algorithms/gallery-algorithms-debug.js
@@ -3,16 +3,20 @@ YUI.add('gallery-algorithms', function(Y) {
"use strict";
/**
+ * @module gallery-algorithms
+ */
+
+/**
* <p>Useful algorithms not provided by browsers.</p>
*
- * @module gallery-algorithms
- * @class Y.Array
+ * @main gallery-algorithms
+ * @class Array~algorithms
*/
/**********************************************************************
* <p>Swaps two elements.</p>
*
- * @method Y.Array.swap
+ * @method swap
* @static
* @param list {Array} the list on which to operate
* @param i {int} first index
@@ -28,7 +32,7 @@ Y.Array.swap = function(list,i,j)
/**********************************************************************
* <p>A -1,0,+1 comparator for case-sensitive string comparison.</p>
*
- * @method Y.Array.compareStringsCaseSensitive
+ * @method compareStringsCaseSensitive
* @static
* @param s1 {String} first string
* @param s2 {String} second string
@@ -49,7 +53,7 @@ Y.Array.compareStringsCaseSensitive = function(s1, s2)
/**********************************************************************
* <p>A -1,0,+1 comparator for case-insensitive string comparison.</p>
*
- * @method Y.Array.compareStringsCaseInsensitive
+ * @method compareStringsCaseInsensitive
* @static
* @param s1 {String} first string
* @param s2 {String} second string
@@ -64,7 +68,7 @@ Y.Array.compareStringsCaseInsensitive = function(s1, s2)
* <p>Converts a -1,0,+1 comparator into a boolean comparator, for use by
* Y.Array.find().</p>
*
- * @method Y.Array.compareForFind
+ * @method compareForFind
* @static
* @param f {Function} -1,0,+1 comparator function
* @return {Function} function that returns true if the arguments are equal
@@ -80,13 +84,13 @@ Y.Array.compareForFind = function(f)
/*
quick sort history:
- Copyright (c) 2006 John Lindal
- Copyright (c) 2003 Scandinavian Digital Systems AB
+ Copyright (c) 2006 John Lindal
+ Copyright (c) 2003 Scandinavian Digital Systems AB
- Adapted from http://www.digsys.se
+ Adapted from http://www.digsys.se
- Freeware: The source code and its methods and algorithms may be
- used as desired without restrictions.
+ Freeware: The source code and its methods and algorithms may be
+ used as desired without restrictions.
*/
function qsort1(list,i1,i2,compare)
@@ -160,10 +164,10 @@ function qsortRange(list,first,last,compare)
/**********************************************************************
* <p>Quick sort the given list.</p>
*
- * @method Y.Array.quickSort
+ * @method quickSort
* @static
* @param list {Array} the list to search (sorted on the compare function)
- * @param compare {Function} the comparison function (default: Y.Array.compareStringsCaseSensitive)
+ * @param compare=Y.Array.compareStringsCaseSensitive {Function} the comparison function
*/
Y.Array.quickSort = function(list,compare)
{
@@ -180,11 +184,11 @@ binary search history:
/**********************************************************************
* <p>Binary search.</p>
*
- * @method Y.Array.binarySearch
+ * @method binarySearch
* @static
* @param list {Array} the list to search (sorted on the compare function)
* @param target {Mixed} the object to search for
- * @param compare {Function} the comparison function (default: Y.Array.compareStringsCaseSensitive)
+ * @param compare=Y.Array.compareStringsCaseSensitive {Function} the comparison function
* @return {int} index of matched item or -1 if no match
*/
Y.Array.binarySearch = function(list, target, compare)
@@ -240,7 +244,7 @@ if (Y.ArrayList)
* Useful algorithms that are not provided by browsers. Available if
* Y.ArrayList (collection) is loaded.
*
- * @class Y.ArrayList
+ * @class ArrayList~extras
*/
Y.mix(Y.ArrayList,
@@ -248,7 +252,7 @@ if (Y.ArrayList)
/**
* <p>Swap two elements.</p>
*
- * @method Y.ArrayList.swap
+ * @method swap
* @param i {int} first index
* @param j {int} second index
*/
@@ -260,7 +264,7 @@ if (Y.ArrayList)
/**
* <p>Set comparison function.</p>
*
- * @method Y.ArrayList.setComparator
+ * @method setComparator
* @param compare {Function} the -1,0,+1 comparison function to use when sorting and searching
*/
setComparator: function(compare)
@@ -271,7 +275,7 @@ if (Y.ArrayList)
/**
* <p>Quick sort the given list, using the function passed to setComparator().</p>
*
- * @method Y.ArrayList.quickSort
+ * @method quickSort
*/
quickSort: function()
{
@@ -281,7 +285,7 @@ if (Y.ArrayList)
/**
* <p>Binary search, using the function passed to setComparator().</p>
*
- * @method Y.ArrayList.binarySearch
+ * @method binarySearch
* @param target {Mixed} the object to search for
* @return {int} index of matched item or -1 if no match
*/
@@ -293,4 +297,4 @@ if (Y.ArrayList)
}
-}, 'gallery-2011.02.23-19-01' ,{optional:['collection']});
+}, 'gallery-2012.05.16-20-37' ,{optional:['collection']});
View
2  build/gallery-algorithms/gallery-algorithms-min.js
@@ -1 +1 @@
-YUI.add("gallery-algorithms",function(c){c.Array.swap=function(g,f,d){var e=g[f];g[f]=g[d];g[d]=e;};c.Array.compareStringsCaseSensitive=function(e,d){if(e==d){return 0;}else{return(e<d?-1:+1);}};c.Array.compareStringsCaseInsensitive=function(e,d){return c.Array.compareStringsCaseSensitive(e.toLowerCase(),d.toLowerCase());};c.Array.compareForFind=function(d){return function(f,e){return(d(f,e)===0);};};function b(j,h,g,d){var e,f,i,l,o,p,k=true;if(!d){d=c.Array.compareStringsCaseSensitive;}l=Math.floor((h+g)/2);e=l;i=e--;o=j[i];while(e>=h&&k){f=e--;k=(d(o,j[f])===0);}e=l+1;while(e<=g&&k){f=e++;k=(d(o,j[f])===0);}if(k){return -1;}if(d(j[f],o)>0){i=f;o=j[i];}e=h;f=g;while(e<=f){while(d(o,j[e])>0){e++;}while(d(o,j[f])<=0){f--;}if(e<f){p=j[f];j[f]=j[e];j[e]=p;f--;e++;}}return e;}function a(g,h,e,f){var d;if(h<e){d=b(g,h,e,f);if(d!=-1){a(g,h,d-1,f);a(g,d,e,f);}}}c.Array.quickSort=function(e,d){a(e,0,e.length-1,d);};c.Array.binarySearch=function(i,h,e){if(!i||!i.length||c.Lang.isUndefined(h)){return null;}if(!e){e=c.Array.compareStringsCaseSensitive;}var k=0;var g=i.length-1;var f;while(k<=g){var l=(k+g)/2;var d=(l<1)?0:parseInt(l,10);var j=e(i[d],h);if(j<0){k=d+1;continue;}if(j>0){g=d-1;continue;}if(j===0){g=d-1;f=d;continue;}return d;}return(c.Lang.isUndefined(f)?-1:f);};if(c.ArrayList){c.mix(c.ArrayList,{swap:function(e,d){c.Array.swap(this._items,e,d);},setComparator:function(d){this._compare=d;},quickSort:function(){c.Array.quickSort(this._items,this._compare);},binarySearch:function(d){c.Array.binarySearch(this._items,d,this._compare);}});}},"gallery-2011.02.23-19-01",{optional:["collection"]});
+YUI.add("gallery-algorithms",function(c){c.Array.swap=function(g,f,d){var e=g[f];g[f]=g[d];g[d]=e;};c.Array.compareStringsCaseSensitive=function(e,d){if(e==d){return 0;}else{return(e<d?-1:+1);}};c.Array.compareStringsCaseInsensitive=function(e,d){return c.Array.compareStringsCaseSensitive(e.toLowerCase(),d.toLowerCase());};c.Array.compareForFind=function(d){return function(f,e){return(d(f,e)===0);};};function b(j,h,g,d){var e,f,i,l,o,p,k=true;if(!d){d=c.Array.compareStringsCaseSensitive;}l=Math.floor((h+g)/2);e=l;i=e--;o=j[i];while(e>=h&&k){f=e--;k=(d(o,j[f])===0);}e=l+1;while(e<=g&&k){f=e++;k=(d(o,j[f])===0);}if(k){return -1;}if(d(j[f],o)>0){i=f;o=j[i];}e=h;f=g;while(e<=f){while(d(o,j[e])>0){e++;}while(d(o,j[f])<=0){f--;}if(e<f){p=j[f];j[f]=j[e];j[e]=p;f--;e++;}}return e;}function a(g,h,e,f){var d;if(h<e){d=b(g,h,e,f);if(d!=-1){a(g,h,d-1,f);a(g,d,e,f);}}}c.Array.quickSort=function(e,d){a(e,0,e.length-1,d);};c.Array.binarySearch=function(i,h,e){if(!i||!i.length||c.Lang.isUndefined(h)){return null;}if(!e){e=c.Array.compareStringsCaseSensitive;}var k=0;var g=i.length-1;var f;while(k<=g){var l=(k+g)/2;var d=(l<1)?0:parseInt(l,10);var j=e(i[d],h);if(j<0){k=d+1;continue;}if(j>0){g=d-1;continue;}if(j===0){g=d-1;f=d;continue;}return d;}return(c.Lang.isUndefined(f)?-1:f);};if(c.ArrayList){c.mix(c.ArrayList,{swap:function(e,d){c.Array.swap(this._items,e,d);},setComparator:function(d){this._compare=d;},quickSort:function(){c.Array.quickSort(this._items,this._compare);},binarySearch:function(d){c.Array.binarySearch(this._items,d,this._compare);}});}},"gallery-2012.05.16-20-37",{optional:["collection"]});
View
46 build/gallery-algorithms/gallery-algorithms.js
@@ -3,16 +3,20 @@ YUI.add('gallery-algorithms', function(Y) {
"use strict";
/**
+ * @module gallery-algorithms
+ */
+
+/**
* <p>Useful algorithms not provided by browsers.</p>
*
- * @module gallery-algorithms
- * @class Y.Array
+ * @main gallery-algorithms
+ * @class Array~algorithms
*/
/**********************************************************************
* <p>Swaps two elements.</p>
*
- * @method Y.Array.swap
+ * @method swap
* @static
* @param list {Array} the list on which to operate
* @param i {int} first index
@@ -28,7 +32,7 @@ Y.Array.swap = function(list,i,j)
/**********************************************************************
* <p>A -1,0,+1 comparator for case-sensitive string comparison.</p>
*
- * @method Y.Array.compareStringsCaseSensitive
+ * @method compareStringsCaseSensitive
* @static
* @param s1 {String} first string
* @param s2 {String} second string
@@ -49,7 +53,7 @@ Y.Array.compareStringsCaseSensitive = function(s1, s2)
/**********************************************************************
* <p>A -1,0,+1 comparator for case-insensitive string comparison.</p>
*
- * @method Y.Array.compareStringsCaseInsensitive
+ * @method compareStringsCaseInsensitive
* @static
* @param s1 {String} first string
* @param s2 {String} second string
@@ -64,7 +68,7 @@ Y.Array.compareStringsCaseInsensitive = function(s1, s2)
* <p>Converts a -1,0,+1 comparator into a boolean comparator, for use by
* Y.Array.find().</p>
*
- * @method Y.Array.compareForFind
+ * @method compareForFind
* @static
* @param f {Function} -1,0,+1 comparator function
* @return {Function} function that returns true if the arguments are equal
@@ -80,13 +84,13 @@ Y.Array.compareForFind = function(f)
/*
quick sort history:
- Copyright (c) 2006 John Lindal
- Copyright (c) 2003 Scandinavian Digital Systems AB
+ Copyright (c) 2006 John Lindal
+ Copyright (c) 2003 Scandinavian Digital Systems AB
- Adapted from http://www.digsys.se
+ Adapted from http://www.digsys.se
- Freeware: The source code and its methods and algorithms may be
- used as desired without restrictions.
+ Freeware: The source code and its methods and algorithms may be
+ used as desired without restrictions.
*/
function qsort1(list,i1,i2,compare)
@@ -160,10 +164,10 @@ function qsortRange(list,first,last,compare)
/**********************************************************************
* <p>Quick sort the given list.</p>
*
- * @method Y.Array.quickSort
+ * @method quickSort
* @static
* @param list {Array} the list to search (sorted on the compare function)
- * @param compare {Function} the comparison function (default: Y.Array.compareStringsCaseSensitive)
+ * @param compare=Y.Array.compareStringsCaseSensitive {Function} the comparison function
*/
Y.Array.quickSort = function(list,compare)
{
@@ -180,11 +184,11 @@ binary search history:
/**********************************************************************
* <p>Binary search.</p>
*
- * @method Y.Array.binarySearch
+ * @method binarySearch
* @static
* @param list {Array} the list to search (sorted on the compare function)
* @param target {Mixed} the object to search for
- * @param compare {Function} the comparison function (default: Y.Array.compareStringsCaseSensitive)
+ * @param compare=Y.Array.compareStringsCaseSensitive {Function} the comparison function
* @return {int} index of matched item or -1 if no match
*/
Y.Array.binarySearch = function(list, target, compare)
@@ -240,7 +244,7 @@ if (Y.ArrayList)
* Useful algorithms that are not provided by browsers. Available if
* Y.ArrayList (collection) is loaded.
*
- * @class Y.ArrayList
+ * @class ArrayList~extras
*/
Y.mix(Y.ArrayList,
@@ -248,7 +252,7 @@ if (Y.ArrayList)
/**
* <p>Swap two elements.</p>
*
- * @method Y.ArrayList.swap
+ * @method swap
* @param i {int} first index
* @param j {int} second index
*/
@@ -260,7 +264,7 @@ if (Y.ArrayList)
/**
* <p>Set comparison function.</p>
*
- * @method Y.ArrayList.setComparator
+ * @method setComparator
* @param compare {Function} the -1,0,+1 comparison function to use when sorting and searching
*/
setComparator: function(compare)
@@ -271,7 +275,7 @@ if (Y.ArrayList)
/**
* <p>Quick sort the given list, using the function passed to setComparator().</p>
*
- * @method Y.ArrayList.quickSort
+ * @method quickSort
*/
quickSort: function()
{
@@ -281,7 +285,7 @@ if (Y.ArrayList)
/**
* <p>Binary search, using the function passed to setComparator().</p>
*
- * @method Y.ArrayList.binarySearch
+ * @method binarySearch
* @param target {Mixed} the object to search for
* @return {int} index of matched item or -1 if no match
*/
@@ -293,4 +297,4 @@ if (Y.ArrayList)
}
-}, 'gallery-2011.02.23-19-01' ,{optional:['collection']});
+}, 'gallery-2012.05.16-20-37' ,{optional:['collection']});
View
12 build/gallery-anim-class/gallery-anim-class-debug.js
@@ -3,12 +3,12 @@ YUI.add('gallery-anim-class', function(Y) {
"use strict";
/**********************************************************************
- * <p>Adds CSS class animation to Y.Anim, so you can specify cssClass in
- * from and/or to. At the end of the animation, the from class is replaced
- * by the to class, and all the individual styles used during the animation
- * are removed.</p>
+ * <p>Adds CSS class animation to `Y.Anim`, so you can specify `cssClass`
+ * in `from` and/or `to`. At the end of the animation, the `from` class is
+ * replaced by the `to` class, and all the individual styles used during
+ * the animation are removed.</p>
*
- * <p>Explicit entries in from or to override values set by cssClass.</p>
+ * <p>Explicit entries in `from` or `to` override values set by cssClass.</p>
*
* @module gallery-anim-class
*/
@@ -213,4 +213,4 @@ Y.Anim.prototype._end = function()
};
-}, 'gallery-2012.03.23-18-00' ,{requires:['anim-base','node-style','gallery-funcprog']});
+}, 'gallery-2012.05.16-20-37' ,{requires:['anim-base','node-style','gallery-funcprog']});
View
2  build/gallery-anim-class/gallery-anim-class-min.js
@@ -1 +1 @@
-YUI.add("gallery-anim-class",function(b){var i=["top","bottom","left","right","width","height","maxHeight","maxWidth","minHeight","minWidth","color","fontSize","fontSizeAdjust","fontWeight","textIndent","textShadow","wordSpacing","backgroundColor","backgroundPosition","backgroundSize","outlineColor","outlineWidth","marginTop","marginRight","marginBottom","marginLeft","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderSpacing","paddingTop","paddingRight","paddingBottom","paddingLeft","zIndex","opacity","boxShadow","letterSpacing","lineHeight","markerOffset","orphans","widows","size","fillOpacity","outlineOffset","floodColor","floodOpacity","lightingColor","stopColor","stopOpacity","stroke","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth"];function d(){if(!b.Anim.behaviors.outlineColor){b.Anim.behaviors.outlineColor=b.Anim.behaviors.color;}}function g(k){return b.map(i,function(l){return k.getStyle(l);});}function e(k){return/[#0-9]/.test(k);}function c(k,m,l){if(l.cssClass){k.removeClass(l.cssClass);}if(m.cssClass){k.addClass(m.cssClass);}}function f(k,m,l){if(m.cssClass){k.removeClass(m.cssClass);}if(l.cssClass){k.addClass(l.cssClass);}}var a=b.Anim.prototype._start;b.Anim.prototype._start=function(){var l=this.get("node"),o=this.get("from")||{},n=this.get("to")||{};d();delete this._class_diff_attr;if(o.cssClass||n.cssClass){f(l,o,n);var k=g(l);c(l,o,n);var m=g(l);if(this.get("reverse")){f(l,o,n);}this._class_diff_attr={fromClass:o.cssClass,from:[],toClass:n.cssClass,to:[]};b.each(k,function(r,q){var s=m[q];if(r!==s){var p=i[q];if(!o[p]&&e(s)){this._class_diff_attr.from.push(p);o[p]=s;}if(!n[p]&&e(r)){this._class_diff_attr.to.push(p);n[p]=r;}}},this);delete o.cssClass;this.set("from",o);delete n.cssClass;this.set("to",n);}a.apply(this,arguments);};var h=b.Anim.prototype._runFrame;b.Anim.prototype._runFrame=function(){var k=this.get("reverse");if(!k&&this._class_diff_attr&&this._class_diff_attr.fromClass){this.get("node").removeClass(this._class_diff_attr.fromClass);}else{if(k&&this._class_diff_attr&&this._class_diff_attr.toClass){this.get("node").removeClass(this._class_diff_attr.toClass);}}h.apply(this,arguments);};var j=b.Anim.prototype._end;b.Anim.prototype._end=function(){if(this._class_diff_attr){var k=this.get("node"),m=this.get("from")||{},l=this.get("to")||{};b.each(this._class_diff_attr.from,function(n){delete m[n];});m.cssClass=this._class_diff_attr.fromClass;this.set("from",m);b.each(this._class_diff_attr.to,function(n){delete l[n];k.setStyle(n,"");});l.cssClass=this._class_diff_attr.toClass;this.set("to",l);if(this.get("reverse")){c(k,m,l);}else{f(k,m,l);}}j.apply(this,arguments);};},"gallery-2012.03.23-18-00",{requires:["anim-base","node-style","gallery-funcprog"]});
+YUI.add("gallery-anim-class",function(b){var i=["top","bottom","left","right","width","height","maxHeight","maxWidth","minHeight","minWidth","color","fontSize","fontSizeAdjust","fontWeight","textIndent","textShadow","wordSpacing","backgroundColor","backgroundPosition","backgroundSize","outlineColor","outlineWidth","marginTop","marginRight","marginBottom","marginLeft","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderSpacing","paddingTop","paddingRight","paddingBottom","paddingLeft","zIndex","opacity","boxShadow","letterSpacing","lineHeight","markerOffset","orphans","widows","size","fillOpacity","outlineOffset","floodColor","floodOpacity","lightingColor","stopColor","stopOpacity","stroke","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth"];function d(){if(!b.Anim.behaviors.outlineColor){b.Anim.behaviors.outlineColor=b.Anim.behaviors.color;}}function g(k){return b.map(i,function(l){return k.getStyle(l);});}function e(k){return/[#0-9]/.test(k);}function c(k,m,l){if(l.cssClass){k.removeClass(l.cssClass);}if(m.cssClass){k.addClass(m.cssClass);}}function f(k,m,l){if(m.cssClass){k.removeClass(m.cssClass);}if(l.cssClass){k.addClass(l.cssClass);}}var a=b.Anim.prototype._start;b.Anim.prototype._start=function(){var l=this.get("node"),o=this.get("from")||{},n=this.get("to")||{};d();delete this._class_diff_attr;if(o.cssClass||n.cssClass){f(l,o,n);var k=g(l);c(l,o,n);var m=g(l);if(this.get("reverse")){f(l,o,n);}this._class_diff_attr={fromClass:o.cssClass,from:[],toClass:n.cssClass,to:[]};b.each(k,function(r,q){var s=m[q];if(r!==s){var p=i[q];if(!o[p]&&e(s)){this._class_diff_attr.from.push(p);o[p]=s;}if(!n[p]&&e(r)){this._class_diff_attr.to.push(p);n[p]=r;}}},this);delete o.cssClass;this.set("from",o);delete n.cssClass;this.set("to",n);}a.apply(this,arguments);};var h=b.Anim.prototype._runFrame;b.Anim.prototype._runFrame=function(){var k=this.get("reverse");if(!k&&this._class_diff_attr&&this._class_diff_attr.fromClass){this.get("node").removeClass(this._class_diff_attr.fromClass);}else{if(k&&this._class_diff_attr&&this._class_diff_attr.toClass){this.get("node").removeClass(this._class_diff_attr.toClass);}}h.apply(this,arguments);};var j=b.Anim.prototype._end;b.Anim.prototype._end=function(){if(this._class_diff_attr){var k=this.get("node"),m=this.get("from")||{},l=this.get("to")||{};b.each(this._class_diff_attr.from,function(n){delete m[n];});m.cssClass=this._class_diff_attr.fromClass;this.set("from",m);b.each(this._class_diff_attr.to,function(n){delete l[n];k.setStyle(n,"");});l.cssClass=this._class_diff_attr.toClass;this.set("to",l);if(this.get("reverse")){c(k,m,l);}else{f(k,m,l);}}j.apply(this,arguments);};},"gallery-2012.05.16-20-37",{requires:["anim-base","node-style","gallery-funcprog"]});
View
12 build/gallery-anim-class/gallery-anim-class.js
@@ -3,12 +3,12 @@ YUI.add('gallery-anim-class', function(Y) {
"use strict";
/**********************************************************************
- * <p>Adds CSS class animation to Y.Anim, so you can specify cssClass in
- * from and/or to. At the end of the animation, the from class is replaced
- * by the to class, and all the individual styles used during the animation
- * are removed.</p>
+ * <p>Adds CSS class animation to `Y.Anim`, so you can specify `cssClass`
+ * in `from` and/or `to`. At the end of the animation, the `from` class is
+ * replaced by the `to` class, and all the individual styles used during
+ * the animation are removed.</p>
*
- * <p>Explicit entries in from or to override values set by cssClass.</p>
+ * <p>Explicit entries in `from` or `to` override values set by cssClass.</p>
*
* @module gallery-anim-class
*/
@@ -213,4 +213,4 @@ Y.Anim.prototype._end = function()
};
-}, 'gallery-2012.03.23-18-00' ,{requires:['anim-base','node-style','gallery-funcprog']});
+}, 'gallery-2012.05.16-20-37' ,{requires:['anim-base','node-style','gallery-funcprog']});
View
130 build/gallery-bulkedit/gallery-bulkedit-debug.js
@@ -27,7 +27,8 @@ YUI.add('gallery-bulkedit', function(Y) {
* This comparator can either be 'integer', 'decimal', or a function which
* takes two arguments.</p>
*
- * @class BulkEditDataSource
+ * @class BulkEdit
+ * @namespace DataSource
* @extends DataSource.Local
* @constructor
* @param config {Object}
@@ -45,7 +46,7 @@ BulkEditDataSource.ATTRS =
* REQUIRED. The original data. This must be immutable, i.e., the
* values must not change.
*
- * @config ds
+ * @attribute ds
* @type {DataSource}
* @writeonce
*/
@@ -59,7 +60,7 @@ BulkEditDataSource.ATTRS =
* request usable by the underlying DataSource. This function takes
* one argument: state (startIndex,resultCount,...).
*
- * @config generateRequest
+ * @attribute generateRequest
* @type {Function}
* @writeonce
*/
@@ -73,7 +74,7 @@ BulkEditDataSource.ATTRS =
* REQUIRED. The name of the key in each record that stores an
* identifier which is unique across the entire data set.
*
- * @config uniqueIdKey
+ * @attribute uniqueIdKey
* @type {String}
* @writeonce
*/
@@ -87,7 +88,7 @@ BulkEditDataSource.ATTRS =
* The function to call to generate a unique id for a new record. The
* default generates "bulk-edit-new-id-#".
*
- * @config generateUniqueId
+ * @attribute generateUniqueId
* @type {Function}
* @writeonce
*/
@@ -107,7 +108,7 @@ BulkEditDataSource.ATTRS =
* received data, e.g., <code>.meta.startIndex</code>. If it is not
* provided, startIndex is always assumed to be zero.
*
- * @config startIndexExpr
+ * @attribute startIndexExpr
* @type {String}
* @writeonce
*/
@@ -123,7 +124,7 @@ BulkEditDataSource.ATTRS =
* only appropriate for DataSources that always return the entire data
* set.
*
- * @config totalRecordsReturnExpr
+ * @attribute totalRecordsReturnExpr
* @type {String}
* @writeonce
*/
@@ -137,7 +138,7 @@ BulkEditDataSource.ATTRS =
* REQUIRED. The function to call to extract the total number of
* records from the response.
*
- * @config extractTotalRecords
+ * @attribute extractTotalRecords
* @type {Function}
* @writeonce
*/
@@ -422,8 +423,9 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
},
/**
- * @return {boolean} true if the raw data is stored locally
+ * @method _dataIsLocal
* @protected
+ * @return {boolean} true if the raw data is stored locally
*/
_dataIsLocal: function()
{
@@ -433,6 +435,7 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
/**
* Flush the underlying datasource's cache.
*
+ * @method _flushCache
* @protected
*/
_flushCache: function()
@@ -447,6 +450,7 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
/**
* Use this instead of any meta information in response.
*
+ * @method getRecordCount
* @return {Number} the total number of records
*/
getRecordCount: function()
@@ -455,6 +459,7 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
},
/**
+ * @method getCurrentRecords
* @return {Number} the records returned by the latest request
*/
getCurrentRecords: function()
@@ -463,6 +468,7 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
},
/**
+ * @method getCurrentRecordMap
* @return {Object} the records returned by the latest request, keyed by record id
*/
getCurrentRecordMap: function()
@@ -471,6 +477,7 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
},
/**
+ * @method getValue
* @param record_index {Number}
* @param key {String} field key
* @return {mixed} the value of the specified field in the specified record
@@ -517,6 +524,7 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
* When using a remote datasource, this will include changes made to
* deleted records.
*
+ * @method getChanges
* @return {Object} map of all changed values, keyed by record id
*/
getChanges: function()
@@ -525,6 +533,7 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
},
/**
+ * @method getRemovedRecordIndexes
* @return {Array} list of removed record indices, based on initial ordering
*/
getRemovedRecordIndexes: function()
@@ -544,10 +553,11 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
/**
* You must reload() the widget after calling this function!
*
+ * @method insertRecord
+ * @protected
* @param index {Number} insertion index
* @param record {Object|String} record to insert or id of record to clone
* @return {String} id of newly inserted record
- * @protected
*/
insertRecord: function(
/* int */ index,
@@ -597,9 +607,10 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
/**
* You must reload() the widget after calling this function!
*
+ * @method removeRecord
+ * @protected
* @param index {Number} index of record to remove
* @return {boolean} true if record was removed
- * @protected
*/
removeRecord: function(
/* int */ index)
@@ -639,10 +650,11 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
/**
* Update a value in a record.
*
+ * @method updateValue
+ * @protected
* @param record_id {String}
* @param key {String} field key
* @param value {String} new item value
- * @protected
*/
updateValue: function(
/* string */ record_id,
@@ -675,9 +687,10 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
},
/**
+ * @method _getComparator
+ * @protected
* @param key {String} field key
* @return {Function} comparator function for the given field
- * @protected
*/
_getComparator: function(
/* string */ key)
@@ -702,6 +715,7 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
* Only usable with DataSource.Local. When using best-effort save on
* the server, call this for each record that was successfully saved.
*
+ * @method mergeChanges
* @param record_id {String}
*/
mergeChanges: function(
@@ -763,6 +777,7 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
*
* <p>You must reload() the widget after calling this function!</p>
*
+ * @method killRecord
* @param record_id {String}
*/
killRecord: function(
@@ -844,6 +859,7 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
*
* <p>You must reload() the widget after calling this function!</p>
*
+ * @method updateRecordId
* @param orig_record_id {String}
* @param new_record_id {String}
*/
@@ -914,6 +930,7 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
* Find the index of the given record id. Only usable with
* DataSource.Local.
*
+ * @method recordIdToIndex
* @param record_id {String}
* @return {Number} index or record or -1 if not found
*/
@@ -959,6 +976,7 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
/**
* Merges edits into data and returns result.
*
+ * @method _defRequestFn
* @protected
*/
_defRequestFn: function(e)
@@ -984,10 +1002,12 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
});
Y.BulkEditDataSource = BulkEditDataSource;
+Y.namespace('DataSource').BulkEdit = BulkEditDataSource;
/**********************************************************************
* A widget for editing many records at once.
*
* @module gallery-bulkedit
+ * @main gallery-bulkedit
*/
/**
@@ -1020,8 +1040,8 @@ BulkEditor.NAME = "bulkedit";
BulkEditor.ATTRS =
{
/**
- * @config ds
- * @type {BulkEditDataSource}
+ * @attribute ds
+ * @type {DataSource.BulkEdit}
* @writeonce
*/
ds:
@@ -1039,7 +1059,7 @@ BulkEditor.ATTRS =
* gallery-formmgr-css-validation). Derived classes can require
* additional keys.
*
- * @config fields
+ * @attribute fields
* @type {Object}
* @writeonce
*/
@@ -1054,7 +1074,7 @@ BulkEditor.ATTRS =
* expects it to be configured to display ValidationPageLinks, so the
* user can see which pages have errors that need to be fixed.
*
- * @config paginator
+ * @attribute paginator
* @type {Paginator}
* @writeonce
*/
@@ -1070,7 +1090,7 @@ BulkEditor.ATTRS =
/**
* Extra key/value pairs to pass in the DataSource request.
*
- * @config requestExtra
+ * @attribute requestExtra
* @type {Object}
* @writeonce
*/
@@ -1084,7 +1104,7 @@ BulkEditor.ATTRS =
/**
* CSS class used to temporarily highlight a record.
*
- * @config pingClass
+ * @attribute pingClass
* @type {String}
* @default "yui3-bulkedit-ping"
*/
@@ -1097,7 +1117,7 @@ BulkEditor.ATTRS =
/**
* Duration in seconds that pingClass is applied to a record.
*
- * @config pingTimeout
+ * @attribute pingTimeout
* @type {Number}
* @default 2
*/
@@ -1175,6 +1195,8 @@ Y.extend(BulkEditor, Y.Widget,
/**
* Reloads the current page of records. This will erase any changes
* unsaved changes!
+ *
+ * @method reload
*/
reload: function()
{
@@ -1227,6 +1249,8 @@ Y.extend(BulkEditor, Y.Widget,
/**
* Save the modified values from the current page of records.
+ *
+ * @method saveChanges
*/
saveChanges: function()
{
@@ -1249,6 +1273,7 @@ Y.extend(BulkEditor, Y.Widget,
* Retrieve *all* the data. Do not call this if you use server-side
* pagination.
*
+ * @method getAllValues
* @param callback {Object} callback object which will be invoked by DataSource
*/
getAllValues: function(callback)
@@ -1268,6 +1293,7 @@ Y.extend(BulkEditor, Y.Widget,
},
/**
+ * @method getChanges
* @return {Object} map of all changed values, keyed by record id
*/
getChanges: function()
@@ -1280,6 +1306,7 @@ Y.extend(BulkEditor, Y.Widget,
*
* <p>You must reload() the widget after calling this function!</p>
*
+ * @method insertRecord
* @param index {Number} insertion index
* @param record {Object|String} record to insert or id of record to clone
* @return {String} the new record's id
@@ -1306,6 +1333,7 @@ Y.extend(BulkEditor, Y.Widget,
*
* <p>You must reload() the widget after calling this function!</p>
*
+ * @method removeRecord
* @param index {Number}
* @return {Boolean} true if the record was successfully removed
*/
@@ -1330,6 +1358,7 @@ Y.extend(BulkEditor, Y.Widget,
},
/**
+ * @method getFieldConfig
* @param key {String} field key
* @return {Object} field configuration
*/
@@ -1340,6 +1369,7 @@ Y.extend(BulkEditor, Y.Widget,
},
/**
+ * @method getRecordContainerId
* @param record {String|Object} record id or record object
* @return {String} id of DOM element containing the record's input elements
*/
@@ -1357,6 +1387,7 @@ Y.extend(BulkEditor, Y.Widget,
},
/**
+ * @method getFieldId
* @param record {String|Object} record id or record object
* @param key {String} field key
* @return {String} id of DOM element containing the field's input element
@@ -1369,6 +1400,7 @@ Y.extend(BulkEditor, Y.Widget,
},
/**
+ * @method getRecordAndFieldKey
* @param key {String|Node} field key or field input element
* @return {Object} object containing record and field_key
*/
@@ -1383,6 +1415,7 @@ Y.extend(BulkEditor, Y.Widget,
},
/**
+ * @method getRecordId
* @param obj {Object|Node} record object, record container, or any node inside record container
* @return {String} record id
*/
@@ -1406,6 +1439,7 @@ Y.extend(BulkEditor, Y.Widget,
},
/**
+ * @method getRecordContainer
* @param record {String|Object|Node} record id, record object, record container, or any node inside record container
* @return {Node} node containing rendered record
*/
@@ -1429,6 +1463,7 @@ Y.extend(BulkEditor, Y.Widget,
},
/**
+ * @method getFieldContainer
* @param record {String|Object|Node} record id, record object, record container, or any node inside record container
* @param key {String} field key
* @return {Node} node containing rendered field
@@ -1442,6 +1477,7 @@ Y.extend(BulkEditor, Y.Widget,
},
/**
+ * @method getFieldElement
* @param record {String|Object|Node} record id, record object, record container, or any node inside record container
* @param key {String} field key
* @return {Node} field's input element
@@ -1461,6 +1497,7 @@ Y.extend(BulkEditor, Y.Widget,
* Paginate and/or scroll to make the specified record visible. Record
* is pinged to help the user find it.
*
+ * @method showRecordIndex
* @param index {Number} record index
*/
showRecordIndex: function(
@@ -1491,6 +1528,7 @@ Y.extend(BulkEditor, Y.Widget,
* Paginate and/or scroll to make the specified record visible. Record
* is pinged to help the user find it.
*
+ * @method showRecordId
* @param id {Number} record id
*/
showRecordId: function(
@@ -1508,6 +1546,7 @@ Y.extend(BulkEditor, Y.Widget,
* while. Your CSS can use this class to highlight the record in some
* way.
*
+ * @method pingRecord
* @param record {String|Object|Node} record id, record object, record container, or any node inside record container
*/
pingRecord: function(
@@ -1528,8 +1567,9 @@ Y.extend(BulkEditor, Y.Widget,
/**
* Render the current page of records.
*
- * @param response {Object} response from data source
+ * @method _render
* @protected
+ * @param response {Object} response from data source
*/
_render: function(response)
{
@@ -1563,8 +1603,9 @@ Y.extend(BulkEditor, Y.Widget,
/**
* Derived class should override to create a structure for the records.
*
- * @param container {Node}
+ * @method _renderContainer
* @protected
+ * @param container {Node}
*/
_renderContainer: function(
/* element */ container)
@@ -1575,9 +1616,10 @@ Y.extend(BulkEditor, Y.Widget,
/**
* Derived class must override to create a container for the record.
*
+ * @method _renderRecordContainer
+ * @protected
* @param container {Node}
* @param record {Object} record data
- * @protected
*/
_renderRecordContainer: function(
/* element */ container,
@@ -1590,9 +1632,10 @@ Y.extend(BulkEditor, Y.Widget,
* Derived class can override if it needs to do more than just call
* _renderField() for each field.
*
+ * @method _renderRecord
+ * @protected
* @param container {Node} record container
* @param record {Object} record data
- * @protected
*/
_renderRecord: function(
/* element */ container,
@@ -1616,13 +1659,14 @@ Y.extend(BulkEditor, Y.Widget,
* If _renderRecord is not overridden, derived class must override this
* function to render the field.
*
+ * @method _renderField
+ * @protected
* @param o {Object}
* container {Node} record container,
* key {String} field key,
* value {Mixed} field value,
* field {Object} field configuration,
* record {Object} record data
- * @protected
*/
_renderField: function(
/* object */ o)
@@ -1632,8 +1676,9 @@ Y.extend(BulkEditor, Y.Widget,
/**
* Update the paginator to match the data source meta information.
*
- * @param response {Object} response from DataSource
+ * @method _updatePaginator
* @protected
+ * @param response {Object} response from DataSource
*/
_updatePaginator: function(response)
{
@@ -1647,6 +1692,8 @@ Y.extend(BulkEditor, Y.Widget,
/**
* Clear errors received from the server. This clears all displayed
* messages.
+ *
+ * @method clearServerErrors
*/
clearServerErrors: function()
{
@@ -1679,6 +1726,7 @@ Y.extend(BulkEditor, Y.Widget,
* error) or an object providing msg and type, where type can be
* 'error', 'warn', 'info', or 'success'.
*
+ * @method setServerErrors
* @param page_errors {Array} list of page-level error messages
* @param record_field_errors {Array} list of objects *in record display order*,
* each of which defines id (String), recordError (message),
@@ -1718,6 +1766,7 @@ Y.extend(BulkEditor, Y.Widget,
/**
* Update paginator to show which pages have errors.
*
+ * @method _updatePageStatus
* @protected
*/
_updatePageStatus: function()
@@ -1754,6 +1803,7 @@ Y.extend(BulkEditor, Y.Widget,
* Validate the visible values (if using server-side pagination) or all
* the values (if using client-side pagination or no pagination).
*
+ * @method validate
* @return {Boolean} true if all checked values are acceptable
*/
validate: function()
@@ -1799,9 +1849,10 @@ Y.extend(BulkEditor, Y.Widget,
/**
* Validate the visible values.
*
+ * @method _validateVisibleFields
+ * @protected
* @param container {Node} if null, uses contentBox
* @return {Boolean} true if all checked values are acceptable
- * @protected
*/
_validateVisibleFields: function(
/* object */ container)
@@ -1857,9 +1908,10 @@ Y.extend(BulkEditor, Y.Widget,
/**
* Validate the given elements.
*
+ * @method _validateElements
+ * @protected
* @param nodes {NodeList}
* @return {Boolean} true if all checked values are acceptable
- * @protected
*/
_validateElements: function(
/* array */ nodes)
@@ -1947,8 +1999,9 @@ Y.extend(BulkEditor, Y.Widget,
* If the data is stored locally and we paginate, validate all of it
* and mark the pages that have invalid values.
*
- * @return {Boolean} true if all checked values are acceptable
+ * @method _validateAllPages
* @protected
+ * @return {Boolean} true if all checked values are acceptable
*/
_validateAllPages: function()
{
@@ -2023,6 +2076,8 @@ Y.extend(BulkEditor, Y.Widget,
/**
* Clear all displayed messages.
+ *
+ * @method _clearValidationMessages
*/
_clearValidationMessages: function()
{
@@ -2042,6 +2097,7 @@ Y.extend(BulkEditor, Y.Widget,
/**
* Display a message for the specified field.
*
+ * @method displayFieldMessage
* @param e {Node} field input element
* @param msg {String} message to display
* @param type {String} message type: error, warn, info, success
@@ -2086,6 +2142,7 @@ Y.extend(BulkEditor, Y.Widget,
/**
* Display a message for the specified record.
*
+ * @method displayRecordMessage
* @param id {String} record id
* @param msg {String} message to display
* @param type {String} message type: error, warn, info, success
@@ -2125,10 +2182,11 @@ Y.extend(BulkEditor, Y.Widget,
},
/**
+ * @method _getElementStatus
+ * @protected
* @param n {Node}
* @param r {RegExp}
* @return {Mixed} status or false
- * @protected
*/
_getElementStatus: function(
/* Node */ n,
@@ -2141,6 +2199,7 @@ Y.extend(BulkEditor, Y.Widget,
/**
* Update the status of the node, if the new status has higher precedence.
*
+ * @method _updateRecordStatus
* @param bd {Node}
* @param type {String} new status
* @param p {String} pattern for extracting status
@@ -2175,6 +2234,11 @@ function cleanHTML(s)
return (s ? Y.Escape.html(s) : '');
}
+/**
+ * @property Y.BulkEditor.error_msg_markup
+ * @type {String}
+ * @static
+ */
BulkEditor.error_msg_markup = Y.Lang.sub('<div class="{c}"></div>',
{
c: message_container_class
@@ -2349,7 +2413,7 @@ HTMLTableBulkEditor.ATTRS =
/**
* Configuration for each column: key, label, formatter.
*
- * @config columns
+ * @attribute columns
* @type {Array}
* @writeonce
*/
@@ -2368,7 +2432,7 @@ HTMLTableBulkEditor.ATTRS =
* <p>Attaching events to the container before the table is created does
* not work in all browsers.</p>
*
- * @config events
+ * @attribute events
* @type {Array}
* @writeonce
*/
@@ -2632,4 +2696,4 @@ Y.extend(HTMLTableBulkEditor, BulkEditor,
Y.HTMLTableBulkEditor = HTMLTableBulkEditor;
-}, 'gallery-2012.05.09-20-27' ,{skinnable:true, optional:['datasource','dataschema','gallery-paginator'], requires:['widget','datasource-local','gallery-busyoverlay','gallery-formmgr-css-validation','gallery-node-optimizations','gallery-scrollintoview','array-extras','gallery-funcprog','escape']});
+}, 'gallery-2012.05.16-20-37' ,{skinnable:true, optional:['datasource','dataschema','gallery-paginator'], requires:['widget','datasource-local','gallery-busyoverlay','gallery-formmgr-css-validation','gallery-node-optimizations','gallery-scrollintoview','array-extras','gallery-funcprog','escape']});
View
4 build/gallery-bulkedit/gallery-bulkedit-min.js
@@ -1,6 +1,6 @@
YUI.add("gallery-bulkedit",function(Y){function BulkEditDataSource(){BulkEditDataSource.superclass.constructor.apply(this,arguments);}BulkEditDataSource.NAME="bulkEditDataSource";BulkEditDataSource.ATTRS={ds:{writeOnce:true},generateRequest:{validator:Y.Lang.isFunction,writeOnce:true},uniqueIdKey:{validator:Y.Lang.isString,writeOnce:true},generateUniqueId:{value:function(){idCounter++;return uniqueIdPrefix+idCounter;},validator:Y.Lang.isFunction,writeOnce:true},startIndexExpr:{validator:Y.Lang.isString,writeOnce:true},totalRecordsReturnExpr:{validator:Y.Lang.isString,writeOnce:true},extractTotalRecords:{validator:Y.Lang.isFunction,writeOnce:true}};var uniqueIdPrefix="bulk-edit-new-id-",idCounter=0,inserted_prefix="be-ds-i:",inserted_re=/^be-ds-i:/,removed_prefix="be-ds-r:",removed_re=/^be-ds-r:/;BulkEditDataSource.comparator={"string":function(a,b){return(Y.Lang.trim(a.toString())===Y.Lang.trim(b.toString()));},"integer":function(a,b){return(parseInt(a,10)===parseInt(b,10));},"decimal":function(a,b){return(parseFloat(a,10)===parseFloat(b,10));},"boolean":function(a,b){return(((a&&b)||(!a&&!b))?true:false);}};function fromDisplayIndex(index){var count=-1;for(var i=0;i<this._index.length;i++){var j=this._index[i];if(!removed_re.test(j)){count++;if(count===index){return i;}}}return false;}function adjustRequest(){var r=this._callback.request;this._callback.adjust={origStart:r.startIndex,origCount:r.resultCount};if(!this._index){return;}var start=Math.min(r.startIndex,this._index.length);var end=0;for(var i=0;i<start;i++){var j=this._index[i];if(!inserted_re.test(j)){end++;}if(removed_re.test(j)){start++;}}r.startIndex=end;this._callback.adjust.indexStart=i;var count=0;while(i<this._index.length&&count<this._callback.adjust.origCount){var j=this._index[i];if(inserted_re.test(j)){r.resultCount--;}if(removed_re.test(j)){r.resultCount++;}else{count++;}i++;}this._callback.adjust.indexEnd=i;}function internalSuccess(e){if(!e.response||e.error||!Y.Lang.isArray(e.response.results)){internalFailure.apply(this,arguments);return;}if(!Y.Lang.isUndefined(this._callback._tId)&&e.tId!==this._callback._tId){return;}this._callback.response=e.response;checkFinished.call(this);}function internalFailure(e){if(e.tId===this._callback._tId){this._callback.error=e.error;this._callback.response=e.response;this.fire("response",this._callback);}}function checkFinished(){if(this._generatingRequest||!this._callback.response){return;}if(!this._fields){this._fields={};Y.Array.each(this.get("ds").schema.get("schema").resultFields,function(value){if(Y.Lang.isObject(value)){this._fields[value.key]=value;}},this);}var response={};Y.mix(response,this._callback.response);response.results=[];response=Y.clone(response,true);var dataStartIndex=0;if(this.get("startIndexExpr")){eval("dataStartIndex=this._callback.response"+this.get("startIndexExpr"));}var startIndex=this._callback.request.startIndex-dataStartIndex;response.results=this._callback.response.results.slice(startIndex,startIndex+this._callback.request.resultCount);if(!this._index){if(this.get("totalRecordsReturnExpr")){eval("response"+this.get("totalRecordsReturnExpr")+"="+this._callback.response.results.length);}this._count=this.get("extractTotalRecords")(response);this._index=[];for(var i=0;i<this._count;i++){this._index.push(i);}}else{var adjust=this._callback.adjust;for(var i=adjust.indexStart,k=0;i<adjust.indexEnd;i++,k++){var j=this._index[i];if(inserted_re.test(j)){var id=j.substr(inserted_prefix.length);response.results.splice(k,0,Y.clone(this._new[id],true));}else{if(removed_re.test(j)){response.results.splice(k,1);k--;}}}}this._records=[];this._recordMap={};var uniqueIdKey=this.get("uniqueIdKey");Y.Array.each(response.results,function(value){var rec=Y.clone(value,true);this._records.push(rec);this._recordMap[rec[uniqueIdKey]]=rec;},this);Y.Array.each(response.results,function(rec){var diff=this._diff[rec[uniqueIdKey]];if(diff){Y.mix(rec,diff,true);}},this);this._callback.response=response;this.fire("response",this._callback);}Y.extend(BulkEditDataSource,Y.DataSource.Local,{initializer:function(config){if(!(config.ds instanceof Y.DataSource.Local)){Y.error("BulkEditDataSource requires DataSource");}if(!config.generateRequest){Y.error("BulkEditDataSource requires generateRequest function");}if(!config.uniqueIdKey){Y.error("BulkEditDataSource requires uniqueIdKey configuration");}if(!config.extractTotalRecords){Y.error("BulkEditDataSource requires extractTotalRecords function");}this._index=null;this._count=0;this._new={};this._diff={};},_dataIsLocal:function(){return(Y.Lang.isArray(this.get("ds").get("source")));},_flushCache:function(){var ds=this.get("ds");if(ds.cache&&Y.Lang.isFunction(ds.cache.flush)){ds.cache.flush();}},getRecordCount:function(){return this._count;},getCurrentRecords:function(){return this._records;},getCurrentRecordMap:function(){return this._recordMap;},getValue:function(record_index,key){if(!this._dataIsLocal()){Y.error("BulkEditDataSource.getValue() can only be called when using a local datasource");}var j=fromDisplayIndex.call(this,record_index);if(j===false){return false;}j=this._index[j];if(inserted_re.test(j)){var record_id=j.substr(inserted_prefix.length);var record=this._new[record_id];}else{var record=this.get("ds").get("source")[j];var record_id=record[this.get("uniqueIdKey")];}if(this._diff[record_id]&&!Y.Lang.isUndefined(this._diff[record_id][key])){return this._diff[record_id][key];}else{return record[key];}},getChanges:function(){return this._diff;},getRemovedRecordIndexes:function(){var list=[];Y.Array.each(this._index,function(j){if(removed_re.test(j)){list.push(parseInt(j.substr(removed_prefix.length),10));}});return list;},insertRecord:function(index,record){this._count++;var record_id=String(this.get("generateUniqueId")());this._new[record_id]={};this._new[record_id][this.get("uniqueIdKey")]=record_id;var j=fromDisplayIndex.call(this,index);if(j===false){j=this._index.length;}this._index.splice(j,0,inserted_prefix+record_id);
-if(record&&!Y.Lang.isObject(record)){var s=record.toString();record=Y.clone(this._recordMap[s]||this._new[s],true);var diff=this._diff[s];if(record&&diff){Y.mix(record,diff,true);}}if(record){var uniqueIdKey=this.get("uniqueIdKey");Y.Object.each(record,function(value,key){if(key!=uniqueIdKey){this.updateValue(record_id,key,value);}},this);}return record_id;},removeRecord:function(index){var j=fromDisplayIndex.call(this,index);if(j===false){return false;}this._count--;if(inserted_re.test(this._index[j])){var record_id=this._index[j].substr(inserted_prefix.length);delete this._new[record_id];this._index.splice(j,1);}else{if(this._dataIsLocal()){var record_id=this.get("ds").get("source")[this._index[j]][this.get("uniqueIdKey")].toString();}this._index[j]=removed_prefix+this._index[j];}if(record_id){delete this._diff[record_id];}return true;},updateValue:function(record_id,key,value){if(key==this.get("uniqueIdKey")){Y.error("BulkEditDataSource.updateValue() does not allow changing the id for a record. Use BulkEditDataSource.updateRecordId() instead.");}record_id=record_id.toString();var record=this._recordMap[record_id];if(record&&this._getComparator(key)(record[key]||"",value||"")){if(this._diff[record_id]){delete this._diff[record_id][key];}}else{if(!this._diff[record_id]){this._diff[record_id]={};}this._diff[record_id][key]=value;}},_getComparator:function(key){var f=(this._fields[key]&&this._fields[key].comparator)||"string";if(Y.Lang.isFunction(f)){return f;}else{if(BulkEditDataSource.comparator[f]){return BulkEditDataSource.comparator[f];}else{return BulkEditDataSource.comparator.string;}}},mergeChanges:function(record_id){if(!this._dataIsLocal()){Y.error("BulkEditDataSource.mergeChanges() can only be called when using a local datasource");}record_id=record_id.toString();function merge(rec){if(rec[this.get("uniqueIdKey")].toString()===record_id){var diff=this._diff[record_id];if(diff){Y.mix(rec,diff,true);delete this._diff[record_id];}return true;}}var found=false;this._flushCache();Y.Array.some(this.get("ds").get("source"),function(value){if(merge.call(this,value)){found=true;return true;}},this);if(!found){Y.Object.some(this._new,function(value){if(merge.call(this,value)){found=true;return true;}},this);}},killRecord:function(record_id){if(!this._dataIsLocal()){Y.error("BulkEditDataSource.killRecord() can only be called when using a local datasource");}record_id=record_id.toString();function kill(rec){if(rec[this.get("uniqueIdKey")].toString()===record_id){var info={};this.recordIdToIndex(record_id,info);var j=this._index[info.internal_index];this._index.splice(info.internal_index,1);if(!inserted_re.test(j)){for(var i=info.internal_index;i<this._index.length;i++){var k=this._index[i];if(removed_re.test(k)){this._index[i]=removed_prefix+(parseInt(k.substr(removed_prefix.length),10)-1);}else{if(!inserted_re.test(k)){this._index[i]--;}}}}this._count--;delete this._diff[record_id];return true;}}var found=false;this._flushCache();var data=this.get("ds").get("source");Y.Array.some(data,function(value,i){if(kill.call(this,value)){data.splice(i,1);found=true;return true;}},this);if(!found){Y.Object.some(this._new,function(value,id){if(kill.call(this,value)){delete this._new[id];found=true;return true;}},this);}},updateRecordId:function(orig_record_id,new_record_id){if(!this._dataIsLocal()){Y.error("BulkEditDataSource.updateRecordId() can only be called when using a local datasource");}orig_record_id=orig_record_id.toString();new_record_id=new_record_id.toString();function update(rec){if(rec[this.get("uniqueIdKey")].toString()===orig_record_id){var info={};this.recordIdToIndex(orig_record_id,info);var j=info.internal_index;if(inserted_re.test(this._index[j])){this._index[j]=inserted_prefix+new_record_id;}rec[this.get("uniqueIdKey")]=new_record_id;if(this._diff[orig_record_id]){this._diff[new_record_id]=this._diff[orig_record_id];delete this._diff[orig_record_id];}return true;}}var found=false;this._flushCache();Y.Array.some(this.get("ds").get("source"),function(value){if(update.call(this,value)){found=true;return true;}},this);if(!found){Y.Object.some(this._new,function(value,id){if(update.call(this,value)){this._new[new_record_id]=value;delete this._new[id];found=true;return true;}},this);}},recordIdToIndex:function(record_id,return_info){if(!this._dataIsLocal()){Y.error("BulkEditDataSource.recordIdToIndex() can only be called when using a local datasource");}record_id=record_id.toString();var records=this.get("ds").get("source");var count=0;for(var i=0;i<this._index.length;i++){var j=this._index[i];var ins=inserted_re.test(j);var del=removed_re.test(j);if((ins&&j.substr(inserted_prefix.length)===record_id)||(!ins&&!del&&records[j][this.get("uniqueIdKey")].toString()===record_id)){if(return_info){return_info.internal_index=i;}return count;}if(!del){count++;}}return -1;},_defRequestFn:function(e){this._callback=e;adjustRequest.call(this);this._generatingRequest=true;this._callback._tId=this.get("ds").sendRequest({request:this.get("generateRequest")(this._callback.request),callback:{success:Y.bind(internalSuccess,this),failure:Y.bind(internalFailure,this)}});this._generatingRequest=false;checkFinished.call(this);}});Y.BulkEditDataSource=BulkEditDataSource;function BulkEditor(){BulkEditor.superclass.constructor.apply(this,arguments);}BulkEditor.NAME="bulkedit";BulkEditor.ATTRS={ds:{validator:function(value){return(value instanceof BulkEditDataSource);},writeOnce:true},fields:{validator:Y.Lang.isObject,writeOnce:true},paginator:{validator:function(value){return(value instanceof Y.Paginator);},writeOnce:true},requestExtra:{value:{},validator:Y.Lang.isObject,writeOnce:true},pingClass:{value:Y.ClassNameManager.getClassName(BulkEditor.NAME,"ping"),validator:Y.Lang.isString},pingTimeout:{value:2,validator:Y.Lang.isNumber}};var default_page_size=1000000000,id_prefix="bulk-editor",id_separator="__",id_regex=new RegExp("^"+id_prefix+id_separator+"(.+?)(?:"+id_separator+"(.+?))?$"),field_container_class=Y.ClassNameManager.getClassName(BulkEditor.NAME,"field-container"),field_container_class_prefix=field_container_class+"-",field_class_prefix=Y.ClassNameManager.getClassName(BulkEditor.NAME,"field")+"-",status_prefix="bulkedit-has",status_pattern=status_prefix+"([a-z]+)",status_re=new RegExp(Y.Node.class_re_prefix+status_pattern+Y.Node.class_re_suffix),record_status_prefix="bulkedit-hasrecord",record_status_pattern=record_status_prefix+"([a-z]+)",record_status_re=new RegExp(Y.Node.class_re_prefix+record_status_pattern+Y.Node.class_re_suffix),message_container_class=Y.ClassNameManager.getClassName(BulkEditor.NAME,"message-text"),perl_flags_regex=/^\(\?([a-z]+)\)/;
+if(record&&!Y.Lang.isObject(record)){var s=record.toString();record=Y.clone(this._recordMap[s]||this._new[s],true);var diff=this._diff[s];if(record&&diff){Y.mix(record,diff,true);}}if(record){var uniqueIdKey=this.get("uniqueIdKey");Y.Object.each(record,function(value,key){if(key!=uniqueIdKey){this.updateValue(record_id,key,value);}},this);}return record_id;},removeRecord:function(index){var j=fromDisplayIndex.call(this,index);if(j===false){return false;}this._count--;if(inserted_re.test(this._index[j])){var record_id=this._index[j].substr(inserted_prefix.length);delete this._new[record_id];this._index.splice(j,1);}else{if(this._dataIsLocal()){var record_id=this.get("ds").get("source")[this._index[j]][this.get("uniqueIdKey")].toString();}this._index[j]=removed_prefix+this._index[j];}if(record_id){delete this._diff[record_id];}return true;},updateValue:function(record_id,key,value){if(key==this.get("uniqueIdKey")){Y.error("BulkEditDataSource.updateValue() does not allow changing the id for a record. Use BulkEditDataSource.updateRecordId() instead.");}record_id=record_id.toString();var record=this._recordMap[record_id];if(record&&this._getComparator(key)(record[key]||"",value||"")){if(this._diff[record_id]){delete this._diff[record_id][key];}}else{if(!this._diff[record_id]){this._diff[record_id]={};}this._diff[record_id][key]=value;}},_getComparator:function(key){var f=(this._fields[key]&&this._fields[key].comparator)||"string";if(Y.Lang.isFunction(f)){return f;}else{if(BulkEditDataSource.comparator[f]){return BulkEditDataSource.comparator[f];}else{return BulkEditDataSource.comparator.string;}}},mergeChanges:function(record_id){if(!this._dataIsLocal()){Y.error("BulkEditDataSource.mergeChanges() can only be called when using a local datasource");}record_id=record_id.toString();function merge(rec){if(rec[this.get("uniqueIdKey")].toString()===record_id){var diff=this._diff[record_id];if(diff){Y.mix(rec,diff,true);delete this._diff[record_id];}return true;}}var found=false;this._flushCache();Y.Array.some(this.get("ds").get("source"),function(value){if(merge.call(this,value)){found=true;return true;}},this);if(!found){Y.Object.some(this._new,function(value){if(merge.call(this,value)){found=true;return true;}},this);}},killRecord:function(record_id){if(!this._dataIsLocal()){Y.error("BulkEditDataSource.killRecord() can only be called when using a local datasource");}record_id=record_id.toString();function kill(rec){if(rec[this.get("uniqueIdKey")].toString()===record_id){var info={};this.recordIdToIndex(record_id,info);var j=this._index[info.internal_index];this._index.splice(info.internal_index,1);if(!inserted_re.test(j)){for(var i=info.internal_index;i<this._index.length;i++){var k=this._index[i];if(removed_re.test(k)){this._index[i]=removed_prefix+(parseInt(k.substr(removed_prefix.length),10)-1);}else{if(!inserted_re.test(k)){this._index[i]--;}}}}this._count--;delete this._diff[record_id];return true;}}var found=false;this._flushCache();var data=this.get("ds").get("source");Y.Array.some(data,function(value,i){if(kill.call(this,value)){data.splice(i,1);found=true;return true;}},this);if(!found){Y.Object.some(this._new,function(value,id){if(kill.call(this,value)){delete this._new[id];found=true;return true;}},this);}},updateRecordId:function(orig_record_id,new_record_id){if(!this._dataIsLocal()){Y.error("BulkEditDataSource.updateRecordId() can only be called when using a local datasource");}orig_record_id=orig_record_id.toString();new_record_id=new_record_id.toString();function update(rec){if(rec[this.get("uniqueIdKey")].toString()===orig_record_id){var info={};this.recordIdToIndex(orig_record_id,info);var j=info.internal_index;if(inserted_re.test(this._index[j])){this._index[j]=inserted_prefix+new_record_id;}rec[this.get("uniqueIdKey")]=new_record_id;if(this._diff[orig_record_id]){this._diff[new_record_id]=this._diff[orig_record_id];delete this._diff[orig_record_id];}return true;}}var found=false;this._flushCache();Y.Array.some(this.get("ds").get("source"),function(value){if(update.call(this,value)){found=true;return true;}},this);if(!found){Y.Object.some(this._new,function(value,id){if(update.call(this,value)){this._new[new_record_id]=value;delete this._new[id];found=true;return true;}},this);}},recordIdToIndex:function(record_id,return_info){if(!this._dataIsLocal()){Y.error("BulkEditDataSource.recordIdToIndex() can only be called when using a local datasource");}record_id=record_id.toString();var records=this.get("ds").get("source");var count=0;for(var i=0;i<this._index.length;i++){var j=this._index[i];var ins=inserted_re.test(j);var del=removed_re.test(j);if((ins&&j.substr(inserted_prefix.length)===record_id)||(!ins&&!del&&records[j][this.get("uniqueIdKey")].toString()===record_id)){if(return_info){return_info.internal_index=i;}return count;}if(!del){count++;}}return -1;},_defRequestFn:function(e){this._callback=e;adjustRequest.call(this);this._generatingRequest=true;this._callback._tId=this.get("ds").sendRequest({request:this.get("generateRequest")(this._callback.request),callback:{success:Y.bind(internalSuccess,this),failure:Y.bind(internalFailure,this)}});this._generatingRequest=false;checkFinished.call(this);}});Y.BulkEditDataSource=BulkEditDataSource;Y.namespace("DataSource").BulkEdit=BulkEditDataSource;function BulkEditor(){BulkEditor.superclass.constructor.apply(this,arguments);}BulkEditor.NAME="bulkedit";BulkEditor.ATTRS={ds:{validator:function(value){return(value instanceof BulkEditDataSource);},writeOnce:true},fields:{validator:Y.Lang.isObject,writeOnce:true},paginator:{validator:function(value){return(value instanceof Y.Paginator);},writeOnce:true},requestExtra:{value:{},validator:Y.Lang.isObject,writeOnce:true},pingClass:{value:Y.ClassNameManager.getClassName(BulkEditor.NAME,"ping"),validator:Y.Lang.isString},pingTimeout:{value:2,validator:Y.Lang.isNumber}};var default_page_size=1000000000,id_prefix="bulk-editor",id_separator="__",id_regex=new RegExp("^"+id_prefix+id_separator+"(.+?)(?:"+id_separator+"(.+?))?$"),field_container_class=Y.ClassNameManager.getClassName(BulkEditor.NAME,"field-container"),field_container_class_prefix=field_container_class+"-",field_class_prefix=Y.ClassNameManager.getClassName(BulkEditor.NAME,"field")+"-",status_prefix="bulkedit-has",status_pattern=status_prefix+"([a-z]+)",status_re=new RegExp(Y.Node.class_re_prefix+status_pattern+Y.Node.class_re_suffix),record_status_prefix="bulkedit-hasrecord",record_status_pattern=record_status_prefix+"([a-z]+)",record_status_re=new RegExp(Y.Node.class_re_prefix+record_status_pattern+Y.Node.class_re_suffix),message_container_class=Y.ClassNameManager.getClassName(BulkEditor.NAME,"message-text"),perl_flags_regex=/^\(\?([a-z]+)\)/;
BulkEditor.record_container_class=Y.ClassNameManager.getClassName(BulkEditor.NAME,"bd");BulkEditor.record_msg_container_class=Y.ClassNameManager.getClassName(BulkEditor.NAME,"record-message-container");function switchPage(state){this.saveChanges();var pg=this.get("paginator");pg.setTotalRecords(state.totalRecords,true);pg.setStartIndex(state.recordOffset,true);pg.setRowsPerPage(state.rowsPerPage,true);pg.setPage(state.page,true);this._updatePageStatus();this.reload();}Y.extend(BulkEditor,Y.Widget,{initializer:function(config){if(config.paginator){config.paginator.on("changeRequest",switchPage,this);}},renderUI:function(){this.clearServerErrors();this.reload();},reload:function(){if(!this.busy){this.plug(Y.Plugin.BusyOverlay);}this.busy.show();var pg=this.get("paginator");var request={startIndex:pg?pg.getStartIndex():0,resultCount:pg?pg.getRowsPerPage():default_page_size};Y.mix(request,this.get("requestExtra"));var ds=this.get("ds");ds.sendRequest({request:request,callback:{success:Y.bind(function(e){this.busy.hide();if(pg&&pg.getStartIndex()>=ds.getRecordCount()){pg.setPage(pg.getPreviousPage());return;}this._render(e.response);this._updatePaginator(e.response);this.scroll_to_index=-1;},this),failure:Y.bind(function(){this.busy.hide();this.scroll_to_index=-1;},this)}});},saveChanges:function(){var ds=this.get("ds");var records=ds.getCurrentRecords();var id_key=ds.get("uniqueIdKey");Y.Object.each(this.get("fields"),function(value,key){Y.Array.each(records,function(r){var node=this.getFieldElement(r,key);ds.updateValue(r[id_key],key,node.get("value"));},this);},this);},getAllValues:function(callback){var request={startIndex:0,resultCount:this.get("ds").getRecordCount()};Y.mix(request,this.get("requestExtra"));this.get("ds").sendRequest({request:request,callback:callback});},getChanges:function(){return this.get("ds").getChanges();},insertRecord:function(index,record){var record_id=this.get("ds").insertRecord(index,record);if(index<=this.server_errors.records.length){this.server_errors.records.splice(index,0,{id:record_id});this._updatePageStatus()