Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into safari6scroll

  • Loading branch information...
commit 9073f1f8764157c3b0b4d4d0c0bb978166bec54b 2 parents bbc278d + 125fd13
@davglass davglass authored
Showing with 3,618 additions and 1,896 deletions.
  1. +0 −1  .gitignore
  2. +4 −0 .yeti.json
  3. +2 −2 build/calendar-base/calendar-base-coverage.js
  4. +1 −1  build/calendar-base/calendar-base-debug.js
  5. +1 −1  build/calendar-base/calendar-base-min.js
  6. +1 −1  build/calendar-base/calendar-base.js
  7. +1 −0  build/calendar-base/lang/calendar-base_es-AR.js
  8. +1 −0  build/calendar-base/lang/calendar-base_es.js
  9. +1 −0  build/calendar-base/lang/calendar-base_it.js
  10. +1 −0  build/calendar-base/lang/calendar-base_nl.js
  11. +2 −2 build/calendar/calendar-coverage.js
  12. +1 −1  build/calendar/calendar-debug.js
  13. +1 −1  build/calendar/calendar-min.js
  14. +1 −1  build/calendar/calendar.js
  15. +1 −0  build/calendar/lang/calendar_es-AR.js
  16. +1 −0  build/calendar/lang/calendar_es.js
  17. +1 −0  build/calendar/lang/calendar_it.js
  18. +1 −0  build/calendar/lang/calendar_nl.js
  19. +94 −85 build/event-flick/event-flick-coverage.js
  20. +19 −9 build/event-flick/event-flick-debug.js
  21. +18 −9 build/event-flick/event-flick.js
  22. +246 −192 build/event-move/event-move-coverage.js
  23. +55 −13 build/event-move/event-move-debug.js
  24. +1 −1  build/event-move/event-move-min.js
  25. +52 −13 build/event-move/event-move.js
  26. +2 −2 build/loader-base/loader-base-coverage.js
  27. +1 −1  build/loader-base/loader-base-debug.js
  28. +1 −1  build/loader-base/loader-base-min.js
  29. +1 −1  build/loader-base/loader-base.js
  30. +55 −47 build/loader-yui3/loader-yui3-coverage.js
  31. +9 −1 build/loader-yui3/loader-yui3-debug.js
  32. +1 −1  build/loader-yui3/loader-yui3-min.js
  33. +9 −1 build/loader-yui3/loader-yui3.js
  34. +10 −2 build/loader/loader-debug.js
  35. +1 −1  build/loader/loader-min.js
  36. +10 −2 build/loader/loader.js
  37. +256 −255 build/scrollview-base/scrollview-base-coverage.js
  38. +3 −2 build/scrollview-base/scrollview-base-debug.js
  39. +1 −1  build/scrollview-base/scrollview-base-min.js
  40. +3 −2 build/scrollview-base/scrollview-base.js
  41. +3 −3 build/scrollview-scrollbars/scrollview-scrollbars-coverage.js
  42. +2 −2 build/scrollview-scrollbars/scrollview-scrollbars-debug.js
  43. +1 −1  build/scrollview-scrollbars/scrollview-scrollbars-min.js
  44. +2 −2 build/scrollview-scrollbars/scrollview-scrollbars.js
  45. +3 −3 build/simpleyui/simpleyui-debug.js
  46. +1 −1  build/simpleyui/simpleyui-min.js
  47. +3 −3 build/simpleyui/simpleyui.js
  48. +3 −3 build/transition/transition-coverage.js
  49. +2 −2 build/transition/transition-debug.js
  50. +1 −1  build/transition/transition-min.js
  51. +2 −2 build/transition/transition.js
  52. +2 −2 build/yui-base/yui-base-coverage.js
  53. +1 −1  build/yui-base/yui-base-debug.js
  54. +1 −1  build/yui-base/yui-base.js
  55. +2 −2 build/yui-core/yui-core-coverage.js
  56. +1 −1  build/yui-core/yui-core-debug.js
  57. +1 −1  build/yui-core/yui-core.js
  58. +2 −2 build/yui-nodejs/yui-nodejs-coverage.js
  59. +11 −3 build/yui-nodejs/yui-nodejs-debug.js
  60. +1 −1  build/yui-nodejs/yui-nodejs-min.js
  61. +11 −3 build/yui-nodejs/yui-nodejs.js
  62. +2 −2 build/yui/yui-coverage.js
  63. +11 −3 build/yui/yui-debug.js
  64. +1 −1  build/yui/yui-min.js
  65. +11 −3 build/yui/yui.js
  66. +22 −1 src/anim/HISTORY.md
  67. +11 −4 src/app/docs/model/index.mustache
  68. +20 −0 src/arraysort/HISTORY.md
  69. +22 −2 src/async-queue/HISTORY.md
  70. +0 −1  src/async-queue/tests/unit/async-queue.html
  71. +15 −0 src/attribute/HISTORY.md
  72. +20 −0 src/autocomplete/HISTORY.md
  73. +68 −48 src/base/HISTORY.md
  74. +20 −0 src/button/HISTORY.md
  75. +20 −0 src/calendar/HISTORY.md
  76. +7 −0 src/calendar/lang/calendar-base_es-AR.js
  77. +7 −0 src/calendar/lang/calendar-base_es.js
  78. +7 −0 src/calendar/lang/calendar-base_it.js
  79. +7 −0 src/calendar/lang/calendar-base_nl.js
  80. +6 −0 src/calendar/lang/calendar_es-AR.js
  81. +5 −0 src/calendar/lang/calendar_es.js
  82. +5 −0 src/calendar/lang/calendar_it.js
  83. +5 −0 src/calendar/lang/calendar_nl.js
  84. +4 −0 src/calendar/meta/calendar-base.json
  85. +4 −0 src/calendar/meta/calendar.json
  86. +15 −0 src/charts/HISTORY.md
  87. +20 −0 src/classnamemanager/HISTORY.md
  88. +1 −1  src/common/docs/assets/vendor/prettify/prettify-min.css
  89. +1 −1  src/common/docs/assets/vendor/prettify/prettify-min.js
  90. +52 −0 src/common/docs/assets/vendor/prettify/prettify.css
  91. +298 −195 src/common/docs/assets/vendor/prettify/prettify.js
  92. +22 −2 src/console-filters/HISTORY.md
  93. +25 −3 src/console/HISTORY.md
  94. +22 −2 src/cookie/HISTORY.md
  95. +21 −1 src/cssbase/HISTORY.md
  96. +31 −11 src/cssfonts/HISTORY.md
  97. +43 −23 src/cssgrids/HISTORY.md
  98. +26 −6 src/cssreset/HISTORY.md
  99. +25 −5 src/dataschema/HISTORY.md
  100. +7 −0 src/dataschema/README.md
  101. +21 −0 src/datasource/HISTORY.md
  102. +22 −2 src/datatable-deprecated/HISTORY.md
  103. +24 −4 src/datatable/HISTORY.md
  104. +0 −1  src/datatable/tests/unit/datatable-sort.html
  105. +37 −18 src/datatype/HISTORY.md
  106. +15 −0 src/date/HISTORY.md
  107. +12 −2 src/dd/HISTORY.md
  108. +15 −0 src/dial/HISTORY.md
  109. +20 −0 src/dom/HISTORY.md
  110. +1 −1  src/dom/tests/unit/dom-xy.html
  111. +20 −0 src/dump/HISTORY.md
  112. +11 −1 src/editor/HISTORY.md
  113. +20 −0 src/escape/HISTORY.md
  114. +35 −20 src/event-custom/HISTORY.md
  115. +5 −5 src/event-custom/tests/benchmark/event-custom-benchmark.html
  116. +31 −12 src/event-gestures/HISTORY.md
  117. +19 −9 src/event-gestures/js/Flick.js
  118. +55 −13 src/event-gestures/js/Move.js
  119. +1 −1  src/event-gestures/tests/manual/ie10gestures.html
  120. +213 −1 src/event-gestures/tests/unit/assets/gesture-tests.js
  121. +4 −3 src/event-gestures/tests/unit/index.html
  122. +36 −21 src/event-simulate/HISTORY.md
  123. +20 −0 src/event-valuechange/HISTORY.md
  124. +10 −3 src/event/HISTORY.md
  125. +108 −0 src/event/docs/gestures.mustache
  126. +2 −2 src/event/docs/index.mustache
  127. +26 −5 src/file/HISTORY.md
  128. +15 −0 src/gesture-simulate/HISTORY.md
  129. +15 −0 src/graphics/HISTORY.md
  130. +20 −0 src/highlight/HISTORY.md
  131. +20 −0 src/history/HISTORY.md
  132. +20 −0 src/imageloader/HISTORY.md
  133. +20 −0 src/intl/HISTORY.md
  134. +20 −0 src/jsonp/HISTORY.md
  135. +1 −1  src/loader/build.json
  136. +9 −1 src/loader/js/yui3.js
  137. +8 −0 src/loader/js/yui3.json
  138. +15 −0 src/matrix/HISTORY.md
  139. +20 −0 src/node-flick/HISTORY.md
  140. +20 −0 src/node-focusmanager/HISTORY.md
  141. +21 −1 src/node-menunav/HISTORY.md
  142. +15 −0 src/node-scroll-info/HISTORY.md
  143. +26 −6 src/node/HISTORY.md
  144. +30 −13 src/number/HISTORY.md
  145. +51 −24 src/oop/HISTORY.md
  146. +0 −130 src/panel/docs/assets/vendor/prettify/CHANGES.html
  147. +0 −202 src/panel/docs/assets/vendor/prettify/COPYING
  148. +0 −203 src/panel/docs/assets/vendor/prettify/README.html
  149. +0 −1  src/panel/docs/assets/vendor/prettify/prettify-min.css
  150. +0 −35 src/panel/docs/assets/vendor/prettify/prettify-min.js
  151. +20 −0 src/parallel/HISTORY.md
  152. +41 −18 src/plugin/HISTORY.md
  153. +20 −0 src/pluginhost/HISTORY.md
  154. +40 −20 src/profiler/HISTORY.md
  155. +23 −3 src/querystring/HISTORY.md
  156. +20 −0 src/queue-promote/HISTORY.md
  157. +20 −0 src/recordset/HISTORY.md
  158. +44 −29 src/scrollview/HISTORY.md
  159. +2 −2 src/scrollview/js/scrollbars-plugin.js
  160. +3 −2 src/scrollview/js/scrollview-base.js
  161. +21 −1 src/simpleyui/HISTORY.md
  162. +3 −3 src/simpleyui/js/concat.js
  163. +22 −2 src/slider/HISTORY.md
  164. +30 −10 src/stylesheet/HISTORY.md
  165. +21 −1 src/substitute/HISTORY.md
  166. +44 −14 src/swf/HISTORY.md
  167. +34 −13 src/swfdetect/HISTORY.md
  168. +23 −2 src/tabview/HISTORY.md
  169. +20 −0 src/test-console/HISTORY.md
  170. +23 −3 src/test/HISTORY.md
  171. +20 −0 src/text/HISTORY.md
  172. +4 −0 src/transition/HISTORY.md
  173. +2 −2 src/transition/js/transition-native.js
  174. +47 −0 src/transition/tests/transition.html
  175. +21 −1 src/uploader-deprecated/HISTORY.md
  176. +24 −2 src/uploader/HISTORY.md
  177. +31 −13 src/xml/HISTORY.md
  178. +6 −0 src/xml/README.md
  179. +2 −2 src/yql/HISTORY.md
  180. +20 −0 src/yui-throttle/HISTORY.md
  181. +2 −3 src/yui/HISTORY.md
  182. +1 −1  src/yui/js/yui-ua.js
