From 21b4baceaacfd0757960779600376198a827796e Mon Sep 17 00:00:00 2001 From: ThomasJ Date: Mon, 25 Jan 2016 19:35:25 +0900 Subject: [PATCH] ax5calendar 0.2.0 --- bower.json | 2 +- dist/ax5calendar.css | 2 +- dist/ax5calendar.min.js | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bower.json b/bower.json index 085ed92..ddf568e 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "bootstrap-ax5calendar", - "version": "0.1.0", + "version": "0.2.0", "authors": [ "ThomasJ " ], diff --git a/dist/ax5calendar.css b/dist/ax5calendar.css index 39457df..5a5f6fc 100644 --- a/dist/ax5calendar.css +++ b/dist/ax5calendar.css @@ -1 +1 @@ -@-webkit-keyframes ax5-ui-calendar-fadeout{from{opacity:1.0}to{opacity:0.0}}@-moz-keyframes ax5-ui-calendar-fadeout{from{opacity:1.0}to{opacity:0.0}}@keyframes ax5-ui-calendar-fadeout{from{opacity:1.0}to{opacity:0.0}}@-webkit-keyframes ax5-ui-calendar-fadein{from{opacity:0.0}to{opacity:1.0}}@-moz-keyframes ax5-ui-calendar-fadein{from{opacity:0.0}to{opacity:1.0}}@keyframes ax5-ui-calendar-fadein{from{opacity:0.0}to{opacity:1.0}}.ax5-ui-calendar{box-sizing:border-box;position:relative}.ax5-ui-calendar .calendar-control{position:relative;box-sizing:content-box;background-color:#f5f5f5;background-image:-webkit-linear-gradient(bottom, #f5f5f5);background-image:linear-gradient(to top,#f5f5f5);border:1px solid #ddd;border-radius:5px;font-size:18px;margin-bottom:5px;color:#333}.ax5-ui-calendar .calendar-control .date-move-left,.ax5-ui-calendar .calendar-control .date-move-right{display:block;position:absolute;overflow:hidden;text-align:center;font-size:22px;cursor:pointer;text-decoration:none}.ax5-ui-calendar .calendar-control .date-move-left i,.ax5-ui-calendar .calendar-control .date-move-left span,.ax5-ui-calendar .calendar-control .date-move-right i,.ax5-ui-calendar .calendar-control .date-move-right span{line-height:inherit}.ax5-ui-calendar .calendar-control .date-move-left{left:0px;top:0px}.ax5-ui-calendar .calendar-control .date-move-right{right:0px;top:0px}.ax5-ui-calendar .calendar-control .date-display{text-align:center}.ax5-ui-calendar .calendar-control .date-display [data-calendar-display]{margin:0px 10px;cursor:pointer;text-decoration:underline}.ax5-ui-calendar .calendar-control a{color:#333}.ax5-ui-calendar .calendar-control a:hover{color:#337ab7}.ax5-ui-calendar .calendar-body.fadein{-webkit-animation:ax5-ui-calendar-fadein 0.3s ease-in-out;-moz-animation:ax5-ui-calendar-fadein 0.3s ease-in-out;animation:ax5-ui-calendar-fadein 0.3s ease-in-out;opacity:1.0}.ax5-ui-calendar .calendar-body.fadeout{-webkit-animation:ax5-ui-calendar-fadeout 0.3s ease-in-out;-moz-animation:ax5-ui-calendar-fadeout 0.3s ease-in-out;animation:ax5-ui-calendar-fadeout 0.3s ease-in-out;opacity:0.0}.ax5-ui-calendar .calendar-body table{box-sizing:border-box;table-layout:fixed;border-collapse:collapse;border-spacing:0px}.ax5-ui-calendar .calendar-body table thead td,.ax5-ui-calendar .calendar-body table thead th{box-sizing:border-box;vertical-align:middle;line-height:1em;cursor:pointer;text-align:center;font-size:12px;padding:10px 2px;border:0px none;background-color:#fff;background-image:-webkit-linear-gradient(bottom, #fff,#fff);background-image:linear-gradient(to top,#fff,#fff);color:#6D6E70}.ax5-ui-calendar .calendar-body table thead td.calendar-col-0,.ax5-ui-calendar .calendar-body table thead th.calendar-col-0{color:#C78B81}.ax5-ui-calendar .calendar-body table thead td.calendar-col-6,.ax5-ui-calendar .calendar-body table thead th.calendar-col-6{color:#32B4DC}.ax5-ui-calendar .calendar-body table tbody td,.ax5-ui-calendar .calendar-body table tbody th{box-sizing:border-box;vertical-align:middle;line-height:1em;cursor:pointer;text-align:center;font-size:14px;border:0px none;background-color:#fff;background-image:-webkit-linear-gradient(bottom, #fff,#fff);background-image:linear-gradient(to top,#fff,#fff);overflow:hidden}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day{position:relative;display:block;width:100%;height:100%;vertical-align:middle;border-radius:5px;overflow:hidden;line-height:inherit;background-color:#fff;background-image:-webkit-linear-gradient(bottom, #fff,#fff);background-image:linear-gradient(to top,#fff,#fff);color:#C3C4C6;font-size:16px}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day span.addon,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day span.addon{position:absolute;left:0px;top:0px;width:100%;text-align:center;line-height:10px}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day span.lunar,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day span.lunar{position:absolute;left:0px;bottom:3px;width:100%;text-align:center;font-size:12px;color:#eee;line-height:12px}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.live,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.live{background-color:#F0F0F0;background-image:-webkit-linear-gradient(bottom, #F0F0F0,#F0F0F0);background-image:linear-gradient(to top,#F0F0F0,#F0F0F0);color:#6D6E70}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.live span.addon,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.live span.addon{color:#A1A1A1}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.live span.lunar,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.live span.lunar{color:#A1A1A1}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.focus,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.focus{background-color:#E67241;background-image:-webkit-linear-gradient(bottom, #E67241,#E67241);background-image:linear-gradient(to top,#E67241,#E67241);color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.focus span.addon,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.focus span.addon{color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.focus span.lunar,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.focus span.lunar{color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.focus.hover,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.focus.hover{background-color:#32B4DC;background-image:-webkit-linear-gradient(bottom, #32B4DC,#32B4DC);background-image:linear-gradient(to top,#32B4DC,#32B4DC);color:#fff !important}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.focus.hover span.addon,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.focus.hover span.addon{color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.focus.hover span.lunar,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.focus.hover span.lunar{color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.selected,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.selected{background-color:#32B4DC;background-image:-webkit-linear-gradient(bottom, #32B4DC,#32B4DC);background-image:linear-gradient(to top,#32B4DC,#32B4DC);color:#fff !important}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.selected span.addon,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.selected span.addon{color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.selected span.lunar,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.selected span.lunar{color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.disable,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.disable{background-color:#fff;background-image:-webkit-linear-gradient(bottom, #fff,#fff);background-image:linear-gradient(to top,#fff,#fff);color:#dddedf}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-month,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-month{display:block;width:100%;height:100%;vertical-align:middle;border-radius:5px;overflow:hidden;line-height:inherit;background-color:#fff;background-image:-webkit-linear-gradient(bottom, #fff,#fff);background-image:linear-gradient(to top,#fff,#fff);color:#C3C4C6;font-size:16px}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-month.live,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-month.live{background-color:#F0F0F0;background-image:-webkit-linear-gradient(bottom, #F0F0F0,#F0F0F0);background-image:linear-gradient(to top,#F0F0F0,#F0F0F0);color:#6D6E70}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-month.hover,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-month.hover{background-color:#32B4DC;background-image:-webkit-linear-gradient(bottom, #32B4DC,#32B4DC);background-image:linear-gradient(to top,#32B4DC,#32B4DC);color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-month.focus,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-month.focus{background-color:#E67241;background-image:-webkit-linear-gradient(bottom, #E67241,#E67241);background-image:linear-gradient(to top,#E67241,#E67241);color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-year,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-year{display:block;width:100%;height:100%;vertical-align:middle;border-radius:5px;overflow:hidden;line-height:inherit;background-color:#fff;background-image:-webkit-linear-gradient(bottom, #fff,#fff);background-image:linear-gradient(to top,#fff,#fff);color:#C3C4C6;font-size:16px}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-year.live,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-year.live{background-color:#F0F0F0;background-image:-webkit-linear-gradient(bottom, #F0F0F0,#F0F0F0);background-image:linear-gradient(to top,#F0F0F0,#F0F0F0);color:#6D6E70}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-year.hover,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-year.hover{background-color:#32B4DC;background-image:-webkit-linear-gradient(bottom, #32B4DC,#32B4DC);background-image:linear-gradient(to top,#32B4DC,#32B4DC);color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-year.focus,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-year.focus{background-color:#E67241;background-image:-webkit-linear-gradient(bottom, #E67241,#E67241);background-image:linear-gradient(to top,#E67241,#E67241);color:#fff}.ax5-ui-calendar .calendar-body table tbody td.calendar-col-0 .calendar-item-day.live,.ax5-ui-calendar .calendar-body table tbody th.calendar-col-0 .calendar-item-day.live{color:#C78B81}.ax5-ui-calendar .calendar-body table tbody td.calendar-col-6 .calendar-item-day.live,.ax5-ui-calendar .calendar-body table tbody th.calendar-col-6 .calendar-item-day.live{color:#32B4DC} +@-webkit-keyframes ax5-ui-calendar-fadeout{from{opacity:1.0}to{opacity:0.0}}@-moz-keyframes ax5-ui-calendar-fadeout{from{opacity:1.0}to{opacity:0.0}}@keyframes ax5-ui-calendar-fadeout{from{opacity:1.0}to{opacity:0.0}}@-webkit-keyframes ax5-ui-calendar-fadein{from{opacity:0.0}to{opacity:1.0}}@-moz-keyframes ax5-ui-calendar-fadein{from{opacity:0.0}to{opacity:1.0}}@keyframes ax5-ui-calendar-fadein{from{opacity:0.0}to{opacity:1.0}}.ax5-ui-calendar{box-sizing:border-box;position:relative}.ax5-ui-calendar .calendar-control{position:relative;box-sizing:content-box;background-color:#f5f5f5;background-image:-webkit-linear-gradient(bottom, #f5f5f5);background-image:linear-gradient(to top,#f5f5f5);border:1px solid #ddd;border-radius:5px;font-size:18px;margin-bottom:5px;color:#333}.ax5-ui-calendar .calendar-control .date-move-left,.ax5-ui-calendar .calendar-control .date-move-right{display:block;position:absolute;overflow:hidden;text-align:center;font-size:22px;cursor:pointer;text-decoration:none}.ax5-ui-calendar .calendar-control .date-move-left i,.ax5-ui-calendar .calendar-control .date-move-left span,.ax5-ui-calendar .calendar-control .date-move-right i,.ax5-ui-calendar .calendar-control .date-move-right span{line-height:inherit}.ax5-ui-calendar .calendar-control .date-move-left{left:0px;top:0px}.ax5-ui-calendar .calendar-control .date-move-right{right:0px;top:0px}.ax5-ui-calendar .calendar-control .date-display{text-align:center}.ax5-ui-calendar .calendar-control .date-display [data-calendar-display]{margin:0px 10px;cursor:pointer;text-decoration:underline}.ax5-ui-calendar .calendar-control a{color:#333}.ax5-ui-calendar .calendar-control a:hover{color:#337ab7}.ax5-ui-calendar .calendar-body.fadein{-webkit-animation:ax5-ui-calendar-fadein 0.3s ease-in-out;-moz-animation:ax5-ui-calendar-fadein 0.3s ease-in-out;animation:ax5-ui-calendar-fadein 0.3s ease-in-out;opacity:1.0}.ax5-ui-calendar .calendar-body.fadeout{-webkit-animation:ax5-ui-calendar-fadeout 0.3s ease-in-out;-moz-animation:ax5-ui-calendar-fadeout 0.3s ease-in-out;animation:ax5-ui-calendar-fadeout 0.3s ease-in-out;opacity:0.0}.ax5-ui-calendar .calendar-body table{box-sizing:border-box;table-layout:fixed;border-collapse:collapse;border-spacing:0px}.ax5-ui-calendar .calendar-body table thead td,.ax5-ui-calendar .calendar-body table thead th{box-sizing:border-box;vertical-align:middle;line-height:1em;cursor:pointer;text-align:center;font-size:12px;padding:10px 2px;border:0px none;background-color:#fff;background-image:-webkit-linear-gradient(bottom, #fff,#fff);background-image:linear-gradient(to top,#fff,#fff);color:#6D6E70}.ax5-ui-calendar .calendar-body table thead td.calendar-col-0,.ax5-ui-calendar .calendar-body table thead th.calendar-col-0{color:#C78B81}.ax5-ui-calendar .calendar-body table thead td.calendar-col-6,.ax5-ui-calendar .calendar-body table thead th.calendar-col-6{color:#32B4DC}.ax5-ui-calendar .calendar-body table tbody td,.ax5-ui-calendar .calendar-body table tbody th{box-sizing:border-box;vertical-align:middle;line-height:1em;cursor:pointer;text-align:center;font-size:14px;border:0px none;background-color:#fff;background-image:-webkit-linear-gradient(bottom, #fff,#fff);background-image:linear-gradient(to top,#fff,#fff);overflow:hidden}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day{position:relative;display:block;width:100%;height:100%;vertical-align:middle;border-radius:5px;overflow:hidden;line-height:inherit;background-color:#fff;background-image:-webkit-linear-gradient(bottom, #fff,#fff);background-image:linear-gradient(to top,#fff,#fff);color:#C3C4C6;font-size:16px}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day span.addon,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day span.addon{position:absolute;left:0px;top:0px;width:100%;text-align:center;line-height:10px}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day span.lunar,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day span.lunar{position:absolute;left:0px;bottom:3px;width:100%;text-align:center;font-size:12px;color:#eee;line-height:12px}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.live,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.live{background-color:#F0F0F0;background-image:-webkit-linear-gradient(bottom, #F0F0F0,#F0F0F0);background-image:linear-gradient(to top,#F0F0F0,#F0F0F0);color:#6D6E70}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.live span.addon,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.live span.addon{color:#A1A1A1}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.live span.lunar,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.live span.lunar{color:#A1A1A1}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.focus,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.focus{background-color:#E67241;background-image:-webkit-linear-gradient(bottom, #E67241,#E67241);background-image:linear-gradient(to top,#E67241,#E67241);color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.focus span.addon,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.focus span.addon{color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.focus span.lunar,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.focus span.lunar{color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.focus.hover,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.focus.hover{background-color:#32B4DC;background-image:-webkit-linear-gradient(bottom, #32B4DC,#32B4DC);background-image:linear-gradient(to top,#32B4DC,#32B4DC);color:#fff !important}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.focus.hover span.addon,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.focus.hover span.addon{color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.focus.hover span.lunar,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.focus.hover span.lunar{color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.hover,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.hover{background-color:#32B4DC;background-image:-webkit-linear-gradient(bottom, #32B4DC,#32B4DC);background-image:linear-gradient(to top,#32B4DC,#32B4DC);color:#fff !important}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.hover span.addon,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.hover span.addon{color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.hover span.lunar,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.hover span.lunar{color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-day.disable,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-day.disable{background-color:#fff;background-image:-webkit-linear-gradient(bottom, #fff,#fff);background-image:linear-gradient(to top,#fff,#fff);color:#dddedf}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-month,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-month{display:block;width:100%;height:100%;vertical-align:middle;border-radius:5px;overflow:hidden;line-height:inherit;background-color:#fff;background-image:-webkit-linear-gradient(bottom, #fff,#fff);background-image:linear-gradient(to top,#fff,#fff);color:#C3C4C6;font-size:16px}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-month.live,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-month.live{background-color:#F0F0F0;background-image:-webkit-linear-gradient(bottom, #F0F0F0,#F0F0F0);background-image:linear-gradient(to top,#F0F0F0,#F0F0F0);color:#6D6E70}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-month.hover,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-month.hover{background-color:#32B4DC;background-image:-webkit-linear-gradient(bottom, #32B4DC,#32B4DC);background-image:linear-gradient(to top,#32B4DC,#32B4DC);color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-month.focus,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-month.focus{background-color:#E67241;background-image:-webkit-linear-gradient(bottom, #E67241,#E67241);background-image:linear-gradient(to top,#E67241,#E67241);color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-year,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-year{display:block;width:100%;height:100%;vertical-align:middle;border-radius:5px;overflow:hidden;line-height:inherit;background-color:#fff;background-image:-webkit-linear-gradient(bottom, #fff,#fff);background-image:linear-gradient(to top,#fff,#fff);color:#C3C4C6;font-size:16px}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-year.live,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-year.live{background-color:#F0F0F0;background-image:-webkit-linear-gradient(bottom, #F0F0F0,#F0F0F0);background-image:linear-gradient(to top,#F0F0F0,#F0F0F0);color:#6D6E70}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-year.hover,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-year.hover{background-color:#32B4DC;background-image:-webkit-linear-gradient(bottom, #32B4DC,#32B4DC);background-image:linear-gradient(to top,#32B4DC,#32B4DC);color:#fff}.ax5-ui-calendar .calendar-body table tbody td .calendar-item-year.focus,.ax5-ui-calendar .calendar-body table tbody th .calendar-item-year.focus{background-color:#E67241;background-image:-webkit-linear-gradient(bottom, #E67241,#E67241);background-image:linear-gradient(to top,#E67241,#E67241);color:#fff}.ax5-ui-calendar .calendar-body table tbody td.calendar-col-0 .calendar-item-day.live,.ax5-ui-calendar .calendar-body table tbody th.calendar-col-0 .calendar-item-day.live{color:#C78B81}.ax5-ui-calendar .calendar-body table tbody td.calendar-col-6 .calendar-item-day.live,.ax5-ui-calendar .calendar-body table tbody th.calendar-col-6 .calendar-item-day.live{color:#32B4DC} diff --git a/dist/ax5calendar.min.js b/dist/ax5calendar.min.js index 0e530ce..a500cc9 100755 --- a/dist/ax5calendar.min.js +++ b/dist/ax5calendar.min.js @@ -1 +1 @@ -!function(t,e){var a=ax5.util,i=function(){var t,i=this,n=1;this.main=function(){e&&e.call(this),this.config={clickEventName:"click",theme:"default",mode:"day",dateFormat:"yyyy-mm-dd",displayDate:new Date,animateTime:250,dimensions:{controlHeight:"40px",controlButtonWidth:"40px",itemPadding:2},lang:{yearHeading:"Choose the year",monthHeading:"Choose the month",year:"%s",month:["January","February","March","April","May","June","July","August","September","October","November","December"],day:"%s"},multipleSelect:!1}}.apply(this,arguments),this.target=null,this.selection=[],t=this.config,this.printedDay={start:"",end:""},this.init=function(){t.target||console.log(ax5.info.getError("ax5calendar","401","setConfig")),this.target=jQuery(t.target),t.displayDate=a.date(t.displayDate),this.target.html(this.getFrame()),this.$={root:this.target.find('[data-calendar-els="root"]'),control:this.target.find('[data-calendar-els="control"]'),"control-display":this.target.find('[data-calendar-els="control-display"]'),body:this.target.find('[data-calendar-els="body"]')},t.control&&this.$.control.find("[data-calendar-move]").on(t.clickEventName,function(t){this.move(t||window.event)}.bind(this)),"day"===t.mode||"d"===t.mode?this.printDay(t.displayDate):"month"===t.mode||"m"===t.mode?this.printMonth(t.displayDate):("year"===t.mode||"y"===t.mode)&&this.printYear(t.displayDate)},this.getFrame=function(){var e=[];if(e.push('
'),t.control){var i={},n={};n.height=i.height=a.cssNumber(t.dimensions.controlHeight),n["line-height"]=i["line-height"]=a.cssNumber(t.dimensions.controlHeight),n.width=a.cssNumber(t.dimensions.controlHeight),e.push('
'),e.push(''+t.control.left+""),e.push('
'),e.push(''+t.control.right+""),e.push("
")}return e.push('
'),e.push("
"),e.join("")},this.setDisplay=function(){if(t.control){var e=a.date(t.displayDate),i="",n="";if("day"==t.mode||"d"==t.mode)t.control.yearTmpl&&(i=t.control.yearTmpl.replace("%s",e.getFullYear())),t.control.monthTmpl&&(n=t.control.monthTmpl.replace("%s",t.lang.month[e.getMonth()])),this.$["control-display"].html(function(){return t.control.yearFirst?''+i+''+n+"":''+n+''+i+""}());else if("month"==t.mode||"m"==t.mode)t.control.yearTmpl&&(i=t.control.yearTmpl.replace("%s",e.getFullYear())),this.$["control-display"].html(''+i+"");else if("year"==t.mode||"y"==t.mode){var d=t.control.yearTmpl.replace("%s",e.getFullYear()-10),s=t.control.yearTmpl.replace("%s",Number(e.getFullYear())+9);this.$["control-display"].html(d+" ~ "+s)}this.$["control-display"].find("[data-calendar-display]").on(t.clickEventName,function(t){if(target=a.findParentNode(t.target,function(t){return t.getAttribute("data-calendar-display")?!0:void 0}),target){var e=target.getAttribute("data-calendar-display");this.changeMode(e)}}.bind(this))}},this.printDay=function(e){var n,d,s,l=a.date(e),r=[],o=new Date(l.getFullYear(),l.getMonth(),1,12),h=t.displayDate,c=function(){var t=o.getDay();return 0==t&&(t=7),a.date(o,{add:{d:-t}})}(),p=l.getMonth(),u=(l.getDate(),{}),m=this.$.body.width(),y=Math.floor(m*(6/7));for(t.dimensions.height&&(y=a.number(t.dimensions.height)),u.height=Math.floor(y/6)-2*a.number(t.dimensions.itemPadding)+"px",u["line-height"]=u.height,u.padding=a.cssNumber(t.dimensions.itemPadding),r.push(''),r.push(""),r.push(""),s=0;7>s;)r.push('"),s++;for(r.push(""),r.push(""),r.push(""),n=c,d=0;6>d;){for(r.push(""),s=0;7>s;)r.push('"),s++,n=a.date(n,{add:{d:1}});r.push(""),d++}if(r.push(""),r.push("
'),r.push(ax5.info.weekNames[s].label),r.push("
'),r.push(''+t.lang.day.replace("%s",n.getDate())+''),r.push("
"),this.$.body.html(r.join("")),this.$.body.find("[data-calendar-item-date]").on(t.clickEventName,function(t){t=t||window.event,i.onclick(t);try{t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0}catch(t){}return!1}),this.printedDay={start:c,end:n},t.onStateChanged){var g={action:"printDay",printedDay:this.printedDay};t.onStateChanged.call(g,g)}this.setDisplay()},this.printMonth=function(e){var n,d,s,l=a.date(e),r=l.getMonth(),o=[],h={},c=this.$.body.width(),p=Math.floor(c*(6/7));for(t.dimensions.height&&(p=a.number(t.dimensions.height)),h.height=Math.floor(p/4)-2*a.number(t.dimensions.itemPadding)+"px",h["line-height"]=h.height,h.padding=a.cssNumber(t.dimensions.itemPadding),o.push(''),o.push(""),o.push(""),o.push('"),o.push(""),o.push(""),o.push(""),s=0,n=0;4>n;){for(o.push(""),d=0;3>d;)o.push('"),s++,d++;o.push(""),n++}o.push(""),o.push("
'+t.lang.monthHeading+"
'),o.push(''+t.lang.month[s]+""),o.push("
"),this.$.body.html(o.join("")),this.$.body.find("[data-calendar-item-month]").on(t.clickEventName,function(t){if(t=t||window.event,target=a.findParentNode(t.target,function(t){return t.getAttribute("data-calendar-item-month")?!0:void 0}),target){value=target.getAttribute("data-calendar-item-month"),i.changeMode("day",value);try{t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0}catch(t){}return!1}}),this.setDisplay()},this.printYear=function(e){var n,d,s=a.date(e),l=s.getFullYear(),r=[],o={},h=this.$.body.width(),c=Math.floor(h*(6/7));for(t.dimensions.height&&(c=a.number(t.dimensions.height)),o.height=Math.floor(c/5)-2*a.number(t.dimensions.itemPadding)+"px",o["line-height"]=o.height,o.padding=a.cssNumber(t.dimensions.itemPadding),r.push(''),r.push(""),r.push(""),r.push('"),r.push(""),r.push(""),r.push(""),y=l-10,n=0;5>n;){for(r.push(""),d=0;4>d;)r.push('"),y++,d++;r.push(""),n++}r.push(""),r.push("
'+t.lang.yearHeading+"
'),r.push(''+t.lang.year.replace("%s",y)+""),r.push("
"),this.$.body.html(r.join("")),this.$.body.find("[data-calendar-item-year]").on(t.clickEventName,function(t){if(t=t||window.event,target=a.findParentNode(t.target,function(t){return t.getAttribute("data-calendar-item-year")?!0:void 0}),target){value=target.getAttribute("data-calendar-item-year"),i.changeMode("month",value);try{t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0}catch(t){}return!1}}),this.setDisplay()},this.onclick=function(e,d,s){if(d=a.findParentNode(e.target,function(t){return t.getAttribute("data-calendar-item-date")?!0:void 0})){s=d.getAttribute("data-calendar-item-date");var l=a.date(s,{"return":t.dateFormat}),r=!0;if(t.selectable&&(t.selectable[l]||(r=!1)),r){if(n=t.multipleSelect?a.isNumber(t.multipleSelect)?t.multipleSelect:2:1,i.selection.length>=n){var o=i.selection.splice(0,i.selection.length-(n-1));o.forEach(function(e){i.$.body.find('[data-calendar-item-date="'+a.date(e,{"return":t.dateFormat})+'"]').removeClass("selected")})}jQuery(d).addClass("selected"),i.selection.push(s),t.onClick&&t.onClick.call({date:s,target:this.target,dateElement:d})}}},this.move=function(e,i,n){i=a.findParentNode(e.target,function(t){return t.getAttribute("data-calendar-move")?!0:void 0}),i&&(n=i.getAttribute("data-calendar-move"),"day"==t.mode?("left"==n?t.displayDate=a.date(t.displayDate,{add:{m:-1}}):t.displayDate=a.date(t.displayDate,{add:{m:1}}),this.printDay(t.displayDate)):"month"==t.mode?("left"==n?t.displayDate=a.date(t.displayDate,{add:{y:-1}}):t.displayDate=a.date(t.displayDate,{add:{y:1}}),this.printMonth(t.displayDate)):"year"==t.mode&&("left"==n?t.displayDate=a.date(t.displayDate,{add:{y:-10}}):t.displayDate=a.date(t.displayDate,{add:{y:10}}),this.printYear(t.displayDate)))},this.changeMode=function(e,a){"undefined"!=typeof a&&(t.displayDate=a),t.mode=e,this.$.body.removeClass("fadein").addClass("fadeout"),setTimeout(function(){"day"==t.mode?this.printDay(t.displayDate):"month"==t.mode?this.printMonth(t.displayDate):"year"==t.mode&&this.printYear(t.displayDate),this.$.body.removeClass("fadeout").addClass("fadein")}.bind(this),t.animateTime)},this.setDisplayDate=function(e){t.displayDate=a.date(e),this.$.body.removeClass("fadein").addClass("fadeout"),setTimeout(function(){"day"==t.mode?this.printDay(t.displayDate):"month"==t.mode?this.printMonth(t.displayDate):"year"==t.mode&&this.printYear(t.displayDate),this.$.body.removeClass("fadeout").addClass("fadein")}.bind(this),t.animateTime)},this.setSelection=function(e){return a.isArray(e)?(n=t.multipleSelect?a.isNumber(t.multipleSelect)?t.multipleSelect:2:1,this.selection=e.splice(0,n),this.selection.forEach(function(e){i.$.body.find('[data-calendar-item-date="'+a.date(e,{"return":t.dateFormat})+'"]').addClass("selected")}),this):this},this.getSelection=function(){return this.selection}};a.isFunction(e)&&(i.prototype=new e),t.calendar=i}(ax5.ui,ax5.ui.root); \ No newline at end of file +!function(t,a){var e=ax5.util,n=function(){var t,n=this;this.main=function(){a&&a.call(this),this.config={clickEventName:"click",theme:"default",mode:"day",dateFormat:"yyyy-mm-dd",displayDate:new Date,animateTime:250,dimensions:{controlHeight:"40px",controlButtonWidth:"40px",itemPadding:2},lang:{yearHeading:"Choose the year",monthHeading:"Choose the month",year:"%s",month:["January","February","March","April","May","June","July","August","September","October","November","December"],day:"%s"}}}.apply(this,arguments),this.target=null,t=this.config,this.printedDay={start:"",end:""},this.init=function(){t.target||console.log(ax5.info.getError("ax5calendar","401","setConfig")),this.target=jQuery(t.target),t.displayDate=e.date(t.displayDate),this.target.html(this.getFrame()),this.$={root:this.target.find('[data-calendar-els="root"]'),control:this.target.find('[data-calendar-els="control"]'),"control-display":this.target.find('[data-calendar-els="control-display"]'),body:this.target.find('[data-calendar-els="body"]')},t.control&&this.$.control.find("[data-calendar-move]").on(t.clickEventName,function(t){this.move(t||window.event)}.bind(this)),"day"===t.mode||"d"===t.mode?this.printDay(t.displayDate):"month"===t.mode||"m"===t.mode?this.printMonth(t.displayDate):("year"===t.mode||"y"===t.mode)&&this.printYear(t.displayDate)},this.getFrame=function(){var a=[];if(a.push('
'),t.control){var n={},i={};i.height=n.height=e.cssNumber(t.dimensions.controlHeight),i["line-height"]=n["line-height"]=e.cssNumber(t.dimensions.controlHeight),i.width=e.cssNumber(t.dimensions.controlHeight),a.push('
'),a.push(''+t.control.left+""),a.push('
'),a.push(''+t.control.right+""),a.push("
")}return a.push('
'),a.push("
"),a.join("")},this.setDisplay=function(){if(t.control){var a=e.date(t.displayDate),n="",i="";if("day"==t.mode||"d"==t.mode)t.control.yearTmpl&&(n=t.control.yearTmpl.replace("%s",a.getFullYear())),t.control.monthTmpl&&(i=t.control.monthTmpl.replace("%s",t.lang.month[a.getMonth()])),this.$["control-display"].html(function(){return t.control.yearFirst?''+n+''+i+"":''+i+''+n+""}());else if("month"==t.mode||"m"==t.mode)t.control.yearTmpl&&(n=t.control.yearTmpl.replace("%s",a.getFullYear())),this.$["control-display"].html(''+n+"");else if("year"==t.mode||"y"==t.mode){var d=t.control.yearTmpl.replace("%s",a.getFullYear()-10),s=t.control.yearTmpl.replace("%s",Number(a.getFullYear())+9);this.$["control-display"].html(d+" ~ "+s)}this.$["control-display"].find("[data-calendar-display]").on(t.clickEventName,function(t){if(target=e.findParentNode(t.target,function(t){return t.getAttribute("data-calendar-display")?!0:void 0}),target){var a=target.getAttribute("data-calendar-display");this.changeMode(a)}}.bind(this))}},this.printDay=function(a){var i,d,s,r=e.date(a),l=[],o=new Date(r.getFullYear(),r.getMonth(),1,12),h=t.displayDate,c=function(){var t=o.getDay();return 0==t&&(t=7),e.date(o,{add:{d:-t}})}(),p=r.getMonth(),u=(r.getDate(),{}),y=this.$.body.width(),m=Math.floor(y*(6/7));for(t.dimensions.height&&(m=e.number(t.dimensions.height)),u.height=Math.floor(m/6)-2*e.number(t.dimensions.itemPadding)+"px",u["line-height"]=u.height,u.padding=e.cssNumber(t.dimensions.itemPadding),l.push(''),l.push(""),l.push(""),s=0;7>s;)l.push('"),s++;for(l.push(""),l.push(""),l.push(""),i=c,d=0;6>d;){for(l.push(""),s=0;7>s;)l.push('"),s++,i=e.date(i,{add:{d:1}});l.push(""),d++}if(l.push(""),l.push("
'),l.push(ax5.info.weekNames[s].label),l.push("
'),l.push(''+t.lang.day.replace("%s",i.getDate())+''),l.push("
"),this.$.body.html(l.join("")),this.$.body.find("[data-calendar-item-date]").on(t.clickEventName,function(t){t=t||window.event,n.onclick(t);try{t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0}catch(t){}return!1}),this.printedDay={start:c,end:i},t.onStateChanged){var g={action:"printDay",printedDay:this.printedDay};t.onStateChanged.call(g,g)}this.setDisplay()},this.printMonth=function(a){var i,d,s,r=e.date(a),l=r.getMonth(),o=[],h={},c=this.$.body.width(),p=Math.floor(c*(6/7));for(t.dimensions.height&&(p=e.number(t.dimensions.height)),h.height=Math.floor(p/4)-2*e.number(t.dimensions.itemPadding)+"px",h["line-height"]=h.height,h.padding=e.cssNumber(t.dimensions.itemPadding),o.push(''),o.push(""),o.push(""),o.push('"),o.push(""),o.push(""),o.push(""),s=0,i=0;4>i;){for(o.push(""),d=0;3>d;)o.push('"),s++,d++;o.push(""),i++}o.push(""),o.push("
'+t.lang.monthHeading+"
'),o.push(''+t.lang.month[s]+""),o.push("
"),this.$.body.html(o.join("")),this.$.body.find("[data-calendar-item-month]").on(t.clickEventName,function(t){if(t=t||window.event,target=e.findParentNode(t.target,function(t){return t.getAttribute("data-calendar-item-month")?!0:void 0}),target){value=target.getAttribute("data-calendar-item-month"),n.changeMode("day",value);try{t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0}catch(t){}return!1}}),this.setDisplay()},this.printYear=function(a){var i,d,s=e.date(a),r=s.getFullYear(),l=[],o={},h=this.$.body.width(),c=Math.floor(h*(6/7));for(t.dimensions.height&&(c=e.number(t.dimensions.height)),o.height=Math.floor(c/5)-2*e.number(t.dimensions.itemPadding)+"px",o["line-height"]=o.height,o.padding=e.cssNumber(t.dimensions.itemPadding),l.push(''),l.push(""),l.push(""),l.push('"),l.push(""),l.push(""),l.push(""),y=r-10,i=0;5>i;){for(l.push(""),d=0;4>d;)l.push('"),y++,d++;l.push(""),i++}l.push(""),l.push("
'+t.lang.yearHeading+"
'),l.push(''+t.lang.year.replace("%s",y)+""),l.push("
"),this.$.body.html(l.join("")),this.$.body.find("[data-calendar-item-year]").on(t.clickEventName,function(t){if(t=t||window.event,target=e.findParentNode(t.target,function(t){return t.getAttribute("data-calendar-item-year")?!0:void 0}),target){value=target.getAttribute("data-calendar-item-year"),n.changeMode("month",value);try{t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0}catch(t){}return!1}}),this.setDisplay()},this.onclick=function(a,n,i){if(n=e.findParentNode(a.target,function(t){return t.getAttribute("data-calendar-item-date")?!0:void 0})){i=n.getAttribute("data-calendar-item-date");var d=e.date(i,{"return":t.dateFormat}),s=!0;t.selectable&&(t.selectable[d]||(s=!1)),s&&(this.$.body.find('[data-calendar-item-date="'+e.date(t.displayDate,{"return":t.dateFormat})+'"]').removeClass("hover"),jQuery(n).addClass("hover"),t.displayDate=i,t.onClick&&t.onClick.call({date:i,target:this.target,dateElement:n}))}},this.move=function(a,n,i){n=e.findParentNode(a.target,function(t){return t.getAttribute("data-calendar-move")?!0:void 0}),n&&(i=n.getAttribute("data-calendar-move"),"day"==t.mode?("left"==i?t.displayDate=e.date(t.displayDate,{add:{m:-1}}):t.displayDate=e.date(t.displayDate,{add:{m:1}}),this.printDay(t.displayDate)):"month"==t.mode?("left"==i?t.displayDate=e.date(t.displayDate,{add:{y:-1}}):t.displayDate=e.date(t.displayDate,{add:{y:1}}),this.printMonth(t.displayDate)):"year"==t.mode&&("left"==i?t.displayDate=e.date(t.displayDate,{add:{y:-10}}):t.displayDate=e.date(t.displayDate,{add:{y:10}}),this.printYear(t.displayDate)))},this.changeMode=function(a,e){"undefined"!=typeof e&&(t.displayDate=e),t.mode=a,this.$.body.removeClass("fadein").addClass("fadeout"),setTimeout(function(){"day"==t.mode?this.printDay(t.displayDate):"month"==t.mode?this.printMonth(t.displayDate):"year"==t.mode&&this.printYear(t.displayDate),this.$.body.removeClass("fadeout").addClass("fadein")}.bind(this),t.animateTime)},this.setDisplayDate=function(a){t.displayDate=e.date(a),this.$.body.removeClass("fadein").addClass("fadeout"),setTimeout(function(){"day"==t.mode?this.printDay(t.displayDate):"month"==t.mode?this.printMonth(t.displayDate):"year"==t.mode&&this.printYear(t.displayDate),this.$.body.removeClass("fadeout").addClass("fadein")}.bind(this),t.animateTime)}};e.isFunction(a)&&(n.prototype=new a),t.calendar=n}(ax5.ui,ax5.ui.root); \ No newline at end of file diff --git a/package.json b/package.json index 8f4171c..be1cf2f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bootstrap-ax5calendar", - "version": "0.1.0", + "version": "0.2.0", "description": "A calendar plugin that works with Bootstrap & jQuery", "license": "MIT", "repository": {