Permalink
Browse files

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

  • Loading branch information...
2 parents 975af71 + a123bc8 commit e4310d4c4469468ec5512b465f4b0b4393cf5947 @lsmith lsmith committed Mar 5, 2012
@@ -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;
@@ -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}
@@ -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;
@@ -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}
@@ -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;
@@ -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;
@@ -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,14 +154,16 @@ Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {
*/
_focusCalendarCell : function (ev) {
this._highlightedDateNode = ev.target;
+ ev.stopPropagation();
},
/**
* Handler for gain of focus of calendar grid
* @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"),
Oops, something went wrong.

0 comments on commit e4310d4

Please sign in to comment.