fixed now highlight - bad previous commit

This commit is contained in:
g00fy-
2013-10-14 10:28:24 +02:00
parent e367fc670c
commit d323594873
3 changed files with 53 additions and 10 deletions

46
dist/index.css vendored
View File

@@ -129,7 +129,8 @@
background: none;
}
[date-picker] .active {
[date-picker] .active,
[date-picker] .now {
color: #ffffff;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
@@ -148,20 +149,59 @@
}
[date-picker] .active:hover,
[date-picker] .now:hover,
[date-picker] .active:active,
[date-picker] .now:active,
[date-picker] .active.active,
[date-picker] .now.active,
[date-picker] .active.disabled,
[date-picker] .active[disabled] {
[date-picker] .now.disabled,
[date-picker] .active[disabled],
[date-picker] .now[disabled] {
color: #ffffff;
background-color: #0044cc;
*background-color: #003bb3;
}
[date-picker] .active:active,
[date-picker] .active.active {
[date-picker] .now:active,
[date-picker] .active.active,
[date-picker] .now.active {
background-color: #003399 \9;
}
[date-picker] .now {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #ee735b;
*background-color: #ee905b;
background-image: -moz-linear-gradient(top, #ee5f5b, #ee905b);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#ee905b));
background-image: -webkit-linear-gradient(top, #ee5f5b, #ee905b);
background-image: -o-linear-gradient(top, #ee5f5b, #ee905b);
background-image: linear-gradient(to bottom, #ee5f5b, #ee905b);
background-repeat: repeat-x;
border-color: #ee905b #ee905b #e56218;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffee905b', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
}
[date-picker] .now:hover,
[date-picker] .now:active,
[date-picker] .now.active,
[date-picker] .now.disabled,
[date-picker] .now[disabled] {
color: #ffffff;
background-color: #ee905b;
*background-color: #ec8044;
}
[date-picker] .now:active,
[date-picker] .now.active {
background-color: #e9712d \9;
}
[date-picker] .disabled {
color: #999999 !important;
cursor: default;

15
dist/index.js vendored
View File

@@ -265,7 +265,10 @@ Module.directive('datePicker', function datePickerDirective(datePickerConfig) {
var now = scope.now;
//noinspection FallThroughInSwitchStatementJS
switch (scope.view) {
case 'hour':
case 'minutes':
is &= ~~(date.getMinutes()/step) === ~~(now.getMinutes()/step);
/*falls through*/
case 'hours':
is &= date.getHours() === now.getHours();
/*falls through*/
case 'date':
@@ -468,7 +471,7 @@ angular.module("datePicker").run(["$templateCache", function($templateCache) {
" <tbody>\n" +
" <tr ng-repeat=\"week in weeks\">\n" +
" <td ng-repeat=\"day in week\"\n" +
" ng-class=\"{'active':isSameDay(day),'disabled':(day.getMonth()!=date.getMonth()),'after':isAfter(day),'before':isBefore(day)}\"\n" +
" ng-class=\"{'now':isNow(day),'active':isSameDay(day),'disabled':(day.getMonth()!=date.getMonth()),'after':isAfter(day),'before':isBefore(day)}\"\n" +
" ng-click=\"setDate(day)\" ng-bind=\"day.getDate()\">\n" +
" </td>\n" +
" </tr>\n" +
@@ -487,7 +490,7 @@ angular.module("datePicker").run(["$templateCache", function($templateCache) {
" <tbody>\n" +
" <tr>\n" +
" <td colspan=\"7\">\n" +
" <span ng-class=\"{'active':isSameYear(year),'btn-danger':isNow(year)}\"\n" +
" <span ng-class=\"{'active':isSameYear(year),'now':isNow(year)}\"\n" +
" ng-repeat=\"year in years\"\n" +
" ng-click=\"setDate(year)\" ng-bind=\"year.getFullYear()\"></span>\n" +
"\n" +
@@ -510,7 +513,7 @@ angular.module("datePicker").run(["$templateCache", function($templateCache) {
" <tr>\n" +
" <td colspan=\"7\">\n" +
" <span ng-repeat=\"month in months\"\n" +
" ng-class=\"{'active':isSameMonth(month),'after':isAfter(month),'before':isBefore(month),'btn-danger':isNow(month)}\"\n" +
" ng-class=\"{'active':isSameMonth(month),'after':isAfter(month),'before':isBefore(month),'now':isNow(month)}\"\n" +
" ng-click=\"setDate(month)\">{{month|date:'MMM'}}</span>\n" +
"\n" +
" </td>\n" +
@@ -531,7 +534,7 @@ angular.module("datePicker").run(["$templateCache", function($templateCache) {
" <tr>\n" +
" <td colspan=\"7\">\n" +
" <span ng-repeat=\"hour in hours\"\n" +
" ng-class=\"{'old':isOldHour(hour),'new':isNewHour(hour),'active':isSameHour(hour)}\"\n" +
" ng-class=\"{'now':isNow(hour),'active':isSameHour(hour)}\"\n" +
" ng-click=\"setDate(hour)\" ng-bind=\"hour.getHours()+':00'\"></span>\n" +
" </td>\n" +
" </tr>\n" +
@@ -552,7 +555,7 @@ angular.module("datePicker").run(["$templateCache", function($templateCache) {
" <tr>\n" +
" <td colspan=\"7\">\n" +
" <span ng-repeat=\"minute in minutes\"\n" +
" ng-class=\"{active:isSameMinutes(minute)}\"\n" +
" ng-class=\"{active:isSameMinutes(minute),'now':isNow(minute)}\"\n" +
" ng-click=\"setDate(minute)\">{{minute|date:\"HH:mm\"}}</span>\n" +
" </td>\n" +
" </tr>\n" +

2
dist/index.min.css vendored

File diff suppressed because one or more lines are too long