From 41ab3cadc0026a9954ca0736868d42a9a8f60ac1 Mon Sep 17 00:00:00 2001 From: iFish Date: Tue, 9 Sep 2014 22:28:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=8E=86=E5=8F=AF=E8=AE=A2=E7=A5=A8?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E5=A2=9E=E5=8A=A0=E9=A2=9C=E8=89=B2=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web12306/css/ui/date-selector.css | 69 +++++++++++++++------------ Web12306/css/ui/index-search-base.css | 7 +-- Web12306/js/ui/widget_datedropdown.js | 5 ++ 3 files changed, 47 insertions(+), 34 deletions(-) diff --git a/Web12306/css/ui/date-selector.css b/Web12306/css/ui/date-selector.css index be040d6..3b07860 100644 --- a/Web12306/css/ui/date-selector.css +++ b/Web12306/css/ui/date-selector.css @@ -98,11 +98,12 @@ line-height: 28px; text-align: center; } - .date-bar-wrap .date-bar .date-bar-list li.disabled { - background-color: #cccccc; - color: #aaaaaa; - cursor: not-allowed; - } + + .date-bar-wrap .date-bar .date-bar-list li.disabled { + background-color: #cccccc; + color: #aaaaaa; + cursor: not-allowed; + } .date-bar-wrap .date-bar .date-bar-list li h5 { font-weight: bold; @@ -132,29 +133,29 @@ border-top-color: #dfdfdf; } - .date-bar-wrap .date-bar .date-bar-list li.selected:after, - .date-bar-wrap .date-bar .date-bar-list li.selected:before { - content: ''; - position: absolute; - width: 0; - height: 0; - border-bottom: 5px solid #c6701a; - border-left: 5px solid transparent; - border-right: 5px solid transparent; - top: 100%; - left: 50%; - margin-left: -5px; - margin-top: -1px; - } + .date-bar-wrap .date-bar .date-bar-list li.selected:after, + .date-bar-wrap .date-bar .date-bar-list li.selected:before { + content: ''; + position: absolute; + width: 0; + height: 0; + border-bottom: 5px solid #c6701a; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + top: 100%; + left: 50%; + margin-left: -5px; + margin-top: -1px; + } - .date-bar-wrap .date-bar .date-bar-list li.selected:after { - border-bottom: 5px solid #f5f5f5; - margin-top: 0; - } + .date-bar-wrap .date-bar .date-bar-list li.selected:after { + border-bottom: 5px solid #f5f5f5; + margin-top: 0; + } - .date-bar-wrap .date-bar .date-bar-list li.selected + li { - border-left: 1px solid #d67e29; - } + .date-bar-wrap .date-bar .date-bar-list li.selected + li { + border-left: 1px solid #d67e29; + } .date-bar-wrap .date-bar .date-bar-list li:last-child { } @@ -213,16 +214,22 @@ cursor: pointer; } - /*.date-selector table td:active { + /*.date-selector table td:active { background-color: #f78800; color: #ffffff; cursor: pointer; }*/ - .date-selector .date-current { - color: #f78800; - font-weight: bold; - } + .date-selector .date-current { + color: #f78800; + font-weight: bold; + } + + .date-selector .date-commonavailable { + color: #d8a15e; + background-color: #FFF1E0; + font-weight: bold; + } .date-selector .date-notavailable { background-color: #ffffff; diff --git a/Web12306/css/ui/index-search-base.css b/Web12306/css/ui/index-search-base.css index 11c626e..6bb8526 100644 --- a/Web12306/css/ui/index-search-base.css +++ b/Web12306/css/ui/index-search-base.css @@ -228,13 +228,14 @@ border-top: 1px solid#e9e8e2; border-right: 1px solid#e9e8e2; border-bottom: 1px solid#e9e8e2; - border-left: 1px solid#e9e8e2; + border-left: none; background-color: #fbfbfb; - right: 5px; + right: 0; color: #898989; padding: 8px 8px 8px 15px; text-decoration: underline; float: right; + position: relative; } .search-more-option:hover { @@ -252,7 +253,7 @@ width: 1px; height: 0; border-top: 16px #e9e8e2 solid; - border-left: 7px solid #fdfbf2; + border-left: 7px solid rgba(255, 249, 233, 255); top: 0; border-bottom: 16px #e9e8e2 solid; } diff --git a/Web12306/js/ui/widget_datedropdown.js b/Web12306/js/ui/widget_datedropdown.js index adf9346..f5c1db2 100644 --- a/Web12306/js/ui/widget_datedropdown.js +++ b/Web12306/js/ui/widget_datedropdown.js @@ -1,4 +1,5 @@ define(function (require, exports, module) { + var param = require("../data.js"); var getCurDate = function () { var now = new Date(); //now = new Date(Math.floor(now.getTime() / 86400000) * 86400000); @@ -23,6 +24,8 @@ var currentDate = getCurDate(); var dateTmp = calendarBegin; + var minTime = param.minDate.getTime(); + var maxTime = param.maxDate.getTime(); for (var i = 0; i < 42; i++) { var cell = cells.eq(i); cell.html(dateTmp.getDate()); @@ -32,6 +35,8 @@ } if (dateTmp.getTime() === currentDate.getTime()) { cell.addClass("date-current"); + } else if (dateTmp.getTime() <= maxTime && dateTmp.getTime() >= minTime) { + cell.addClass("date-commonavailable"); } cell.attr("data-date", getDateString(dateTmp)); dateTmp = new Date(dateTmp.getTime() + 86400000);