Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of yuisource.corp.yahoo.com:yui3

  • Loading branch information...
commit e4310d4c4469468ec5512b465f4b0b4393cf5947 2 parents 975af71 + a123bc8
@lsmith lsmith authored
View
3  build/calendar-base/assets/skins/night/calendar-base-skin.css
@@ -1,7 +1,5 @@
.yui3-skin-night .yui3-calendar-content {
padding:10px;
- font-size:0.8em;
- font-family:"Lucida Grande", "Lucida Sans", Calibri, Helvetica, Arial, sans-serif;
color: #CBCBCB;
border: 1px solid #303030;
background: #151515; /* Old browsers */
@@ -35,6 +33,7 @@
.yui3-skin-night .yui3-calendar-day,
.yui3-skin-night .yui3-calendar-prevmonth-day,
.yui3-skin-night .yui3-calendar-nextmonth-day {
+ padding:5px;
border: 1px solid #151515;
background: #262727;
text-align:center;
View
2  build/calendar-base/assets/skins/night/calendar-base.css
@@ -1 +1 @@
-.yui3-calendar-pane{width:100%}.yui3-calendar-grid{width:100%}.yui3-calendar-column-hidden,.yui3-calendar-hidden{display:none}.yui3-skin-night .yui3-calendar-content{padding:10px;font-size:.8em;font-family:"Lucida Grande","Lucida Sans",Calibri,Helvetica,Arial,sans-serif;color:#cbcbcb;border:1px solid #303030;background:#151515;background:-moz-linear-gradient(top,#222 0,#151515 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#222),color-stop(100%,#151515));background:-webkit-linear-gradient(top,#222 0,#151515 100%);background:-o-linear-gradient(top,#222 0,#151515 100%);background:-ms-linear-gradient(top,#222 0,#151515 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#222222',endColorstr='#151515',GradientType=0);background:linear-gradient(top,#222 0,#151515 100%);-moz-border-radius:5px;border-radius:5px}.yui3-skin-night .yui3-calendar-grid{padding:5px;border-collapse:collapse}.yui3-skin-night .yui3-calendar-header{padding-bottom:10px}.yui3-skin-night .yui3-calendar-header-label{margin:0;font-size:1em;font-weight:bold}.yui3-skin-night .yui3-calendar-day,.yui3-skin-night .yui3-calendar-prevmonth-day,.yui3-skin-night .yui3-calendar-nextmonth-day{border:1px solid #151515;background:#262727;text-align:center}.yui3-skin-night .yui3-calendar-day:hover{background:#383939;color:#fff}.yui3-skin-night .yui3-calendar-selection-disabled,.yui3-skin-night .yui3-calendar-selection-disabled:hover{background:#151515;color:#596060}.yui3-skin-night .yui3-calendar-weekday{color:#4f4f4f;font-weight:bold;text-align:center}.yui3-skin-night .yui3-calendar-prevmonth-day,.yui3-skin-night .yui3-calendar-nextmonth-day{color:#4f4f4f}.yui3-skin-night .yui3-calendar-day{font-weight:bold}.yui3-skin-night .yui3-calendar-day-selected{background-color:#505151;color:#fff}.yui3-skin-night .yui3-calendar-header-label{text-align:center}.yui3-skin-night .yui3-calendar-left-grid{margin-right:1em}.yui3-skin-sam .yui3-calendar-right-grid{margin-left:1em}
+.yui3-calendar-pane{width:100%}.yui3-calendar-grid{width:100%}.yui3-calendar-column-hidden,.yui3-calendar-hidden{display:none}.yui3-skin-night .yui3-calendar-content{padding:10px;color:#cbcbcb;border:1px solid #303030;background:#151515;background:-moz-linear-gradient(top,#222 0,#151515 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#222),color-stop(100%,#151515));background:-webkit-linear-gradient(top,#222 0,#151515 100%);background:-o-linear-gradient(top,#222 0,#151515 100%);background:-ms-linear-gradient(top,#222 0,#151515 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#222222',endColorstr='#151515',GradientType=0);background:linear-gradient(top,#222 0,#151515 100%);-moz-border-radius:5px;border-radius:5px}.yui3-skin-night .yui3-calendar-grid{padding:5px;border-collapse:collapse}.yui3-skin-night .yui3-calendar-header{padding-bottom:10px}.yui3-skin-night .yui3-calendar-header-label{margin:0;font-size:1em;font-weight:bold}.yui3-skin-night .yui3-calendar-day,.yui3-skin-night .yui3-calendar-prevmonth-day,.yui3-skin-night .yui3-calendar-nextmonth-day{padding:5px;border:1px solid #151515;background:#262727;text-align:center}.yui3-skin-night .yui3-calendar-day:hover{background:#383939;color:#fff}.yui3-skin-night .yui3-calendar-selection-disabled,.yui3-skin-night .yui3-calendar-selection-disabled:hover{background:#151515;color:#596060}.yui3-skin-night .yui3-calendar-weekday{color:#4f4f4f;font-weight:bold;text-align:center}.yui3-skin-night .yui3-calendar-prevmonth-day,.yui3-skin-night .yui3-calendar-nextmonth-day{color:#4f4f4f}.yui3-skin-night .yui3-calendar-day{font-weight:bold}.yui3-skin-night .yui3-calendar-day-selected{background-color:#505151;color:#fff}.yui3-skin-night .yui3-calendar-header-label{text-align:center}.yui3-skin-night .yui3-calendar-left-grid{margin-right:1em}.yui3-skin-sam .yui3-calendar-right-grid{margin-left:1em}
View
3  build/calendar-base/assets/skins/sam/calendar-base-skin.css
@@ -1,7 +1,5 @@
.yui3-skin-sam .yui3-calendar-content {
padding:10px;
- font-size:0.8em;
- font-family:"Lucida Grande", "Lucida Sans", Calibri, Helvetica, Arial, sans-serif;
color: #000000;
border: 1px solid gray;
background: #f2f2f2; /* Old browsers */
@@ -34,6 +32,7 @@
.yui3-skin-sam .yui3-calendar-day,
.yui3-skin-sam .yui3-calendar-prevmonth-day,
.yui3-skin-sam .yui3-calendar-nextmonth-day {
+ padding:5px;
border: 1px solid #CCCCCC;
background: #FFFFFF;
text-align:center;
View
2  build/calendar-base/assets/skins/sam/calendar-base.css
@@ -1 +1 @@
-.yui3-calendar-pane{width:100%}.yui3-calendar-grid{width:100%}.yui3-calendar-column-hidden,.yui3-calendar-hidden{display:none}.yui3-skin-sam .yui3-calendar-content{padding:10px;font-size:.8em;font-family:"Lucida Grande","Lucida Sans",Calibri,Helvetica,Arial,sans-serif;color:#000;border:1px solid gray;background:#f2f2f2;background:-moz-linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#f9f9f9),color-stop(100%,#f2f2f2));background:-webkit-linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);background:-o-linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);background:-ms-linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9',endColorstr='#f2f2f2',GradientType=0);background:linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);-moz-border-radius:5px;border-radius:5px}.yui3-skin-sam .yui3-calendar-grid{padding:5px;border-collapse:collapse}.yui3-skin-sam .yui3-calendar-header{padding-bottom:10px}.yui3-skin-sam .yui3-calendar-header-label{margin:0;font-size:1em;font-weight:bold}.yui3-skin-sam .yui3-calendar-day,.yui3-skin-sam .yui3-calendar-prevmonth-day,.yui3-skin-sam .yui3-calendar-nextmonth-day{border:1px solid #ccc;background:#fff;text-align:center}.yui3-skin-sam .yui3-calendar-day:hover{background:#06c;color:#fff}.yui3-skin-sam .yui3-calendar-selection-disabled,.yui3-skin-sam .yui3-calendar-selection-disabled:hover{color:#a6a6a6;background:#ccc}.yui3-skin-sam .yui3-calendar-weekday{font-weight:bold}.yui3-skin-sam .yui3-calendar-prevmonth-day,.yui3-skin-sam .yui3-calendar-nextmonth-day{color:#a6a6a6}.yui3-skin-sam .yui3-calendar-day{font-weight:bold}.yui3-skin-sam .yui3-calendar-day-selected{background-color:#b3d4ff;color:#000}.yui3-skin-sam .yui3-calendar-header-label{text-align:center}.yui3-skin-sam .yui3-calendar-left-grid{margin-right:1em}.yui3-skin-sam .yui3-calendar-right-grid{margin-left:1em}
+.yui3-calendar-pane{width:100%}.yui3-calendar-grid{width:100%}.yui3-calendar-column-hidden,.yui3-calendar-hidden{display:none}.yui3-skin-sam .yui3-calendar-content{padding:10px;color:#000;border:1px solid gray;background:#f2f2f2;background:-moz-linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#f9f9f9),color-stop(100%,#f2f2f2));background:-webkit-linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);background:-o-linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);background:-ms-linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9',endColorstr='#f2f2f2',GradientType=0);background:linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);-moz-border-radius:5px;border-radius:5px}.yui3-skin-sam .yui3-calendar-grid{padding:5px;border-collapse:collapse}.yui3-skin-sam .yui3-calendar-header{padding-bottom:10px}.yui3-skin-sam .yui3-calendar-header-label{margin:0;font-size:1em;font-weight:bold}.yui3-skin-sam .yui3-calendar-day,.yui3-skin-sam .yui3-calendar-prevmonth-day,.yui3-skin-sam .yui3-calendar-nextmonth-day{padding:5px;border:1px solid #ccc;background:#fff;text-align:center}.yui3-skin-sam .yui3-calendar-day:hover{background:#06c;color:#fff}.yui3-skin-sam .yui3-calendar-selection-disabled,.yui3-skin-sam .yui3-calendar-selection-disabled:hover{color:#a6a6a6;background:#ccc}.yui3-skin-sam .yui3-calendar-weekday{font-weight:bold}.yui3-skin-sam .yui3-calendar-prevmonth-day,.yui3-skin-sam .yui3-calendar-nextmonth-day{color:#a6a6a6}.yui3-skin-sam .yui3-calendar-day{font-weight:bold}.yui3-skin-sam .yui3-calendar-day-selected{background-color:#b3d4ff;color:#000}.yui3-skin-sam .yui3-calendar-header-label{text-align:center}.yui3-skin-sam .yui3-calendar-left-grid{margin-right:1em}.yui3-skin-sam .yui3-calendar-right-grid{margin-left:1em}
View
3  build/calendar/assets/skins/night/calendar-base-skin.css
@@ -1,7 +1,5 @@
.yui3-skin-night .yui3-calendar-content {
padding:10px;
- font-size:0.8em;
- font-family:"Lucida Grande", "Lucida Sans", Calibri, Helvetica, Arial, sans-serif;
color: #CBCBCB;
border: 1px solid #303030;
background: #151515; /* Old browsers */
@@ -35,6 +33,7 @@
.yui3-skin-night .yui3-calendar-day,
.yui3-skin-night .yui3-calendar-prevmonth-day,
.yui3-skin-night .yui3-calendar-nextmonth-day {
+ padding:5px;
border: 1px solid #151515;
background: #262727;
text-align:center;
View
3  build/calendar/assets/skins/sam/calendar-base-skin.css
@@ -1,7 +1,5 @@
.yui3-skin-sam .yui3-calendar-content {
padding:10px;
- font-size:0.8em;
- font-family:"Lucida Grande", "Lucida Sans", Calibri, Helvetica, Arial, sans-serif;
color: #000000;
border: 1px solid gray;
background: #f2f2f2; /* Old browsers */
@@ -34,6 +32,7 @@
.yui3-skin-sam .yui3-calendar-day,
.yui3-skin-sam .yui3-calendar-prevmonth-day,
.yui3-skin-sam .yui3-calendar-nextmonth-day {
+ padding:5px;
border: 1px solid #CCCCCC;
background: #FFFFFF;
text-align:center;
View
19 build/calendar/calendar-debug.js
@@ -68,6 +68,11 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
*/
initializer : function () {
this.plug(Y.Plugin.CalendarNavigator);
+
+
+ this._keyEvents = [];
+ this._highlightedDateNode = null;
+ this._lastSelectedDate = null;
},
/**
@@ -108,9 +113,6 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
var newNode = this._dateToNode(oDate);
newNode.focus();
newNode.addClass(CAL_DAY_HILITED);
- //this._highlightedDateNode.set("tabIndex", -1);
-
-
},
/**
@@ -152,6 +154,7 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
*/
_focusCalendarCell : function (ev) {
this._highlightedDateNode = ev.target;
+ ev.stopPropagation();
},
/**
@@ -159,7 +162,8 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
* @method _focusCalendarGrid
* @protected
*/
- _focusCalendarGrid : function (ev) {
+ _focusCalendarGrid : function (ev) {
+ this._unhighlightCurrentDateNode();
this._highlightedDateNode = null;
},
@@ -175,7 +179,6 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
dayNum = 0,
dir = '';
-
switch(keyCode) {
case KEY_DOWN:
dayNum = 7;
@@ -211,14 +214,14 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
}
break;
}
+
+
+ if (keyCode == KEY_DOWN || keyCode == KEY_UP || keyCode == KEY_LEFT || keyCode == KEY_RIGHT) {
if (curDate == null) {
curDate = ydate.addMonths(this.get("date"), gridNum);
dayNum = 0;
}
-
-
- if (keyCode == KEY_DOWN || keyCode == KEY_UP || keyCode == KEY_LEFT || keyCode == KEY_RIGHT) {
ev.preventDefault();
var newDate = ydate.addDays(curDate, dayNum),
startDate = this.get("date"),
View
2  build/calendar/calendar-min.js
@@ -1 +1 @@
-YUI.add("calendar",function(c){var s=c.ClassNameManager.getClassName,n="calendar",e=40,p=38,t=37,i=39,f=13,g=32,m=s(n,"header"),d=s(n,"day-selected"),b=s(n,"day-highlighted"),r=s(n,"day"),a=s(n,"prevmonth-day"),o=s(n,"nextmonth-day"),j=s(n,"grid"),k=c.DataType.Date,q=c.delegate,u=s(n,"pane"),h=c.UA.os;function l(v){l.superclass.constructor.apply(this,arguments);}c.Calendar=c.extend(l,c.CalendarBase,{_keyEvents:[],_highlightedDateNode:null,_lastSelectedDate:null,initializer:function(){this.plug(c.Plugin.CalendarNavigator);},syncUI:function(){},_bindCalendarEvents:function(){var v=this.get("contentBox"),w=v.one("."+u);w.on("selectstart",function(x){x.preventDefault();});w.delegate("click",this._clickCalendar,"."+r,this);w.delegate("keydown",this._keydownCalendar,"."+j,this);w.delegate("focus",this._focusCalendarGrid,"."+j,this);w.delegate("focus",this._focusCalendarCell,"."+r,this);w.delegate("blur",this._blurCalendarGrid,"."+j+",."+r,this);},_highlightDateNode:function(w){this._unhighlightCurrentDateNode();var v=this._dateToNode(w);v.focus();v.addClass(b);},_unhighlightCurrentDateNode:function(){if(this._highlightedDateNode){this._highlightedDateNode.removeClass(b);}},_getGridNumber:function(w){var v=w.get("id").split("_").reverse();return parseInt(v[0],10);},_blurCalendarGrid:function(v){this._unhighlightCurrentDateNode();},_focusCalendarCell:function(v){this._highlightedDateNode=v.target;},_focusCalendarGrid:function(v){this._highlightedDateNode=null;},_keydownCalendar:function(D){var x=this._getGridNumber(D.target),z=this._highlightedDateNode==null?null:this._nodeToDate(this._highlightedDateNode),F=D.keyCode,w=0,y="";switch(F){case e:w=7;y="s";break;case p:w=-7;y="n";break;case t:w=-1;y="w";break;case i:w=1;y="e";break;case g:case f:if(this._highlightedDateNode){var C=this.get("selectionMode");if(C==="single"&&!this._highlightedDateNode.hasClass(d)){this._clearSelection(true);this._addDateToSelection(z);}else{if(C==="multiple"||C==="multiple-sticky"){if(this._highlightedDateNode.hasClass(d)){this._removeDateFromSelection(z);}else{this._addDateToSelection(z);}}}}break;}if(z==null){z=k.addMonths(this.get("date"),x);w=0;}if(F==e||F==p||F==t||F==i){D.preventDefault();var E=k.addDays(z,w),v=this.get("date"),B=k.addMonths(this.get("date"),this._paneNumber-1),A=new Date(B);B.setDate(k.daysInMonth(B));if(k.isInRange(E,v,B)){this._highlightDateNode(E);}else{if(k.isGreater(v,E)){if(!k.isGreaterOrEqual(this.get("minimumDate"),v)){this.set("date",k.addMonths(v,-1));this._highlightDateNode(E);}}else{if(k.isGreater(E,B)){if(!k.isGreaterOrEqual(A,this.get("maximumDate"))){this.set("date",k.addMonths(v,1));this._highlightDateNode(E);}}}}}},_clickCalendar:function(y){var z=y.target,w=z.hasClass(r)&&!z.hasClass(a)&&!z.hasClass(o),v=z.hasClass(d);switch(this.get("selectionMode")){case ("single"):if(w){if(!v){this._clearSelection(true);this._addDateToSelection(this._nodeToDate(z));}}break;case ("multiple-sticky"):if(w){if(v){this._removeDateFromSelection(this._nodeToDate(z));}else{this._addDateToSelection(this._nodeToDate(z));}}break;case ("multiple"):if(!y.metaKey&&!y.ctrlKey&&!y.shiftKey){this._clearSelection(true);this._lastSelectedDate=this._nodeToDate(z);this._addDateToSelection(this._lastSelectedDate);}else{if(((h=="macintosh"&&y.metaKey)||(h!="macintosh"&&y.ctrlKey))&&!y.shiftKey){if(v){this._removeDateFromSelection(this._nodeToDate(z));this._lastSelectedDate=null;}else{this._lastSelectedDate=this._nodeToDate(z);this._addDateToSelection(this._lastSelectedDate);}}else{if(((h=="macintosh"&&y.metaKey)||(h!="macintosh"&&y.ctrlKey))&&y.shiftKey){if(this._lastSelectedDate!=null){var x=this._nodeToDate(z);this._addDateRangeToSelection(x,this._lastSelectedDate);this._lastSelectedDate=x;}else{this._lastSelectedDate=this._nodeToDate(z);this._addDateToSelection(this._lastSelectedDate);}}else{if(y.shiftKey){if(this._lastSelectedDate!=null){var x=this._nodeToDate(z);this._clearSelection(true);this._addDateRangeToSelection(x,this._lastSelectedDate);this._lastSelectedDate=x;}else{this._clearSelection(true);this._lastSelectedDate=this._nodeToDate(z);this._addDateToSelection(this._lastSelectedDate);}}}}}break;}if(w){this.fire("dateClick",{cell:z,date:this._nodeToDate(z)});}else{if(z.hasClass(a)){this.fire("prevMonthClick");}else{if(z.hasClass(o)){this.fire("nextMonthClick");}}}},subtractMonth:function(v){this.set("date",k.addMonths(this.get("date"),-1));v.halt();},subtractYear:function(v){this.set("date",k.addYears(this.get("date"),-1));v.halt();},addMonth:function(v){this.set("date",k.addMonths(this.get("date"),1));v.halt();},addYear:function(v){this.set("date",k.addYears(this.get("date"),1));v.halt();}},{NAME:"calendar",ATTRS:{selectionMode:{value:"single"},date:{value:new Date(),lazyAdd:false,setter:function(A){var w=this._normalizeDate(A),x=k.addMonths(w,this._paneNumber-1);var y=this.get("minimumDate");var z=this.get("maximumDate");if((y==null||k.isGreaterOrEqual(w,y))&&(z==null||k.isGreaterOrEqual(z,x))){return w;}else{if(y!=null&&k.isGreater(y,w)){return y;}else{if(z!=null&&k.isGreater(x,z)){var v=k.addMonths(z,-1*(this._paneNumber-1));return v;}}}}},minimumDate:{value:null,setter:function(x){if(x!=null){var w=this.get("date"),v=this._normalizeDate(x);if(w!=null&&!k.isGreaterOrEqual(w,v)){this.set("date",v);}return v;}else{return this._normalizeDate(x);}}},maximumDate:{value:null,setter:function(x){if(x!=null){var v=this.get("date"),w=this._normalizeDate(x);if(v!=null&&!k.isGreaterOrEqual(x,k.addMonths(v,this._paneNumber-1))){this.set("date",k.addMonths(w,-1*(this._paneNumber-1)));}return w;}else{return x;}}}}});},"@VERSION@",{requires:["calendar-base","calendarnavigator"],lang:["de","en","fr","ja","pt-BR","ru","zh-HANT-TW"]});
+YUI.add("calendar",function(c){var s=c.ClassNameManager.getClassName,n="calendar",e=40,p=38,t=37,i=39,f=13,g=32,m=s(n,"header"),d=s(n,"day-selected"),b=s(n,"day-highlighted"),r=s(n,"day"),a=s(n,"prevmonth-day"),o=s(n,"nextmonth-day"),j=s(n,"grid"),k=c.DataType.Date,q=c.delegate,u=s(n,"pane"),h=c.UA.os;function l(v){l.superclass.constructor.apply(this,arguments);}c.Calendar=c.extend(l,c.CalendarBase,{_keyEvents:[],_highlightedDateNode:null,_lastSelectedDate:null,initializer:function(){this.plug(c.Plugin.CalendarNavigator);this._keyEvents=[];this._highlightedDateNode=null;this._lastSelectedDate=null;},syncUI:function(){},_bindCalendarEvents:function(){var v=this.get("contentBox"),w=v.one("."+u);w.on("selectstart",function(x){x.preventDefault();});w.delegate("click",this._clickCalendar,"."+r,this);w.delegate("keydown",this._keydownCalendar,"."+j,this);w.delegate("focus",this._focusCalendarGrid,"."+j,this);w.delegate("focus",this._focusCalendarCell,"."+r,this);w.delegate("blur",this._blurCalendarGrid,"."+j+",."+r,this);},_highlightDateNode:function(w){this._unhighlightCurrentDateNode();var v=this._dateToNode(w);v.focus();v.addClass(b);},_unhighlightCurrentDateNode:function(){if(this._highlightedDateNode){this._highlightedDateNode.removeClass(b);}},_getGridNumber:function(w){var v=w.get("id").split("_").reverse();return parseInt(v[0],10);},_blurCalendarGrid:function(v){this._unhighlightCurrentDateNode();},_focusCalendarCell:function(v){this._highlightedDateNode=v.target;v.stopPropagation();},_focusCalendarGrid:function(v){this._unhighlightCurrentDateNode();this._highlightedDateNode=null;},_keydownCalendar:function(D){var x=this._getGridNumber(D.target),z=this._highlightedDateNode==null?null:this._nodeToDate(this._highlightedDateNode),F=D.keyCode,w=0,y="";switch(F){case e:w=7;y="s";break;case p:w=-7;y="n";break;case t:w=-1;y="w";break;case i:w=1;y="e";break;case g:case f:if(this._highlightedDateNode){var C=this.get("selectionMode");if(C==="single"&&!this._highlightedDateNode.hasClass(d)){this._clearSelection(true);this._addDateToSelection(z);}else{if(C==="multiple"||C==="multiple-sticky"){if(this._highlightedDateNode.hasClass(d)){this._removeDateFromSelection(z);}else{this._addDateToSelection(z);}}}}break;}if(F==e||F==p||F==t||F==i){if(z==null){z=k.addMonths(this.get("date"),x);w=0;}D.preventDefault();var E=k.addDays(z,w),v=this.get("date"),B=k.addMonths(this.get("date"),this._paneNumber-1),A=new Date(B);B.setDate(k.daysInMonth(B));if(k.isInRange(E,v,B)){this._highlightDateNode(E);}else{if(k.isGreater(v,E)){if(!k.isGreaterOrEqual(this.get("minimumDate"),v)){this.set("date",k.addMonths(v,-1));this._highlightDateNode(E);}}else{if(k.isGreater(E,B)){if(!k.isGreaterOrEqual(A,this.get("maximumDate"))){this.set("date",k.addMonths(v,1));this._highlightDateNode(E);}}}}}},_clickCalendar:function(y){var z=y.target,w=z.hasClass(r)&&!z.hasClass(a)&&!z.hasClass(o),v=z.hasClass(d);switch(this.get("selectionMode")){case ("single"):if(w){if(!v){this._clearSelection(true);this._addDateToSelection(this._nodeToDate(z));}}break;case ("multiple-sticky"):if(w){if(v){this._removeDateFromSelection(this._nodeToDate(z));}else{this._addDateToSelection(this._nodeToDate(z));}}break;case ("multiple"):if(!y.metaKey&&!y.ctrlKey&&!y.shiftKey){this._clearSelection(true);this._lastSelectedDate=this._nodeToDate(z);this._addDateToSelection(this._lastSelectedDate);}else{if(((h=="macintosh"&&y.metaKey)||(h!="macintosh"&&y.ctrlKey))&&!y.shiftKey){if(v){this._removeDateFromSelection(this._nodeToDate(z));this._lastSelectedDate=null;}else{this._lastSelectedDate=this._nodeToDate(z);this._addDateToSelection(this._lastSelectedDate);}}else{if(((h=="macintosh"&&y.metaKey)||(h!="macintosh"&&y.ctrlKey))&&y.shiftKey){if(this._lastSelectedDate!=null){var x=this._nodeToDate(z);this._addDateRangeToSelection(x,this._lastSelectedDate);this._lastSelectedDate=x;}else{this._lastSelectedDate=this._nodeToDate(z);this._addDateToSelection(this._lastSelectedDate);}}else{if(y.shiftKey){if(this._lastSelectedDate!=null){var x=this._nodeToDate(z);this._clearSelection(true);this._addDateRangeToSelection(x,this._lastSelectedDate);this._lastSelectedDate=x;}else{this._clearSelection(true);this._lastSelectedDate=this._nodeToDate(z);this._addDateToSelection(this._lastSelectedDate);}}}}}break;}if(w){this.fire("dateClick",{cell:z,date:this._nodeToDate(z)});}else{if(z.hasClass(a)){this.fire("prevMonthClick");}else{if(z.hasClass(o)){this.fire("nextMonthClick");}}}},subtractMonth:function(v){this.set("date",k.addMonths(this.get("date"),-1));v.halt();},subtractYear:function(v){this.set("date",k.addYears(this.get("date"),-1));v.halt();},addMonth:function(v){this.set("date",k.addMonths(this.get("date"),1));v.halt();},addYear:function(v){this.set("date",k.addYears(this.get("date"),1));v.halt();}},{NAME:"calendar",ATTRS:{selectionMode:{value:"single"},date:{value:new Date(),lazyAdd:false,setter:function(A){var w=this._normalizeDate(A),x=k.addMonths(w,this._paneNumber-1);var y=this.get("minimumDate");var z=this.get("maximumDate");if((y==null||k.isGreaterOrEqual(w,y))&&(z==null||k.isGreaterOrEqual(z,x))){return w;}else{if(y!=null&&k.isGreater(y,w)){return y;}else{if(z!=null&&k.isGreater(x,z)){var v=k.addMonths(z,-1*(this._paneNumber-1));return v;}}}}},minimumDate:{value:null,setter:function(x){if(x!=null){var w=this.get("date"),v=this._normalizeDate(x);if(w!=null&&!k.isGreaterOrEqual(w,v)){this.set("date",v);}return v;}else{return this._normalizeDate(x);}}},maximumDate:{value:null,setter:function(x){if(x!=null){var v=this.get("date"),w=this._normalizeDate(x);if(v!=null&&!k.isGreaterOrEqual(x,k.addMonths(v,this._paneNumber-1))){this.set("date",k.addMonths(w,-1*(this._paneNumber-1)));}return w;}else{return x;}}}}});},"@VERSION@",{requires:["calendar-base","calendarnavigator"],lang:["de","en","fr","ja","pt-BR","ru","zh-HANT-TW"]});
View
19 build/calendar/calendar.js
@@ -68,6 +68,11 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
*/
initializer : function () {
this.plug(Y.Plugin.CalendarNavigator);
+
+
+ this._keyEvents = [];
+ this._highlightedDateNode = null;
+ this._lastSelectedDate = null;
},
/**
@@ -108,9 +113,6 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
var newNode = this._dateToNode(oDate);
newNode.focus();
newNode.addClass(CAL_DAY_HILITED);
- //this._highlightedDateNode.set("tabIndex", -1);
-
-
},
/**
@@ -152,6 +154,7 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
*/
_focusCalendarCell : function (ev) {
this._highlightedDateNode = ev.target;
+ ev.stopPropagation();
},
/**
@@ -159,7 +162,8 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
* @method _focusCalendarGrid
* @protected
*/
- _focusCalendarGrid : function (ev) {
+ _focusCalendarGrid : function (ev) {
+ this._unhighlightCurrentDateNode();
this._highlightedDateNode = null;
},
@@ -175,7 +179,6 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
dayNum = 0,
dir = '';
-
switch(keyCode) {
case KEY_DOWN:
dayNum = 7;
@@ -211,14 +214,14 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
}
break;
}
+
+
+ if (keyCode == KEY_DOWN || keyCode == KEY_UP || keyCode == KEY_LEFT || keyCode == KEY_RIGHT) {
if (curDate == null) {
curDate = ydate.addMonths(this.get("date"), gridNum);
dayNum = 0;
}
-
-
- if (keyCode == KEY_DOWN || keyCode == KEY_UP || keyCode == KEY_LEFT || keyCode == KEY_RIGHT) {
ev.preventDefault();
var newDate = ydate.addDays(curDate, dayNum),
startDate = this.get("date"),
View
3  build/calendarnavigator/assets/skins/night/calendar-base-skin.css
@@ -1,7 +1,5 @@
.yui3-skin-night .yui3-calendar-content {
padding:10px;
- font-size:0.8em;
- font-family:"Lucida Grande", "Lucida Sans", Calibri, Helvetica, Arial, sans-serif;
color: #CBCBCB;
border: 1px solid #303030;
background: #151515; /* Old browsers */
@@ -35,6 +33,7 @@
.yui3-skin-night .yui3-calendar-day,
.yui3-skin-night .yui3-calendar-prevmonth-day,
.yui3-skin-night .yui3-calendar-nextmonth-day {
+ padding:5px;
border: 1px solid #151515;
background: #262727;
text-align:center;
View
3  build/calendarnavigator/assets/skins/sam/calendar-base-skin.css
@@ -1,7 +1,5 @@
.yui3-skin-sam .yui3-calendar-content {
padding:10px;
- font-size:0.8em;
- font-family:"Lucida Grande", "Lucida Sans", Calibri, Helvetica, Arial, sans-serif;
color: #000000;
border: 1px solid gray;
background: #f2f2f2; /* Old browsers */
@@ -34,6 +32,7 @@
.yui3-skin-sam .yui3-calendar-day,
.yui3-skin-sam .yui3-calendar-prevmonth-day,
.yui3-skin-sam .yui3-calendar-nextmonth-day {
+ padding:5px;
border: 1px solid #CCCCCC;
background: #FFFFFF;
text-align:center;
View
8 src/calendar/HISTORY.md
@@ -1,6 +1,14 @@
Calendar Change History
=======================
+3.5.0 - Updates
+---------------
+ * Calendar is now keyboard navigable [Ticket #2530348]
+ * Calendar skins have been updated [Tickets #2530720, [#2531110, #2531744]
+ * Calendar has received accessibility fixes
+ * CalendarNavigator plugin has been updated and now supports disabled button states
+ * Calendar got multiple new internationalization packages (de, fr, pt-BR, zh-HANT-TW)
+
3.4.1 - Bug Fix Release
-----------------------
View
3  src/calendar/assets/skins/night/calendar-base-skin.css
@@ -1,7 +1,5 @@
.yui3-skin-night .yui3-calendar-content {
padding:10px;
- font-size:0.8em;
- font-family:"Lucida Grande", "Lucida Sans", Calibri, Helvetica, Arial, sans-serif;
color: #CBCBCB;
border: 1px solid #303030;
background: #151515; /* Old browsers */
@@ -35,6 +33,7 @@
.yui3-skin-night .yui3-calendar-day,
.yui3-skin-night .yui3-calendar-prevmonth-day,
.yui3-skin-night .yui3-calendar-nextmonth-day {
+ padding:5px;
border: 1px solid #151515;
background: #262727;
text-align:center;
View
3  src/calendar/assets/skins/sam/calendar-base-skin.css
@@ -1,7 +1,5 @@
.yui3-skin-sam .yui3-calendar-content {
padding:10px;
- font-size:0.8em;
- font-family:"Lucida Grande", "Lucida Sans", Calibri, Helvetica, Arial, sans-serif;
color: #000000;
border: 1px solid gray;
background: #f2f2f2; /* Old browsers */
@@ -34,6 +32,7 @@
.yui3-skin-sam .yui3-calendar-day,
.yui3-skin-sam .yui3-calendar-prevmonth-day,
.yui3-skin-sam .yui3-calendar-nextmonth-day {
+ padding:5px;
border: 1px solid #CCCCCC;
background: #FFFFFF;
text-align:center;
View
19 src/calendar/js/calendar.js
@@ -66,6 +66,11 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
*/
initializer : function () {
this.plug(Y.Plugin.CalendarNavigator);
+
+
+ this._keyEvents = [];
+ this._highlightedDateNode = null;
+ this._lastSelectedDate = null;
},
/**
@@ -106,9 +111,6 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
var newNode = this._dateToNode(oDate);
newNode.focus();
newNode.addClass(CAL_DAY_HILITED);
- //this._highlightedDateNode.set("tabIndex", -1);
-
-
},
/**
@@ -150,6 +152,7 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
*/
_focusCalendarCell : function (ev) {
this._highlightedDateNode = ev.target;
+ ev.stopPropagation();
},
/**
@@ -157,7 +160,8 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
* @method _focusCalendarGrid
* @protected
*/
- _focusCalendarGrid : function (ev) {
+ _focusCalendarGrid : function (ev) {
+ this._unhighlightCurrentDateNode();
this._highlightedDateNode = null;
},
@@ -173,7 +177,6 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
dayNum = 0,
dir = '';
-
switch(keyCode) {
case KEY_DOWN:
dayNum = 7;
@@ -209,14 +212,14 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
}
break;
}
+
+
+ if (keyCode == KEY_DOWN || keyCode == KEY_UP || keyCode == KEY_LEFT || keyCode == KEY_RIGHT) {
if (curDate == null) {
curDate = ydate.addMonths(this.get("date"), gridNum);
dayNum = 0;
}
-
-
- if (keyCode == KEY_DOWN || keyCode == KEY_UP || keyCode == KEY_LEFT || keyCode == KEY_RIGHT) {
ev.preventDefault();
var newDate = ydate.addDays(curDate, dayNum),
startDate = this.get("date"),
View
14 src/loader/tests/loader-tests.js
@@ -968,7 +968,7 @@ YUI.add('loader-tests', function(Y) {
Assert.isNotNull(node1, 'Failed to load module 1');
Assert.isNotNull(node2, 'Failed to load module 2');
Assert.isNotNull(node3, 'Failed to load module 3');
-
+
if (Y.Get._env.async) {
//This browser supports the async property, check it
Assert.isFalse(node1.async, 'Async flag on node1 was set incorrectly');
@@ -976,9 +976,15 @@ YUI.add('loader-tests', function(Y) {
Assert.isTrue(node3.async, 'Async flag on node3 was set incorrectly');
} else {
//The async attribute is still
- Assert.isNull(node1.getAttribute('async'), 'Async flag on node1 was set incorrectly');
- Assert.isNull(node2.getAttribute('async'), 'Async flag on node2 was set incorrectly');
- Assert.isNotNull(node3.getAttribute('async'), 'Async flag on node3 was set incorrectly');
+ if (Y.UA.ie && Y.UA.ie > 8) {
+ Assert.isTrue(node3.async, 'Async flag on node3 was set incorrectly');
+ Assert.isUndefined(node1.async, 'Async flag on node1 was set incorrectly');
+ Assert.isUndefined(node2.async, 'Async flag on node2 was set incorrectly');
+ } else {
+ Assert.isNull(node1.getAttribute('async'), 'Async flag on node1 was set incorrectly');
+ Assert.isNull(node2.getAttribute('async'), 'Async flag on node2 was set incorrectly');
+ Assert.isNotNull(node3.getAttribute('async'), 'Async flag on node3 was set incorrectly');
+ }
}
});
});
View
6 src/uploader/HISTORY.md
@@ -1,10 +1,12 @@
-Uploader Utility Change History
-===============================
+Uploader Utility (New) Change History
+=====================================
3.5.0
* Added HTML5Uploader layer
* Refactored queue management out of Uploader
* Introduced new APIs (more details in documentation)
+ * Added keyboard access to the Flash layer
+ * Old uploader has been deprecated as 'uploader-deprecated' module.
3.4.1
-----

0 comments on commit e4310d4

Please sign in to comment.
Something went wrong with that request. Please try again.