View
1  .gitignore
@@ -14,4 +14,3 @@ src/build.log
src/out
node_modules
api-js/
-.yeti.json
View
4 .yeti.json
@@ -0,0 +1,4 @@
+{
+ "basedir": ".",
+ "glob": "**/tests/unit/*.html"
+}
View
4 build/calendar-base/calendar-base-coverage.js
2 additions, 2 deletions not shown
View
2  build/calendar-base/calendar-base-debug.js
@@ -1630,4 +1630,4 @@ Y.CalendarBase = Y.extend( CalendarBase, Y.Widget, {
});
-}, '@VERSION@', {"requires": ["widget", "substitute", "datatype-date", "datatype-date-math", "cssgrids"], "lang": ["de", "en", "fr", "ja", "nb-NO", "pt-BR", "ru", "zh-HANT-TW"], "skinnable": true});
+}, '@VERSION@', {"requires": ["widget", "substitute", "datatype-date", "datatype-date-math", "cssgrids"], "lang": ["de", "en", "es", "es-AR", "fr", "it", "ja", "nb-NO", "nl", "pt-BR", "ru", "zh-HANT-TW"], "skinnable": true});
View
2  build/calendar-base/calendar-base-min.js
@@ -1 +1 @@
-YUI.add("calendar-base",function(e,t){function P(e){P.superclass.constructor.apply(this,arguments)}var n=e.ClassNameManager.getClassName,r="calendar",i=n(r,"grid"),s=n(r,"left-grid"),o=n(r,"right-grid"),u=n(r,"body"),a=n(r,"header"),f=n(r,"header-label"),l=n(r,"weekdayrow"),c=n(r,"weekday"),h=n(r,"column-hidden"),p=n(r,"day-selected"),d=n(r,"selection-disabled"),v=n(r,"row"),m=n(r,"day"),g=n(r,"prevmonth-day"),y=n(r,"nextmonth-day"),b=n(r,"anchor"),w=n(r,"pane"),E=n(r,"status"),S=e.Lang,x=e.Node,T=x.create,N=e.substitute,C=e.each,k=e.Array.hasValue,L=e.Array.indexOf,A=e.Object.hasKey,O=e.Object.setValue,M=e.Object.owns,_=e.Object.isEmpty,D=e.DataType.Date;e.CalendarBase=e.extend(P,e.Widget,{_paneProperties:{},_paneNumber:1,_calendarId:null,_selectedDates:{},_rules:{},_filterFunction:null,_storedDateCells:{},initializer:function(){this._paneProperties={},this._calendarId=e.guid("calendar"),this._selectedDates={},_(this._rules)&&(this._rules={}),this._storedDateCells={}},renderUI:function(){var e=this.get("contentBox");e.appendChild(this._initCalendarHTML(this.get("date"))),this.get("showPrevMonth")&&this._afterShowPrevMonthChange(),this.get("showNextMonth")&&this._afterShowNextMonthChange(),this._renderCustomRules(),this._renderSelectedDates(),this.get("boundingBox").setAttribute("aria-labelledby",this._calendarId+"_header")},bindUI:function(){this.after("dateChange",this._afterDateChange),this.after("showPrevMonthChange",this._afterShowPrevMonthChange),this.after("showNextMonthChange",this._afterShowNextMonthChange),this.after("headerRendererChange",this._afterHeaderRendererChange),this.after("customRendererChange",this._afterCustomRendererChange),this.after("enabledDatesRuleChange",this._afterCustomRendererChange),this.after("disabledDatesRuleChange",this._afterCustomRendererChange),this.after("focusedChange",this._afterFocusedChange),this.after("selectionChange",this._renderSelectedDates),this._bindCalendarEvents()},_getSelectedDatesList:function(){var e=[];return C(this._selectedDates,function(t){C(t,function(t){C(t,function(t){e.push(t)},this)},this)},this),e},_getSelectedDatesInMonth:function(t){var n=t.getFullYear(),r=t.getMonth();return A(this._selectedDates,n)&&A(this._selectedDates[n],r)?e.Object.values(this._selectedDates[n][r]):[]},_isNumInList:function(e,t){if(t=="all")return!0;var n=t.split(","),r=n.length;while(r--){var i=n[r].split("-");if(i.length==2&&e>=parseInt(i[0],10)&&e<=parseInt(i[1],10))return!0;if(i.length==1&&parseInt(n[r],10)==e)return!0}return!1},_getRulesForDate:function(e){var t=e.getFullYear(),n=e.getMonth(),r=e.getDate(),i=e.getDay(),s=this._rules,o=[],u,a,f,l;for(u in s)if(this._isNumInList(t,u))if(S.isString(s[u]))o.push(s[u]);else for(a in s[u])if(this._isNumInList(n,a))if(S.isString(s[u][a]))o.push(s[u][a]);else for(f in s[u][a])if(this._isNumInList(r,f))if(S.isString(s[u][a][f]))o.push(s[u][a][f]);else for(l in s[u][a][f])this._isNumInList(i,l)&&S.isString(s[u][a][f][l])&&o.push(s[u][a][f][l]);return o},_matchesRule:function(e,t){return L(this._getRulesForDate(e),t)>=0},_canBeSelected:function(e){var t=this.get("enabledDatesRule"),n=this.get("disabledDatesRule");return t?this._matchesRule(e,t):n?!this._matchesRule(e,n):!0},selectDates:function(e){D.isValidDate(e)?this._addDateToSelection(e):S.isArray(e)&&this._addDatesToSelection(e)},deselectDates:function(e){e?D.isValidDate(e)?this._removeDateFromSelection(e):S.isArray(e)&&this._removeDatesFromSelection(e):this._clearSelection()},_addDateToSelection:function(e,t){if(this._canBeSelected(e)){var n=e.getFullYear(),r=e.getMonth(),i=e.getDate();A(this._selectedDates,n)?A(this._selectedDates[n],r)?this._selectedDates[n][r][i]=e:(this._selectedDates[n][r]={},this._selectedDates[n][r][i]=e):(this._selectedDates[n]={},this._selectedDates[n][r]={},this._selectedDates[n][r][i]=e),this._selectedDates=O(this._selectedDates,[n,r,i],e),t||this._fireSelectionChange()}},_addDatesToSelection:function(e){C(e,this._addDateToSelection,this),this._fireSelectionChange()},_addDateRangeToSelection:function(e,t){var n=(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4,r=e.getTime(),i=t.getTime();if(r>i){var s=r;r=i,i=s+n}else i-=n;for(var o=r;o<=i;o+=864e5){var u=new Date(o);u.setHours(12),this._addDateToSelection(u,o)}this._fireSelectionChange()},_removeDateFromSelection:function(e,t){var n=e.getFullYear(),r=e.getMonth(),i=e.getDate();A(this._selectedDates,n)&&A(this._selectedDates[n],r)&&A(this._selectedDates[n][r],i)&&(delete this._selectedDates[n][r][i],t||this._fireSelectionChange())},_removeDatesFromSelection:function(e){C(e,this._removeDateFromSelection,this),this._fireSelectionChange()},_removeDateRangeFromSelection:function(e,t){var n=e.getTime(),r=t.getTime();for(var i=n;i<=r;i+=864e5)this._removeDateFromSelection(new Date(i),i);this._fireSelectionChange()},_clearSelection:function(e){this._selectedDates={},this.get("contentBox").all("."+p).removeClass(p).setAttribute("aria-selected",!1),e||this._fireSelectionChange()},_fireSelectionChange:function(){this.fire("selectionChange",{newSelection:this._getSelectedDatesList()})},_restoreModifiedCells:function(){var e=this.get("contentBox"),t;for(t in this._storedDateCells)e.one("#"+t).replace(this._storedDateCells[t]),delete this._storedDateCells[t]},_renderCustomRules:function(){this.get("contentBox").all("."+m+",."+y).removeClass(d).setAttribute("aria-disabled",!1);if(!_(this._rules)){var e=this.get("enabledDatesRule"),t=this.get("disabledDatesRule");for(var n=0;n<this._paneNumber;n++){var r=D.addMonths(this.get("date"),n),i=D.listOfDatesInMonth(r);C(i,function(n){var r=this._getRulesForDate(n);if(r.length>0){var i=this._dateToNode(n);(e&&L(r,e)<0||!e&&t&&L(r,t)>=0)&&i.addClass(d).setAttribute("aria-disabled",!0),S.isFunction(this._filterFunction)&&(this._storedDateCells[i.get("id")]=i.cloneNode(!0),this._filterFunction(n,i,r))}else if(e){var i=this._dateToNode(n);i.addClass(d).setAttribute("aria-disabled",!0)}},this)}}},_renderSelectedDates:function(){this.get("contentBox").all("."+p).removeClass(p).setAttribute("aria-selected",!1);for(var e=0;e<this._paneNumber;e++){var t=D.addMonths(this.get("date"),e),n=this._getSelectedDatesInMonth(t);C(n,function(e){this._dateToNode(e).addClass(p).setAttribute("aria-selected",!0)},this)}},_dateToNode:function(e){var t=e.getDate(),n=0,r=t%7,i=(12+e.getMonth()-this.get("date").getMonth())%12,s=this._calendarId+"_pane_"+i,o=this._paneProperties[s].cutoffCol;switch(r){case 0:o>=6?n=12:n=5;break;case 1:n=6;break;case 2:o>0?n=7:n=0;break;case 3:o>1?n=8:n=1;break;case 4:o>2?n=9:n=2;break;case 5:o>3?n=10:n=3;break;case 6:o>4?n=11:n=4}return this.get("contentBox").one("#"+this._calendarId+"_pane_"+i+"_"+n+"_"+t)},_nodeToDate:function(e){var t=e.get("id").split("_").reverse(),n=parseInt(t[2],10),r=parseInt(t[0],10),i=D.addMonths(this.get("date"),n),s=i.getFullYear(),o=i.getMonth();return new Date(s,o,r,12,0,0,0)},_bindCalendarEvents:function(){},_normalizeDate:function(e){return e?new Date(e.getFullYear(),e.getMonth(),1,12,0,0,0):null},_getCutoffColumn:function(e,t){var n=this._normalizeDate(e).getDay()-t,r=6-(n+7)%7;return r},_turnPrevMonthOn:function(e){var t=e.get("id"),n=this._paneProperties[t].paneDate,r=D.daysInMonth(D.addMonths(n,-1));this._paneProperties[t].hasOwnProperty("daysInPrevMonth")||(this._paneProperties[t].daysInPrevMonth=0);if(r!=this._paneProperties[t].daysInPrevMonth){this._paneProperties[t].daysInPrevMonth=r;for(var i=5;i>=0;i--)e.one("#"+t+"_"+i+"_"+(i-5)).set("text",r--)}},_turnPrevMonthOff:function(e){var t=e.get("id");this._paneProperties[t].daysInPrevMonth=0;for(var n=5;n>=0;n--)e.one("#"+t+"_"+n+"_"+(n-5)).setContent("&nbsp;")},_cleanUpNextMonthCells:function(e){var t=e.get("id");e.one("#"+t+"_6_29").removeClass(y),e.one("#"+t+"_7_30").removeClass(y),e.one("#"+t+"_8_31").removeClass(y),e.one("#"+t+"_0_30").removeClass(y),e.one("#"+t+"_1_31").removeClass(y)},_turnNextMonthOn:function(e){var t=1,n=e.get("id"),r=this._paneProperties[n].daysInMonth,i=this._paneProperties[n].cutoffCol;for(var s=r-22;s<i+7;s++)e.one("#"+n+"_"+s+"_"+(s+23)).set("text",t++).addClass(y);var o=i;r==31&&i<=1?o=2:r==30&&i===0&&(o=1);for(var s=o;s<i+7;s++)e.one("#"+n+"_"+s+"_"+(s+30)).set("text",t++).addClass(y)},_turnNextMonthOff:function(e){var t=e.get("id"),n=this._paneProperties[t].daysInMonth,r=this._paneProperties[t].cutoffCol;for(var i=n-22;i<=12;i++)e.one("#"+t+"_"+i+"_"+(i+23)).setContent("&nbsp;").addClass(y);var s=0;n==31&&r<=1?s=2:n==30&&r===0&&(s=1);for(var i=s;i<=12;i++)e.one("#"+t+"_"+i+"_"+(i+30)).setContent("&nbsp;").addClass(y)},_afterShowNextMonthChange:function(){var e=this.get("contentBox"),t=e.one("#"+this._calendarId+"_pane_"+(this._paneNumber-1));this._cleanUpNextMonthCells(t),this.get("showNextMonth")?this._turnNextMonthOn(t):this._turnNextMonthOff(t)},_afterShowPrevMonthChange:function(){var e=this.get("contentBox"),t=e.one("#"+this._calendarId+"_pane_"+0);this.get("showPrevMonth")?this._turnPrevMonthOn(t):this._turnPrevMonthOff(t)},_afterHeaderRendererChange:function(){var e=this.get("contentBox").one("."+f);e.setContent(this._updateCalendarHeader(this.get("date")))},_afterCustomRendererChange:function(){this._restoreModifiedCells(),this._renderCustomRules()},_afterDateChange:function(){var e=this.get("contentBox"),t=e.one("."+a).one("."+f),n=e.all("."+i),r=this.get("date"),s=0;e.setStyle("visibility","hidden"),t.setContent(this._updateCalendarHeader(r)),this._restoreModifiedCells(),n.each(function(e){this._rerenderCalendarPane(D.addMonths(r,s++),e)},this),this._afterShowPrevMonthChange(),this._afterShowNextMonthChange(),this._renderCustomRules(),this._renderSelectedDates(),e.setStyle("visibility","visible")},_initCalendarPane:function(e,t){var n="",r=this.get("strings.very_short_weekdays")||["Su","Mo","Tu","We","Th","Fr","Sa"],i=this.get("strings.weekdays")||["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],s=this.get("strings.first_weekday")||0,o=this._getCutoffColumn(e,s),u=D.daysInMonth(e),a=["","","","","",""],f={};f.weekday_row="";for(var l=s;l<=s+6;l++)f.weekday_row+=N(P.WEEKDAY_TEMPLATE,{weekdayname:r[l%7],full_weekdayname:i[l%7]});f.weekday_row_template=N(P.WEEKDAY_ROW_TEMPLATE,f);for(var c=0;c<=5;c++)for(var p=0;p<=12;p++){var d=7*c-5+p,v=t+"_"+p+"_"+d,b=m;d<1?b=g:d>u&&(b=y);if(d<1||d>u)d="&nbsp;";var w=p>=o&&p<o+7?"":h;a[c]+=N(P.CALDAY_TEMPLATE,{day_content:d,calendar_col_class:"calendar_col"+p,calendar_col_visibility_class:w,calendar_day_class:b,calendar_day_id:v})}f.body_template="",C(a,function(e){f.body_template+=N(P.CALDAY_ROW_TEMPLATE,{calday_row:e})}),f.calendar_pane_id=t,f.calendar_pane_tabindex=this.get("tabIndex"),f.pane_arialabel=D.format(e,{format:"%B %Y"});var E=N(N(P.CALENDAR_GRID_TEMPLATE,f),P.CALENDAR_STRINGS);return this._paneProperties[t]={cutoffCol:o,daysInMonth:u,paneDate:e},E},_rerenderCalendarPane:function(e,t){var n=this.get("strings.first_weekday")||0,r=this._getCutoffColumn(e,n),i=D.daysInMonth(e),s=t.get("id");t.setStyle("visibility","hidden"),t.setAttribute("aria-label",D.format(e,{format:"%B %Y"}));for(var o=0;o<=12;o++){var u=t.all(".calendar_col"+o);u.removeClass(h);if(o<r||o>=r+7)u.addClass(h);else switch(o){case 0:var a=t.one("#"+s+"_0_30");i>=30?(a.set("text","30"),a.removeClass(y).addClass(m)):(a.setContent("&nbsp;"),a.addClass(y).addClass(m));break;case 1:var a=t.one("#"+s+"_1_31");i>=31?(a.set("text","31"),a.removeClass(y).addClass(m)):(a.setContent("&nbsp;"),a.removeClass(m).addClass(y));break;case 6:var a=t.one("#"+s+"_6_29");i>=29?(a.set("text","29"),a.removeClass(y).addClass(m)):(a.setContent("&nbsp;"),a.removeClass(m).addClass(y));break;case 7:var a=t.one("#"+s+"_7_30");i>=30?(a.set("text","30"),a.removeClass(y).addClass(m)):(a.setContent("&nbsp;"),a.removeClass(m).addClass(y));break;case 8:var a=t.one("#"+s+"_8_31");i>=31?(a.set("text","31"),a.removeClass(y).addClass(m)):(a.setContent("&nbsp;"),a.removeClass(m).addClass(y))}}this._paneProperties[s].cutoffCol=r,this._paneProperties[s].daysInMonth=i,this._paneProperties[s].paneDate=e,t.setStyle("visibility","visible")},_updateCalendarHeader:function(t){var n="",r=this.get("headerRenderer");return e.Lang.isString(r)?n=D.format(t,{format:r}):r instanceof Function&&(n=r.call(this,t)),n},_initCalendarHeader:function(e){return N(N(P.HEADER_TEMPLATE,{calheader:this._updateCalendarHeader(e),calendar_id:this._calendarId}),P.CALENDAR_STRINGS)},_initCalendarHTML:function(t){function i(){var e=this._initCalendarPane(D.addMonths(t,r),n.calendar_id+"_pane_"+r);return r++,e}var n={},r=0;n.header_template=this._initCalendarHeader(t),n.calendar_id=this._calendarId,n.body_template=N(N(P.CONTENT_TEMPLATE,n),P.CALENDAR_STRINGS);var s=n.body_template.replace(/\{calendar_grid_template\}/g,e.bind(i,this));return this._paneNumber=r,s}},{CALENDAR_STRINGS:{calendar_grid_class:i,calendar_body_class:u,calendar_hd_class:a,calendar_hd_label_class:f,calendar_weekdayrow_class:l,calendar_weekday_class:c,calendar_row_class:v,calendar_day_class:m,calendar_dayanchor_class:b,calendar_pane_class:w,calendar_right_grid_class:o,calendar_left_grid_class:s,calendar_status_class:E},CONTENT_TEMPLATE:'<div class="yui3-g {calendar_pane_class}" id="{calendar_id}">{header_template}<div class="yui3-u-1">{calendar_grid_template}</div></div>',ONE_PANE_TEMPLATE:'<div class="yui3-g {calendar_pane_class}" id="{calendar_id}">{header_template}<div class="yui3-u-1">{calendar_grid_template}</div></div>',TWO_PANE_TEMPLATE:'<div class="yui3-g {calendar_pane_class}" id="{calendar_id}">{header_template}<div class="yui3-u-1-2"><div class = "{calendar_left_grid_class}">{calendar_grid_template}</div></div><div class="yui3-u-1-2"><div class = "{calendar_right_grid_class}">{calendar_grid_template}</div></div></div>',THREE_PANE_TEMPLATE:'<div class="yui3-g {calendar_pane_class}" id="{calendar_id}">{header_template}<div class="yui3-u-1-3"><div class = "{calendar_left_grid_class}">{calendar_grid_template}</div></div><div class="yui3-u-1-3">{calendar_grid_template}</div><div class="yui3-u-1-3"><div class = "{calendar_right_grid_class}">{calendar_grid_template}</div></div></div>',CALENDAR_GRID_TEMPLATE:'<table class="{calendar_grid_class}" id="{calendar_pane_id}" role="grid" aria-readonly="true" aria-label="{pane_arialabel}" tabindex="{calendar_pane_tabindex}"><thead>{weekday_row_template}</thead><tbody>{body_template}</tbody></table>',HEADER_TEMPLATE:'<div class="yui3-g {calendar_hd_class}"><div class="yui3-u {calendar_hd_label_class}" id="{calendar_id}_header" aria-role="heading">{calheader}</div></div>',WEEKDAY_ROW_TEMPLATE:'<tr class="{calendar_weekdayrow_class}" role="row">{weekday_row}</tr>',CALDAY_ROW_TEMPLATE:'<tr class="{calendar_row_class}" role="row">{calday_row}</tr>',WEEKDAY_TEMPLATE:'<th class="{calendar_weekday_class}" role="columnheader" aria-label="{full_weekdayname}">{weekdayname}</th>',CALDAY_TEMPLATE:'<td class="{calendar_col_class} {calendar_day_class} {calendar_col_visibility_class}" id="{calendar_day_id}" role="gridcell" tabindex="-1">{day_content}</td>',NAME:"calendarBase",ATTRS:{tabIndex:{value:1},date:{value:new Date,setter:function(e){var t=this._normalizeDate(e);return D.areEqual(t,this.get("date"))?this.get("date"):t}},showPrevMonth:{value:!1},showNextMonth:{value:!1},strings:{valueFn:function(){return e.Intl.get("calendar-base")}},headerRenderer:{value:"%B %Y"},enabledDatesRule:{value:null},disabledDatesRule:{value:null},selectedDates:{readOnly:!0,getter:function(e){return this._getSelectedDatesList()}},customRenderer:{lazyAdd:!1,value:{},setter:function(e){this._rules=e.rules,this._filterFunction=e.filterFunction}}}})},"@VERSION@",{requires:["widget","substitute","datatype-date","datatype-date-math","cssgrids"],lang:["de","en","fr","ja","nb-NO","pt-BR","ru","zh-HANT-TW"],skinnable:!0});
+YUI.add("calendar-base",function(e,t){function P(e){P.superclass.constructor.apply(this,arguments)}var n=e.ClassNameManager.getClassName,r="calendar",i=n(r,"grid"),s=n(r,"left-grid"),o=n(r,"right-grid"),u=n(r,"body"),a=n(r,"header"),f=n(r,"header-label"),l=n(r,"weekdayrow"),c=n(r,"weekday"),h=n(r,"column-hidden"),p=n(r,"day-selected"),d=n(r,"selection-disabled"),v=n(r,"row"),m=n(r,"day"),g=n(r,"prevmonth-day"),y=n(r,"nextmonth-day"),b=n(r,"anchor"),w=n(r,"pane"),E=n(r,"status"),S=e.Lang,x=e.Node,T=x.create,N=e.substitute,C=e.each,k=e.Array.hasValue,L=e.Array.indexOf,A=e.Object.hasKey,O=e.Object.setValue,M=e.Object.owns,_=e.Object.isEmpty,D=e.DataType.Date;e.CalendarBase=e.extend(P,e.Widget,{_paneProperties:{},_paneNumber:1,_calendarId:null,_selectedDates:{},_rules:{},_filterFunction:null,_storedDateCells:{},initializer:function(){this._paneProperties={},this._calendarId=e.guid("calendar"),this._selectedDates={},_(this._rules)&&(this._rules={}),this._storedDateCells={}},renderUI:function(){var e=this.get("contentBox");e.appendChild(this._initCalendarHTML(this.get("date"))),this.get("showPrevMonth")&&this._afterShowPrevMonthChange(),this.get("showNextMonth")&&this._afterShowNextMonthChange(),this._renderCustomRules(),this._renderSelectedDates(),this.get("boundingBox").setAttribute("aria-labelledby",this._calendarId+"_header")},bindUI:function(){this.after("dateChange",this._afterDateChange),this.after("showPrevMonthChange",this._afterShowPrevMonthChange),this.after("showNextMonthChange",this._afterShowNextMonthChange),this.after("headerRendererChange",this._afterHeaderRendererChange),this.after("customRendererChange",this._afterCustomRendererChange),this.after("enabledDatesRuleChange",this._afterCustomRendererChange),this.after("disabledDatesRuleChange",this._afterCustomRendererChange),this.after("focusedChange",this._afterFocusedChange),this.after("selectionChange",this._renderSelectedDates),this._bindCalendarEvents()},_getSelectedDatesList:function(){var e=[];return C(this._selectedDates,function(t){C(t,function(t){C(t,function(t){e.push(t)},this)},this)},this),e},_getSelectedDatesInMonth:function(t){var n=t.getFullYear(),r=t.getMonth();return A(this._selectedDates,n)&&A(this._selectedDates[n],r)?e.Object.values(this._selectedDates[n][r]):[]},_isNumInList:function(e,t){if(t=="all")return!0;var n=t.split(","),r=n.length;while(r--){var i=n[r].split("-");if(i.length==2&&e>=parseInt(i[0],10)&&e<=parseInt(i[1],10))return!0;if(i.length==1&&parseInt(n[r],10)==e)return!0}return!1},_getRulesForDate:function(e){var t=e.getFullYear(),n=e.getMonth(),r=e.getDate(),i=e.getDay(),s=this._rules,o=[],u,a,f,l;for(u in s)if(this._isNumInList(t,u))if(S.isString(s[u]))o.push(s[u]);else for(a in s[u])if(this._isNumInList(n,a))if(S.isString(s[u][a]))o.push(s[u][a]);else for(f in s[u][a])if(this._isNumInList(r,f))if(S.isString(s[u][a][f]))o.push(s[u][a][f]);else for(l in s[u][a][f])this._isNumInList(i,l)&&S.isString(s[u][a][f][l])&&o.push(s[u][a][f][l]);return o},_matchesRule:function(e,t){return L(this._getRulesForDate(e),t)>=0},_canBeSelected:function(e){var t=this.get("enabledDatesRule"),n=this.get("disabledDatesRule");return t?this._matchesRule(e,t):n?!this._matchesRule(e,n):!0},selectDates:function(e){D.isValidDate(e)?this._addDateToSelection(e):S.isArray(e)&&this._addDatesToSelection(e)},deselectDates:function(e){e?D.isValidDate(e)?this._removeDateFromSelection(e):S.isArray(e)&&this._removeDatesFromSelection(e):this._clearSelection()},_addDateToSelection:function(e,t){if(this._canBeSelected(e)){var n=e.getFullYear(),r=e.getMonth(),i=e.getDate();A(this._selectedDates,n)?A(this._selectedDates[n],r)?this._selectedDates[n][r][i]=e:(this._selectedDates[n][r]={},this._selectedDates[n][r][i]=e):(this._selectedDates[n]={},this._selectedDates[n][r]={},this._selectedDates[n][r][i]=e),this._selectedDates=O(this._selectedDates,[n,r,i],e),t||this._fireSelectionChange()}},_addDatesToSelection:function(e){C(e,this._addDateToSelection,this),this._fireSelectionChange()},_addDateRangeToSelection:function(e,t){var n=(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4,r=e.getTime(),i=t.getTime();if(r>i){var s=r;r=i,i=s+n}else i-=n;for(var o=r;o<=i;o+=864e5){var u=new Date(o);u.setHours(12),this._addDateToSelection(u,o)}this._fireSelectionChange()},_removeDateFromSelection:function(e,t){var n=e.getFullYear(),r=e.getMonth(),i=e.getDate();A(this._selectedDates,n)&&A(this._selectedDates[n],r)&&A(this._selectedDates[n][r],i)&&(delete this._selectedDates[n][r][i],t||this._fireSelectionChange())},_removeDatesFromSelection:function(e){C(e,this._removeDateFromSelection,this),this._fireSelectionChange()},_removeDateRangeFromSelection:function(e,t){var n=e.getTime(),r=t.getTime();for(var i=n;i<=r;i+=864e5)this._removeDateFromSelection(new Date(i),i);this._fireSelectionChange()},_clearSelection:function(e){this._selectedDates={},this.get("contentBox").all("."+p).removeClass(p).setAttribute("aria-selected",!1),e||this._fireSelectionChange()},_fireSelectionChange:function(){this.fire("selectionChange",{newSelection:this._getSelectedDatesList()})},_restoreModifiedCells:function(){var e=this.get("contentBox"),t;for(t in this._storedDateCells)e.one("#"+t).replace(this._storedDateCells[t]),delete this._storedDateCells[t]},_renderCustomRules:function(){this.get("contentBox").all("."+m+",."+y).removeClass(d).setAttribute("aria-disabled",!1);if(!_(this._rules)){var e=this.get("enabledDatesRule"),t=this.get("disabledDatesRule");for(var n=0;n<this._paneNumber;n++){var r=D.addMonths(this.get("date"),n),i=D.listOfDatesInMonth(r);C(i,function(n){var r=this._getRulesForDate(n);if(r.length>0){var i=this._dateToNode(n);(e&&L(r,e)<0||!e&&t&&L(r,t)>=0)&&i.addClass(d).setAttribute("aria-disabled",!0),S.isFunction(this._filterFunction)&&(this._storedDateCells[i.get("id")]=i.cloneNode(!0),this._filterFunction(n,i,r))}else if(e){var i=this._dateToNode(n);i.addClass(d).setAttribute("aria-disabled",!0)}},this)}}},_renderSelectedDates:function(){this.get("contentBox").all("."+p).removeClass(p).setAttribute("aria-selected",!1);for(var e=0;e<this._paneNumber;e++){var t=D.addMonths(this.get("date"),e),n=this._getSelectedDatesInMonth(t);C(n,function(e){this._dateToNode(e).addClass(p).setAttribute("aria-selected",!0)},this)}},_dateToNode:function(e){var t=e.getDate(),n=0,r=t%7,i=(12+e.getMonth()-this.get("date").getMonth())%12,s=this._calendarId+"_pane_"+i,o=this._paneProperties[s].cutoffCol;switch(r){case 0:o>=6?n=12:n=5;break;case 1:n=6;break;case 2:o>0?n=7:n=0;break;case 3:o>1?n=8:n=1;break;case 4:o>2?n=9:n=2;break;case 5:o>3?n=10:n=3;break;case 6:o>4?n=11:n=4}return this.get("contentBox").one("#"+this._calendarId+"_pane_"+i+"_"+n+"_"+t)},_nodeToDate:function(e){var t=e.get("id").split("_").reverse(),n=parseInt(t[2],10),r=parseInt(t[0],10),i=D.addMonths(this.get("date"),n),s=i.getFullYear(),o=i.getMonth();return new Date(s,o,r,12,0,0,0)},_bindCalendarEvents:function(){},_normalizeDate:function(e){return e?new Date(e.getFullYear(),e.getMonth(),1,12,0,0,0):null},_getCutoffColumn:function(e,t){var n=this._normalizeDate(e).getDay()-t,r=6-(n+7)%7;return r},_turnPrevMonthOn:function(e){var t=e.get("id"),n=this._paneProperties[t].paneDate,r=D.daysInMonth(D.addMonths(n,-1));this._paneProperties[t].hasOwnProperty("daysInPrevMonth")||(this._paneProperties[t].daysInPrevMonth=0);if(r!=this._paneProperties[t].daysInPrevMonth){this._paneProperties[t].daysInPrevMonth=r;for(var i=5;i>=0;i--)e.one("#"+t+"_"+i+"_"+(i-5)).set("text",r--)}},_turnPrevMonthOff:function(e){var t=e.get("id");this._paneProperties[t].daysInPrevMonth=0;for(var n=5;n>=0;n--)e.one("#"+t+"_"+n+"_"+(n-5)).setContent("&nbsp;")},_cleanUpNextMonthCells:function(e){var t=e.get("id");e.one("#"+t+"_6_29").removeClass(y),e.one("#"+t+"_7_30").removeClass(y),e.one("#"+t+"_8_31").removeClass(y),e.one("#"+t+"_0_30").removeClass(y),e.one("#"+t+"_1_31").removeClass(y)},_turnNextMonthOn:function(e){var t=1,n=e.get("id"),r=this._paneProperties[n].daysInMonth,i=this._paneProperties[n].cutoffCol;for(var s=r-22;s<i+7;s++)e.one("#"+n+"_"+s+"_"+(s+23)).set("text",t++).addClass(y);var o=i;r==31&&i<=1?o=2:r==30&&i===0&&(o=1);for(var s=o;s<i+7;s++)e.one("#"+n+"_"+s+"_"+(s+30)).set("text",t++).addClass(y)},_turnNextMonthOff:function(e){var t=e.get("id"),n=this._paneProperties[t].daysInMonth,r=this._paneProperties[t].cutoffCol;for(var i=n-22;i<=12;i++)e.one("#"+t+"_"+i+"_"+(i+23)).setContent("&nbsp;").addClass(y);var s=0;n==31&&r<=1?s=2:n==30&&r===0&&(s=1);for(var i=s;i<=12;i++)e.one("#"+t+"_"+i+"_"+(i+30)).setContent("&nbsp;").addClass(y)},_afterShowNextMonthChange:function(){var e=this.get("contentBox"),t=e.one("#"+this._calendarId+"_pane_"+(this._paneNumber-1));this._cleanUpNextMonthCells(t),this.get("showNextMonth")?this._turnNextMonthOn(t):this._turnNextMonthOff(t)},_afterShowPrevMonthChange:function(){var e=this.get("contentBox"),t=e.one("#"+this._calendarId+"_pane_"+0);this.get("showPrevMonth")?this._turnPrevMonthOn(t):this._turnPrevMonthOff(t)},_afterHeaderRendererChange:function(){var e=this.get("contentBox").one("."+f);e.setContent(this._updateCalendarHeader(this.get("date")))},_afterCustomRendererChange:function(){this._restoreModifiedCells(),this._renderCustomRules()},_afterDateChange:function(){var e=this.get("contentBox"),t=e.one("."+a).one("."+f),n=e.all("."+i),r=this.get("date"),s=0;e.setStyle("visibility","hidden"),t.setContent(this._updateCalendarHeader(r)),this._restoreModifiedCells(),n.each(function(e){this._rerenderCalendarPane(D.addMonths(r,s++),e)},this),this._afterShowPrevMonthChange(),this._afterShowNextMonthChange(),this._renderCustomRules(),this._renderSelectedDates(),e.setStyle("visibility","visible")},_initCalendarPane:function(e,t){var n="",r=this.get("strings.very_short_weekdays")||["Su","Mo","Tu","We","Th","Fr","Sa"],i=this.get("strings.weekdays")||["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],s=this.get("strings.first_weekday")||0,o=this._getCutoffColumn(e,s),u=D.daysInMonth(e),a=["","","","","",""],f={};f.weekday_row="";for(var l=s;l<=s+6;l++)f.weekday_row+=N(P.WEEKDAY_TEMPLATE,{weekdayname:r[l%7],full_weekdayname:i[l%7]});f.weekday_row_template=N(P.WEEKDAY_ROW_TEMPLATE,f);for(var c=0;c<=5;c++)for(var p=0;p<=12;p++){var d=7*c-5+p,v=t+"_"+p+"_"+d,b=m;d<1?b=g:d>u&&(b=y);if(d<1||d>u)d="&nbsp;";var w=p>=o&&p<o+7?"":h;a[c]+=N(P.CALDAY_TEMPLATE,{day_content:d,calendar_col_class:"calendar_col"+p,calendar_col_visibility_class:w,calendar_day_class:b,calendar_day_id:v})}f.body_template="",C(a,function(e){f.body_template+=N(P.CALDAY_ROW_TEMPLATE,{calday_row:e})}),f.calendar_pane_id=t,f.calendar_pane_tabindex=this.get("tabIndex"),f.pane_arialabel=D.format(e,{format:"%B %Y"});var E=N(N(P.CALENDAR_GRID_TEMPLATE,f),P.CALENDAR_STRINGS);return this._paneProperties[t]={cutoffCol:o,daysInMonth:u,paneDate:e},E},_rerenderCalendarPane:function(e,t){var n=this.get("strings.first_weekday")||0,r=this._getCutoffColumn(e,n),i=D.daysInMonth(e),s=t.get("id");t.setStyle("visibility","hidden"),t.setAttribute("aria-label",D.format(e,{format:"%B %Y"}));for(var o=0;o<=12;o++){var u=t.all(".calendar_col"+o);u.removeClass(h);if(o<r||o>=r+7)u.addClass(h);else switch(o){case 0:var a=t.one("#"+s+"_0_30");i>=30?(a.set("text","30"),a.removeClass(y).addClass(m)):(a.setContent("&nbsp;"),a.addClass(y).addClass(m));break;case 1:var a=t.one("#"+s+"_1_31");i>=31?(a.set("text","31"),a.removeClass(y).addClass(m)):(a.setContent("&nbsp;"),a.removeClass(m).addClass(y));break;case 6:var a=t.one("#"+s+"_6_29");i>=29?(a.set("text","29"),a.removeClass(y).addClass(m)):(a.setContent("&nbsp;"),a.removeClass(m).addClass(y));break;case 7:var a=t.one("#"+s+"_7_30");i>=30?(a.set("text","30"),a.removeClass(y).addClass(m)):(a.setContent("&nbsp;"),a.removeClass(m).addClass(y));break;case 8:var a=t.one("#"+s+"_8_31");i>=31?(a.set("text","31"),a.removeClass(y).addClass(m)):(a.setContent("&nbsp;"),a.removeClass(m).addClass(y))}}this._paneProperties[s].cutoffCol=r,this._paneProperties[s].daysInMonth=i,this._paneProperties[s].paneDate=e,t.setStyle("visibility","visible")},_updateCalendarHeader:function(t){var n="",r=this.get("headerRenderer");return e.Lang.isString(r)?n=D.format(t,{format:r}):r instanceof Function&&(n=r.call(this,t)),n},_initCalendarHeader:function(e){return N(N(P.HEADER_TEMPLATE,{calheader:this._updateCalendarHeader(e),calendar_id:this._calendarId}),P.CALENDAR_STRINGS)},_initCalendarHTML:function(t){function i(){var e=this._initCalendarPane(D.addMonths(t,r),n.calendar_id+"_pane_"+r);return r++,e}var n={},r=0;n.header_template=this._initCalendarHeader(t),n.calendar_id=this._calendarId,n.body_template=N(N(P.CONTENT_TEMPLATE,n),P.CALENDAR_STRINGS);var s=n.body_template.replace(/\{calendar_grid_template\}/g,e.bind(i,this));return this._paneNumber=r,s}},{CALENDAR_STRINGS:{calendar_grid_class:i,calendar_body_class:u,calendar_hd_class:a,calendar_hd_label_class:f,calendar_weekdayrow_class:l,calendar_weekday_class:c,calendar_row_class:v,calendar_day_class:m,calendar_dayanchor_class:b,calendar_pane_class:w,calendar_right_grid_class:o,calendar_left_grid_class:s,calendar_status_class:E},CONTENT_TEMPLATE:'<div class="yui3-g {calendar_pane_class}" id="{calendar_id}">{header_template}<div class="yui3-u-1">{calendar_grid_template}</div></div>',ONE_PANE_TEMPLATE:'<div class="yui3-g {calendar_pane_class}" id="{calendar_id}">{header_template}<div class="yui3-u-1">{calendar_grid_template}</div></div>',TWO_PANE_TEMPLATE:'<div class="yui3-g {calendar_pane_class}" id="{calendar_id}">{header_template}<div class="yui3-u-1-2"><div class = "{calendar_left_grid_class}">{calendar_grid_template}</div></div><div class="yui3-u-1-2"><div class = "{calendar_right_grid_class}">{calendar_grid_template}</div></div></div>',THREE_PANE_TEMPLATE:'<div class="yui3-g {calendar_pane_class}" id="{calendar_id}">{header_template}<div class="yui3-u-1-3"><div class = "{calendar_left_grid_class}">{calendar_grid_template}</div></div><div class="yui3-u-1-3">{calendar_grid_template}</div><div class="yui3-u-1-3"><div class = "{calendar_right_grid_class}">{calendar_grid_template}</div></div></div>',CALENDAR_GRID_TEMPLATE:'<table class="{calendar_grid_class}" id="{calendar_pane_id}" role="grid" aria-readonly="true" aria-label="{pane_arialabel}" tabindex="{calendar_pane_tabindex}"><thead>{weekday_row_template}</thead><tbody>{body_template}</tbody></table>',HEADER_TEMPLATE:'<div class="yui3-g {calendar_hd_class}"><div class="yui3-u {calendar_hd_label_class}" id="{calendar_id}_header" aria-role="heading">{calheader}</div></div>',WEEKDAY_ROW_TEMPLATE:'<tr class="{calendar_weekdayrow_class}" role="row">{weekday_row}</tr>',CALDAY_ROW_TEMPLATE:'<tr class="{calendar_row_class}" role="row">{calday_row}</tr>',WEEKDAY_TEMPLATE:'<th class="{calendar_weekday_class}" role="columnheader" aria-label="{full_weekdayname}">{weekdayname}</th>',CALDAY_TEMPLATE:'<td class="{calendar_col_class} {calendar_day_class} {calendar_col_visibility_class}" id="{calendar_day_id}" role="gridcell" tabindex="-1">{day_content}</td>',NAME:"calendarBase",ATTRS:{tabIndex:{value:1},date:{value:new Date,setter:function(e){var t=this._normalizeDate(e);return D.areEqual(t,this.get("date"))?this.get("date"):t}},showPrevMonth:{value:!1},showNextMonth:{value:!1},strings:{valueFn:function(){return e.Intl.get("calendar-base")}},headerRenderer:{value:"%B %Y"},enabledDatesRule:{value:null},disabledDatesRule:{value:null},selectedDates:{readOnly:!0,getter:function(e){return this._getSelectedDatesList()}},customRenderer:{lazyAdd:!1,value:{},setter:function(e){this._rules=e.rules,this._filterFunction=e.filterFunction}}}})},"@VERSION@",{requires:["widget","substitute","datatype-date","datatype-date-math","cssgrids"],lang:["de","en","es","es-AR","fr","it","ja","nb-NO","nl","pt-BR","ru","zh-HANT-TW"],skinnable:!0});
View
2  build/calendar-base/calendar-base.js
@@ -1630,4 +1630,4 @@ Y.CalendarBase = Y.extend( CalendarBase, Y.Widget, {
});
-}, '@VERSION@', {"requires": ["widget", "substitute", "datatype-date", "datatype-date-math", "cssgrids"], "lang": ["de", "en", "fr", "ja", "nb-NO", "pt-BR", "ru", "zh-HANT-TW"], "skinnable": true});
+}, '@VERSION@', {"requires": ["widget", "substitute", "datatype-date", "datatype-date-math", "cssgrids"], "lang": ["de", "en", "es", "es-AR", "fr", "it", "ja", "nb-NO", "nl", "pt-BR", "ru", "zh-HANT-TW"], "skinnable": true});
View
1  build/calendar-base/lang/calendar-base_es-AR.js
@@ -0,0 +1 @@
+YUI.add("lang/calendar-base_es-AR",function(e){e.Intl.add("calendar-base","es-AR",{weekdays:["Domingo","Lunes","Martes","Mi\u00e9rcoles","Jueves","Viernes","S\u00e1bado"],short_weekdays:["Dom","Lun","Mar","Mie","Jue","Vie","Sab"],very_short_weekdays:["Do","Lu","Ma","Mi","Ju","Vi","Sa"],first_weekday:0,weekends:[0,6]})},"@VERSION@");
View
1  build/calendar-base/lang/calendar-base_es.js
@@ -0,0 +1 @@
+YUI.add("lang/calendar-base_es",function(e){e.Intl.add("calendar-base","es",{weekdays:["Domingo","Lunes","Martes","Mi\u00e9rcoles","Jueves","Viernes","S\u00e1bado"],short_weekdays:["Dom","Lun","Mar","Mie","Jue","Vie","Sab"],very_short_weekdays:["Do","Lu","Ma","Mi","Ju","Vi","Sa"],first_weekday:1,weekends:[0,6]})},"@VERSION@");
View
1  build/calendar-base/lang/calendar-base_it.js
@@ -0,0 +1 @@
+YUI.add("lang/calendar-base_it",function(e){e.Intl.add("calendar-base","it",{weekdays:["Luned\u00ec","Marted\u00ec","Mercoled\u00ec","Gioved\u00ec","Venerd\u00ec","Sabato","Domenica"],short_weekdays:["Lun","Mar","Mer","Gio","Ven","Sab","Dom"],very_short_weekdays:["Lu","Ma","Me","Gi","Ve","Sa","Do"],first_weekday:1,weekends:[0,6]})},"@VERSION@");
View
1  build/calendar-base/lang/calendar-base_nl.js
@@ -0,0 +1 @@
+YUI.add("lang/calendar-base_nl",function(e){e.Intl.add("calendar-base","nl",{weekdays:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],short_weekdays:["zon","maan","dins","woens","don","vrij","zat"],very_short_weekdays:["zo","ma","di","woe","do","vr","za"],first_weekday:1,weekends:[0,6]})},"@VERSION@");
View
4 build/calendar/calendar-coverage.js
@@ -26,7 +26,7 @@ _yuitest_coverage["build/calendar/calendar.js"] = {
path: "build/calendar/calendar.js",
code: []
};
-_yuitest_coverage["build/calendar/calendar.js"].code=["YUI.add('calendar', function (Y, NAME) {","","/**"," * The Calendar component is a UI widget that allows users"," * to view dates in a two-dimensional month grid, as well as"," * to select one or more dates, or ranges of dates. Calendar"," * is generated dynamically and relies on the developer to"," * provide for a progressive enhancement alternative."," *"," *"," * @module calendar"," */","","var getCN = Y.ClassNameManager.getClassName,"," CALENDAR = 'calendar',"," KEY_DOWN = 40,"," KEY_UP = 38,"," KEY_LEFT = 37,"," KEY_RIGHT = 39,"," KEY_ENTER = 13,"," KEY_SPACE = 32,"," CAL_HD = getCN(CALENDAR, 'header'),"," CAL_DAY_SELECTED = getCN(CALENDAR, 'day-selected'),"," CAL_DAY_HILITED = getCN(CALENDAR, 'day-highlighted'),"," CAL_DAY = getCN(CALENDAR, 'day'),"," CAL_PREVMONTH_DAY = getCN(CALENDAR, 'prevmonth-day'),"," CAL_NEXTMONTH_DAY = getCN(CALENDAR, 'nextmonth-day'),"," CAL_GRID = getCN(CALENDAR, 'grid'),"," ydate = Y.DataType.Date,"," delegate = Y.delegate,"," CAL_PANE = getCN(CALENDAR, 'pane'),"," os = Y.UA.os;","","/** Create a calendar view to represent a single or multiple"," * month range of dates, rendered as a grid with date and"," * weekday labels."," * "," * @class Calendar"," * @extends CalendarBase"," * @param config {Object} Configuration object (see Configuration attributes)"," * @constructor"," */","function Calendar(config) {"," Calendar.superclass.constructor.apply ( this, arguments );","}","","Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {",""," _keyEvents: [],",""," _highlightedDateNode: null,",""," /**"," * A property tracking the last selected date on the calendar, for the"," * purposes of multiple selection."," *"," * @property _lastSelectedDate"," * @type Date"," * @default null"," * @private"," */ "," _lastSelectedDate: null,",""," /**"," * Designated initializer. Activates the navigation plugin for the calendar."," *"," * @method initializer"," */ "," initializer : function () {"," this.plug(Y.Plugin.CalendarNavigator);","",""," this._keyEvents = [];"," this._highlightedDateNode = null;"," this._lastSelectedDate = null;"," },",""," /**"," * Overrides the _bindCalendarEvents placeholder in CalendarBase"," * and binds calendar events during bindUI stage."," * @method _bindCalendarEvents"," * @protected"," */ "," _bindCalendarEvents : function () {"," var contentBox = this.get('contentBox'),"," pane = contentBox.one(\".\" + CAL_PANE);"," pane.on(\"selectstart\", this._preventSelectionStart);"," pane.delegate(\"click\", this._clickCalendar, \".\" + CAL_DAY + \", .\" + CAL_PREVMONTH_DAY + \", .\" + CAL_NEXTMONTH_DAY, this);"," pane.delegate(\"keydown\", this._keydownCalendar, \".\" + CAL_GRID, this);"," pane.delegate(\"focus\", this._focusCalendarGrid, \".\" + CAL_GRID, this);"," pane.delegate(\"focus\", this._focusCalendarCell, \".\" + CAL_DAY, this);"," pane.delegate(\"blur\", this._blurCalendarGrid, \".\" + CAL_GRID + \",.\" + CAL_DAY, this);"," },",""," /**"," * Prevents text selection if it is started within the calendar pane"," * @method _preventSelectionStart"," * @param event {Event} The selectstart event"," * @protected"," */ "," _preventSelectionStart : function (event) {"," event.preventDefault();"," },",""," /**"," * Highlights a specific date node with keyboard highlight class"," * @method _highlightDateNode"," * @param oDate {Date} Date corresponding the node to be highlighted"," * @protected"," */ "," _highlightDateNode : function (oDate) {"," this._unhighlightCurrentDateNode();"," var newNode = this._dateToNode(oDate);"," newNode.focus();"," newNode.addClass(CAL_DAY_HILITED);"," },",""," /**"," * Unhighlights a specific date node currently highlighted with keyboard highlight class"," * @method _unhighlightCurrentDateNode"," * @protected"," */ "," _unhighlightCurrentDateNode : function () {"," var allHilitedNodes = this.get(\"contentBox\").all(\".\" + CAL_DAY_HILITED);"," if (allHilitedNodes) {"," allHilitedNodes.removeClass(CAL_DAY_HILITED);"," }"," },",""," /**"," * Returns the grid number for a specific calendar grid (for multi-grid templates)"," * @method _getGridNumber"," * @param gridNode {Node} Node corresponding to a specific grid"," * @protected"," */ "," _getGridNumber : function (gridNode) {"," var idParts = gridNode.get(\"id\").split(\"_\").reverse();"," return parseInt(idParts[0], 10);"," },",""," /**"," * Handler for loss of focus of calendar grid"," * @method _blurCalendarGrid"," * @protected"," */ "," _blurCalendarGrid : function (ev) {"," this._unhighlightCurrentDateNode();"," },","",""," /**"," * Handler for gain of focus of calendar cell"," * @method _focusCalendarCell"," * @protected"," */ "," _focusCalendarCell : function (ev) {"," this._highlightedDateNode = ev.target;"," ev.stopPropagation();"," },",""," /**"," * Handler for gain of focus of calendar grid"," * @method _focusCalendarGrid"," * @protected"," */ "," _focusCalendarGrid : function (ev) { "," this._unhighlightCurrentDateNode();"," this._highlightedDateNode = null;"," },",""," /**"," * Handler for keyboard press on a calendar grid"," * @method _keydownCalendar"," * @protected"," */ "," _keydownCalendar : function (ev) {"," var gridNum = this._getGridNumber(ev.target),"," curDate = !this._highlightedDateNode ? null : this._nodeToDate(this._highlightedDateNode),"," keyCode = ev.keyCode,"," dayNum = 0,"," dir = '';",""," switch(keyCode) {"," case KEY_DOWN: "," dayNum = 7;"," dir = 's';"," break;"," case KEY_UP: "," dayNum = -7;"," dir = 'n';"," break;"," case KEY_LEFT: "," dayNum = -1;"," dir = 'w';"," break;"," case KEY_RIGHT:"," dayNum = 1;"," dir = 'e';"," break;"," case KEY_SPACE: case KEY_ENTER:"," ev.preventDefault();"," if (this._highlightedDateNode) {"," var selMode = this.get(\"selectionMode\");"," if (selMode === \"single\" && !this._highlightedDateNode.hasClass(CAL_DAY_SELECTED)) {"," this._clearSelection(true);"," this._addDateToSelection(curDate);"," }"," else if (selMode === \"multiple\" || selMode === \"multiple-sticky\") {"," if (this._highlightedDateNode.hasClass(CAL_DAY_SELECTED)) {"," this._removeDateFromSelection(curDate);"," }"," else {"," this._addDateToSelection(curDate);"," }"," }"," }"," break;"," }"," ",""," if (keyCode == KEY_DOWN || keyCode == KEY_UP || keyCode == KEY_LEFT || keyCode == KEY_RIGHT) {",""," if (!curDate) {"," curDate = ydate.addMonths(this.get(\"date\"), gridNum);"," dayNum = 0;"," }"," ev.preventDefault();"," var newDate = ydate.addDays(curDate, dayNum),"," startDate = this.get(\"date\"),"," endDate = ydate.addMonths(this.get(\"date\"), this._paneNumber - 1),"," lastPaneDate = new Date(endDate);"," endDate.setDate(ydate.daysInMonth(endDate));"," "," if (ydate.isInRange(newDate, startDate, endDate)) {","/*"," var paneShift = (newDate.getMonth() - curDate.getMonth()) % 10;","",""," if (paneShift != 0) {"," var newGridNum = gridNum + paneShift,"," contentBox = this.get('contentBox'),"," newPane = contentBox.one(\"#\" + this._calendarId + \"_pane_\" + newGridNum);"," newPane.focus();"," }","*/"," this._highlightDateNode(newDate);"," }"," else if (ydate.isGreater(startDate, newDate)) {"," if (!ydate.isGreaterOrEqual(this.get(\"minimumDate\"), startDate)) {"," this.set(\"date\", ydate.addMonths(startDate, -1));"," this._highlightDateNode(newDate);"," }"," }"," else if (ydate.isGreater(newDate, endDate)) {"," if (!ydate.isGreaterOrEqual(lastPaneDate, this.get(\"maximumDate\"))) {"," this.set(\"date\", ydate.addMonths(startDate, 1));"," this._highlightDateNode(newDate);"," }"," }",""," }"," },",""," /**"," * Handles the calendar clicks based on selection mode."," * @method _clickCalendar"," * @param {Event} ev A click event"," * @private"," */ "," _clickCalendar : function (ev) {"," var clickedCell = ev.currentTarget,"," clickedCellIsDay = clickedCell.hasClass(CAL_DAY) && "," !clickedCell.hasClass(CAL_PREVMONTH_DAY) && "," !clickedCell.hasClass(CAL_NEXTMONTH_DAY),"," clickedCellIsSelected = clickedCell.hasClass(CAL_DAY_SELECTED);"," switch (this.get(\"selectionMode\")) {"," case(\"single\"):"," if (clickedCellIsDay) {"," if (!clickedCellIsSelected) {"," this._clearSelection(true); "," this._addDateToSelection(this._nodeToDate(clickedCell));"," }"," }"," break;"," case(\"multiple-sticky\"):"," if (clickedCellIsDay) {"," if (clickedCellIsSelected) {"," this._removeDateFromSelection(this._nodeToDate(clickedCell));"," }"," else {"," this._addDateToSelection(this._nodeToDate(clickedCell));"," }"," }"," break;"," case(\"multiple\"):"," if (clickedCellIsDay) {"," if (!ev.metaKey && !ev.ctrlKey && !ev.shiftKey) {"," this._clearSelection(true);"," this._lastSelectedDate = this._nodeToDate(clickedCell);"," this._addDateToSelection(this._lastSelectedDate);"," }"," else if (((os == 'macintosh' && ev.metaKey) || (os != 'macintosh' && ev.ctrlKey)) && !ev.shiftKey) {"," if (clickedCellIsSelected) {"," this._removeDateFromSelection(this._nodeToDate(clickedCell));"," this._lastSelectedDate = null;"," }"," else {"," this._lastSelectedDate = this._nodeToDate(clickedCell);"," this._addDateToSelection(this._lastSelectedDate);"," }"," }"," else if (((os == 'macintosh' && ev.metaKey) || (os != 'macintosh' && ev.ctrlKey)) && ev.shiftKey) {"," if (this._lastSelectedDate) {"," var selectedDate = this._nodeToDate(clickedCell);"," this._addDateRangeToSelection(selectedDate, this._lastSelectedDate);"," this._lastSelectedDate = selectedDate;"," }"," else {"," this._lastSelectedDate = this._nodeToDate(clickedCell);"," this._addDateToSelection(this._lastSelectedDate);"," }"," "," }"," else if (ev.shiftKey) {"," if (this._lastSelectedDate) {"," var selectedDate = this._nodeToDate(clickedCell);"," this._clearSelection(true);"," this._addDateRangeToSelection(selectedDate, this._lastSelectedDate);"," this._lastSelectedDate = selectedDate;"," }"," else {"," this._clearSelection(true);"," this._lastSelectedDate = this._nodeToDate(clickedCell);"," this._addDateToSelection(this._lastSelectedDate);"," }"," }"," }"," break;"," }",""," if (clickedCellIsDay) {"," /**"," * Fired when a specific date cell in the calendar is clicked. The event carries a "," * payload which includes a `cell` property corresponding to the node of the actual"," * date cell, and a `date` property, with the `Date` that was clicked."," *"," * @event dateClick"," */"," this.fire(\"dateClick\", {cell: clickedCell, date: this._nodeToDate(clickedCell)});"," }"," else if (clickedCell.hasClass(CAL_PREVMONTH_DAY)) {"," /**"," * Fired when any of the previous month's days displayed before the calendar grid"," * are clicked."," *"," * @event prevMonthClick"," */"," this.fire(\"prevMonthClick\");"," }"," else if (clickedCell.hasClass(CAL_NEXTMONTH_DAY)) {"," /**"," * Fired when any of the next month's days displayed after the calendar grid"," * are clicked."," *"," * @event nextMonthClick"," */"," this.fire(\"nextMonthClick\");"," }"," },",""," /**"," * Subtracts one month from the current calendar view."," * @method subtractMonth"," */ "," subtractMonth : function (e) {"," this.set(\"date\", ydate.addMonths(this.get(\"date\"), -1));"," if (e) {"," e.halt();"," }"," },",""," /**"," * Subtracts one year from the current calendar view."," * @method subtractYear"," */ "," subtractYear : function (e) {"," this.set(\"date\", ydate.addYears(this.get(\"date\"), -1));"," if (e) {"," e.halt();"," }"," },",""," /**"," * Adds one month to the current calendar view."," * @method addMonth"," */ "," addMonth : function (e) { "," this.set(\"date\", ydate.addMonths(this.get(\"date\"), 1));"," if (e) {"," e.halt();"," }"," },",""," /**"," * Adds one year to the current calendar view."," * @method addYear"," */ "," addYear : function (e) {"," this.set(\"date\", ydate.addYears(this.get(\"date\"), 1));"," if (e) {"," e.halt();"," }"," }","},","","{"," /**"," * The identity of the widget."," *"," * @property NAME"," * @type String"," * @default 'calendar'"," * @readOnly"," * @protected"," * @static"," */ "," NAME: \"calendar\",",""," /**"," * Static property used to define the default attribute configuration of"," * the Widget."," *"," * @property ATTRS"," * @type {Object}"," * @protected"," * @static"," */ "," ATTRS: {",""," /**"," * A setting specifying the type of selection the calendar allows."," * Possible values include:"," * <ul>"," * <li>`single` - One date at a time</li>"," * <li>`multiple-sticky` - Multiple dates, selected one at a time (the dates \"stick\"). This option"," * is appropriate for mobile devices, where function keys from the keyboard are not available.</li>"," * <li>`multiple` - Multiple dates, selected with Ctrl/Meta keys for additional single"," * dates, and Shift key for date ranges.</li>"," *"," * @attribute selectionMode"," * @type String"," * @default single"," */"," selectionMode: {"," value: \"single\""," },",""," /**"," * The date corresponding to the current calendar view. Always"," * normalized to the first of the month that contains the date"," * at assignment time. Used as the first date visible in the"," * calendar."," *"," * @attribute date"," * @type Date"," * @default Today's date as set on the user's computer."," */"," date: {"," value: new Date(),"," lazyAdd: false,"," setter: function (val) {",""," var newDate = this._normalizeDate(val),"," newTopDate = ydate.addMonths(newDate, this._paneNumber - 1);"," var minDate = this.get(\"minimumDate\");"," var maxDate = this.get(\"maximumDate\");"," if ((!minDate || ydate.isGreaterOrEqual(newDate, minDate)) && "," (!maxDate || ydate.isGreaterOrEqual(maxDate, newTopDate))) {"," return newDate;"," }",""," else if (minDate && ydate.isGreater(minDate, newDate)) {"," return minDate;"," }",""," else if (maxDate && ydate.isGreater(newTopDate, maxDate)) {"," var actualMaxDate = ydate.addMonths(maxDate, -1*(this._paneNumber - 1));"," return actualMaxDate;"," }"," }"," },",""," /**"," * The minimum date that can be displayed by the calendar. The calendar will not"," * allow dates earlier than this one to be set, and will reset any earlier date to"," * this date. Should be `null` if no minimum date is needed."," *"," * @attribute minimumDate"," * @type Date"," * @default null"," */"," minimumDate: {"," value: null,"," setter: function (val) {"," if (val) {"," var curDate = this.get('date'),"," newMinDate = this._normalizeDate(val);"," if (curDate && !ydate.isGreaterOrEqual(curDate, newMinDate)) {"," this.set('date', newMinDate);"," }"," return newMinDate;"," }"," else {"," return this._normalizeDate(val);"," }"," }"," },",""," /**"," * The maximum date that can be displayed by the calendar. The calendar will not"," * allow dates later than this one to be set, and will reset any later date to"," * this date. Should be `null` if no maximum date is needed."," *"," * @attribute maximumDate"," * @type Date"," * @default null"," */"," maximumDate: {"," value: null,"," setter: function (val) {"," if (val) {"," var curDate = this.get('date'),"," newMaxDate = this._normalizeDate(val);"," if (curDate && !ydate.isGreaterOrEqual(val, ydate.addMonths(curDate, this._paneNumber - 1))) {"," this.set('date', ydate.addMonths(newMaxDate, -1*(this._paneNumber -1)));"," }"," return newMaxDate;"," }"," else {"," return val;"," }"," }"," }"," }","});","","}, '@VERSION@', {\"requires\": [\"calendar-base\", \"calendarnavigator\"], \"lang\": [\"de\", \"en\", \"fr\", \"ja\", \"nb-NO\", \"pt-BR\", \"ru\", \"zh-HANT-TW\"], \"skinnable\": true});"];
+_yuitest_coverage["build/calendar/calendar.js"].code=["YUI.add('calendar', function (Y, NAME) {","","/**"," * The Calendar component is a UI widget that allows users"," * to view dates in a two-dimensional month grid, as well as"," * to select one or more dates, or ranges of dates. Calendar"," * is generated dynamically and relies on the developer to"," * provide for a progressive enhancement alternative."," *"," *"," * @module calendar"," */","","var getCN = Y.ClassNameManager.getClassName,"," CALENDAR = 'calendar',"," KEY_DOWN = 40,"," KEY_UP = 38,"," KEY_LEFT = 37,"," KEY_RIGHT = 39,"," KEY_ENTER = 13,"," KEY_SPACE = 32,"," CAL_HD = getCN(CALENDAR, 'header'),"," CAL_DAY_SELECTED = getCN(CALENDAR, 'day-selected'),"," CAL_DAY_HILITED = getCN(CALENDAR, 'day-highlighted'),"," CAL_DAY = getCN(CALENDAR, 'day'),"," CAL_PREVMONTH_DAY = getCN(CALENDAR, 'prevmonth-day'),"," CAL_NEXTMONTH_DAY = getCN(CALENDAR, 'nextmonth-day'),"," CAL_GRID = getCN(CALENDAR, 'grid'),"," ydate = Y.DataType.Date,"," delegate = Y.delegate,"," CAL_PANE = getCN(CALENDAR, 'pane'),"," os = Y.UA.os;","","/** Create a calendar view to represent a single or multiple"," * month range of dates, rendered as a grid with date and"," * weekday labels."," * "," * @class Calendar"," * @extends CalendarBase"," * @param config {Object} Configuration object (see Configuration attributes)"," * @constructor"," */","function Calendar(config) {"," Calendar.superclass.constructor.apply ( this, arguments );","}","","Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {",""," _keyEvents: [],",""," _highlightedDateNode: null,",""," /**"," * A property tracking the last selected date on the calendar, for the"," * purposes of multiple selection."," *"," * @property _lastSelectedDate"," * @type Date"," * @default null"," * @private"," */ "," _lastSelectedDate: null,",""," /**"," * Designated initializer. Activates the navigation plugin for the calendar."," *"," * @method initializer"," */ "," initializer : function () {"," this.plug(Y.Plugin.CalendarNavigator);","",""," this._keyEvents = [];"," this._highlightedDateNode = null;"," this._lastSelectedDate = null;"," },",""," /**"," * Overrides the _bindCalendarEvents placeholder in CalendarBase"," * and binds calendar events during bindUI stage."," * @method _bindCalendarEvents"," * @protected"," */ "," _bindCalendarEvents : function () {"," var contentBox = this.get('contentBox'),"," pane = contentBox.one(\".\" + CAL_PANE);"," pane.on(\"selectstart\", this._preventSelectionStart);"," pane.delegate(\"click\", this._clickCalendar, \".\" + CAL_DAY + \", .\" + CAL_PREVMONTH_DAY + \", .\" + CAL_NEXTMONTH_DAY, this);"," pane.delegate(\"keydown\", this._keydownCalendar, \".\" + CAL_GRID, this);"," pane.delegate(\"focus\", this._focusCalendarGrid, \".\" + CAL_GRID, this);"," pane.delegate(\"focus\", this._focusCalendarCell, \".\" + CAL_DAY, this);"," pane.delegate(\"blur\", this._blurCalendarGrid, \".\" + CAL_GRID + \",.\" + CAL_DAY, this);"," },",""," /**"," * Prevents text selection if it is started within the calendar pane"," * @method _preventSelectionStart"," * @param event {Event} The selectstart event"," * @protected"," */ "," _preventSelectionStart : function (event) {"," event.preventDefault();"," },",""," /**"," * Highlights a specific date node with keyboard highlight class"," * @method _highlightDateNode"," * @param oDate {Date} Date corresponding the node to be highlighted"," * @protected"," */ "," _highlightDateNode : function (oDate) {"," this._unhighlightCurrentDateNode();"," var newNode = this._dateToNode(oDate);"," newNode.focus();"," newNode.addClass(CAL_DAY_HILITED);"," },",""," /**"," * Unhighlights a specific date node currently highlighted with keyboard highlight class"," * @method _unhighlightCurrentDateNode"," * @protected"," */ "," _unhighlightCurrentDateNode : function () {"," var allHilitedNodes = this.get(\"contentBox\").all(\".\" + CAL_DAY_HILITED);"," if (allHilitedNodes) {"," allHilitedNodes.removeClass(CAL_DAY_HILITED);"," }"," },",""," /**"," * Returns the grid number for a specific calendar grid (for multi-grid templates)"," * @method _getGridNumber"," * @param gridNode {Node} Node corresponding to a specific grid"," * @protected"," */ "," _getGridNumber : function (gridNode) {"," var idParts = gridNode.get(\"id\").split(\"_\").reverse();"," return parseInt(idParts[0], 10);"," },",""," /**"," * Handler for loss of focus of calendar grid"," * @method _blurCalendarGrid"," * @protected"," */ "," _blurCalendarGrid : function (ev) {"," this._unhighlightCurrentDateNode();"," },","",""," /**"," * Handler for gain of focus of calendar cell"," * @method _focusCalendarCell"," * @protected"," */ "," _focusCalendarCell : function (ev) {"," this._highlightedDateNode = ev.target;"," ev.stopPropagation();"," },",""," /**"," * Handler for gain of focus of calendar grid"," * @method _focusCalendarGrid"," * @protected"," */ "," _focusCalendarGrid : function (ev) { "," this._unhighlightCurrentDateNode();"," this._highlightedDateNode = null;"," },",""," /**"," * Handler for keyboard press on a calendar grid"," * @method _keydownCalendar"," * @protected"," */ "," _keydownCalendar : function (ev) {"," var gridNum = this._getGridNumber(ev.target),"," curDate = !this._highlightedDateNode ? null : this._nodeToDate(this._highlightedDateNode),"," keyCode = ev.keyCode,"," dayNum = 0,"," dir = '';",""," switch(keyCode) {"," case KEY_DOWN: "," dayNum = 7;"," dir = 's';"," break;"," case KEY_UP: "," dayNum = -7;"," dir = 'n';"," break;"," case KEY_LEFT: "," dayNum = -1;"," dir = 'w';"," break;"," case KEY_RIGHT:"," dayNum = 1;"," dir = 'e';"," break;"," case KEY_SPACE: case KEY_ENTER:"," ev.preventDefault();"," if (this._highlightedDateNode) {"," var selMode = this.get(\"selectionMode\");"," if (selMode === \"single\" && !this._highlightedDateNode.hasClass(CAL_DAY_SELECTED)) {"," this._clearSelection(true);"," this._addDateToSelection(curDate);"," }"," else if (selMode === \"multiple\" || selMode === \"multiple-sticky\") {"," if (this._highlightedDateNode.hasClass(CAL_DAY_SELECTED)) {"," this._removeDateFromSelection(curDate);"," }"," else {"," this._addDateToSelection(curDate);"," }"," }"," }"," break;"," }"," ",""," if (keyCode == KEY_DOWN || keyCode == KEY_UP || keyCode == KEY_LEFT || keyCode == KEY_RIGHT) {",""," if (!curDate) {"," curDate = ydate.addMonths(this.get(\"date\"), gridNum);"," dayNum = 0;"," }"," ev.preventDefault();"," var newDate = ydate.addDays(curDate, dayNum),"," startDate = this.get(\"date\"),"," endDate = ydate.addMonths(this.get(\"date\"), this._paneNumber - 1),"," lastPaneDate = new Date(endDate);"," endDate.setDate(ydate.daysInMonth(endDate));"," "," if (ydate.isInRange(newDate, startDate, endDate)) {","/*"," var paneShift = (newDate.getMonth() - curDate.getMonth()) % 10;","",""," if (paneShift != 0) {"," var newGridNum = gridNum + paneShift,"," contentBox = this.get('contentBox'),"," newPane = contentBox.one(\"#\" + this._calendarId + \"_pane_\" + newGridNum);"," newPane.focus();"," }","*/"," this._highlightDateNode(newDate);"," }"," else if (ydate.isGreater(startDate, newDate)) {"," if (!ydate.isGreaterOrEqual(this.get(\"minimumDate\"), startDate)) {"," this.set(\"date\", ydate.addMonths(startDate, -1));"," this._highlightDateNode(newDate);"," }"," }"," else if (ydate.isGreater(newDate, endDate)) {"," if (!ydate.isGreaterOrEqual(lastPaneDate, this.get(\"maximumDate\"))) {"," this.set(\"date\", ydate.addMonths(startDate, 1));"," this._highlightDateNode(newDate);"," }"," }",""," }"," },",""," /**"," * Handles the calendar clicks based on selection mode."," * @method _clickCalendar"," * @param {Event} ev A click event"," * @private"," */ "," _clickCalendar : function (ev) {"," var clickedCell = ev.currentTarget,"," clickedCellIsDay = clickedCell.hasClass(CAL_DAY) && "," !clickedCell.hasClass(CAL_PREVMONTH_DAY) && "," !clickedCell.hasClass(CAL_NEXTMONTH_DAY),"," clickedCellIsSelected = clickedCell.hasClass(CAL_DAY_SELECTED);"," switch (this.get(\"selectionMode\")) {"," case(\"single\"):"," if (clickedCellIsDay) {"," if (!clickedCellIsSelected) {"," this._clearSelection(true); "," this._addDateToSelection(this._nodeToDate(clickedCell));"," }"," }"," break;"," case(\"multiple-sticky\"):"," if (clickedCellIsDay) {"," if (clickedCellIsSelected) {"," this._removeDateFromSelection(this._nodeToDate(clickedCell));"," }"," else {"," this._addDateToSelection(this._nodeToDate(clickedCell));"," }"," }"," break;"," case(\"multiple\"):"," if (clickedCellIsDay) {"," if (!ev.metaKey && !ev.ctrlKey && !ev.shiftKey) {"," this._clearSelection(true);"," this._lastSelectedDate = this._nodeToDate(clickedCell);"," this._addDateToSelection(this._lastSelectedDate);"," }"," else if (((os == 'macintosh' && ev.metaKey) || (os != 'macintosh' && ev.ctrlKey)) && !ev.shiftKey) {"," if (clickedCellIsSelected) {"," this._removeDateFromSelection(this._nodeToDate(clickedCell));"," this._lastSelectedDate = null;"," }"," else {"," this._lastSelectedDate = this._nodeToDate(clickedCell);"," this._addDateToSelection(this._lastSelectedDate);"," }"," }"," else if (((os == 'macintosh' && ev.metaKey) || (os != 'macintosh' && ev.ctrlKey)) && ev.shiftKey) {"," if (this._lastSelectedDate) {"," var selectedDate = this._nodeToDate(clickedCell);"," this._addDateRangeToSelection(selectedDate, this._lastSelectedDate);"," this._lastSelectedDate = selectedDate;"," }"," else {"," this._lastSelectedDate = this._nodeToDate(clickedCell);"," this._addDateToSelection(this._lastSelectedDate);"," }"," "," }"," else if (ev.shiftKey) {"," if (this._lastSelectedDate) {"," var selectedDate = this._nodeToDate(clickedCell);"," this._clearSelection(true);"," this._addDateRangeToSelection(selectedDate, this._lastSelectedDate);"," this._lastSelectedDate = selectedDate;"," }"," else {"," this._clearSelection(true);"," this._lastSelectedDate = this._nodeToDate(clickedCell);"," this._addDateToSelection(this._lastSelectedDate);"," }"," }"," }"," break;"," }",""," if (clickedCellIsDay) {"," /**"," * Fired when a specific date cell in the calendar is clicked. The event carries a "," * payload which includes a `cell` property corresponding to the node of the actual"," * date cell, and a `date` property, with the `Date` that was clicked."," *"," * @event dateClick"," */"," this.fire(\"dateClick\", {cell: clickedCell, date: this._nodeToDate(clickedCell)});"," }"," else if (clickedCell.hasClass(CAL_PREVMONTH_DAY)) {"," /**"," * Fired when any of the previous month's days displayed before the calendar grid"," * are clicked."," *"," * @event prevMonthClick"," */"," this.fire(\"prevMonthClick\");"," }"," else if (clickedCell.hasClass(CAL_NEXTMONTH_DAY)) {"," /**"," * Fired when any of the next month's days displayed after the calendar grid"," * are clicked."," *"," * @event nextMonthClick"," */"," this.fire(\"nextMonthClick\");"," }"," },",""," /**"," * Subtracts one month from the current calendar view."," * @method subtractMonth"," */ "," subtractMonth : function (e) {"," this.set(\"date\", ydate.addMonths(this.get(\"date\"), -1));"," if (e) {"," e.halt();"," }"," },",""," /**"," * Subtracts one year from the current calendar view."," * @method subtractYear"," */ "," subtractYear : function (e) {"," this.set(\"date\", ydate.addYears(this.get(\"date\"), -1));"," if (e) {"," e.halt();"," }"," },",""," /**"," * Adds one month to the current calendar view."," * @method addMonth"," */ "," addMonth : function (e) { "," this.set(\"date\", ydate.addMonths(this.get(\"date\"), 1));"," if (e) {"," e.halt();"," }"," },",""," /**"," * Adds one year to the current calendar view."," * @method addYear"," */ "," addYear : function (e) {"," this.set(\"date\", ydate.addYears(this.get(\"date\"), 1));"," if (e) {"," e.halt();"," }"," }","},","","{"," /**"," * The identity of the widget."," *"," * @property NAME"," * @type String"," * @default 'calendar'"," * @readOnly"," * @protected"," * @static"," */ "," NAME: \"calendar\",",""," /**"," * Static property used to define the default attribute configuration of"," * the Widget."," *"," * @property ATTRS"," * @type {Object}"," * @protected"," * @static"," */ "," ATTRS: {",""," /**"," * A setting specifying the type of selection the calendar allows."," * Possible values include:"," * <ul>"," * <li>`single` - One date at a time</li>"," * <li>`multiple-sticky` - Multiple dates, selected one at a time (the dates \"stick\"). This option"," * is appropriate for mobile devices, where function keys from the keyboard are not available.</li>"," * <li>`multiple` - Multiple dates, selected with Ctrl/Meta keys for additional single"," * dates, and Shift key for date ranges.</li>"," *"," * @attribute selectionMode"," * @type String"," * @default single"," */"," selectionMode: {"," value: \"single\""," },",""," /**"," * The date corresponding to the current calendar view. Always"," * normalized to the first of the month that contains the date"," * at assignment time. Used as the first date visible in the"," * calendar."," *"," * @attribute date"," * @type Date"," * @default Today's date as set on the user's computer."," */"," date: {"," value: new Date(),"," lazyAdd: false,"," setter: function (val) {",""," var newDate = this._normalizeDate(val),"," newTopDate = ydate.addMonths(newDate, this._paneNumber - 1);"," var minDate = this.get(\"minimumDate\");"," var maxDate = this.get(\"maximumDate\");"," if ((!minDate || ydate.isGreaterOrEqual(newDate, minDate)) && "," (!maxDate || ydate.isGreaterOrEqual(maxDate, newTopDate))) {"," return newDate;"," }",""," else if (minDate && ydate.isGreater(minDate, newDate)) {"," return minDate;"," }",""," else if (maxDate && ydate.isGreater(newTopDate, maxDate)) {"," var actualMaxDate = ydate.addMonths(maxDate, -1*(this._paneNumber - 1));"," return actualMaxDate;"," }"," }"," },",""," /**"," * The minimum date that can be displayed by the calendar. The calendar will not"," * allow dates earlier than this one to be set, and will reset any earlier date to"," * this date. Should be `null` if no minimum date is needed."," *"," * @attribute minimumDate"," * @type Date"," * @default null"," */"," minimumDate: {"," value: null,"," setter: function (val) {"," if (val) {"," var curDate = this.get('date'),"," newMinDate = this._normalizeDate(val);"," if (curDate && !ydate.isGreaterOrEqual(curDate, newMinDate)) {"," this.set('date', newMinDate);"," }"," return newMinDate;"," }"," else {"," return this._normalizeDate(val);"," }"," }"," },",""," /**"," * The maximum date that can be displayed by the calendar. The calendar will not"," * allow dates later than this one to be set, and will reset any later date to"," * this date. Should be `null` if no maximum date is needed."," *"," * @attribute maximumDate"," * @type Date"," * @default null"," */"," maximumDate: {"," value: null,"," setter: function (val) {"," if (val) {"," var curDate = this.get('date'),"," newMaxDate = this._normalizeDate(val);"," if (curDate && !ydate.isGreaterOrEqual(val, ydate.addMonths(curDate, this._paneNumber - 1))) {"," this.set('date', ydate.addMonths(newMaxDate, -1*(this._paneNumber -1)));"," }"," return newMaxDate;"," }"," else {"," return val;"," }"," }"," }"," }","});","","}, '@VERSION@', {\"requires\": [\"calendar-base\", \"calendarnavigator\"], \"lang\": [\"de\", \"en\", \"es\", \"es-AR\", \"fr\", \"it\", \"ja\", \"nb-NO\", \"nl\", \"pt-BR\", \"ru\", \"zh-HANT-TW\"], \"skinnable\": true});"];
_yuitest_coverage["build/calendar/calendar.js"].lines = {"1":0,"14":0,"43":0,"44":0,"47":0,"70":0,"73":0,"74":0,"75":0,"85":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"102":0,"112":0,"113":0,"114":0,"115":0,"124":0,"125":0,"126":0,"137":0,"138":0,"147":0,"157":0,"158":0,"167":0,"168":0,"177":0,"183":0,"185":0,"186":0,"187":0,"189":0,"190":0,"191":0,"193":0,"194":0,"195":0,"197":0,"198":0,"199":0,"201":0,"202":0,"203":0,"204":0,"205":0,"206":0,"208":0,"209":0,"210":0,"213":0,"217":0,"221":0,"223":0,"224":0,"225":0,"227":0,"228":0,"232":0,"234":0,"246":0,"248":0,"249":0,"250":0,"251":0,"254":0,"255":0,"256":0,"257":0,"271":0,"276":0,"278":0,"279":0,"280":0,"281":0,"284":0,"286":0,"287":0,"288":0,"291":0,"294":0,"296":0,"297":0,"298":0,"299":0,"300":0,"302":0,"303":0,"304":0,"305":0,"308":0,"309":0,"312":0,"313":0,"314":0,"315":0,"316":0,"319":0,"320":0,"324":0,"325":0,"326":0,"327":0,"328":0,"329":0,"332":0,"333":0,"334":0,"338":0,"341":0,"349":0,"351":0,"358":0,"360":0,"367":0,"376":0,"377":0,"378":0,"387":0,"388":0,"389":0,"398":0,"399":0,"400":0,"409":0,"410":0,"411":0,"473":0,"475":0,"476":0,"477":0,"479":0,"482":0,"483":0,"486":0,"487":0,"488":0,"505":0,"506":0,"508":0,"509":0,"511":0,"514":0,"531":0,"532":0,"534":0,"535":0,"537":0,"540":0};
_yuitest_coverage["build/calendar/calendar.js"].functions = {"Calendar:43":0,"initializer:69":0,"_bindCalendarEvents:84":0,"_preventSelectionStart:101":0,"_highlightDateNode:111":0,"_unhighlightCurrentDateNode:123":0,"_getGridNumber:136":0,"_blurCalendarGrid:146":0,"_focusCalendarCell:156":0,"_focusCalendarGrid:166":0,"_keydownCalendar:176":0,"_clickCalendar:270":0,"subtractMonth:375":0,"subtractYear:386":0,"addMonth:397":0,"addYear:408":0,"setter:471":0,"setter:504":0,"setter:530":0,"(anonymous 1):1":0};
_yuitest_coverage["build/calendar/calendar.js"].coveredLines = 153;
@@ -750,4 +750,4 @@ return val;
}
});
-}, '@VERSION@', {"requires": ["calendar-base", "calendarnavigator"], "lang": ["de", "en", "fr", "ja", "nb-NO", "pt-BR", "ru", "zh-HANT-TW"], "skinnable": true});
+}, '@VERSION@', {"requires": ["calendar-base", "calendarnavigator"], "lang": ["de", "en", "es", "es-AR", "fr", "it", "ja", "nb-NO", "nl", "pt-BR", "ru", "zh-HANT-TW"], "skinnable": true});
View
2  build/calendar/calendar-debug.js
@@ -544,4 +544,4 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
}
});
-}, '@VERSION@', {"requires": ["calendar-base", "calendarnavigator"], "lang": ["de", "en", "fr", "ja", "nb-NO", "pt-BR", "ru", "zh-HANT-TW"], "skinnable": true});
+}, '@VERSION@', {"requires": ["calendar-base", "calendarnavigator"], "lang": ["de", "en", "es", "es-AR", "fr", "it", "ja", "nb-NO", "nl", "pt-BR", "ru", "zh-HANT-TW"], "skinnable": true});
View
2  build/calendar/calendar-min.js
@@ -1 +1 @@
-YUI.add("calendar",function(e,t){function E(e){E.superclass.constructor.apply(this,arguments)}var n=e.ClassNameManager.getClassName,r="calendar",i=40,s=38,o=37,u=39,a=13,f=32,l=n(r,"header"),c=n(r,"day-selected"),h=n(r,"day-highlighted"),p=n(r,"day"),d=n(r,"prevmonth-day"),v=n(r,"nextmonth-day"),m=n(r,"grid"),g=e.DataType.Date,y=e.delegate,b=n(r,"pane"),w=e.UA.os;e.Calendar=e.extend(E,e.CalendarBase,{_keyEvents:[],_highlightedDateNode:null,_lastSelectedDate:null,initializer:function(){this.plug(e.Plugin.CalendarNavigator),this._keyEvents=[],this._highlightedDateNode=null,this._lastSelectedDate=null},_bindCalendarEvents:function(){var e=this.get("contentBox"),t=e.one("."+b);t.on("selectstart",this._preventSelectionStart),t.delegate("click",this._clickCalendar,"."+p+", ."+d+", ."+v,this),t.delegate("keydown",this._keydownCalendar,"."+m,this),t.delegate("focus",this._focusCalendarGrid,"."+m,this),t.delegate("focus",this._focusCalendarCell,"."+p,this),t.delegate("blur",this._blurCalendarGrid,"."+m+",."+p,this)},_preventSelectionStart:function(e){e.preventDefault()},_highlightDateNode:function(e){this._unhighlightCurrentDateNode();var t=this._dateToNode(e);t.focus(),t.addClass(h)},_unhighlightCurrentDateNode:function(){var e=this.get("contentBox").all("."+h);e&&e.removeClass(h)},_getGridNumber:function(e){var t=e.get("id").split("_").reverse();return parseInt(t[0],10)},_blurCalendarGrid:function(e){this._unhighlightCurrentDateNode()},_focusCalendarCell:function(e){this._highlightedDateNode=e.target,e.stopPropagation()},_focusCalendarGrid:function(e){this._unhighlightCurrentDateNode(),this._highlightedDateNode=null},_keydownCalendar:function(e){var t=this._getGridNumber(e.target),n=this._highlightedDateNode?this._nodeToDate(this._highlightedDateNode):null,r=e.keyCode,l=0,h="";switch(r){case i:l=7,h="s";break;case s:l=-7,h="n";break;case o:l=-1,h="w";break;case u:l=1,h="e";break;case f:case a:e.preventDefault();if(this._highlightedDateNode){var p=this.get("selectionMode");if(p==="single"&&!this._highlightedDateNode.hasClass(c))this._clearSelection(!0),this._addDateToSelection(n);else if(p==="multiple"||p==="multiple-sticky")this._highlightedDateNode.hasClass(c)?this._removeDateFromSelection(n):this._addDateToSelection(n)}}if(r==i||r==s||r==o||r==u){n||(n=g.addMonths(this.get("date"),t),l=0),e.preventDefault();var d=g.addDays(n,l),v=this.get("date"),m=g.addMonths(this.get("date"),this._paneNumber-1),y=new Date(m);m.setDate(g.daysInMonth(m)),g.isInRange(d,v,m)?this._highlightDateNode(d):g.isGreater(v,d)?g.isGreaterOrEqual(this.get("minimumDate"),v)||(this.set("date",g.addMonths(v,-1)),this._highlightDateNode(d)):g.isGreater(d,m)&&(g.isGreaterOrEqual(y,this.get("maximumDate"))||(this.set("date",g.addMonths(v,1)),this._highlightDateNode(d)))}},_clickCalendar:function(e){var t=e.currentTarget,n=t.hasClass(p)&&!t.hasClass(d)&&!t.hasClass(v),r=t.hasClass(c);switch(this.get("selectionMode")){case"single":n&&(r||(this._clearSelection(!0),this._addDateToSelection(this._nodeToDate(t))));break;case"multiple-sticky":n&&(r?this._removeDateFromSelection(this._nodeToDate(t)):this._addDateToSelection(this._nodeToDate(t)));break;case"multiple":if(n)if(!e.metaKey&&!e.ctrlKey&&!e.shiftKey)this._clearSelection(!0),this._lastSelectedDate=this._nodeToDate(t),this._addDateToSelection(this._lastSelectedDate);else if((w=="macintosh"&&e.metaKey||w!="macintosh"&&e.ctrlKey)&&!e.shiftKey)r?(this._removeDateFromSelection(this._nodeToDate(t)),this._lastSelectedDate=null):(this._lastSelectedDate=this._nodeToDate(t),this._addDateToSelection(this._lastSelectedDate));else if((w=="macintosh"&&e.metaKey||w!="macintosh"&&e.ctrlKey)&&e.shiftKey)if(this._lastSelectedDate){var i=this._nodeToDate(t);this._addDateRangeToSelection(i,this._lastSelectedDate),this._lastSelectedDate=i}else this._lastSelectedDate=this._nodeToDate(t),this._addDateToSelection(this._lastSelectedDate);else if(e.shiftKey)if(this._lastSelectedDate){var i=this._nodeToDate(t);this._clearSelection(!0),this._addDateRangeToSelection(i,this._lastSelectedDate),this._lastSelectedDate=i}else this._clearSelection(!0),this._lastSelectedDate=this._nodeToDate(t),this._addDateToSelection(this._lastSelectedDate)}n?this.fire("dateClick",{cell:t,date:this._nodeToDate(t)}):t.hasClass(d)?this.fire("prevMonthClick"):t.hasClass(v)&&this.fire("nextMonthClick")},subtractMonth:function(e){this.set("date",g.addMonths(this.get("date"),-1)),e&&e.halt()},subtractYear:function(e){this.set("date",g.addYears(this.get("date"),-1)),e&&e.halt()},addMonth:function(e){this.set("date",g.addMonths(this.get("date"),1)),e&&e.halt()},addYear:function(e){this.set("date",g.addYears(this.get("date"),1)),e&&e.halt()}},{NAME:"calendar",ATTRS:{selectionMode:{value:"single"},date:{value:new Date,lazyAdd:!1,setter:function(e){var t=this._normalizeDate(e),n=g.addMonths(t,this._paneNumber-1),r=this.get("minimumDate"),i=this.get("maximumDate");if((!r||g.isGreaterOrEqual(t,r))&&(!i||g.isGreaterOrEqual(i,n)))return t;if(r&&g.isGreater(r,t))return r;if(i&&g.isGreater(n,i)){var s=g.addMonths(i,-1*(this._paneNumber-1));return s}}},minimumDate:{value:null,setter:function(e){if(e){var t=this.get("date"),n=this._normalizeDate(e);return t&&!g.isGreaterOrEqual(t,n)&&this.set("date",n),n}return this._normalizeDate(e)}},maximumDate:{value:null,setter:function(e){if(e){var t=this.get("date"),n=this._normalizeDate(e);return t&&!g.isGreaterOrEqual(e,g.addMonths(t,this._paneNumber-1))&&this.set("date",g.addMonths(n,-1*(this._paneNumber-1))),n}return e}}}})},"@VERSION@",{requires:["calendar-base","calendarnavigator"],lang:["de","en","fr","ja","nb-NO","pt-BR","ru","zh-HANT-TW"],skinnable:!0});
+YUI.add("calendar",function(e,t){function E(e){E.superclass.constructor.apply(this,arguments)}var n=e.ClassNameManager.getClassName,r="calendar",i=40,s=38,o=37,u=39,a=13,f=32,l=n(r,"header"),c=n(r,"day-selected"),h=n(r,"day-highlighted"),p=n(r,"day"),d=n(r,"prevmonth-day"),v=n(r,"nextmonth-day"),m=n(r,"grid"),g=e.DataType.Date,y=e.delegate,b=n(r,"pane"),w=e.UA.os;e.Calendar=e.extend(E,e.CalendarBase,{_keyEvents:[],_highlightedDateNode:null,_lastSelectedDate:null,initializer:function(){this.plug(e.Plugin.CalendarNavigator),this._keyEvents=[],this._highlightedDateNode=null,this._lastSelectedDate=null},_bindCalendarEvents:function(){var e=this.get("contentBox"),t=e.one("."+b);t.on("selectstart",this._preventSelectionStart),t.delegate("click",this._clickCalendar,"."+p+", ."+d+", ."+v,this),t.delegate("keydown",this._keydownCalendar,"."+m,this),t.delegate("focus",this._focusCalendarGrid,"."+m,this),t.delegate("focus",this._focusCalendarCell,"."+p,this),t.delegate("blur",this._blurCalendarGrid,"."+m+",."+p,this)},_preventSelectionStart:function(e){e.preventDefault()},_highlightDateNode:function(e){this._unhighlightCurrentDateNode();var t=this._dateToNode(e);t.focus(),t.addClass(h)},_unhighlightCurrentDateNode:function(){var e=this.get("contentBox").all("."+h);e&&e.removeClass(h)},_getGridNumber:function(e){var t=e.get("id").split("_").reverse();return parseInt(t[0],10)},_blurCalendarGrid:function(e){this._unhighlightCurrentDateNode()},_focusCalendarCell:function(e){this._highlightedDateNode=e.target,e.stopPropagation()},_focusCalendarGrid:function(e){this._unhighlightCurrentDateNode(),this._highlightedDateNode=null},_keydownCalendar:function(e){var t=this._getGridNumber(e.target),n=this._highlightedDateNode?this._nodeToDate(this._highlightedDateNode):null,r=e.keyCode,l=0,h="";switch(r){case i:l=7,h="s";break;case s:l=-7,h="n";break;case o:l=-1,h="w";break;case u:l=1,h="e";break;case f:case a:e.preventDefault();if(this._highlightedDateNode){var p=this.get("selectionMode");if(p==="single"&&!this._highlightedDateNode.hasClass(c))this._clearSelection(!0),this._addDateToSelection(n);else if(p==="multiple"||p==="multiple-sticky")this._highlightedDateNode.hasClass(c)?this._removeDateFromSelection(n):this._addDateToSelection(n)}}if(r==i||r==s||r==o||r==u){n||(n=g.addMonths(this.get("date"),t),l=0),e.preventDefault();var d=g.addDays(n,l),v=this.get("date"),m=g.addMonths(this.get("date"),this._paneNumber-1),y=new Date(m);m.setDate(g.daysInMonth(m)),g.isInRange(d,v,m)?this._highlightDateNode(d):g.isGreater(v,d)?g.isGreaterOrEqual(this.get("minimumDate"),v)||(this.set("date",g.addMonths(v,-1)),this._highlightDateNode(d)):g.isGreater(d,m)&&(g.isGreaterOrEqual(y,this.get("maximumDate"))||(this.set("date",g.addMonths(v,1)),this._highlightDateNode(d)))}},_clickCalendar:function(e){var t=e.currentTarget,n=t.hasClass(p)&&!t.hasClass(d)&&!t.hasClass(v),r=t.hasClass(c);switch(this.get("selectionMode")){case"single":n&&(r||(this._clearSelection(!0),this._addDateToSelection(this._nodeToDate(t))));break;case"multiple-sticky":n&&(r?this._removeDateFromSelection(this._nodeToDate(t)):this._addDateToSelection(this._nodeToDate(t)));break;case"multiple":if(n)if(!e.metaKey&&!e.ctrlKey&&!e.shiftKey)this._clearSelection(!0),this._lastSelectedDate=this._nodeToDate(t),this._addDateToSelection(this._lastSelectedDate);else if((w=="macintosh"&&e.metaKey||w!="macintosh"&&e.ctrlKey)&&!e.shiftKey)r?(this._removeDateFromSelection(this._nodeToDate(t)),this._lastSelectedDate=null):(this._lastSelectedDate=this._nodeToDate(t),this._addDateToSelection(this._lastSelectedDate));else if((w=="macintosh"&&e.metaKey||w!="macintosh"&&e.ctrlKey)&&e.shiftKey)if(this._lastSelectedDate){var i=this._nodeToDate(t);this._addDateRangeToSelection(i,this._lastSelectedDate),this._lastSelectedDate=i}else this._lastSelectedDate=this._nodeToDate(t),this._addDateToSelection(this._lastSelectedDate);else if(e.shiftKey)if(this._lastSelectedDate){var i=this._nodeToDate(t);this._clearSelection(!0),this._addDateRangeToSelection(i,this._lastSelectedDate),this._lastSelectedDate=i}else this._clearSelection(!0),this._lastSelectedDate=this._nodeToDate(t),this._addDateToSelection(this._lastSelectedDate)}n?this.fire("dateClick",{cell:t,date:this._nodeToDate(t)}):t.hasClass(d)?this.fire("prevMonthClick"):t.hasClass(v)&&this.fire("nextMonthClick")},subtractMonth:function(e){this.set("date",g.addMonths(this.get("date"),-1)),e&&e.halt()},subtractYear:function(e){this.set("date",g.addYears(this.get("date"),-1)),e&&e.halt()},addMonth:function(e){this.set("date",g.addMonths(this.get("date"),1)),e&&e.halt()},addYear:function(e){this.set("date",g.addYears(this.get("date"),1)),e&&e.halt()}},{NAME:"calendar",ATTRS:{selectionMode:{value:"single"},date:{value:new Date,lazyAdd:!1,setter:function(e){var t=this._normalizeDate(e),n=g.addMonths(t,this._paneNumber-1),r=this.get("minimumDate"),i=this.get("maximumDate");if((!r||g.isGreaterOrEqual(t,r))&&(!i||g.isGreaterOrEqual(i,n)))return t;if(r&&g.isGreater(r,t))return r;if(i&&g.isGreater(n,i)){var s=g.addMonths(i,-1*(this._paneNumber-1));return s}}},minimumDate:{value:null,setter:function(e){if(e){var t=this.get("date"),n=this._normalizeDate(e);return t&&!g.isGreaterOrEqual(t,n)&&this.set("date",n),n}return this._normalizeDate(e)}},maximumDate:{value:null,setter:function(e){if(e){var t=this.get("date"),n=this._normalizeDate(e);return t&&!g.isGreaterOrEqual(e,g.addMonths(t,this._paneNumber-1))&&this.set("date",g.addMonths(n,-1*(this._paneNumber-1))),n}return e}}}})},"@VERSION@",{requires:["calendar-base","calendarnavigator"],lang:["de","en","es","es-AR","fr","it","ja","nb-NO","nl","pt-BR","ru","zh-HANT-TW"],skinnable:!0});
View
2  build/calendar/calendar.js
@@ -544,4 +544,4 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
}
});
-}, '@VERSION@', {"requires": ["calendar-base", "calendarnavigator"], "lang": ["de", "en", "fr", "ja", "nb-NO", "pt-BR", "ru", "zh-HANT-TW"], "skinnable": true});
+}, '@VERSION@', {"requires": ["calendar-base", "calendarnavigator"], "lang": ["de", "en", "es", "es-AR", "fr", "it", "ja", "nb-NO", "nl", "pt-BR", "ru", "zh-HANT-TW"], "skinnable": true});
View
1  build/calendar/lang/calendar_es-AR.js
@@ -0,0 +1 @@
+YUI.add("lang/calendar_es-AR",function(e){e.Intl.add("calendar","es-AR",{weekdays:["Domingo","Lunes","Martes","Mi\u00e9rcoles","Jueves","Viernes","S\u00e1bado"],short_weekdays:["Dom","Lun","Mar","Mie","Jue","Vie","Sab"],very_short_weekdays:["Do","Lu","Ma","Mi","Ju","Vi","Sa"]})},"@VERSION@");
View
1  build/calendar/lang/calendar_es.js
@@ -0,0 +1 @@
+YUI.add("lang/calendar_es",function(e){e.Intl.add("calendar","es",{weekdays:["Domingo","Lunes","Martes","Mi\u00e9rcoles","Jueves","Viernes","S\u00e1bado"],short_weekdays:["Dom","Lun","Mar","Mie","Jue","Vie","Sab"],very_short_weekdays:["Do","Lu","Ma","Mi","Ju","Vi","Sa"]})},"@VERSION@");
View
1  build/calendar/lang/calendar_it.js
@@ -0,0 +1 @@
+YUI.add("lang/calendar_it",function(e){e.Intl.add("calendar","it",{weekdays:["Luned\u00ec","Marted\u00ec","Mercoled\u00ec","Gioved\u00ec","Venerd\u00ec","Sabato","Domenica"],short_weekdays:["Lun","Mar","Mer","Gio","Ven","Sab","Dom"],very_short_weekdays:["Lu","Ma","Me","Gi","Ve","Sa","Do"]})},"@VERSION@");
View
1  build/calendar/lang/calendar_nl.js
@@ -0,0 +1 @@
+YUI.add("lang/calendar_nl",function(e){e.Intl.add("calendar","nl",{weekdays:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],short_weekdays:["zon","maan","dins","woens","don","vrij","zat"],very_short_weekdays:["zo","ma","di","woe","do","vr","za"]})},"@VERSION@");
View
179 build/event-flick/event-flick-coverage.js
@@ -26,9 +26,9 @@ _yuitest_coverage["build/event-flick/event-flick.js"] = {
path: "build/event-flick/event-flick.js",
code: []
};
-_yuitest_coverage["build/event-flick/event-flick.js"].code=["YUI.add('event-flick', function (Y, NAME) {","","/**"," * The gestures module provides gesture events such as \"flick\", which normalize user interactions"," * across touch and mouse or pointer based input devices. This layer can be used by application developers"," * to build input device agnostic components which behave the same in response to either touch or mouse based "," * interaction."," *"," * <p>Documentation for events added by this module can be found in the event document for the <a href=\"../classes/YUI.html#events\">YUI</a> global.</p>"," *"," * @module event-gestures"," */","","/**"," * Adds support for a \"flick\" event, which is fired at the end of a touch or mouse based flick gesture, and provides "," * velocity of the flick, along with distance and time information."," *"," * <p>Documentation for the flick event can be found on the <a href=\"../classes/YUI.html#event_flick\">YUI</a> global, "," * along with the other supported events.</p>"," *"," * @module event-gestures"," * @submodule event-flick"," */","var GESTURE_MAP = Y.Event._GESTURE_MAP,"," EVENT = {"," start: GESTURE_MAP.start,"," end: GESTURE_MAP.end,"," move: GESTURE_MAP.move"," },"," START = \"start\","," END = \"end\","," MOVE = \"move\",",""," OWNER_DOCUMENT = \"ownerDocument\","," MIN_VELOCITY = \"minVelocity\","," MIN_DISTANCE = \"minDistance\","," PREVENT_DEFAULT = \"preventDefault\",",""," _FLICK_START = \"_fs\","," _FLICK_START_HANDLE = \"_fsh\","," _FLICK_END_HANDLE = \"_feh\","," _FLICK_MOVE_HANDLE = \"_fmh\",",""," NODE_TYPE = \"nodeType\";","","/**"," * Sets up a \"flick\" event, that is fired whenever the user initiates a flick gesture on the node"," * where the listener is attached. The subscriber can specify a minimum distance or velocity for"," * which the event is to be fired. The subscriber can also specify if there is a particular axis which"," * they are interested in - \"x\" or \"y\". If no axis is specified, the axis along which there was most distance"," * covered is used."," *"," * <p>It is recommended that you use Y.bind to set up context and additional arguments for your event handler,"," * however if you want to pass the context and arguments as additional signature arguments to \"on\", "," * you need to provide a null value for the configuration object, e.g: <code>node.on(\"flick\", fn, null, context, arg1, arg2, arg3)</code></p>"," *"," * @event flick"," * @for YUI"," * @param type {string} \"flick\""," * @param fn {function} The method the event invokes. It receives an event facade with an e.flick object containing the flick related properties: e.flick.time, e.flick.distance, e.flick.velocity and e.flick.axis, e.flick.start."," * @param cfg {Object} Optional. An object which specifies any of the following:"," * <dl>"," * <dt>minDistance (in pixels, defaults to 10)</dt>"," * <dd>The minimum distance between start and end points, which would qualify the gesture as a flick.</dd>"," * <dt>minVelocity (in pixels/ms, defaults to 0)</dt>"," * <dd>The minimum velocity which would qualify the gesture as a flick.</dd>"," * <dt>preventDefault (defaults to false)</dt>"," * <dd>Can be set to true/false to prevent default behavior as soon as the touchstart/touchend or mousedown/mouseup is received so that things like scrolling or text selection can be "," * prevented. This property can also be set to a function, which returns true or false, based on the event facade passed to it.</dd>"," * <dt>axis (no default)</dt>"," * <dd>Can be set to \"x\" or \"y\" if you want to constrain the flick velocity and distance to a single axis. If not"," * defined, the axis along which the maximum distance was covered is used.</dd>"," * </dl>"," * @return {EventHandle} the detach handle"," */","","Y.Event.define('flick', {",""," on: function (node, subscriber, ce) {",""," var startHandle = node.on(EVENT[START],"," this._onStart,"," this,"," node,"," subscriber, "," ce);"," "," subscriber[_FLICK_START_HANDLE] = startHandle;"," },",""," detach: function (node, subscriber, ce) {",""," var startHandle = subscriber[_FLICK_START_HANDLE],"," endHandle = subscriber[_FLICK_END_HANDLE];",""," if (startHandle) {"," startHandle.detach();"," subscriber[_FLICK_START_HANDLE] = null;"," }",""," if (endHandle) {"," endHandle.detach();"," subscriber[_FLICK_END_HANDLE] = null;"," }"," },",""," processArgs: function(args) {"," var params = (args.length > 3) ? Y.merge(args.splice(3, 1)[0]) : {};",""," if (!(MIN_VELOCITY in params)) {"," params[MIN_VELOCITY] = this.MIN_VELOCITY;"," }",""," if (!(MIN_DISTANCE in params)) {"," params[MIN_DISTANCE] = this.MIN_DISTANCE;"," }",""," if (!(PREVENT_DEFAULT in params)) {"," params[PREVENT_DEFAULT] = this.PREVENT_DEFAULT;"," }",""," return params;"," },",""," _onStart: function(e, node, subscriber, ce) {",""," var start = true, // always true for mouse"," endHandle,"," moveHandle,"," doc,"," preventDefault = subscriber._extra.preventDefault,"," origE = e; ",""," if (e.touches) {"," start = (e.touches.length === 1);"," e = e.touches[0];"," }",""," if (start) {",""," if (preventDefault) {"," // preventDefault is a boolean or function"," if (!preventDefault.call || preventDefault(e)) {"," origE.preventDefault();"," }"," }",""," e.flick = {"," time : new Date().getTime()"," };",""," subscriber[_FLICK_START] = e;",""," endHandle = subscriber[_FLICK_END_HANDLE];",""," doc = (node.get(NODE_TYPE) === 9) ? node : node.get(OWNER_DOCUMENT);"," if (!endHandle) {"," endHandle = doc.on(EVENT[END], Y.bind(this._onEnd, this), null, node, subscriber, ce);"," subscriber[_FLICK_END_HANDLE] = endHandle;"," }",""," subscriber[_FLICK_MOVE_HANDLE] = doc.once(EVENT[MOVE], Y.bind(this._onMove, this), null, node, subscriber, ce);"," }"," },",""," _onMove: function(e, node, subscriber, ce) {"," var start = subscriber[_FLICK_START];",""," // Start timing from first move."," if (start && start.flick) {"," start.flick.time = new Date().getTime();"," }"," },",""," _onEnd: function(e, node, subscriber, ce) {",""," var endTime = new Date().getTime(),"," start = subscriber[_FLICK_START],"," valid = !!start,"," endEvent = e,"," startTime,"," time,"," preventDefault,"," params,"," xyDistance, "," distance,"," velocity,"," axis,"," moveHandle = subscriber[_FLICK_MOVE_HANDLE];",""," if (moveHandle) {"," moveHandle.detach();"," delete subscriber[_FLICK_MOVE_HANDLE];"," }",""," if (valid) {",""," if (e.changedTouches) {"," if (e.changedTouches.length === 1 && e.touches.length === 0) {"," endEvent = e.changedTouches[0];"," } else {"," valid = false;"," }"," }",""," if (valid) {",""," params = subscriber._extra;"," preventDefault = params[PREVENT_DEFAULT];",""," if (preventDefault) {"," // preventDefault is a boolean or function"," if (!preventDefault.call || preventDefault(e)) {"," e.preventDefault();"," }"," }",""," startTime = start.flick.time;"," endTime = new Date().getTime();"," time = endTime - startTime;",""," xyDistance = ["," endEvent.pageX - start.pageX,"," endEvent.pageY - start.pageY"," ];",""," if (params.axis) {"," axis = params.axis;"," } else {"," axis = (Math.abs(xyDistance[0]) >= Math.abs(xyDistance[1])) ? 'x' : 'y';"," }",""," distance = xyDistance[(axis === 'x') ? 0 : 1];"," velocity = (time !== 0) ? distance/time : 0;",""," if (isFinite(velocity) && (Math.abs(distance) >= params[MIN_DISTANCE]) && (Math.abs(velocity) >= params[MIN_VELOCITY])) {",""," e.type = \"flick\";"," e.flick = {"," time:time,"," distance: distance,"," velocity:velocity,"," axis: axis,"," start : start"," };",""," ce.fire(e);",""," }",""," subscriber[_FLICK_START] = null;"," }"," }"," },",""," MIN_VELOCITY : 0,"," MIN_DISTANCE : 0,"," PREVENT_DEFAULT : false","});","","","}, '@VERSION@', {\"requires\": [\"node-base\", \"event-touch\", \"event-synthetic\"]});"];
-_yuitest_coverage["build/event-flick/event-flick.js"].lines = {"1":0,"24":0,"77":0,"81":0,"88":0,"93":0,"96":0,"97":0,"98":0,"101":0,"102":0,"103":0,"108":0,"110":0,"111":0,"114":0,"115":0,"118":0,"119":0,"122":0,"127":0,"134":0,"135":0,"136":0,"139":0,"141":0,"143":0,"144":0,"148":0,"152":0,"154":0,"156":0,"157":0,"158":0,"159":0,"162":0,"167":0,"170":0,"171":0,"177":0,"191":0,"192":0,"193":0,"196":0,"198":0,"199":0,"200":0,"202":0,"206":0,"208":0,"209":0,"211":0,"213":0,"214":0,"218":0,"219":0,"220":0,"222":0,"227":0,"228":0,"230":0,"233":0,"234":0,"236":0,"238":0,"239":0,"247":0,"251":0};
-_yuitest_coverage["build/event-flick/event-flick.js"].functions = {"on:79":0,"detach:91":0,"processArgs:107":0,"_onStart:125":0,"_onMove:166":0,"_onEnd:175":0,"(anonymous 1):1":0};
+_yuitest_coverage["build/event-flick/event-flick.js"].code=["YUI.add('event-flick', function (Y, NAME) {","","/**"," * The gestures module provides gesture events such as \"flick\", which normalize user interactions"," * across touch and mouse or pointer based input devices. This layer can be used by application developers"," * to build input device agnostic components which behave the same in response to either touch or mouse based"," * interaction."," *"," * <p>Documentation for events added by this module can be found in the event document for the <a href=\"../classes/YUI.html#events\">YUI</a> global.</p>"," *"," *"," @example",""," YUI().use('event-flick', function (Y) {"," Y.one('#myNode').on('flick', function (e) {"," });"," });",""," *"," * @module event-gestures"," */","","/**"," * Adds support for a \"flick\" event, which is fired at the end of a touch or mouse based flick gesture, and provides"," * velocity of the flick, along with distance and time information."," *"," * <p>Documentation for the flick event can be found on the <a href=\"../classes/YUI.html#event_flick\">YUI</a> global,"," * along with the other supported events.</p>"," *"," * @module event-gestures"," * @submodule event-flick"," */","var GESTURE_MAP = Y.Event._GESTURE_MAP,"," EVENT = {"," start: GESTURE_MAP.start,"," end: GESTURE_MAP.end,"," move: GESTURE_MAP.move"," },"," START = \"start\","," END = \"end\","," MOVE = \"move\",",""," OWNER_DOCUMENT = \"ownerDocument\","," MIN_VELOCITY = \"minVelocity\","," MIN_DISTANCE = \"minDistance\","," PREVENT_DEFAULT = \"preventDefault\",",""," _FLICK_START = \"_fs\","," _FLICK_START_HANDLE = \"_fsh\","," _FLICK_END_HANDLE = \"_feh\","," _FLICK_MOVE_HANDLE = \"_fmh\",",""," NODE_TYPE = \"nodeType\";","","/**"," * Sets up a \"flick\" event, that is fired whenever the user initiates a flick gesture on the node"," * where the listener is attached. The subscriber can specify a minimum distance or velocity for"," * which the event is to be fired. The subscriber can also specify if there is a particular axis which"," * they are interested in - \"x\" or \"y\". If no axis is specified, the axis along which there was most distance"," * covered is used."," *"," * <p>It is recommended that you use Y.bind to set up context and additional arguments for your event handler,"," * however if you want to pass the context and arguments as additional signature arguments to \"on\","," * you need to provide a null value for the configuration object, e.g: <code>node.on(\"flick\", fn, null, context, arg1, arg2, arg3)</code></p>"," *"," * @event flick"," * @for YUI"," * @param type {string} \"flick\""," * @param fn {function} The method the event invokes. It receives an event facade with an e.flick object containing the flick related properties: e.flick.time, e.flick.distance, e.flick.velocity and e.flick.axis, e.flick.start."," * @param cfg {Object} Optional. An object which specifies any of the following:"," * <dl>"," * <dt>minDistance (in pixels, defaults to 10)</dt>"," * <dd>The minimum distance between start and end points, which would qualify the gesture as a flick.</dd>"," * <dt>minVelocity (in pixels/ms, defaults to 0)</dt>"," * <dd>The minimum velocity which would qualify the gesture as a flick.</dd>"," * <dt>preventDefault (defaults to false)</dt>"," * <dd>Can be set to true/false to prevent default behavior as soon as the touchstart/touchend or mousedown/mouseup is received so that things like scrolling or text selection can be"," * prevented. This property can also be set to a function, which returns true or false, based on the event facade passed to it.</dd>"," * <dt>axis (no default)</dt>"," * <dd>Can be set to \"x\" or \"y\" if you want to constrain the flick velocity and distance to a single axis. If not"," * defined, the axis along which the maximum distance was covered is used.</dd>"," * </dl>"," * @return {EventHandle} the detach handle"," */","","Y.Event.define('flick', {",""," on: function (node, subscriber, ce) {",""," var startHandle = node.on(EVENT[START],"," this._onStart,"," this,"," node,"," subscriber,"," ce);",""," subscriber[_FLICK_START_HANDLE] = startHandle;"," },",""," detach: function (node, subscriber, ce) {",""," var startHandle = subscriber[_FLICK_START_HANDLE],"," endHandle = subscriber[_FLICK_END_HANDLE];",""," if (startHandle) {"," startHandle.detach();"," subscriber[_FLICK_START_HANDLE] = null;"," }",""," if (endHandle) {"," endHandle.detach();"," subscriber[_FLICK_END_HANDLE] = null;"," }"," },",""," processArgs: function(args) {"," var params = (args.length > 3) ? Y.merge(args.splice(3, 1)[0]) : {};",""," if (!(MIN_VELOCITY in params)) {"," params[MIN_VELOCITY] = this.MIN_VELOCITY;"," }",""," if (!(MIN_DISTANCE in params)) {"," params[MIN_DISTANCE] = this.MIN_DISTANCE;"," }",""," if (!(PREVENT_DEFAULT in params)) {"," params[PREVENT_DEFAULT] = this.PREVENT_DEFAULT;"," }",""," return params;"," },",""," _onStart: function(e, node, subscriber, ce) {",""," var start = true, // always true for mouse"," endHandle,"," moveHandle,"," doc,"," preventDefault = subscriber._extra.preventDefault,"," origE = e;",""," if (e.touches) {"," start = (e.touches.length === 1);"," e = e.touches[0];"," }",""," if (start) {",""," if (preventDefault) {"," // preventDefault is a boolean or function"," if (!preventDefault.call || preventDefault(e)) {"," origE.preventDefault();"," }"," }",""," e.flick = {"," time : new Date().getTime()"," };",""," subscriber[_FLICK_START] = e;",""," endHandle = subscriber[_FLICK_END_HANDLE];",""," doc = (node.get(NODE_TYPE) === 9) ? node : node.get(OWNER_DOCUMENT);"," if (!endHandle) {"," endHandle = doc.on(EVENT[END], Y.bind(this._onEnd, this), null, node, subscriber, ce);"," subscriber[_FLICK_END_HANDLE] = endHandle;"," }",""," subscriber[_FLICK_MOVE_HANDLE] = doc.once(EVENT[MOVE], Y.bind(this._onMove, this), null, node, subscriber, ce);"," }"," },",""," _onMove: function(e, node, subscriber, ce) {"," var start = subscriber[_FLICK_START];",""," // Start timing from first move."," if (start && start.flick) {"," start.flick.time = new Date().getTime();"," }"," },",""," _onEnd: function(e, node, subscriber, ce) {",""," var endTime = new Date().getTime(),"," start = subscriber[_FLICK_START],"," valid = !!start,"," endEvent = e,"," startTime,"," time,"," preventDefault,"," params,"," xyDistance,"," distance,"," velocity,"," axis,"," moveHandle = subscriber[_FLICK_MOVE_HANDLE];",""," if (moveHandle) {"," moveHandle.detach();"," delete subscriber[_FLICK_MOVE_HANDLE];"," }",""," if (valid) {",""," if (e.changedTouches) {"," if (e.changedTouches.length === 1 && e.touches.length === 0) {"," endEvent = e.changedTouches[0];"," } else {"," valid = false;"," }"," }",""," if (valid) {",""," params = subscriber._extra;"," preventDefault = params[PREVENT_DEFAULT];",""," if (preventDefault) {"," // preventDefault is a boolean or function"," if (!preventDefault.call || preventDefault(e)) {"," e.preventDefault();"," }"," }",""," startTime = start.flick.time;"," endTime = new Date().getTime();"," time = endTime - startTime;",""," xyDistance = ["," endEvent.pageX - start.pageX,"," endEvent.pageY - start.pageY"," ];",""," if (params.axis) {"," axis = params.axis;"," } else {"," axis = (Math.abs(xyDistance[0]) >= Math.abs(xyDistance[1])) ? 'x' : 'y';"," }",""," distance = xyDistance[(axis === 'x') ? 0 : 1];"," velocity = (time !== 0) ? distance/time : 0;",""," if (isFinite(velocity) && (Math.abs(distance) >= params[MIN_DISTANCE]) && (Math.abs(velocity) >= params[MIN_VELOCITY])) {",""," e.type = \"flick\";"," e.flick = {"," time:time,"," distance: distance,"," velocity:velocity,"," axis: axis,"," start : start"," };",""," ce.fire(e);",""," }",""," subscriber[_FLICK_START] = null;"," }"," }"," },",""," MIN_VELOCITY : 0,"," MIN_DISTANCE : 0,"," PREVENT_DEFAULT : false","});","","","}, '@VERSION@', {\"requires\": [\"node-base\", \"event-touch\", \"event-synthetic\"]});"];
+_yuitest_coverage["build/event-flick/event-flick.js"].lines = {"1":0,"33":0,"86":0,"90":0,"97":0,"102":0,"105":0,"106":0,"107":0,"110":0,"111":0,"112":0,"117":0,"119":0,"120":0,"123":0,"124":0,"127":0,"128":0,"131":0,"136":0,"143":0,"144":0,"145":0,"148":0,"150":0,"152":0,"153":0,"157":0,"161":0,"163":0,"165":0,"166":0,"167":0,"168":0,"171":0,"176":0,"179":0,"180":0,"186":0,"200":0,"201":0,"202":0,"205":0,"207":0,"208":0,"209":0,"211":0,"215":0,"217":0,"218":0,"220":0,"222":0,"223":0,"227":0,"228":0,"229":0,"231":0,"236":0,"237":0,"239":0,"242":0,"243":0,"245":0,"247":0,"248":0,"256":0,"260":0};
+_yuitest_coverage["build/event-flick/event-flick.js"].functions = {"on:88":0,"detach:100":0,"processArgs:116":0,"_onStart:134":0,"_onMove:175":0,"_onEnd:184":0,"(anonymous 1):1":0};
_yuitest_coverage["build/event-flick/event-flick.js"].coveredLines = 68;
_yuitest_coverage["build/event-flick/event-flick.js"].coveredFunctions = 7;
_yuitest_coverline("build/event-flick/event-flick.js", 1);
@@ -37,26 +37,35 @@ YUI.add('event-flick', function (Y, NAME) {
/**
* The gestures module provides gesture events such as "flick", which normalize user interactions
* across touch and mouse or pointer based input devices. This layer can be used by application developers
- * to build input device agnostic components which behave the same in response to either touch or mouse based
+ * to build input device agnostic components which behave the same in response to either touch or mouse based
* interaction.
*
* <p>Documentation for events added by this module can be found in the event document for the <a href="../classes/YUI.html#events">YUI</a> global.</p>
*
+ *
+ @example
+
+ YUI().use('event-flick', function (Y) {
+ Y.one('#myNode').on('flick', function (e) {
+ });
+ });
+
+ *
* @module event-gestures
*/
/**
- * Adds support for a "flick" event, which is fired at the end of a touch or mouse based flick gesture, and provides
+ * Adds support for a "flick" event, which is fired at the end of a touch or mouse based flick gesture, and provides
* velocity of the flick, along with distance and time information.
*
- * <p>Documentation for the flick event can be found on the <a href="../classes/YUI.html#event_flick">YUI</a> global,
+ * <p>Documentation for the flick event can be found on the <a href="../classes/YUI.html#event_flick">YUI</a> global,
* along with the other supported events.</p>
*
* @module event-gestures
* @submodule event-flick
*/
_yuitest_coverfunc("build/event-flick/event-flick.js", "(anonymous 1)", 1);
-_yuitest_coverline("build/event-flick/event-flick.js", 24);
+_yuitest_coverline("build/event-flick/event-flick.js", 33);
var GESTURE_MAP = Y.Event._GESTURE_MAP,
EVENT = {
start: GESTURE_MAP.start,
@@ -87,7 +96,7 @@ var GESTURE_MAP = Y.Event._GESTURE_MAP,
* covered is used.
*
* <p>It is recommended that you use Y.bind to set up context and additional arguments for your event handler,
- * however if you want to pass the context and arguments as additional signature arguments to "on",
+ * however if you want to pass the context and arguments as additional signature arguments to "on",
* you need to provide a null value for the configuration object, e.g: <code>node.on("flick", fn, null, context, arg1, arg2, arg3)</code></p>
*
* @event flick
@@ -101,7 +110,7 @@ var GESTURE_MAP = Y.Event._GESTURE_MAP,
* <dt>minVelocity (in pixels/ms, defaults to 0)</dt>
* <dd>The minimum velocity which would qualify the gesture as a flick.</dd>
* <dt>preventDefault (defaults to false)</dt>
- * <dd>Can be set to true/false to prevent default behavior as soon as the touchstart/touchend or mousedown/mouseup is received so that things like scrolling or text selection can be
+ * <dd>Can be set to true/false to prevent default behavior as soon as the touchstart/touchend or mousedown/mouseup is received so that things like scrolling or text selection can be
* prevented. This property can also be set to a function, which returns true or false, based on the event facade passed to it.</dd>
* <dt>axis (no default)</dt>
* <dd>Can be set to "x" or "y" if you want to constrain the flick velocity and distance to a single axis. If not
@@ -110,150 +119,150 @@ var GESTURE_MAP = Y.Event._GESTURE_MAP,
* @return {EventHandle} the detach handle
*/
-_yuitest_coverline("build/event-flick/event-flick.js", 77);
+_yuitest_coverline("build/event-flick/event-flick.js", 86);
Y.Event.define('flick', {
on: function (node, subscriber, ce) {
- _yuitest_coverfunc("build/event-flick/event-flick.js", "on", 79);
-_yuitest_coverline("build/event-flick/event-flick.js", 81);
+ _yuitest_coverfunc("build/event-flick/event-flick.js", "on", 88);
+_yuitest_coverline("build/event-flick/event-flick.js", 90);
var startHandle = node.on(EVENT[START],
this._onStart,
this,
node,
- subscriber,
+ subscriber,
ce);
-
- _yuitest_coverline("build/event-flick/event-flick.js", 88);
+
+ _yuitest_coverline("build/event-flick/event-flick.js", 97);
subscriber[_FLICK_START_HANDLE] = startHandle;
},
detach: function (node, subscriber, ce) {
- _yuitest_coverfunc("build/event-flick/event-flick.js", "detach", 91);
-_yuitest_coverline("build/event-flick/event-flick.js", 93);
+ _yuitest_coverfunc("build/event-flick/event-flick.js", "detach", 100);
+_yuitest_coverline("build/event-flick/event-flick.js", 102);
var startHandle = subscriber[_FLICK_START_HANDLE],
endHandle = subscriber[_FLICK_END_HANDLE];
- _yuitest_coverline("build/event-flick/event-flick.js", 96);
+ _yuitest_coverline("build/event-flick/event-flick.js", 105);
if (startHandle) {
- _yuitest_coverline("build/event-flick/event-flick.js", 97);
+ _yuitest_coverline("build/event-flick/event-flick.js", 106);
startHandle.detach();
- _yuitest_coverline("build/event-flick/event-flick.js", 98);
+ _yuitest_coverline("build/event-flick/event-flick.js", 107);
subscriber[_FLICK_START_HANDLE] = null;
}
- _yuitest_coverline("build/event-flick/event-flick.js", 101);
+ _yuitest_coverline("build/event-flick/event-flick.js", 110);
if (endHandle) {
- _yuitest_coverline("build/event-flick/event-flick.js", 102);
+ _yuitest_coverline("build/event-flick/event-flick.js", 111);
endHandle.detach();
- _yuitest_coverline("build/event-flick/event-flick.js", 103);
+ _yuitest_coverline("build/event-flick/event-flick.js", 112);
subscriber[_FLICK_END_HANDLE] = null;
}
},
processArgs: function(args) {
- _yuitest_coverfunc("build/event-flick/event-flick.js", "processArgs", 107);
-_yuitest_coverline("build/event-flick/event-flick.js", 108);
+ _yuitest_coverfunc("build/event-flick/event-flick.js", "processArgs", 116);
+_yuitest_coverline("build/event-flick/event-flick.js", 117);
var params = (args.length > 3) ? Y.merge(args.splice(3, 1)[0]) : {};
- _yuitest_coverline("build/event-flick/event-flick.js", 110);
+ _yuitest_coverline("build/event-flick/event-flick.js", 119);
if (!(MIN_VELOCITY in params)) {
- _yuitest_coverline("build/event-flick/event-flick.js", 111);
+ _yuitest_coverline("build/event-flick/event-flick.js", 120);
params[MIN_VELOCITY] = this.MIN_VELOCITY;
}
- _yuitest_coverline("build/event-flick/event-flick.js", 114);
+ _yuitest_coverline("build/event-flick/event-flick.js", 123);
if (!(MIN_DISTANCE in params)) {
- _yuitest_coverline("build/event-flick/event-flick.js", 115);
+ _yuitest_coverline("build/event-flick/event-flick.js", 124);
params[MIN_DISTANCE] = this.MIN_DISTANCE;
}
- _yuitest_coverline("build/event-flick/event-flick.js", 118);
+ _yuitest_coverline("build/event-flick/event-flick.js", 127);
if (!(PREVENT_DEFAULT in params)) {
- _yuitest_coverline("build/event-flick/event-flick.js", 119);
+ _yuitest_coverline("build/event-flick/event-flick.js", 128);
params[PREVENT_DEFAULT] = this.PREVENT_DEFAULT;
}
- _yuitest_coverline("build/event-flick/event-flick.js", 122);
+ _yuitest_coverline("build/event-flick/event-flick.js", 131);
return params;
},
_onStart: function(e, node, subscriber, ce) {
- _yuitest_coverfunc("build/event-flick/event-flick.js", "_onStart", 125);
-_yuitest_coverline("build/event-flick/event-flick.js", 127);
+ _yuitest_coverfunc("build/event-flick/event-flick.js", "_onStart", 134);
+_yuitest_coverline("build/event-flick/event-flick.js", 136);
var start = true, // always true for mouse
endHandle,
moveHandle,
doc,
preventDefault = subscriber._extra.preventDefault,
- origE = e;
+ origE = e;
- _yuitest_coverline("build/event-flick/event-flick.js", 134);
+ _yuitest_coverline("build/event-flick/event-flick.js", 143);
if (e.touches) {
- _yuitest_coverline("build/event-flick/event-flick.js", 135);
+ _yuitest_coverline("build/event-flick/event-flick.js", 144);
start = (e.touches.length === 1);
- _yuitest_coverline("build/event-flick/event-flick.js", 136);
+ _yuitest_coverline("build/event-flick/event-flick.js", 145);
e = e.touches[0];
}
- _yuitest_coverline("build/event-flick/event-flick.js", 139);
+ _yuitest_coverline("build/event-flick/event-flick.js", 148);
if (start) {
- _yuitest_coverline("build/event-flick/event-flick.js", 141);
+ _yuitest_coverline("build/event-flick/event-flick.js", 150);
if (preventDefault) {
// preventDefault is a boolean or function
- _yuitest_coverline("build/event-flick/event-flick.js", 143);
+ _yuitest_coverline("build/event-flick/event-flick.js", 152);
if (!preventDefault.call || preventDefault(e)) {
- _yuitest_coverline("build/event-flick/event-flick.js", 144);
+ _yuitest_coverline("build/event-flick/event-flick.js", 153);
origE.preventDefault();
}
}
- _yuitest_coverline("build/event-flick/event-flick.js", 148);
+ _yuitest_coverline("build/event-flick/event-flick.js", 157);
e.flick = {
time : new Date().getTime()
};
- _yuitest_coverline("build/event-flick/event-flick.js", 152);
+ _yuitest_coverline("build/event-flick/event-flick.js", 161);
subscriber[_FLICK_START] = e;
- _yuitest_coverline("build/event-flick/event-flick.js", 154);
+ _yuitest_coverline("build/event-flick/event-flick.js", 163);
endHandle = subscriber[_FLICK_END_HANDLE];
- _yuitest_coverline("build/event-flick/event-flick.js", 156);
+ _yuitest_coverline("build/event-flick/event-flick.js", 165);
doc = (node.get(NODE_TYPE) === 9) ? node : node.get(OWNER_DOCUMENT);
- _yuitest_coverline("build/event-flick/event-flick.js", 157);
+ _yuitest_coverline("build/event-flick/event-flick.js", 166);
if (!endHandle) {
- _yuitest_coverline("build/event-flick/event-flick.js", 158);
+ _yuitest_coverline("build/event-flick/event-flick.js", 167);
endHandle = doc.on(EVENT[END], Y.bind(this._onEnd, this), null, node, subscriber, ce);
- _yuitest_coverline("build/event-flick/event-flick.js", 159);
+ _yuitest_coverline("build/event-flick/event-flick.js", 168);
subscriber[_FLICK_END_HANDLE] = endHandle;
}
- _yuitest_coverline("build/event-flick/event-flick.js", 162);
+ _yuitest_coverline("build/event-flick/event-flick.js", 171);
subscriber[_FLICK_MOVE_HANDLE] = doc.once(EVENT[MOVE], Y.bind(this._onMove, this), null, node, subscriber, ce);
}
},
_onMove: function(e, node, subscriber, ce) {
- _yuitest_coverfunc("build/event-flick/event-flick.js", "_onMove", 166);
-_yuitest_coverline("build/event-flick/event-flick.js", 167);
+ _yuitest_coverfunc("build/event-flick/event-flick.js", "_onMove", 175);
+_yuitest_coverline("build/event-flick/event-flick.js", 176);
var start = subscriber[_FLICK_START];
// Start timing from first move.
- _yuitest_coverline("build/event-flick/event-flick.js", 170);
+ _yuitest_coverline("build/event-flick/event-flick.js", 179);
if (start && start.flick) {
- _yuitest_coverline("build/event-flick/event-flick.js", 171);
+ _yuitest_coverline("build/event-flick/event-flick.js", 180);
start.flick.time = new Date().getTime();
}
},
_onEnd: function(e, node, subscriber, ce) {
- _yuitest_coverfunc("build/event-flick/event-flick.js", "_onEnd", 175);
-_yuitest_coverline("build/event-flick/event-flick.js", 177);
+ _yuitest_coverfunc("build/event-flick/event-flick.js", "_onEnd", 184);
+_yuitest_coverline("build/event-flick/event-flick.js", 186);
var endTime = new Date().getTime(),
start = subscriber[_FLICK_START],
valid = !!start,
@@ -262,86 +271,86 @@ var endTime = new Date().getTime(),
time,
preventDefault,
params,
- xyDistance,
+ xyDistance,
distance,
velocity,
axis,
moveHandle = subscriber[_FLICK_MOVE_HANDLE];
- _yuitest_coverline("build/event-flick/event-flick.js", 191);
+ _yuitest_coverline("build/event-flick/event-flick.js", 200);
if (moveHandle) {
- _yuitest_coverline("build/event-flick/event-flick.js", 192);
+ _yuitest_coverline("build/event-flick/event-flick.js", 201);
moveHandle.detach();
- _yuitest_coverline("build/event-flick/event-flick.js", 193);
+ _yuitest_coverline("build/event-flick/event-flick.js", 202);
delete subscriber[_FLICK_MOVE_HANDLE];
}
- _yuitest_coverline("build/event-flick/event-flick.js", 196);
+ _yuitest_coverline("build/event-flick/event-flick.js", 205);
if (valid) {
- _yuitest_coverline("build/event-flick/event-flick.js", 198);
+ _yuitest_coverline("build/event-flick/event-flick.js", 207);
if (e.changedTouches) {
- _yuitest_coverline("build/event-flick/event-flick.js", 199);
+ _yuitest_coverline("build/event-flick/event-flick.js", 208);
if (e.changedTouches.length === 1 && e.touches.length === 0) {
- _yuitest_coverline("build/event-flick/event-flick.js", 200);
+ _yuitest_coverline("build/event-flick/event-flick.js", 209);
endEvent = e.changedTouches[0];
} else {
- _yuitest_coverline("build/event-flick/event-flick.js", 202);
+ _yuitest_coverline("build/event-flick/event-flick.js", 211);
valid = false;
}
}
- _yuitest_coverline("build/event-flick/event-flick.js", 206);
+ _yuitest_coverline("build/event-flick/event-flick.js", 215);
if (valid) {
- _yuitest_coverline("build/event-flick/event-flick.js", 208);
+ _yuitest_coverline("build/event-flick/event-flick.js", 217);
params = subscriber._extra;
- _yuitest_coverline("build/event-flick/event-flick.js", 209);
+ _yuitest_coverline("build/event-flick/event-flick.js", 218);
preventDefault = params[PREVENT_DEFAULT];
- _yuitest_coverline("build/event-flick/event-flick.js", 211);
+ _yuitest_coverline("build/event-flick/event-flick.js", 220);
if (preventDefault) {
// preventDefault is a boolean or function
- _yuitest_coverline("build/event-flick/event-flick.js", 213);
+ _yuitest_coverline("build/event-flick/event-flick.js", 222);
if (!preventDefault.call || preventDefault(e)) {
- _yuitest_coverline("build/event-flick/event-flick.js", 214);
+ _yuitest_coverline("build/event-flick/event-flick.js", 223);
e.preventDefault();
}
}
- _yuitest_coverline("build/event-flick/event-flick.js", 218);
+ _yuitest_coverline("build/event-flick/event-flick.js", 227);
startTime = start.flick.time;
- _yuitest_coverline("build/event-flick/event-flick.js", 219);
+ _yuitest_coverline("build/event-flick/event-flick.js", 228);
endTime = new Date().getTime();
- _yuitest_coverline("build/event-flick/event-flick.js", 220);
+ _yuitest_coverline("build/event-flick/event-flick.js", 229);
time = endTime - startTime;
- _yuitest_coverline("build/event-flick/event-flick.js", 222);
+ _yuitest_coverline("build/event-flick/event-flick.js", 231);
xyDistance = [
endEvent.pageX - start.pageX,
endEvent.pageY - start.pageY
];
- _yuitest_coverline("build/event-flick/event-flick.js", 227);
+ _yuitest_coverline("build/event-flick/event-flick.js", 236);
if (params.axis) {
- _yuitest_coverline("build/event-flick/event-flick.js", 228);
+ _yuitest_coverline("build/event-flick/event-flick.js", 237);
axis = params.axis;
} else {
- _yuitest_coverline("build/event-flick/event-flick.js", 230);
+ _yuitest_coverline("build/event-flick/event-flick.js", 239);
axis = (Math.abs(xyDistance[0]) >= Math.abs(xyDistance[1])) ? 'x' : 'y';
}
- _yuitest_coverline("build/event-flick/event-flick.js", 233);
+ _yuitest_coverline("build/event-flick/event-flick.js", 242);
distance = xyDistance[(axis === 'x') ? 0 : 1];
- _yuitest_coverline("build/event-flick/event-flick.js", 234);
+ _yuitest_coverline("build/event-flick/event-flick.js", 243);
velocity = (time !== 0) ? distance/time : 0;
- _yuitest_coverline("build/event-flick/event-flick.js", 236);
+ _yuitest_coverline("build/event-flick/event-flick.js", 245);
if (isFinite(velocity) && (Math.abs(distance) >= params[MIN_DISTANCE]) && (Math.abs(velocity) >= params[MIN_VELOCITY])) {
- _yuitest_coverline("build/event-flick/event-flick.js", 238);
+ _yuitest_coverline("build/event-flick/event-flick.js", 247);
e.type = "flick";
- _yuitest_coverline("build/event-flick/event-flick.js", 239);
+ _yuitest_coverline("build/event-flick/event-flick.js", 248);
e.flick = {
time:time,
distance: distance,
@@ -350,12 +359,12 @@ e.flick = {
start : start
};
- _yuitest_coverline("build/event-flick/event-flick.js", 247);
+ _yuitest_coverline("build/event-flick/event-flick.js", 256);
ce.fire(e);
}
- _yuitest_coverline("build/event-flick/event-flick.js", 251);
+ _yuitest_coverline("build/event-flick/event-flick.js", 260);
subscriber[_FLICK_START] = null;
}
}
View
28 build/event-flick/event-flick-debug.js
@@ -3,19 +3,29 @@ YUI.add('event-flick', function (Y, NAME) {
/**
* The gestures module provides gesture events such as "flick", which normalize user interactions
* across touch and mouse or pointer based input devices. This layer can be used by application developers
- * to build input device agnostic components which behave the same in response to either touch or mouse based
+ * to build input device agnostic components which behave the same in response to either touch or mouse based
* interaction.
*
* <p>Documentation for events added by this module can be found in the event document for the <a href="../classes/YUI.html#events">YUI</a> global.</p>
*
+ *
+ @example
+
+ YUI().use('event-flick', function (Y) {
+ Y.one('#myNode').on('flick', function (e) {
+ Y.log('flick event fired. The event payload has goodies.');
+ });
+ });
+
+ *
* @module event-gestures
*/
/**
- * Adds support for a "flick" event, which is fired at the end of a touch or mouse based flick gesture, and provides
+ * Adds support for a "flick" event, which is fired at the end of a touch or mouse based flick gesture, and provides
* velocity of the flick, along with distance and time information.
*
- * <p>Documentation for the flick event can be found on the <a href="../classes/YUI.html#event_flick">YUI</a> global,
+ * <p>Documentation for the flick event can be found on the <a href="../classes/YUI.html#event_flick">YUI</a> global,
* along with the other supported events.</p>
*
* @module event-gestures
@@ -51,7 +61,7 @@ var GESTURE_MAP = Y.Event._GESTURE_MAP,
* covered is used.
*
* <p>It is recommended that you use Y.bind to set up context and additional arguments for your event handler,
- * however if you want to pass the context and arguments as additional signature arguments to "on",
+ * however if you want to pass the context and arguments as additional signature arguments to "on",
* you need to provide a null value for the configuration object, e.g: <code>node.on("flick", fn, null, context, arg1, arg2, arg3)</code></p>
*
* @event flick
@@ -65,7 +75,7 @@ var GESTURE_MAP = Y.Event._GESTURE_MAP,
* <dt>minVelocity (in pixels/ms, defaults to 0)</dt>
* <dd>The minimum velocity which would qualify the gesture as a flick.</dd>
* <dt>preventDefault (defaults to false)</dt>
- * <dd>Can be set to true/false to prevent default behavior as soon as the touchstart/touchend or mousedown/mouseup is received so that things like scrolling or text selection can be
+ * <dd>Can be set to true/false to prevent default behavior as soon as the touchstart/touchend or mousedown/mouseup is received so that things like scrolling or text selection can be
* prevented. This property can also be set to a function, which returns true or false, based on the event facade passed to it.</dd>
* <dt>axis (no default)</dt>
* <dd>Can be set to "x" or "y" if you want to constrain the flick velocity and distance to a single axis. If not
@@ -82,9 +92,9 @@ Y.Event.define('flick', {
this._onStart,
this,
node,
- subscriber,
+ subscriber,
ce);
-
+
subscriber[_FLICK_START_HANDLE] = startHandle;
},
@@ -129,7 +139,7 @@ Y.Event.define('flick', {
moveHandle,
doc,
preventDefault = subscriber._extra.preventDefault,
- origE = e;
+ origE = e;
if (e.touches) {
start = (e.touches.length === 1);
@@ -182,7 +192,7 @@ Y.Event.define('flick', {
time,
preventDefault,
params,
- xyDistance,
+ xyDistance,
distance,
velocity,
axis,
View
27 build/event-flick/event-flick.js
@@ -3,19 +3,28 @@ YUI.add('event-flick', function (Y, NAME) {
/**
* The gestures module provides gesture events such as "flick", which normalize user interactions
* across touch and mouse or pointer based input devices. This layer can be used by application developers
- * to build input device agnostic components which behave the same in response to either touch or mouse based
+ * to build input device agnostic components which behave the same in response to either touch or mouse based
* interaction.
*
* <p>Documentation for events added by this module can be found in the event document for the <a href="../classes/YUI.html#events">YUI</a> global.</p>
*
+ *
+ @example
+
+ YUI().use('event-flick', function (Y) {
+ Y.one('#myNode').on('flick', function (e) {
+ });
+ });
+
+ *
* @module event-gestures
*/
/**
- * Adds support for a "flick" event, which is fired at the end of a touch or mouse based flick gesture, and provides
+ * Adds support for a "flick" event, which is fired at the end of a touch or mouse based flick gesture, and provides
* velocity of the flick, along with distance and time information.
*
- * <p>Documentation for the flick event can be found on the <a href="../classes/YUI.html#event_flick">YUI</a> global,
+ * <p>Documentation for the flick event can be found on the <a href="../classes/YUI.html#event_flick">YUI</a> global,
* along with the other supported events.</p>
*
* @module event-gestures
@@ -51,7 +60,7 @@ var GESTURE_MAP = Y.Event._GESTURE_MAP,
* covered is used.
*
* <p>It is recommended that you use Y.bind to set up context and additional arguments for your event handler,
- * however if you want to pass the context and arguments as additional signature arguments to "on",
+ * however if you want to pass the context and arguments as additional signature arguments to "on",
* you need to provide a null value for the configuration object, e.g: <code>node.on("flick", fn, null, context, arg1, arg2, arg3)</code></p>
*
* @event flick
@@ -65,7 +74,7 @@ var GESTURE_MAP = Y.Event._GESTURE_MAP,
* <dt>minVelocity (in pixels/ms, defaults to 0)</dt>
* <dd>The minimum velocity which would qualify the gesture as a flick.</dd>
* <dt>preventDefault (defaults to false)</dt>
- * <dd>Can be set to true/false to prevent default behavior as soon as the touchstart/touchend or mousedown/mouseup is received so that things like scrolling or text selection can be
+ * <dd>Can be set to true/false to prevent default behavior as soon as the touchstart/touchend or mousedown/mouseup is received so that things like scrolling or text selection can be
* prevented. This property can also be set to a function, which returns true or false, based on the event facade passed to it.</dd>
* <dt>axis (no default)</dt>
* <dd>Can be set to "x" or "y" if you want to constrain the flick velocity and distance to a single axis. If not
@@ -82,9 +91,9 @@ Y.Event.define('flick', {
this._onStart,
this,
node,
- subscriber,
+ subscriber,
ce);
-
+
subscriber[_FLICK_START_HANDLE] = startHandle;
},
@@ -129,7 +138,7 @@ Y.Event.define('flick', {
moveHandle,
doc,
preventDefault = subscriber._extra.preventDefault,
- origE = e;
+ origE = e;
if (e.touches) {
start = (e.touches.length === 1);
@@ -182,7 +191,7 @@ Y.Event.define('flick', {
time,
preventDefault,
params,
- xyDistance,
+ xyDistance,
distance,
velocity,
axis,
View
438 build/event-move/event-move-coverage.js
@@ -26,11 +26,11 @@ _yuitest_coverage["build/event-move/event-move.js"] = {
path: "build/event-move/event-move.js",
code: []
};
-_yuitest_coverage["build/event-move/event-move.js"].code=["YUI.add('event-move', function (Y, NAME) {","","/**"," * Adds lower level support for \"gesturemovestart\", \"gesturemove\" and \"gesturemoveend\" events, which can be used to create drag/drop"," * interactions which work across touch and mouse input devices. They correspond to \"touchstart\", \"touchmove\" and \"touchend\" on a touch input"," * device, and \"mousedown\", \"mousemove\", \"mouseup\" on a mouse based input device."," *"," * <p>Documentation for the gesturemove triplet of events can be found on the <a href=\"../classes/YUI.html#event_gesturemove\">YUI</a> global,"," * along with the other supported events.</p>"," *"," * @module event-gestures"," * @submodule event-move"," */",""," var GESTURE_MAP = Y.Event._GESTURE_MAP,"," EVENT = {"," start: GESTURE_MAP.start,"," end: GESTURE_MAP.end,"," move: GESTURE_MAP.move"," },"," START = \"start\","," MOVE = \"move\","," END = \"end\",",""," GESTURE_MOVE = \"gesture\" + MOVE,"," GESTURE_MOVE_END = GESTURE_MOVE + END,"," GESTURE_MOVE_START = GESTURE_MOVE + START,",""," _MOVE_START_HANDLE = \"_msh\","," _MOVE_HANDLE = \"_mh\","," _MOVE_END_HANDLE = \"_meh\",",""," _DEL_MOVE_START_HANDLE = \"_dmsh\","," _DEL_MOVE_HANDLE = \"_dmh\","," _DEL_MOVE_END_HANDLE = \"_dmeh\",",""," _MOVE_START = \"_ms\","," _MOVE = \"_m\",",""," MIN_TIME = \"minTime\","," MIN_DISTANCE = \"minDistance\","," PREVENT_DEFAULT = \"preventDefault\","," BUTTON = \"button\","," OWNER_DOCUMENT = \"ownerDocument\",",""," CURRENT_TARGET = \"currentTarget\","," TARGET = \"target\",",""," NODE_TYPE = \"nodeType\",",""," SUPPORTS_POINTER = Y.config.win && (\"msPointerEnabled\" in Y.config.win.navigator),",""," _defArgsProcessor = function(se, args, delegate) {"," var iConfig = (delegate) ? 4 : 3,"," config = (args.length > iConfig) ? Y.merge(args.splice(iConfig,1)[0]) : {};",""," if (!(PREVENT_DEFAULT in config)) {"," config[PREVENT_DEFAULT] = se.PREVENT_DEFAULT;"," }",""," return config;"," },",""," _getRoot = function(node, subscriber) {"," return subscriber._extra.root || (node.get(NODE_TYPE) === 9) ? node : node.get(OWNER_DOCUMENT);"," },",""," _normTouchFacade = function(touchFacade, touch, params) {"," touchFacade.pageX = touch.pageX;"," touchFacade.pageY = touch.pageY;"," touchFacade.screenX = touch.screenX;"," touchFacade.screenY = touch.screenY;"," touchFacade.clientX = touch.clientX;"," touchFacade.clientY = touch.clientY;"," touchFacade[TARGET] = touchFacade[TARGET] || touch[TARGET];"," touchFacade[CURRENT_TARGET] = touchFacade[CURRENT_TARGET] || touch[CURRENT_TARGET];",""," touchFacade[BUTTON] = (params && params[BUTTON]) || 1; // default to left (left as per vendors, not W3C which is 0)"," },",""," /*"," In IE10 touch mode, gestures will not work properly unless the -ms-touch-action CSS property is set to something other than 'auto'. Read http://msdn.microsoft.com/en-us/library/windows/apps/hh767313.aspx for more info. To get around this, we set -ms-touch-action: none which is the same as e.preventDefault() on touch environments. This tells the browser to fire DOM events for all touch events, and not perform any default behavior.",""," The user can over-ride this by setting a more lenient -ms-touch-action property on a node (such as pan-x, pan-y, etc.) via CSS when subscribing to the 'gesturemovestart' event."," */"," _setTouchActions = function (node, subscriber, evtName) {"," var params = subscriber._extra,"," elem = node.getDOMNode();",""," if (SUPPORTS_POINTER) { //Checks to see if MSPointer events are supported."," elem.style.msTouchAction = 'none';"," }"," },",""," /*"," Resets the element's -ms-touch-action property back to 'auto', which is the default. This is called on detach() and detachDelegate()."," */"," _unsetTouchActions = function (node) {"," if (SUPPORTS_POINTER) {"," var elem = node.getDOMNode();"," if (elem.style.msTouchAction !== 'auto') {"," elem.style.msTouchAction = 'auto'"," }"," }"," },",""," _prevent = function(e, preventDefault) {"," if (preventDefault) {"," // preventDefault is a boolean or a function"," if (!preventDefault.call || preventDefault(e)) {"," e.preventDefault();"," }"," }"," },",""," define = Y.Event.define;","","/**"," * Sets up a \"gesturemovestart\" event, that is fired on touch devices in response to a single finger \"touchstart\","," * and on mouse based devices in response to a \"mousedown\". The subscriber can specify the minimum time"," * and distance thresholds which should be crossed before the \"gesturemovestart\" is fired and for the mouse,"," * which button should initiate a \"gesturemovestart\". This event can also be listened for using node.delegate()."," *"," * <p>It is recommended that you use Y.bind to set up context and additional arguments for your event handler,"," * however if you want to pass the context and arguments as additional signature arguments to on/delegate,"," * you need to provide a null value for the configuration object, e.g: <code>node.on(\"gesturemovestart\", fn, null, context, arg1, arg2, arg3)</code></p>"," *"," * @event gesturemovestart"," * @for YUI"," * @param type {string} \"gesturemovestart\""," * @param fn {function} The method the event invokes. It receives the event facade of the underlying DOM event (mousedown or touchstart.touches[0]) which contains position co-ordinates."," * @param cfg {Object} Optional. An object which specifies:"," *"," * <dl>"," * <dt>minDistance (defaults to 0)</dt>"," * <dd>The minimum distance threshold which should be crossed before the gesturemovestart is fired</dd>"," * <dt>minTime (defaults to 0)</dt>"," * <dd>The minimum time threshold for which the finger/mouse should be help down before the gesturemovestart is fired</dd>"," * <dt>button (no default)</dt>"," * <dd>In the case of a mouse input device, if the event should only be fired for a specific mouse button.</dd>"," * <dt>preventDefault (defaults to false)</dt>"," * <dd>Can be set to true/false to prevent default behavior as soon as the touchstart or mousedown is received (that is before minTime or minDistance thresholds are crossed, and so before the gesturemovestart listener is notified) so that things like text selection and context popups (on touch devices) can be"," * prevented. This property can also be set to a function, which returns true or false, based on the event facade passed to it (for example, DragDrop can determine if the target is a valid handle or not before preventing default).</dd>"," * </dl>"," *"," * @return {EventHandle} the detach handle"," */","","define(GESTURE_MOVE_START, {",""," on: function (node, subscriber, ce) {",""," //Set -ms-touch-action on IE10 and set preventDefault to true"," _setTouchActions(node, subscriber, EVENT[START]);",""," subscriber[_MOVE_START_HANDLE] = node.on(EVENT[START],"," this._onStart,"," this,"," node,"," subscriber,"," ce);"," },",""," delegate : function(node, subscriber, ce, filter) {",""," var se = this;",""," subscriber[_DEL_MOVE_START_HANDLE] = node.delegate(EVENT[START],"," function(e) {"," se._onStart(e, node, subscriber, ce, true);"," },"," filter);"," },",""," detachDelegate : function(node, subscriber, ce, filter) {"," var handle = subscriber[_DEL_MOVE_START_HANDLE];",""," if (handle) {"," handle.detach();"," subscriber[_DEL_MOVE_START_HANDLE] = null;"," }",""," _unsetTouchActions(node);"," },",""," detach: function (node, subscriber, ce) {"," var startHandle = subscriber[_MOVE_START_HANDLE];",""," if (startHandle) {"," startHandle.detach();"," subscriber[_MOVE_START_HANDLE] = null;"," }",""," _unsetTouchActions(node);"," },",""," processArgs : function(args, delegate) {"," var params = _defArgsProcessor(this, args, delegate);",""," if (!(MIN_TIME in params)) {"," params[MIN_TIME] = this.MIN_TIME;"," }",""," if (!(MIN_DISTANCE in params)) {"," params[MIN_DISTANCE] = this.MIN_DISTANCE;"," }",""," return params;"," },",""," _onStart : function(e, node, subscriber, ce, delegate) {",""," if (delegate) {"," node = e[CURRENT_TARGET];"," }",""," var params = subscriber._extra,"," fireStart = true,"," minTime = params[MIN_TIME],"," minDistance = params[MIN_DISTANCE],"," button = params.button,"," preventDefault = params[PREVENT_DEFAULT],"," root = _getRoot(node, subscriber),"," startXY;",""," if (e.touches) {"," if (e.touches.length === 1) {"," _normTouchFacade(e, e.touches[0], params);"," } else {"," fireStart = false;"," }"," } else {"," fireStart = (button === undefined) || (button === e.button);"," }","",""," if (fireStart) {",""," _prevent(e, preventDefault);",""," if (minTime === 0 || minDistance === 0) {"," this._start(e, node, ce, params);",""," } else {",""," startXY = [e.pageX, e.pageY];",""," if (minTime > 0) {","",""," params._ht = Y.later(minTime, this, this._start, [e, node, ce, params]);",""," params._hme = root.on(EVENT[END], Y.bind(function() {"," this._cancel(params);"," }, this));"," }",""," if (minDistance > 0) {","",""," params._hm = root.on(EVENT[MOVE], Y.bind(function(em) {"," if (Math.abs(em.pageX - startXY[0]) > minDistance || Math.abs(em.pageY - startXY[1]) > minDistance) {"," this._start(e, node, ce, params);"," }"," }, this));"," }"," }"," }"," },",""," _cancel : function(params) {"," if (params._ht) {"," params._ht.cancel();"," params._ht = null;"," }"," if (params._hme) {"," params._hme.detach();"," params._hme = null;"," }"," if (params._hm) {"," params._hm.detach();"," params._hm = null;"," }"," },",""," _start : function(e, node, ce, params) {",""," if (params) {"," this._cancel(params);"," }",""," e.type = GESTURE_MOVE_START;","",""," node.setData(_MOVE_START, e);"," ce.fire(e);"," },",""," MIN_TIME : 0,"," MIN_DISTANCE : 0,"," PREVENT_DEFAULT : false","});","","/**"," * Sets up a \"gesturemove\" event, that is fired on touch devices in response to a single finger \"touchmove\","," * and on mouse based devices in response to a \"mousemove\"."," *"," * <p>By default this event is only fired when the same node"," * has received a \"gesturemovestart\" event. The subscriber can set standAlone to true, in the configuration properties,"," * if they want to listen for this event without an initial \"gesturemovestart\".</p>"," *"," * <p>By default this event sets up it's internal \"touchmove\" and \"mousemove\" DOM listeners on the document element. The subscriber"," * can set the root configuration property, to specify which node to attach DOM listeners to, if different from the document.</p>"," *"," * <p>This event can also be listened for using node.delegate().</p>"," *"," * <p>It is recommended that you use Y.bind to set up context and additional arguments for your event handler,"," * however if you want to pass the context and arguments as additional signature arguments to on/delegate,"," * you need to provide a null value for the configuration object, e.g: <code>node.on(\"gesturemove\", fn, null, context, arg1, arg2, arg3)</code></p>"," *"," * @event gesturemove"," * @for YUI"," * @param type {string} \"gesturemove\""," * @param fn {function} The method the event invokes. It receives the event facade of the underlying DOM event (mousemove or touchmove.touches[0]) which contains position co-ordinates."," * @param cfg {Object} Optional. An object which specifies:"," * <dl>"," * <dt>standAlone (defaults to false)</dt>"," * <dd>true, if the subscriber should be notified even if a \"gesturemovestart\" has not occured on the same node.</dd>"," * <dt>root (defaults to document)</dt>"," * <dd>The node to which the internal DOM listeners should be attached.</dd>"," * <dt>preventDefault (defaults to false)</dt>"," * <dd>Can be set to true/false to prevent default behavior as soon as the touchmove or mousemove is received. As with gesturemovestart, can also be set to function which returns true/false based on the event facade passed to it.</dd>"," * </dl>"," *"," * @return {EventHandle} the detach handle"," */","define(GESTURE_MOVE, {",""," on : function (node, subscriber, ce) {"," var root = _getRoot(node, subscriber, EVENT[MOVE]),",""," moveHandle = root.on(EVENT[MOVE],"," this._onMove,"," this,"," node,"," subscriber,"," ce);",""," subscriber[_MOVE_HANDLE] = moveHandle;",""," },",""," delegate : function(node, subscriber, ce, filter) {",""," var se = this;",""," subscriber[_DEL_MOVE_HANDLE] = node.delegate(EVENT[MOVE],"," function(e) {"," se._onMove(e, node, subscriber, ce, true);"," },"," filter);"," },",""," detach : function (node, subscriber, ce) {"," var moveHandle = subscriber[_MOVE_HANDLE];",""," if (moveHandle) {"," moveHandle.detach();"," subscriber[_MOVE_HANDLE] = null;"," }",""," _unsetTouchActions(node);"," },",""," detachDelegate : function(node, subscriber, ce, filter) {"," var handle = subscriber[_DEL_MOVE_HANDLE];",""," if (handle) {"," handle.detach();"," subscriber[_DEL_MOVE_HANDLE] = null;"," }",""," _unsetTouchActions(node);",""," },",""," processArgs : function(args, delegate) {"," return _defArgsProcessor(this, args, delegate);"," },",""," _onMove : function(e, node, subscriber, ce, delegate) {",""," if (delegate) {"," node = e[CURRENT_TARGET];"," }",""," var fireMove = subscriber._extra.standAlone || node.getData(_MOVE_START),"," preventDefault = subscriber._extra.preventDefault;","",""," if (fireMove) {",""," if (e.touches) {"," if (e.touches.length === 1) {"," _normTouchFacade(e, e.touches[0]);"," } else {"," fireMove = false;"," }"," }",""," if (fireMove) {",""," _prevent(e, preventDefault);","",""," e.type = GESTURE_MOVE;"," ce.fire(e);"," }"," }"," },",""," PREVENT_DEFAULT : false","});","","/**"," * Sets up a \"gesturemoveend\" event, that is fired on touch devices in response to a single finger \"touchend\","," * and on mouse based devices in response to a \"mouseup\"."," *"," * <p>By default this event is only fired when the same node"," * has received a \"gesturemove\" or \"gesturemovestart\" event. The subscriber can set standAlone to true, in the configuration properties,"," * if they want to listen for this event without a preceding \"gesturemovestart\" or \"gesturemove\".</p>"," *"," * <p>By default this event sets up it's internal \"touchend\" and \"mouseup\" DOM listeners on the document element. The subscriber"," * can set the root configuration property, to specify which node to attach DOM listeners to, if different from the document.</p>"," *"," * <p>This event can also be listened for using node.delegate().</p>"," *"," * <p>It is recommended that you use Y.bind to set up context and additional arguments for your event handler,"," * however if you want to pass the context and arguments as additional signature arguments to on/delegate,"," * you need to provide a null value for the configuration object, e.g: <code>node.on(\"gesturemoveend\", fn, null, context, arg1, arg2, arg3)</code></p>"," *"," *"," * @event gesturemoveend"," * @for YUI"," * @param type {string} \"gesturemoveend\""," * @param fn {function} The method the event invokes. It receives the event facade of the underlying DOM event (mouseup or touchend.changedTouches[0])."," * @param cfg {Object} Optional. An object which specifies:"," * <dl>"," * <dt>standAlone (defaults to false)</dt>"," * <dd>true, if the subscriber should be notified even if a \"gesturemovestart\" or \"gesturemove\" has not occured on the same node.</dd>"," * <dt>root (defaults to document)</dt>"," * <dd>The node to which the internal DOM listeners should be attached.</dd>"," * <dt>preventDefault (defaults to false)</dt>"," * <dd>Can be set to true/false to prevent default behavior as soon as the touchend or mouseup is received. As with gesturemovestart, can also be set to function which returns true/false based on the event facade passed to it.</dd>"," * </dl>"," *"," * @return {EventHandle} the detach handle"," */","define(GESTURE_MOVE_END, {",""," on : function (node, subscriber, ce) {",""," var root = _getRoot(node, subscriber),",""," endHandle = root.on(EVENT[END],"," this._onEnd,"," this,"," node,"," subscriber,"," ce);",""," subscriber[_MOVE_END_HANDLE] = endHandle;"," },",""," delegate : function(node, subscriber, ce, filter) {",""," var se = this;",""," subscriber[_DEL_MOVE_END_HANDLE] = node.delegate(EVENT[END],"," function(e) {"," se._onEnd(e, node, subscriber, ce, true);"," },"," filter);"," },",""," detachDelegate : function(node, subscriber, ce, filter) {"," var handle = subscriber[_DEL_MOVE_END_HANDLE];",""," if (handle) {"," handle.detach();"," subscriber[_DEL_MOVE_END_HANDLE] = null;"," }",""," _unsetTouchActions(node);",""," },",""," detach : function (node, subscriber, ce) {"," var endHandle = subscriber[_MOVE_END_HANDLE];",""," if (endHandle) {"," endHandle.detach();"," subscriber[_MOVE_END_HANDLE] = null;"," }",""," _unsetTouchActions(node);"," },",""," processArgs : function(args, delegate) {"," return _defArgsProcessor(this, args, delegate);"," },",""," _onEnd : function(e, node, subscriber, ce, delegate) {",""," if (delegate) {"," node = e[CURRENT_TARGET];"," }",""," var fireMoveEnd = subscriber._extra.standAlone || node.getData(_MOVE) || node.getData(_MOVE_START),"," preventDefault = subscriber._extra.preventDefault;",""," if (fireMoveEnd) {",""," if (e.changedTouches) {"," if (e.changedTouches.length === 1) {"," _normTouchFacade(e, e.changedTouches[0]);"," } else {"," fireMoveEnd = false;"," }"," }",""," if (fireMoveEnd) {",""," _prevent(e, preventDefault);",""," e.type = GESTURE_MOVE_END;"," ce.fire(e);",""," node.clearData(_MOVE_START);"," node.clearData(_MOVE);"," }"," }"," },",""," PREVENT_DEFAULT : false","});","","","}, '@VERSION@', {\"requires\": [\"node-base\", \"event-touch\", \"event-synthetic\"]});"];
-_yuitest_coverage["build/event-move/event-move.js"].lines = {"1":0,"15":0,"54":0,"57":0,"58":0,"61":0,"65":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"78":0,"87":0,"90":0,"91":0,"99":0,"100":0,"101":0,"102":0,"108":0,"110":0,"111":0,"149":0,"154":0,"156":0,"166":0,"168":0,"170":0,"176":0,"178":0,"179":0,"180":0,"183":0,"187":0,"189":0,"190":0,"191":0,"194":0,"198":0,"200":0,"201":0,"204":0,"205":0,"208":0,"213":0,"214":0,"217":0,"226":0,"227":0,"228":0,"230":0,"233":0,"237":0,"239":0,"241":0,"242":0,"246":0,"248":0,"251":0,"253":0,"254":0,"258":0,"261":0,"262":0,"263":0,"272":0,"273":0,"274":0,"276":0,"277":0,"278":0,"280":0,"281":0,"282":0,"288":0,"289":0,"292":0,"295":0,"296":0,"337":0,"340":0,"349":0,"355":0,"357":0,"359":0,"365":0,"367":0,"368":0,"369":0,"372":0,"376":0,"378":0,"379":0,"380":0,"383":0,"388":0,"393":0,"394":0,"397":0,"401":0,"403":0,"404":0,"405":0,"407":0,"411":0,"413":0,"416":0,"417":0,"459":0,"463":0,"472":0,"477":0,"479":0,"481":0,"487":0,"489":0,"490":0,"491":0,"494":0,"499":0,"501":0,"502":0,"503":0,"506":0,"510":0,"515":0,"516":0,"519":0,"522":0,"524":0,"525":0,"526":0,"528":0,"532":0,"534":0,"536":0,"537":0,"539":0,"540":0};
-_yuitest_coverage["build/event-move/event-move.js"].functions = {"_defArgsProcessor:53":0,"_getRoot:64":0,"_normTouchFacade:68":0,"_setTouchActions:86":0,"_unsetTouchActions:98":0,"_prevent:107":0,"on:151":0,"(anonymous 2):169":0,"delegate:164":0,"detachDelegate:175":0,"detach:186":0,"processArgs:197":0,"(anonymous 3):253":0,"(anonymous 4):261":0,"_onStart:211":0,"_cancel:271":0,"_start:286":0,"on:339":0,"(anonymous 5):358":0,"delegate:353":0,"detach:364":0,"detachDelegate:375":0,"processArgs:387":0,"_onMove:391":0,"on:461":0,"(anonymous 6):480":0,"delegate:475":0,"detachDelegate:486":0,"detach:498":0,"processArgs:509":0,"_onEnd:513":0,"(anonymous 1):1":0};
-_yuitest_coverage["build/event-move/event-move.js"].coveredLines = 143;
-_yuitest_coverage["build/event-move/event-move.js"].coveredFunctions = 32;
+_yuitest_coverage["build/event-move/event-move.js"].code=["YUI.add('event-move', function (Y, NAME) {","","/**"," * Adds lower level support for \"gesturemovestart\", \"gesturemove\" and \"gesturemoveend\" events, which can be used to create drag/drop"," * interactions which work across touch and mouse input devices. They correspond to \"touchstart\", \"touchmove\" and \"touchend\" on a touch input"," * device, and \"mousedown\", \"mousemove\", \"mouseup\" on a mouse based input device."," *"," * <p>Documentation for the gesturemove triplet of events can be found on the <a href=\"../classes/YUI.html#event_gesturemove\">YUI</a> global,"," * along with the other supported events.</p>",""," @example",""," YUI().use('event-move', function (Y) {"," Y.one('#myNode').on('gesturemovestart', function (e) {"," });"," Y.one('#myNode').on('gesturemove', function (e) {"," });"," Y.one('#myNode').on('gesturemoveend', function (e) {"," });"," });",""," * @module event-gestures"," * @submodule event-move"," */","",""," var GESTURE_MAP = Y.Event._GESTURE_MAP,"," EVENT = {"," start: GESTURE_MAP.start,"," end: GESTURE_MAP.end,"," move: GESTURE_MAP.move"," },"," START = \"start\","," MOVE = \"move\","," END = \"end\",",""," GESTURE_MOVE = \"gesture\" + MOVE,"," GESTURE_MOVE_END = GESTURE_MOVE + END,"," GESTURE_MOVE_START = GESTURE_MOVE + START,",""," _MOVE_START_HANDLE = \"_msh\","," _MOVE_HANDLE = \"_mh\","," _MOVE_END_HANDLE = \"_meh\",",""," _DEL_MOVE_START_HANDLE = \"_dmsh\","," _DEL_MOVE_HANDLE = \"_dmh\","," _DEL_MOVE_END_HANDLE = \"_dmeh\",",""," _MOVE_START = \"_ms\","," _MOVE = \"_m\",",""," MIN_TIME = \"minTime\","," MIN_DISTANCE = \"minDistance\","," PREVENT_DEFAULT = \"preventDefault\","," BUTTON = \"button\","," OWNER_DOCUMENT = \"ownerDocument\",",""," CURRENT_TARGET = \"currentTarget\","," TARGET = \"target\",",""," NODE_TYPE = \"nodeType\","," SUPPORTS_POINTER = Y.config.win && (\"msPointerEnabled\" in Y.config.win.navigator),"," MS_TOUCH_ACTION_COUNT = 'msTouchActionCount',"," MS_INIT_TOUCH_ACTION = 'msInitTouchAction',",""," _defArgsProcessor = function(se, args, delegate) {"," var iConfig = (delegate) ? 4 : 3,"," config = (args.length > iConfig) ? Y.merge(args.splice(iConfig,1)[0]) : {};",""," if (!(PREVENT_DEFAULT in config)) {"," config[PREVENT_DEFAULT] = se.PREVENT_DEFAULT;"," }",""," return config;"," },",""," _getRoot = function(node, subscriber) {"," return subscriber._extra.root || (node.get(NODE_TYPE) === 9) ? node : node.get(OWNER_DOCUMENT);"," },",""," //Checks to see if the node is the document, and if it is, returns the documentElement."," _checkDocumentElem = function(node) {"," var elem = node.getDOMNode();"," if (node.compareTo(Y.config.doc) && elem.documentElement) {"," return elem.documentElement;"," }"," else {"," return false;"," }"," },",""," _normTouchFacade = function(touchFacade, touch, params) {"," touchFacade.pageX = touch.pageX;"," touchFacade.pageY = touch.pageY;"," touchFacade.screenX = touch.screenX;"," touchFacade.screenY = touch.screenY;"," touchFacade.clientX = touch.clientX;"," touchFacade.clientY = touch.clientY;"," touchFacade[TARGET] = touchFacade[TARGET] || touch[TARGET];"," touchFacade[CURRENT_TARGET] = touchFacade[CURRENT_TARGET] || touch[CURRENT_TARGET];",""," touchFacade[BUTTON] = (params && params[BUTTON]) || 1; // default to left (left as per vendors, not W3C which is 0)"," },",""," /*"," In IE10 touch mode, gestures will not work properly unless the -ms-touch-action CSS property is set to something other than 'auto'. Read http://msdn.microsoft.com/en-us/library/windows/apps/hh767313.aspx for more info. To get around this, we set -ms-touch-action: none which is the same as e.preventDefault() on touch environments. This tells the browser to fire DOM events for all touch events, and not perform any default behavior.",""," The user can over-ride this by setting a more lenient -ms-touch-action property on a node (such as pan-x, pan-y, etc.) via CSS when subscribing to the 'gesturemovestart' event."," */"," _setTouchActions = function (node) {"," var elem = _checkDocumentElem(node) || node.getDOMNode(),"," num = node.getData(MS_TOUCH_ACTION_COUNT);",""," //Checks to see if msTouchAction is supported."," if (SUPPORTS_POINTER) {"," if (!num) {"," num = 0;"," node.setData(MS_INIT_TOUCH_ACTION, elem.style.msTouchAction);"," }"," elem.style.msTouchAction = Y.Event._DEFAULT_TOUCH_ACTION;"," num++;"," node.setData(MS_TOUCH_ACTION_COUNT, num);"," }"," },",""," /*"," Resets the element's -ms-touch-action property back to the original value, This is called on detach() and detachDelegate()."," */"," _unsetTouchActions = function (node) {"," var elem = _checkDocumentElem(node) || node.getDOMNode(),"," num = node.getData(MS_TOUCH_ACTION_COUNT),"," initTouchAction = node.getData(MS_INIT_TOUCH_ACTION);",""," if (SUPPORTS_POINTER) {"," num--;"," node.setData(MS_TOUCH_ACTION_COUNT, num);"," if (num === 0 && elem.style.msTouchAction !== initTouchAction) {"," elem.style.msTouchAction = initTouchAction;"," }"," }"," },",""," _prevent = function(e, preventDefault) {"," if (preventDefault) {"," // preventDefault is a boolean or a function"," if (!preventDefault.call || preventDefault(e)) {"," e.preventDefault();"," }"," }"," },",""," define = Y.Event.define;"," Y.Event._DEFAULT_TOUCH_ACTION = 'none';","","/**"," * Sets up a \"gesturemovestart\" event, that is fired on touch devices in response to a single finger \"touchstart\","," * and on mouse based devices in response to a \"mousedown\". The subscriber can specify the minimum time"," * and distance thresholds which should be crossed before the \"gesturemovestart\" is fired and for the mouse,"," * which button should initiate a \"gesturemovestart\". This event can also be listened for using node.delegate()."," *"," * <p>It is recommended that you use Y.bind to set up context and additional arguments for your event handler,"," * however if you want to pass the context and arguments as additional signature arguments to on/delegate,"," * you need to provide a null value for the configuration object, e.g: <code>node.on(\"gesturemovestart\", fn, null, context, arg1, arg2, arg3)</code></p>"," *"," * @event gesturemovestart"," * @for YUI"," * @param type {string} \"gesturemovestart\""," * @param fn {function} The method the event invokes. It receives the event facade of the underlying DOM event (mousedown or touchstart.touches[0]) which contains position co-ordinates."," * @param cfg {Object} Optional. An object which specifies:"," *"," * <dl>"," * <dt>minDistance (defaults to 0)</dt>"," * <dd>The minimum distance threshold which should be crossed before the gesturemovestart is fired</dd>"," * <dt>minTime (defaults to 0)</dt>"," * <dd>The minimum time threshold for which the finger/mouse should be help down before the gesturemovestart is fired</dd>"," * <dt>button (no default)</dt>"," * <dd>In the case of a mouse input device, if the event should only be fired for a specific mouse button.</dd>"," * <dt>preventDefault (defaults to false)</dt>"," * <dd>Can be set to true/false to prevent default behavior as soon as the touchstart or mousedown is received (that is before minTime or minDistance thresholds are crossed, and so before the gesturemovestart listener is notified) so that things like text selection and context popups (on touch devices) can be"," * prevented. This property can also be set to a function, which returns true or false, based on the event facade passed to it (for example, DragDrop can determine if the target is a valid handle or not before preventing default).</dd>"," * </dl>"," *"," * @return {EventHandle} the detach handle"," */","","define(GESTURE_MOVE_START, {",""," on: function (node, subscriber, ce) {",""," //Set -ms-touch-action on IE10 and set preventDefault to true"," _setTouchActions(node);",""," subscriber[_MOVE_START_HANDLE] = node.on(EVENT[START],"," this._onStart,"," this,"," node,"," subscriber,"," ce);"," },",""," delegate : function(node, subscriber, ce, filter) {",""," var se = this;",""," subscriber[_DEL_MOVE_START_HANDLE] = node.delegate(EVENT[START],"," function(e) {"," se._onStart(e, node, subscriber, ce, true);"," },"," filter);"," },",""," detachDelegate : function(node, subscriber, ce, filter) {"," var handle = subscriber[_DEL_MOVE_START_HANDLE];",""," if (handle) {"," handle.detach();"," subscriber[_DEL_MOVE_START_HANDLE] = null;"," }",""," _unsetTouchActions(node);"," },",""," detach: function (node, subscriber, ce) {"," var startHandle = subscriber[_MOVE_START_HANDLE];",""," if (startHandle) {"," startHandle.detach();"," subscriber[_MOVE_START_HANDLE] = null;"," }",""," _unsetTouchActions(node);"," },",""," processArgs : function(args, delegate) {"," var params = _defArgsProcessor(this, args, delegate);",""," if (!(MIN_TIME in params)) {"," params[MIN_TIME] = this.MIN_TIME;"," }",""," if (!(MIN_DISTANCE in params)) {"," params[MIN_DISTANCE] = this.MIN_DISTANCE;"," }",""," return params;"," },",""," _onStart : function(e, node, subscriber, ce, delegate) {",""," if (delegate) {"," node = e[CURRENT_TARGET];"," }",""," var params = subscriber._extra,"," fireStart = true,"," minTime = params[MIN_TIME],"," minDistance = params[MIN_DISTANCE],"," button = params.button,"," preventDefault = params[PREVENT_DEFAULT],"," root = _getRoot(node, subscriber),"," startXY;",""," if (e.touches) {"," if (e.touches.length === 1) {"," _normTouchFacade(e, e.touches[0], params);"," } else {"," fireStart = false;"," }"," } else {"," fireStart = (button === undefined) || (button === e.button);"," }","",""," if (fireStart) {",""," _prevent(e, preventDefault);",""," if (minTime === 0 || minDistance === 0) {"," this._start(e, node, ce, params);",""," } else {",""," startXY = [e.pageX, e.pageY];",""," if (minTime > 0) {","",""," params._ht = Y.later(minTime, this, this._start, [e, node, ce, params]);",""," params._hme = root.on(EVENT[END], Y.bind(function() {"," this._cancel(params);"," }, this));"," }",""," if (minDistance > 0) {","",""," params._hm = root.on(EVENT[MOVE], Y.bind(function(em) {"," if (Math.abs(em.pageX - startXY[0]) > minDistance || Math.abs(em.pageY - startXY[1]) > minDistance) {"," this._start(e, node, ce, params);"," }"," }, this));"," }"," }"," }"," },",""," _cancel : function(params) {"," if (params._ht) {"," params._ht.cancel();"," params._ht = null;"," }"," if (params._hme) {"," params._hme.detach();"," params._hme = null;"," }"," if (params._hm) {"," params._hm.detach();"," params._hm = null;"," }"," },",""," _start : function(e, node, ce, params) {",""," if (params) {"," this._cancel(params);"," }",""," e.type = GESTURE_MOVE_START;","",""," node.setData(_MOVE_START, e);"," ce.fire(e);"," },",""," MIN_TIME : 0,"," MIN_DISTANCE : 0,"," PREVENT_DEFAULT : false","});","","/**"," * Sets up a \"gesturemove\" event, that is fired on touch devices in response to a single finger \"touchmove\","," * and on mouse based devices in response to a \"mousemove\"."," *"," * <p>By default this event is only fired when the same node"," * has received a \"gesturemovestart\" event. The subscriber can set standAlone to true, in the configuration properties,"," * if they want to listen for this event without an initial \"gesturemovestart\".</p>"," *"," * <p>By default this event sets up it's internal \"touchmove\" and \"mousemove\" DOM listeners on the document element. The subscriber"," * can set the root configuration property, to specify which node to attach DOM listeners to, if different from the document.</p>"," *"," * <p>This event can also be listened for using node.delegate().</p>"," *"," * <p>It is recommended that you use Y.bind to set up context and additional arguments for your event handler,"," * however if you want to pass the context and arguments as additional signature arguments to on/delegate,"," * you need to provide a null value for the configuration object, e.g: <code>node.on(\"gesturemove\", fn, null, context, arg1, arg2, arg3)</code></p>"," *"," * @event gesturemove"," * @for YUI"," * @param type {string} \"gesturemove\""," * @param fn {function} The method the event invokes. It receives the event facade of the underlying DOM event (mousemove or touchmove.touches[0]) which contains position co-ordinates."," * @param cfg {Object} Optional. An object which specifies:"," * <dl>"," * <dt>standAlone (defaults to false)</dt>"," * <dd>true, if the subscriber should be notified even if a \"gesturemovestart\" has not occured on the same node.</dd>"," * <dt>root (defaults to document)</dt>"," * <dd>The node to which the internal DOM listeners should be attached.</dd>"," * <dt>preventDefault (defaults to false)</dt>"," * <dd>Can be set to true/false to prevent default behavior as soon as the touchmove or mousemove is received. As with gesturemovestart, can also be set to function which returns true/false based on the event facade passed to it.</dd>"," * </dl>"," *"," * @return {EventHandle} the detach handle"," */","define(GESTURE_MOVE, {",""," on : function (node, subscriber, ce) {",""," _setTouchActions(node);"," var root = _getRoot(node, subscriber, EVENT[MOVE]),",""," moveHandle = root.on(EVENT[MOVE],"," this._onMove,"," this,"," node,"," subscriber,"," ce);",""," subscriber[_MOVE_HANDLE] = moveHandle;",""," },",""," delegate : function(node, subscriber, ce, filter) {",""," var se = this;",""," subscriber[_DEL_MOVE_HANDLE] = node.delegate(EVENT[MOVE],"," function(e) {"," se._onMove(e, node, subscriber, ce, true);"," },"," filter);"," },",""," detach : function (node, subscriber, ce) {"," var moveHandle = subscriber[_MOVE_HANDLE];",""," if (moveHandle) {"," moveHandle.detach();"," subscriber[_MOVE_HANDLE] = null;"," }",""," _unsetTouchActions(node);"," },",""," detachDelegate : function(node, subscriber, ce, filter) {"," var handle = subscriber[_DEL_MOVE_HANDLE];",""," if (handle) {"," handle.detach();"," subscriber[_DEL_MOVE_HANDLE] = null;"," }",""," _unsetTouchActions(node);",""," },",""," processArgs : function(args, delegate) {"," return _defArgsProcessor(this, args, delegate);"," },",""," _onMove : function(e, node, subscriber, ce, delegate) {",""," if (delegate) {"," node = e[CURRENT_TARGET];"," }",""," var fireMove = subscriber._extra.standAlone || node.getData(_MOVE_START),"," preventDefault = subscriber._extra.preventDefault;","",""," if (fireMove) {",""," if (e.touches) {"," if (e.touches.length === 1) {"," _normTouchFacade(e, e.touches[0]);"," } else {"," fireMove = false;"," }"," }",""," if (fireMove) {",""," _prevent(e, preventDefault);","",""," e.type = GESTURE_MOVE;"," ce.fire(e);"," }"," }"," },",""," PREVENT_DEFAULT : false","});","","/**"," * Sets up a \"gesturemoveend\" event, that is fired on touch devices in response to a single finger \"touchend\","," * and on mouse based devices in response to a \"mouseup\"."," *"," * <p>By default this event is only fired when the same node"," * has received a \"gesturemove\" or \"gesturemovestart\" event. The subscriber can set standAlone to true, in the configuration properties,"," * if they want to listen for this event without a preceding \"gesturemovestart\" or \"gesturemove\".</p>"," *"," * <p>By default this event sets up it's internal \"touchend\" and \"mouseup\" DOM listeners on the document element. The subscriber"," * can set the root configuration property, to specify which node to attach DOM listeners to, if different from the document.</p>"," *"," * <p>This event can also be listened for using node.delegate().</p>"," *"," * <p>It is recommended that you use Y.bind to set up context and additional arguments for your event handler,"," * however if you want to pass the context and arguments as additional signature arguments to on/delegate,"," * you need to provide a null value for the configuration object, e.g: <code>node.on(\"gesturemoveend\", fn, null, context, arg1, arg2, arg3)</code></p>"," *"," *"," * @event gesturemoveend"," * @for YUI"," * @param type {string} \"gesturemoveend\""," * @param fn {function} The method the event invokes. It receives the event facade of the underlying DOM event (mouseup or touchend.changedTouches[0])."," * @param cfg {Object} Optional. An object which specifies:"," * <dl>"," * <dt>standAlone (defaults to false)</dt>"," * <dd>true, if the subscriber should be notified even if a \"gesturemovestart\" or \"gesturemove\" has not occured on the same node.</dd>"," * <dt>root (defaults to document)</dt>"," * <dd>The node to which the internal DOM listeners should be attached.</dd>"," * <dt>preventDefault (defaults to false)</dt>"," * <dd>Can be set to true/false to prevent default behavior as soon as the touchend or mouseup is received. As with gesturemovestart, can also be set to function which returns true/false based on the event facade passed to it.</dd>"," * </dl>"," *"," * @return {EventHandle} the detach handle"," */","define(GESTURE_MOVE_END, {",""," on : function (node, subscriber, ce) {"," _setTouchActions(node);"," var root = _getRoot(node, subscriber),",""," endHandle = root.on(EVENT[END],"," this._onEnd,"," this,"," node,"," subscriber,"," ce);",""," subscriber[_MOVE_END_HANDLE] = endHandle;"," },",""," delegate : function(node, subscriber, ce, filter) {",""," var se = this;",""," subscriber[_DEL_MOVE_END_HANDLE] = node.delegate(EVENT[END],"," function(e) {"," se._onEnd(e, node, subscriber, ce, true);"," },"," filter);"," },",""," detachDelegate : function(node, subscriber, ce, filter) {"," var handle = subscriber[_DEL_MOVE_END_HANDLE];",""," if (handle) {"," handle.detach();"," subscriber[_DEL_MOVE_END_HANDLE] = null;"," }",""," _unsetTouchActions(node);",""," },",""," detach : function (node, subscriber, ce) {"," var endHandle = subscriber[_MOVE_END_HANDLE];",""," if (endHandle) {"," endHandle.detach();"," subscriber[_MOVE_END_HANDLE] = null;"," }",""," _unsetTouchActions(node);"," },",""," processArgs : function(args, delegate) {"," return _defArgsProcessor(this, args, delegate);"," },",""," _onEnd : function(e, node, subscriber, ce, delegate) {",""," if (delegate) {"," node = e[CURRENT_TARGET];"," }",""," var fireMoveEnd = subscriber._extra.standAlone || node.getData(_MOVE) || node.getData(_MOVE_START),"," preventDefault = subscriber._extra.preventDefault;",""," if (fireMoveEnd) {",""," if (e.changedTouches) {"," if (e.changedTouches.length === 1) {"," _normTouchFacade(e, e.changedTouches[0]);"," } else {"," fireMoveEnd = false;"," }"," }",""," if (fireMoveEnd) {",""," _prevent(e, preventDefault);",""," e.type = GESTURE_MOVE_END;"," ce.fire(e);",""," node.clearData(_MOVE_START);"," node.clearData(_MOVE);"," }"," }"," },",""," PREVENT_DEFAULT : false","});","","","}, '@VERSION@', {\"requires\": [\"node-base\", \"event-touch\", \"event-synthetic\"]});"];
+_yuitest_coverage["build/event-move/event-move.js"].lines = {"1":0,"27":0,"67":0,"70":0,"71":0,"74":0,"78":0,"83":0,"84":0,"85":0,"88":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"102":0,"111":0,"115":0,"116":0,"117":0,"118":0,"120":0,"121":0,"122":0,"130":0,"134":0,"135":0,"136":0,"137":0,"138":0,"144":0,"146":0,"147":0,"153":0,"186":0,"191":0,"193":0,"203":0,"205":0,"207":0,"213":0,"215":0,"216":0,"217":0,"220":0,"224":0,"226":0,"227":0,"228":0,"231":0,"235":0,"237":0,"238":0,"241":0,"242":0,"245":0,"250":0,"251":0,"254":0,"263":0,"264":0,"265":0,"267":0,"270":0,"274":0,"276":0,"278":0,"279":0,"283":0,"285":0,"288":0,"290":0,"291":0,"295":0,"298":0,"299":0,"300":0,"309":0,"310":0,"311":0,"313":0,"314":0,"315":0,"317":0,"318":0,"319":0,"325":0,"326":0,"329":0,"332":0,"333":0,"374":0,"378":0,"379":0,"388":0,"394":0,"396":0,"398":0,"404":0,"406":0,"407":0,"408":0,"411":0,"415":0,"417":0,"418":0,"419":0,"422":0,"427":0,"432":0,"433":0,"436":0,"440":0,"442":0,"443":0,"444":0,"446":0,"450":0,"452":0,"455":0,"456":0,"498":0,"501":0,"502":0,"511":0,"516":0,"518":0,"520":0,"526":0,"528":0,"529":0,"530":0,"533":0,"538":0,"540":0,"541":0,"542":0,"545":0,"549":0,"554":0,"555":0,"558":0,"561":0,"563":0,"564":0,"565":0,"567":0,"571":0,"573":0,"575":0,"576":0,"578":0,"579":0};
+_yuitest_coverage["build/event-move/event-move.js"].functions = {"_defArgsProcessor:66":0,"_getRoot:77":0,"_checkDocumentElem:82":0,"_normTouchFacade:92":0,"_setTouchActions:110":0,"_unsetTouchActions:129":0,"_prevent:143":0,"on:188":0,"(anonymous 2):206":0,"delegate:201":0,"detachDelegate:212":0,"detach:223":0,"processArgs:234":0,"(anonymous 3):290":0,"(anonymous 4):298":0,"_onStart:248":0,"_cancel:308":0,"_start:323":0,"on:376":0,"(anonymous 5):397":0,"delegate:392":0,"detach:403":0,"detachDelegate:414":0,"processArgs:426":0,"_onMove:430":0,"on:500":0,"(anonymous 6):519":0,"delegate:514":0,"detachDelegate:525":0,"detach:537":0,"processArgs:548":0,"_onEnd:552":0,"(anonymous 1):1":0};
+_yuitest_coverage["build/event-move/event-move.js"].coveredLines = 157;
+_yuitest_coverage["build/event-move/event-move.js"].coveredFunctions = 33;
_yuitest_coverline("build/event-move/event-move.js", 1);
YUI.add('event-move', function (Y, NAME) {
@@ -41,13 +41,25 @@ YUI.add('event-move', function (Y, NAME) {
*
* <p>Documentation for the gesturemove triplet of events can be found on the <a href="../classes/YUI.html#event_gesturemove">YUI</a> global,
* along with the other supported events.</p>
- *
+
+ @example
+
+ YUI().use('event-move', function (Y) {
+ Y.one('#myNode').on('gesturemovestart', function (e) {
+ });
+ Y.one('#myNode').on('gesturemove', function (e) {
+ });
+ Y.one('#myNode').on('gesturemoveend', function (e) {
+ });
+ });
+
* @module event-gestures
* @submodule event-move
*/
+
_yuitest_coverfunc("build/event-move/event-move.js", "(anonymous 1)", 1);
-_yuitest_coverline("build/event-move/event-move.js", 15);
+_yuitest_coverline("build/event-move/event-move.js", 27);
var GESTURE_MAP = Y.Event._GESTURE_MAP,
EVENT = {
start: GESTURE_MAP.start,
@@ -83,51 +95,68 @@ var GESTURE_MAP = Y.Event._GESTURE_MAP,
TARGET = "target",
NODE_TYPE = "nodeType",
-
SUPPORTS_POINTER = Y.config.win && ("msPointerEnabled" in Y.config.win.navigator),
+ MS_TOUCH_ACTION_COUNT = 'msTouchActionCount',
+ MS_INIT_TOUCH_ACTION = 'msInitTouchAction',
_defArgsProcessor = function(se, args, delegate) {
- _yuitest_coverfunc("build/event-move/event-move.js", "_defArgsProcessor", 53);
-_yuitest_coverline("build/event-move/event-move.js", 54);
+ _yuitest_coverfunc("build/event-move/event-move.js", "_defArgsProcessor", 66);
+_yuitest_coverline("build/event-move/event-move.js", 67);
var iConfig = (delegate) ? 4 : 3,
config = (args.length > iConfig) ? Y.merge(args.splice(iConfig,1)[0]) : {};
- _yuitest_coverline("build/event-move/event-move.js", 57);
+ _yuitest_coverline("build/event-move/event-move.js", 70);
if (!(PREVENT_DEFAULT in config)) {
- _yuitest_coverline("build/event-move/event-move.js", 58);
+ _yuitest_coverline("build/event-move/event-move.js", 71);
config[PREVENT_DEFAULT] = se.PREVENT_DEFAULT;
}
- _yuitest_coverline("build/event-move/event-move.js", 61);
+ _yuitest_coverline("build/event-move/event-move.js", 74);
return config;
},
_getRoot = function(node, subscriber) {
- _yuitest_coverfunc("build/event-move/event-move.js", "_getRoot", 64);
-_yuitest_coverline("build/event-move/event-move.js", 65);
+ _yuitest_coverfunc("build/event-move/event-move.js", "_getRoot", 77);
+_yuitest_coverline("build/event-move/event-move.js", 78);
return subscriber._extra.root || (node.get(NODE_TYPE) === 9) ? node : node.get(OWNER_DOCUMENT);
},
+ //Checks to see if the node is the document, and if it is, returns the documentElement.
+ _checkDocumentElem = function(node) {
+ _yuitest_coverfunc("build/event-move/event-move.js", "_checkDocumentElem", 82);
+_yuitest_coverline("build/event-move/event-move.js", 83);
+var elem = node.getDOMNode();
+ _yuitest_coverline("build/event-move/event-move.js", 84);
+if (node.compareTo(Y.config.doc) && elem.documentElement) {
+ _yuitest_coverline("build/event-move/event-move.js", 85);
+return elem.documentElement;
+ }
+ else {
+ _yuitest_coverline("build/event-move/event-move.js", 88);
+return false;
+ }
+ },
+
_normTouchFacade = function(touchFacade, touch, params) {
- _yuitest_coverfunc("build/event-move/event-move.js", "_normTouchFacade", 68);
-_yuitest_coverline("build/event-move/event-move.js", 69);
+ _yuitest_coverfunc("build/event-move/event-move.js", "_normTouchFacade", 92);
+_yuitest_coverline("build/event-move/event-move.js", 93);
touchFacade.pageX = touch.pageX;
- _yuitest_coverline("build/event-move/event-move.js", 70);
+ _yuitest_coverline("build/event-move/event-move.js", 94);
touchFacade.pageY = touch.pageY;
- _yuitest_coverline("build/event-move/event-move.js", 71);
+ _yuitest_coverline("build/event-move/event-move.js", 95);
touchFacade.screenX = touch.screenX;
- _yuitest_coverline("build/event-move/event-move.js", 72);
+ _yuitest_coverline("build/event-move/event-move.js", 96);
touchFacade.screenY = touch.screenY;
- _yuitest_coverline("build/event-move/event-move.js", 73);
+ _yuitest_coverline("build/event-move/event-move.js", 97);
touchFacade.clientX = touch.clientX;
- _yuitest_coverline("build/event-move/event-move.js", 74);
+ _yuitest_coverline("build/event-move/event-move.js", 98);
touchFacade.clientY = touch.clientY;
- _yuitest_coverline("build/event-move/event-move.js", 75);
+ _yuitest_coverline("build/event-move/event-move.js", 99);
touchFacade[TARGET] = touchFacade[TARGET] || touch[TARGET];
- _yuitest_coverline("build/event-move/event-move.js", 76);
+ _yuitest_coverline("build/event-move/event-move.js", 100);
touchFacade[CURRENT_TARGET] = touchFacade[CURRENT_TARGET] || touch[CURRENT_TARGET];
- _yuitest_coverline("build/event-move/event-move.js", 78);
+ _yuitest_coverline("build/event-move/event-move.js", 102);
touchFacade[BUTTON] = (params && params[BUTTON]) || 1; // default to left (left as per vendors, not W3C which is 0)
},
@@ -136,50 +165,71 @@ touchFacade[BUTTON] = (params && params[BUTTON]) || 1; // default to left (left
The user can over-ride this by setting a more lenient -ms-touch-action property on a node (such as pan-x, pan-y, etc.) via CSS when subscribing to the 'gesturemovestart' event.
*/
- _setTouchActions = function (node, subscriber, evtName) {
- _yuitest_coverfunc("build/event-move/event-move.js", "_setTouchActions", 86);
-_yuitest_coverline("build/event-move/event-move.js", 87);
-var params = subscriber._extra,
- elem = node.getDOMNode();
-
- _yuitest_coverline("build/event-move/event-move.js", 90);
-if (SUPPORTS_POINTER) { //Checks to see if MSPointer events are supported.
- _yuitest_coverline("build/event-move/event-move.js", 91);
-elem.style.msTouchAction = 'none';
+ _setTouchActions = function (node) {
+ _yuitest_coverfunc("build/event-move/event-move.js", "_setTouchActions", 110);
+_yuitest_coverline("build/event-move/event-move.js", 111);
+var elem = _checkDocumentElem(node) || node.getDOMNode(),
+ num = node.getData(MS_TOUCH_ACTION_COUNT);
+
+ //Checks to see if msTouchAction is supported.
+ _yuitest_coverline("build/event-move/event-move.js", 115);
+if (SUPPORTS_POINTER) {
+ _yuitest_coverline("build/event-move/event-move.js", 116);
+if (!num) {
+ _yuitest_coverline("build/event-move/event-move.js", 117);
+num = 0;
+ _yuitest_coverline("build/event-move/event-move.js", 118);
+node.setData(MS_INIT_TOUCH_ACTION, elem.style.msTouchAction);
+ }
+ _yuitest_coverline("build/event-move/event-move.js", 120);
+elem.style.msTouchAction = Y.Event._DEFAULT_TOUCH_ACTION;
+ _yuitest_coverline("build/event-move/event-move.js", 121);
+num++;
+ _yuitest_coverline("build/event-move/event-move.js", 122);
+node.setData(MS_TOUCH_ACTION_COUNT, num);
}
},
/*
- Resets the element's -ms-touch-action property back to 'auto', which is the default. This is called on detach() and detachDelegate().
+ Resets the element's -ms-touch-action property back to the original value, This is called on detach() and detachDelegate().
*/
_unsetTouchActions = function (node) {
- _yuitest_coverfunc("build/event-move/event-move.js", "_unsetTouchActions", 98);
-_yuitest_coverline("build/event-move/event-move.js", 99);
+ _yuitest_coverfunc("build/event-move/event-move.js", "_unsetTouchActions", 129);
+_yuitest_coverline("build/event-move/event-move.js", 130);
+var elem = _checkDocumentElem(node) || node.getDOMNode(),
+ num = node.getData(MS_TOUCH_ACTION_COUNT),
+ initTouchAction = node.getData(MS_INIT_TOUCH_ACTION);
+
+ _yuitest_coverline("build/event-move/event-move.js", 134);
if (SUPPORTS_POINTER) {
- _yuitest_coverline("build/event-move/event-move.js", 100);
-var elem = node.getDOMNode();
- _yuitest_coverline("build/event-move/event-move.js", 101);
-if (elem.style.msTouchAction !== 'auto') {
- _yuitest_coverline("build/event-move/event-move.js", 102);
-elem.style.msTouchAction = 'auto'
+ _yuitest_coverline("build/event-move/event-move.js", 135);
+num--;
+ _yuitest_coverline("build/event-move/event-move.js", 136);
+node.setData(MS_TOUCH_ACTION_COUNT, num);
+ _yuitest_coverline("build/event-move/event-move.js", 137);
+if (num === 0 && elem.style.msTouchAction !== initTouchAction) {
+ _yuitest_coverline("build/event-move/event-move.js", 138);
+elem.style.msTouchAction = initTouchAction;
}
}
},
_prevent = function(e, preventDefault) {
- _yuitest_coverfunc("build/event-move/event-move.js", "_prevent", 107);
-_yuitest_coverline("build/event-move/event-move.js", 108);
+ _yuitest_coverfunc("build/event-move/event-move.js", "_prevent", 143);
+_yuitest_coverline("build/event-move/event-move.js", 144);
if (preventDefault) {
// preventDefault is a boolean or a function
- _yuitest_coverline("build/event-move/event-move.js", 110);
+ _yuitest_coverline("build/event-move/event-move.js", 146);
if (!preventDefault.call || preventDefault(e)) {
- _yuitest_coverline("build/event-move/event-move.js", 111);
+ _yuitest_coverline("build/event-move/event-move.js", 147);
e.preventDefault();
}
}
},
define = Y.Event.define;
+ _yuitest_coverline("build/event-move/event-move.js", 153);
+Y.Event._DEFAULT_TOUCH_ACTION = 'none';
/**
* Sets up a "gesturemovestart" event, that is fired on touch devices in response to a single finger "touchstart",
@@ -212,17 +262,17 @@ e.preventDefault();
* @return {EventHandle} the detach handle
*/
-_yuitest_coverline("build/event-move/event-move.js", 149);
+_yuitest_coverline("build/event-move/event-move.js", 186);
define(GESTURE_MOVE_START, {
on: function (node, subscriber, ce) {
//Set -ms-touch-action on IE10 and set preventDefault to true
- _yuitest_coverfunc("build/event-move/event-move.js", "on", 151);
-_yuitest_coverline("build/event-move/event-move.js", 154);
-_setTouchActions(node, subscriber, EVENT[START]);
+ _yuitest_coverfunc("build/event-move/event-move.js", "on", 188);
+_yuitest_coverline("build/event-move/event-move.js", 191);
+_setTouchActions(node);
- _yuitest_coverline("build/event-move/event-move.js", 156);
+ _yuitest_coverline("build/event-move/event-move.js", 193);
subscriber[_MOVE_START_HANDLE] = node.on(EVENT[START],
this._onStart,
this,
@@ -233,85 +283,85 @@ subscriber[_MOVE_START_HANDLE] = node.on(EVENT[START],
delegate : function(node, subscriber, ce, filter) {
- _yuitest_coverfunc("build/event-move/event-move.js", "delegate", 164);
-_yuitest_coverline("build/event-move/event-move.js", 166);
+ _yuitest_coverfunc("build/event-move/event-move.js", "delegate", 201);
+_yuitest_coverline("build/event-move/event-move.js", 203);
var se = this;
- _yuitest_coverline("build/event-move/event-move.js", 168);
+ _yuitest_coverline("build/event-move/event-move.js", 205);
subscriber[_DEL_MOVE_START_HANDLE] = node.delegate(EVENT[START],
function(e) {
- _yuitest_coverfunc("build/event-move/event-move.js", "(anonymous 2)", 169);
-_yuitest_coverline("build/event-move/event-move.js", 170);
+ _yuitest_coverfunc("build/event-move/event-move.js", "(anonymous 2)", 206);
+_yuitest_coverline("build/event-move/event-move.js", 207);
se._onStart(e, node, subscriber, ce, true);
},
filter);
},
detachDelegate : function(node, subscriber, ce, filter) {
- _yuitest_coverfunc("build/event-move/event-move.js", "detachDelegate", 175);
-_yuitest_coverline("build/event-move/event-move.js", 176);
+ _yuitest_coverfunc("build/event-move/event-move.js", "detachDelegate", 212);
+_yuitest_coverline("build/event-move/event-move.js", 213);
var handle = subscriber[_DEL_MOVE_START_HANDLE];
- _yuitest_coverline("build/event-move/event-move.js", 178);
+ _yuitest_coverline("build/event-move/event-move.js", 215);
if (handle) {
- _yuitest_coverline("build/event-move/event-move.js", 179);
+ _yuitest_coverline("build/event-move/event-move.js", 216);
handle.detach();
- _yuitest_coverline("build/event-move/event-move.js", 180);
+ _yuitest_coverline("build/event-move/event-move.js", 217);
subscriber[_DEL_MOVE_START_HANDLE] = null;
}
- _yuitest_coverline("build/event-move/event-move.js", 183);
+ _yuitest_coverline("build/event-move/event-move.js", 220);
_unsetTouchActions(node);
},
detach: function (node, subscriber, ce) {
- _yuitest_coverfunc("build/event-move/event-move.js", "detach", 186);
-_yuitest_coverline("build/event-move/event-move.js", 187);
+ _yuitest_coverfunc("build/event-move/event-move.js", "detach", 223);
+_yuitest_coverline("build/event-move/event-move.js", 224);
var startHandle = subscriber[_MOVE_START_HANDLE];
- _yuitest_coverline("build/event-move/event-move.js", 189);
+ _yuitest_coverline("build/event-move/event-move.js", 226);
if (startHandle) {
- _yuitest_coverline("build/event-move/event-move.js", 190);
+ _yuitest_coverline("build/event-move/event-move.js", 227);
startHandle.detach();
- _yuitest_coverline("build/event-move/event-move.js", 191);
+ _yuitest_coverline("build/event-move/event-move.js", 228);
subscriber[_MOVE_START_HANDLE] = null;
}
- _yuitest_coverline("build/event-move/event-move.js", 194);
+ _yuitest_coverline("build/event-move/event-move.js", 231);
_unsetTouchActions(node);
},
processArgs : function(args, delegate) {
- _yuitest_coverfunc("build/event-move/event-move.js", "processArgs", 197);
-_yuitest_coverline("build/event-move/event-move.js", 198);
+ _yuitest_coverfunc("build/event-move/event-move.js", "processArgs", 234);
+_yuitest_coverline("build/event-move/event-move.js", 235);
var params = _defArgsProcessor(this, args, delegate);
- _yuitest_coverline("build/event-move/event-move.js", 200);
+ _yuitest_coverline("build/event-move/event-move.js", 237);
if (!(MIN_TIME in params)) {
- _yuitest_coverline("build/event-move/event-move.js", 201);
+ _yuitest_coverline("build/event-move/event-move.js", 238);
params[MIN_TIME] = this.MIN_TIME;
}
- _yuitest_coverline("build/event-move/event-move.js", 204);
+ _yuitest_coverline("build/event-move/event-move.js", 241);
if (!(MIN_DISTANCE in params)) {
- _yuitest_coverline("build/event-move/event-move.js", 205);
+ _yuitest_coverline("build/event-move/event-move.js", 242);
params[MIN_DISTANCE] = this.MIN_DISTANCE;
}
- _yuitest_coverline("build/event-move/event-move.js", 208);
+ _yuitest_coverline("build/event-move/event-move.js", 245);
return params;
},
_onStart : function(e, node, subscriber, ce, delegate) {
- _yuitest_coverfunc("build/event-move/event-move.js", "_onStart", 211);
-_yuitest_coverline("build/event-move/event-move.js", 213);
+ _yuitest_coverfunc("build/event-move/event-move.js", "_onStart", 248);
+_yuitest_coverline("build/event-move/event-move.js", 250);
if (delegate) {
- _yuitest_coverline("build/event-move/event-move.js", 214);
+ _yuitest_coverline("build/event-move/event-move.js", 251);
node = e[CURRENT_TARGET];
}
- _yuitest_coverline("build/event-move/event-move.js", 217);
+ _yuitest_coverline("build/event-move/event-move.js", 254);
var params = subscriber._extra,
fireStart = true,
minTime = params[MIN_TIME],
@@ -321,63 +371,63 @@ var params = subscriber._extra,
root = _getRoot(node, subscriber),
startXY;
- _yuitest_coverline("build/event-move/event-move.js", 226);
+ _yuitest_coverline("build/event-move/event-move.js", 263);
if (e.touches) {
- _yuitest_coverline("build/event-move/event-move.js", 227);
+ _yuitest_coverline("build/event-move/event-move.js", 264);
if (e.touches.length === 1) {
- _yuitest_coverline("build/event-move/event-move.js", 228);
+ _yuitest_coverline("build/event-move/event-move.js", 265);
_normTouchFacade(e, e.touches[0], params);
} else {
- _yuitest_coverline("build/event-move/event-move.js", 230);
+ _yuitest_coverline("build/event-move/event-move.js", 267);
fireStart = false;
}
} else {
- _yuitest_coverline("build/event-move/event-move.js", 233);
+ _yuitest_coverline("build/event-move/event-move.js", 270);
fireStart = (button === undefined) || (button === e.button);
}
- _yuitest_coverline("build/event-move/event-move.js", 237);
+ _yuitest_coverline("build/event-move/event-move.js", 274);
if (fireStart) {
- _yuitest_coverline("build/event-move/event-move.js", 239);
+ _yuitest_coverline("build/event-move/event-move.js", 276);
_prevent(e, preventDefault);
- _yuitest_coverline("build/event-move/event-move.js", 241);
+ _yuitest_coverline("build/event-move/event-move.js", 278);
if (minTime === 0 || minDistance === 0) {
- _yuitest_coverline("build/event-move/event-move.js", 242);
+ _yuitest_coverline("build/event-move/event-move.js", 279);
this._start(e, node, ce, params);
} else {
- _yuitest_coverline("build/event-move/event-move.js", 246);
+ _yuitest_coverline("build/event-move/event-move.js", 283);
startXY = [e.pageX, e.pageY];
- _yuitest_coverline("build/event-move/event-move.js", 248);
+ _yuitest_coverline("build/event-move/event-move.js", 285);
if (minTime > 0) {
- _yuitest_coverline("build/event-move/event-move.js", 251);
+ _yuitest_coverline("build/event-move/event-move.js", 288);
params._ht = Y.later(minTime, this, this._start, [e, node, ce, params]);
- _yuitest_coverline("build/event-move/event-move.js", 253);
+ _yuitest_coverline("build/event-move/event-move.js", 290);
params._hme = root.on(EVENT[END], Y.bind(function() {
- _yuitest_coverfunc("build/event-move/event-move.js", "(anonymous 3)", 253);
-_yuitest_coverline("build/event-move/event-move.js", 254);
+ _yuitest_coverfunc("build/event-move/event-move.js", "(anonymous 3)", 290);
+_yuitest_coverline("build/event-move/event-move.js", 291);
this._cancel(params);
}, this));
}
- _yuitest_coverline("build/event-move/event-move.js", 258);
+ _yuitest_coverline("build/event-move/event-move.js", 295);
if (minDistance > 0) {
- _yuitest_coverline("build/event-move/event-move.js", 261);
+ _yuitest_coverline("build/event-move/event-move.js", 298);
params._hm = root.on(EVENT[MOVE], Y.bind(function(em) {
- _yuitest_coverfunc("build/event-move/event-move.js", "(anonymous 4)", 261);
-_yuitest_coverline("build/event-move/event-move.js", 262);
+ _yuitest_coverfunc("build/event-move/event-move.js", "(anonymous 4)", 298);
+_yuitest_coverline("build/event-move/event-move.js", 299);
if (Math.abs(em.pageX - startXY[0]) > minDistance || Math.abs(em.pageY - startXY[1]) > minDistance) {
- _yuitest_coverline("build/event-move/event-move.js", 263);
+ _yuitest_coverline("build/event-move/event-move.js", 300);
this._start(e, node, ce, params);
}
}, this));
@@ -387,46 +437,46 @@ this._start(e, node, ce, params);
},
_cancel : function(params) {
- _yuitest_coverfunc("build/event-move/event-move.js", "_cancel", 271);
-_yuitest_coverline("build/event-move/event-move.js", 272);
+ _yuitest_coverfunc("build/event-move/event-move.js", "_cancel", 308);
+_yuitest_coverline("build/event-move/event-move.js", 309);
if (params._ht) {
- _yuitest_coverline("build/event-move/event-move.js", 273);
+ _yuitest_coverline("build/event-move/event-move.js", 310);
params._ht.cancel();
- _yuitest_coverline("build/event-move/event-move.js", 274);
+ _yuitest_coverline("build/event-move/event-move.js", 311);
params._ht = null;
}
- _yuitest_coverline("build/event-move/event-move.js", 276);
+ _yuitest_coverline("build/event-move/event-move.js", 313);
if (params._hme) {
- _yuitest_coverline("build/event-move/event-move.js", 277);
+ _yuitest_coverline("build/event-move/event-move.js", 314);
params._hme.detach();
- _yuitest_coverline("build/event-move/event-move.js", 278);
+ _yuitest_coverline("build/event-move/event-move.js", 315);
params._hme = null;
}
- _yuitest_coverline("build/event-move/event-move.js", 280);
+ _yuitest_coverline("build/event-move/event-move.js", 317);
if (params._hm) {
- _yuitest_coverline("build/event-move/event-move.js", 281);
+ _yuitest_coverline("build/event-move/event-move.js", 318);
params._hm.detach();
- _yuitest_coverline("build/event-move/event-move.js", 282);
+ _yuitest_coverline("build/event-move/event-move.js", 319);
params._hm = null;
}
},
_start : function(e, node, ce, params) {
- _yuitest_coverfunc("build/event-move/event-move.js", "_start", 286);
-_yuitest_coverline("build/event-move/event-move.js", 288);
+ _yuitest_coverfunc("build/event-move/event-move.js", "_start", 323);
+_yuitest_coverline("build/event-move/event-move.js", 325);
if (params) {
- _yuitest_coverline("build/event-move/event-move.js", 289);
+ _yuitest_coverline("build/event-move/event-move.js", 326);
this._cancel(params);
}
- _yuitest_coverline("build/event-move/event-move.js", 292);
+ _yuitest_coverline("build/event-move/event-move.js", 329);
e.type = GESTURE_MOVE_START;
- _yuitest_coverline("build/event-move/event-move.js", 295);
+ _yuitest_coverline("build/event-move/event-move.js", 332);
node.setData(_MOVE_START, e);
- _yuitest_coverline("build/event-move/event-move.js", 296);
+ _yuitest_coverline("build/event-move/event-move.js", 333);
ce.fire(e);
},
@@ -468,12 +518,15 @@ ce.fire(e);
*
* @return {EventHandle} the detach handle
*/
-_yuitest_coverline("build/event-move/event-move.js", 337);
+_yuitest_coverline("build/event-move/event-move.js", 374);
define(GESTURE_MOVE, {
on : function (node, subscriber, ce) {
- _yuitest_coverfunc("build/event-move/event-move.js", "on", 339);
-_yuitest_coverline("build/event-move/event-move.js", 340);
+
+ _yuitest_coverfunc("build/event-move/event-move.js", "on", 376);
+_yuitest_coverline("build/event-move/event-move.js", 378);
+_setTouchActions(node);
+ _yuitest_coverline("build/event-move/event-move.js", 379);
var root = _getRoot(node, subscriber, EVENT[MOVE]),
moveHandle = root.on(EVENT[MOVE],
@@ -483,107 +536,107 @@ var root = _getRoot(node, subscriber, EVENT[MOVE]),
subscriber,