From 914e9ef5397e0813a4ea85c9a385c67e4316bbbc Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sun, 26 Jan 2014 15:34:23 +0000 Subject: [PATCH 1/2] Updated bootstrap datetimepicker https://github.com/Eonasdan/bootstrap-datetimepicker --- .../css/bootstrap-datetimepicker.min.css | 8 + .../0.0.10/js/bootstrap-datetimepicker.min.js | 26 +++ .../css/bootstrap-datetimepicker.min.css | 9 + .../1.0.0/js/bootstrap-datetimepicker.min.js | 27 +++ .../css/bootstrap-datetimepicker.min.css | 9 + .../2.0.1/js/bootstrap-datetimepicker.min.js | 28 +++ .../css/bootstrap-datetimepicker.min.css | 9 + .../2.1.11/js/bootstrap-datetimepicker.min.js | 28 +++ .../2.1.20/css/bootstrap-datetimepicker.css | 174 ++++++++++++++++++ .../css/bootstrap-datetimepicker.min.css | 8 + .../2.1.20/js/bootstrap-datetimepicker.min.js | 28 +++ .../2.1.30/css/bootstrap-datetimepicker.css | 174 ++++++++++++++++++ .../css/bootstrap-datetimepicker.min.css | 8 + .../2.1.30/js/bootstrap-datetimepicker.min.js | 28 +++ .../css/bootstrap-datetimepicker.min.css | 9 + .../2.1.5/js/bootstrap-datetimepicker.min.js | 28 +++ .../bootstrap-datetimepicker/package.json | 31 ++-- 17 files changed, 618 insertions(+), 14 deletions(-) create mode 100644 ajax/libs/bootstrap-datetimepicker/0.0.10/css/bootstrap-datetimepicker.min.css create mode 100644 ajax/libs/bootstrap-datetimepicker/0.0.10/js/bootstrap-datetimepicker.min.js create mode 100644 ajax/libs/bootstrap-datetimepicker/1.0.0/css/bootstrap-datetimepicker.min.css create mode 100644 ajax/libs/bootstrap-datetimepicker/1.0.0/js/bootstrap-datetimepicker.min.js create mode 100644 ajax/libs/bootstrap-datetimepicker/2.0.1/css/bootstrap-datetimepicker.min.css create mode 100644 ajax/libs/bootstrap-datetimepicker/2.0.1/js/bootstrap-datetimepicker.min.js create mode 100644 ajax/libs/bootstrap-datetimepicker/2.1.11/css/bootstrap-datetimepicker.min.css create mode 100644 ajax/libs/bootstrap-datetimepicker/2.1.11/js/bootstrap-datetimepicker.min.js create mode 100644 ajax/libs/bootstrap-datetimepicker/2.1.20/css/bootstrap-datetimepicker.css create mode 100644 ajax/libs/bootstrap-datetimepicker/2.1.20/css/bootstrap-datetimepicker.min.css create mode 100644 ajax/libs/bootstrap-datetimepicker/2.1.20/js/bootstrap-datetimepicker.min.js create mode 100644 ajax/libs/bootstrap-datetimepicker/2.1.30/css/bootstrap-datetimepicker.css create mode 100644 ajax/libs/bootstrap-datetimepicker/2.1.30/css/bootstrap-datetimepicker.min.css create mode 100644 ajax/libs/bootstrap-datetimepicker/2.1.30/js/bootstrap-datetimepicker.min.js create mode 100644 ajax/libs/bootstrap-datetimepicker/2.1.5/css/bootstrap-datetimepicker.min.css create mode 100644 ajax/libs/bootstrap-datetimepicker/2.1.5/js/bootstrap-datetimepicker.min.js diff --git a/ajax/libs/bootstrap-datetimepicker/0.0.10/css/bootstrap-datetimepicker.min.css b/ajax/libs/bootstrap-datetimepicker/0.0.10/css/bootstrap-datetimepicker.min.css new file mode 100644 index 000000000..6c40dea50 --- /dev/null +++ b/ajax/libs/bootstrap-datetimepicker/0.0.10/css/bootstrap-datetimepicker.min.css @@ -0,0 +1,8 @@ +/*! + * Datepicker for Bootstrap + * + * Copyright 2012 Stefan Petre + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:3000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);position:absolute;top:-7px;left:6px}.bootstrap-datetimepicker-widget:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-weight:bold;font-size:1.2em}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;width:20px;height:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#999}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{color:#fff;background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget td.active:hover,.bootstrap-datetimepicker-widget td.active:hover:hover,.bootstrap-datetimepicker-widget td.active:active,.bootstrap-datetimepicker-widget td.active:hover:active,.bootstrap-datetimepicker-widget td.active.active,.bootstrap-datetimepicker-widget td.active:hover.active,.bootstrap-datetimepicker-widget td.active.disabled,.bootstrap-datetimepicker-widget td.active:hover.disabled,.bootstrap-datetimepicker-widget td.active[disabled],.bootstrap-datetimepicker-widget td.active:hover[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.bootstrap-datetimepicker-widget td.active:active,.bootstrap-datetimepicker-widget td.active:hover:active,.bootstrap-datetimepicker-widget td.active.active,.bootstrap-datetimepicker-widget td.active:hover.active{background-color:#039 \9}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:0;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:block;width:47px;height:54px;line-height:54px;float:left;margin:2px;cursor:pointer;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{color:#fff;background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget td span.active:hover,.bootstrap-datetimepicker-widget td span.active:active,.bootstrap-datetimepicker-widget td span.active.active,.bootstrap-datetimepicker-widget td span.active.disabled,.bootstrap-datetimepicker-widget td span.active[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.bootstrap-datetimepicker-widget td span.active:active,.bootstrap-datetimepicker-widget td span.active.active{background-color:#039 \9}.bootstrap-datetimepicker-widget td span.old{color:#999}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{background:0;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget th.switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{background:0;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-append.date .add-on i,.input-prepend.date .add-on i{display:block;cursor:pointer;width:16px;height:16px} \ No newline at end of file diff --git a/ajax/libs/bootstrap-datetimepicker/0.0.10/js/bootstrap-datetimepicker.min.js b/ajax/libs/bootstrap-datetimepicker/0.0.10/js/bootstrap-datetimepicker.min.js new file mode 100644 index 000000000..92f1f89e8 --- /dev/null +++ b/ajax/libs/bootstrap-datetimepicker/0.0.10/js/bootstrap-datetimepicker.min.js @@ -0,0 +1,26 @@ +/** + * @license + * ========================================================= + * bootstrap-datetimepicker.js + * http://www.eyecon.ro/bootstrap-datepicker + * ========================================================= + * Copyright 2012 Stefan Petre + * + * Contributions: + * - Andrew Rowls + * - Thiago de Arruda + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= + */ +(function($){var smartPhone=window.orientation!=undefined;var DateTimePicker=function(element,options){this.id=dpgId++;this.init(element,options)};var dateToDate=function(dt){if(typeof dt==="string"){return new Date(dt)}return dt};DateTimePicker.prototype={constructor:DateTimePicker,init:function(element,options){var icon;if(!(options.pickTime||options.pickDate))throw new Error("Must choose at least one picker");this.options=options;this.$element=$(element);this.language=options.language in dates?options.language:"en";this.pickDate=options.pickDate;this.pickTime=options.pickTime;this.isInput=this.$element.is("input");this.component=false;if(this.$element.is(".input-append")||this.$element.is(".input-prepend"))this.component=this.$element.find(".add-on");this.format=options.format;if(!this.format){if(this.isInput)this.format=this.$element.data("format");else this.format=this.$element.find("input").data("format");if(!this.format)this.format="MM/dd/yyyy"}this._compileFormat();if(this.component){icon=this.component.find("i")}if(this.pickTime){if(icon&&icon.length)this.timeIcon=icon.data("time-icon");if(!this.timeIcon)this.timeIcon="icon-time";icon.addClass(this.timeIcon)}if(this.pickDate){if(icon&&icon.length)this.dateIcon=icon.data("date-icon");if(!this.dateIcon)this.dateIcon="icon-calendar";icon.removeClass(this.timeIcon);icon.addClass(this.dateIcon)}this.widget=$(getTemplate(this.timeIcon,options.pickDate,options.pickTime,options.pick12HourFormat,options.pickSeconds)).appendTo("body");this.minViewMode=options.minViewMode||this.$element.data("date-minviewmode")||0;if(typeof this.minViewMode==="string"){switch(this.minViewMode){case"months":this.minViewMode=1;break;case"years":this.minViewMode=2;break;default:this.minViewMode=0;break}}this.viewMode=options.viewMode||this.$element.data("date-viewmode")||0;if(typeof this.viewMode==="string"){switch(this.viewMode){case"months":this.viewMode=1;break;case"years":this.viewMode=2;break;default:this.viewMode=0;break}}this.startViewMode=this.viewMode;this.weekStart=options.weekStart||this.$element.data("date-weekstart")||0;this.weekEnd=this.weekStart===0?6:this.weekStart-1;this.setStartDate(options.startDate||this.$element.data("date-startdate"));this.setEndDate(options.endDate||this.$element.data("date-enddate"));this.fillDow();this.fillMonths();this.fillHours();this.fillMinutes();this.fillSeconds();this.update();this.showMode();this._attachDatePickerEvents()},show:function(e){this.widget.show();this.height=this.component?this.component.outerHeight():this.$element.outerHeight();this.place();this.$element.trigger({type:"show",date:this._date});this._attachDatePickerGlobalEvents();if(e){e.stopPropagation();e.preventDefault()}},disable:function(){this.$element.find("input").prop("disabled",true);this._detachDatePickerEvents()},enable:function(){this.$element.find("input").prop("disabled",false);this._attachDatePickerEvents()},hide:function(){var collapse=this.widget.find(".collapse");for(var i=0;i"}html+="";this.widget.find(".datepicker-days thead").append(html)},fillMonths:function(){var html="";var i=0;while(i<12){html+=''+dates[this.language].monthsShort[i++]+""}this.widget.find(".datepicker-months td").append(html)},fillDate:function(){var year=this.viewDate.getUTCFullYear();var month=this.viewDate.getUTCMonth();var currentDate=UTCDate(this._date.getUTCFullYear(),this._date.getUTCMonth(),this._date.getUTCDate(),0,0,0,0);var startYear=typeof this.startDate==="object"?this.startDate.getUTCFullYear():-Infinity;var startMonth=typeof this.startDate==="object"?this.startDate.getUTCMonth():-1;var endYear=typeof this.endDate==="object"?this.endDate.getUTCFullYear():Infinity;var endMonth=typeof this.endDate==="object"?this.endDate.getUTCMonth():12;this.widget.find(".datepicker-days").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-months").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-years").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-days th:eq(1)").text(dates[this.language].months[month]+" "+year);var prevMonth=UTCDate(year,month-1,28,0,0,0,0);var day=DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(),prevMonth.getUTCMonth());prevMonth.setUTCDate(day);prevMonth.setUTCDate(day-(prevMonth.getUTCDay()-this.weekStart+7)%7);if(year==startYear&&month<=startMonth||year=endMonth||year>endYear){this.widget.find(".datepicker-days th:eq(2)").addClass("disabled")}var nextMonth=new Date(prevMonth.valueOf());nextMonth.setUTCDate(nextMonth.getUTCDate()+42);nextMonth=nextMonth.valueOf();var html=[];var clsName;while(prevMonth.valueOf()")}clsName="";if(prevMonth.getUTCFullYear()year||prevMonth.getUTCFullYear()==year&&prevMonth.getUTCMonth()>month){clsName+=" new"}if(prevMonth.valueOf()===currentDate.valueOf()){clsName+=" active"}if(prevMonth.valueOf()+864e5<=this.startDate){clsName+=" disabled"}if(prevMonth.valueOf()>this.endDate){clsName+=" disabled"}html.push(''+prevMonth.getUTCDate()+"");if(prevMonth.getUTCDay()===this.weekEnd){html.push("")}prevMonth.setUTCDate(prevMonth.getUTCDate()+1)}this.widget.find(".datepicker-days tbody").empty().append(html.join(""));var currentYear=this._date.getUTCFullYear();var months=this.widget.find(".datepicker-months").find("th:eq(1)").text(year).end().find("span").removeClass("active");if(currentYear===year){months.eq(this._date.getUTCMonth()).addClass("active")}if(currentYear-1endYear){this.widget.find(".datepicker-months th:eq(2)").addClass("disabled")}for(var i=0;i<12;i++){if(year==startYear&&startMonth>i||yearendYear){$(months[i]).addClass("disabled")}}html="";year=parseInt(year/10,10)*10;var yearCont=this.widget.find(".datepicker-years").find("th:eq(1)").text(year+"-"+(year+9)).end().find("td");this.widget.find(".datepicker-years").find("th").removeClass("disabled");if(startYear>year){this.widget.find(".datepicker-years").find("th:eq(0)").addClass("disabled")}if(endYearendYear?" disabled":"")+'">'+year+"";year+=1}yearCont.html(html)},fillHours:function(){var table=this.widget.find(".timepicker .timepicker-hours table");table.parent().hide();var html="";if(this.options.pick12HourFormat){var current=1;for(var i=0;i<3;i+=1){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current++}html+=""}}else{var current=0;for(var i=0;i<6;i+=1){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current++}html+=""}}table.html(html)},fillMinutes:function(){var table=this.widget.find(".timepicker .timepicker-minutes table");table.parent().hide();var html="";var current=0;for(var i=0;i<5;i++){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current+=3}html+=""}table.html(html)},fillSeconds:function(){var table=this.widget.find(".timepicker .timepicker-seconds table");table.parent().hide();var html="";var current=0;for(var i=0;i<5;i++){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current+=3}html+=""}table.html(html)},fillTime:function(){if(!this._date)return;var timeComponents=this.widget.find(".timepicker span[data-time-component]");var table=timeComponents.closest("table");var is12HourFormat=this.options.pick12HourFormat;var hour=this._date.getUTCHours();var period="AM";if(is12HourFormat){if(hour>=12)period="PM";if(hour===0)hour=12;else if(hour!=12)hour=hour%12;this.widget.find(".timepicker [data-action=togglePeriod]").text(period)}hour=padLeft(hour.toString(),2,"0");var minute=padLeft(this._date.getUTCMinutes().toString(),2,"0");var second=padLeft(this._date.getUTCSeconds().toString(),2,"0");timeComponents.filter("[data-time-component=hours]").text(hour);timeComponents.filter("[data-time-component=minutes]").text(minute);timeComponents.filter("[data-time-component=seconds]").text(second)},click:function(e){e.stopPropagation();e.preventDefault();this._unset=false;var target=$(e.target).closest("span, td, th");if(target.length===1){if(!target.is(".disabled")){switch(target[0].nodeName.toLowerCase()){case"th":switch(target[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var vd=this.viewDate;var navFnc=DPGlobal.modes[this.viewMode].navFnc;var step=DPGlobal.modes[this.viewMode].navStep;if(target[0].className==="prev")step=step*-1;vd["set"+navFnc](vd["get"+navFnc]()+step);this.fillDate();this.set();break}break;case"span":if(target.is(".month")){var month=target.parent().find("span").index(target);this.viewDate.setUTCMonth(month)}else{var year=parseInt(target.text(),10)||0;this.viewDate.setUTCFullYear(year)}if(this.viewMode!==0){this._date=UTCDate(this.viewDate.getUTCFullYear(),this.viewDate.getUTCMonth(),this.viewDate.getUTCDate(),this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.notifyChange()}this.showMode(-1);this.fillDate();this.set();break;case"td":if(target.is(".day")){var day=parseInt(target.text(),10)||1;var month=this.viewDate.getUTCMonth();var year=this.viewDate.getUTCFullYear();if(target.is(".old")){if(month===0){month=11;year-=1}else{month-=1}}else if(target.is(".new")){if(month==11){month=0;year+=1}else{month+=1}}this._date=UTCDate(year,month,day,this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.viewDate=UTCDate(year,month,Math.min(28,day),0,0,0,0);this.fillDate();this.set();this.notifyChange()}break}}}},actions:{incrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()+1)},incrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()+1)},incrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()+1)},decrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()-1)},decrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()-1)},decrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()-1)},togglePeriod:function(e){var hour=this._date.getUTCHours();if(hour>=12)hour-=12;else hour+=12;this._date.setUTCHours(hour)},showPicker:function(){this.widget.find(".timepicker > div:not(.timepicker-picker)").hide();this.widget.find(".timepicker .timepicker-picker").show()},showHours:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-seconds").show()},selectHour:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);if(this.options.pick12HourFormat){var current=this._date.getUTCHours();if(current>=12){if(value!=12)value=(value+12)%24}else{if(value===12)value=0;else value=value%12}}this._date.setUTCHours(value);this.actions.showPicker.call(this)},selectMinute:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);this._date.setUTCMinutes(value);this.actions.showPicker.call(this)},selectSecond:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);this._date.setUTCSeconds(value);this.actions.showPicker.call(this)}},doAction:function(e){e.stopPropagation();e.preventDefault();if(!this._date)this._date=UTCDate(1970,0,0,0,0,0,0);var action=$(e.currentTarget).data("action");var rv=this.actions[action].apply(this,arguments);this.set();this.fillTime();this.notifyChange();return rv},stopEvent:function(e){e.stopPropagation();e.preventDefault()},keydown:function(e){var self=this,k=e.which,input=$(e.target);if(k==8||k==46){setTimeout(function(){self._resetMaskPos(input)})}},keypress:function(e){var k=e.which;if(k==8||k==46){return}var input=$(e.target);var c=String.fromCharCode(k);var val=input.val()||"";val+=c;var mask=this._mask[this._maskPos];if(!mask){return false}if(mask.end!=val.length){return}if(!mask.pattern.test(val.slice(mask.start))){val=val.slice(0,val.length-1);while((mask=this._mask[this._maskPos])&&mask.character){val+=mask.character;this._maskPos++}val+=c;if(mask.end!=val.length){input.val(val);return false}else{if(!mask.pattern.test(val.slice(mask.start))){input.val(val.slice(0,mask.start));return false}else{input.val(val);this._maskPos++;return false}}}else{this._maskPos++}},change:function(e){var input=$(e.target);var val=input.val();if(this._formatPattern.test(val)){this.update();this.setValue(this._date.getTime());this.notifyChange();this.set()}else if(val&&val.trim()){this.setValue(this._date.getTime());if(this._date)this.set();else input.val("")}else{if(this._date){this.setValue(null);this.notifyChange();this._unset=true}}this._resetMaskPos(input)},showMode:function(dir){if(dir){this.viewMode=Math.max(this.minViewMode,Math.min(2,this.viewMode+dir))}this.widget.find(".datepicker > div").hide().filter(".datepicker-"+DPGlobal.modes[this.viewMode].clsName).show()},destroy:function(){this._detachDatePickerEvents();this._detachDatePickerGlobalEvents();this.widget.remove();this.$element.removeData("datetimepicker");this.component.removeData("datetimepicker")},formatDate:function(d){return this.format.replace(formatReplacer,function(match){var methodName,property,rv,len=match.length;if(match==="ms")len=1;property=dateFormatComponents[match].property;if(property==="Hours12"){rv=d.getUTCHours();if(rv===0)rv=12;else if(rv!==12)rv=rv%12}else if(property==="Period12"){if(d.getUTCHours()>=12)return"PM";else return"AM"}else{methodName="get"+property;rv=d[methodName]()}if(methodName==="getUTCMonth")rv=rv+1;if(methodName==="getUTCYear")rv=rv+1900-2e3;return padLeft(rv.toString(),len,"0")})},parseDate:function(str){var match,i,property,methodName,value,parsed={};if(!(match=this._formatPattern.exec(str)))return null;for(i=1;ival.length){this._maskPos=i;break}else if(this._mask[i].end===val.length){this._maskPos=i+1;break}}},_finishParsingDate:function(parsed){var year,month,date,hours,minutes,seconds,milliseconds;year=parsed.UTCFullYear;if(parsed.UTCYear)year=2e3+parsed.UTCYear;if(!year)year=1970;if(parsed.UTCMonth)month=parsed.UTCMonth-1;else month=0;date=parsed.UTCDate||1;hours=parsed.UTCHours||0;minutes=parsed.UTCMinutes||0;seconds=parsed.UTCSeconds||0;milliseconds=parsed.UTCMilliseconds||0;if(parsed.Hours12){hours=parsed.Hours12}if(parsed.Period12){if(/pm/i.test(parsed.Period12)){if(hours!=12)hours=(hours+12)%24}else{hours=hours%12}}return UTCDate(year,month,date,hours,minutes,seconds,milliseconds)},_compileFormat:function(){var match,component,components=[],mask=[],str=this.format,propertiesByIndex={},i=0,pos=0;while(match=formatComponent.exec(str)){component=match[0];if(component in dateFormatComponents){i++;propertiesByIndex[i]=dateFormatComponents[component].property;components.push("\\s*"+dateFormatComponents[component].getPattern(this)+"\\s*");mask.push({pattern:new RegExp(dateFormatComponents[component].getPattern(this)),property:dateFormatComponents[component].property,start:pos,end:pos+=component.length})}else{components.push(escapeRegExp(component));mask.push({pattern:new RegExp(escapeRegExp(component)),character:component,start:pos,end:++pos})}str=str.slice(component.length)}this._mask=mask;this._maskPos=0;this._formatPattern=new RegExp("^\\s*"+components.join("")+"\\s*$");this._propertiesByIndex=propertiesByIndex},_attachDatePickerEvents:function(){var self=this;this.widget.on("click",".datepicker *",$.proxy(this.click,this));this.widget.on("click","[data-action]",$.proxy(this.doAction,this));this.widget.on("mousedown",$.proxy(this.stopEvent,this));if(this.pickDate&&this.pickTime){this.widget.on("click.togglePicker",".accordion-toggle",function(e){e.stopPropagation();var $this=$(this);var $parent=$this.closest("ul");var expanded=$parent.find(".collapse.in");var closed=$parent.find(".collapse:not(.in)");if(expanded&&expanded.length){var collapseData=expanded.data("collapse");if(collapseData&&collapseData.transitioning)return;expanded.collapse("hide");closed.collapse("show");$this.find("i").toggleClass(self.timeIcon+" "+self.dateIcon);self.$element.find(".add-on i").toggleClass(self.timeIcon+" "+self.dateIcon)}})}if(this.isInput){this.$element.on({focus:$.proxy(this.show,this),change:$.proxy(this.change,this)});if(this.options.maskInput){this.$element.on({keydown:$.proxy(this.keydown,this),keypress:$.proxy(this.keypress,this)})}}else{this.$element.on({change:$.proxy(this.change,this)},"input");if(this.options.maskInput){this.$element.on({keydown:$.proxy(this.keydown,this),keypress:$.proxy(this.keypress,this)},"input")}if(this.component){this.component.on("click",$.proxy(this.show,this))}else{this.$element.on("click",$.proxy(this.show,this))}}},_attachDatePickerGlobalEvents:function(){$(window).on("resize.datetimepicker"+this.id,$.proxy(this.place,this));if(!this.isInput){$(document).on("mousedown.datetimepicker"+this.id,$.proxy(this.hide,this))}},_detachDatePickerEvents:function(){this.widget.off("click",".datepicker *",this.click);this.widget.off("click","[data-action]");this.widget.off("mousedown",this.stopEvent);if(this.pickDate&&this.pickTime){this.widget.off("click.togglePicker")}if(this.isInput){this.$element.off({focus:this.show,change:this.change});if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress})}}else{this.$element.off({change:this.change},"input");if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress},"input")}if(this.component){this.component.off("click",this.show)}else{this.$element.off("click",this.show)}}},_detachDatePickerGlobalEvents:function(){$(window).off("resize.datetimepicker"+this.id);if(!this.isInput){$(document).off("mousedown.datetimepicker"+this.id)}}};$.fn.datetimepicker=function(option,val){return this.each(function(){var $this=$(this),data=$this.data("datetimepicker"),options=typeof option==="object"&&option;if(!data){$this.data("datetimepicker",data=new DateTimePicker(this,$.extend({},$.fn.datetimepicker.defaults,options)))}if(typeof option==="string")data[option](val)})};$.fn.datetimepicker.defaults={maskInput:false,pickDate:true,pickTime:true,pick12HourFormat:false,pickSeconds:true,startDate:-Infinity,endDate:Infinity};$.fn.datetimepicker.Constructor=DateTimePicker;var dpgId=0;var dates=$.fn.datetimepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}};var dateFormatComponents={dd:{property:"UTCDate",getPattern:function(){return"(0?[1-9]|[1-2][0-9]|3[0-1])\\b"}},MM:{property:"UTCMonth",getPattern:function(){return"(0?[1-9]|1[0-2])\\b"}},yy:{property:"UTCYear",getPattern:function(){return"(\\d{2})\\b"}},yyyy:{property:"UTCFullYear",getPattern:function(){return"(\\d{4})\\b"}},hh:{property:"UTCHours",getPattern:function(){return"(0?[0-9]|1[0-9]|2[0-3])\\b"}},mm:{property:"UTCMinutes",getPattern:function(){return"(0?[0-9]|[1-5][0-9])\\b"}},ss:{property:"UTCSeconds",getPattern:function(){return"(0?[0-9]|[1-5][0-9])\\b"}},ms:{property:"UTCMilliseconds",getPattern:function(){return"([0-9]{1,3})\\b"}},HH:{property:"Hours12",getPattern:function(){return"(0?[1-9]|1[0-2])\\b"}},PP:{property:"Period12",getPattern:function(){return"(AM|PM|am|pm|Am|aM|Pm|pM)\\b"}}};var keys=[];for(var k in dateFormatComponents)keys.push(k);keys[keys.length-1]+="\\b";keys.push(".");var formatComponent=new RegExp(keys.join("\\b|"));keys.pop();var formatReplacer=new RegExp(keys.join("\\b|"),"g");function escapeRegExp(str){return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function padLeft(s,l,c){if(l'+"
    "+'
  • '+'
    '+DPGlobal.template+"
    "+"
  • "+'
  • '+'
  • '+'
    '+TPGlobal.getTemplate(is12Hours,showSeconds)+"
    "+"
  • "+"
"+""}else if(pickTime){return'"}else{return'"}}function UTCDate(){return new Date(Date.UTC.apply(Date,arguments))}var DPGlobal={modes:[{clsName:"days",navFnc:"UTCMonth",navStep:1},{clsName:"months",navFnc:"UTCFullYear",navStep:1},{clsName:"years",navFnc:"UTCFullYear",navStep:10}],isLeapYear:function(year){return year%4===0&&year%100!==0||year%400===0},getDaysInMonth:function(year,month){return[31,DPGlobal.isLeapYear(year)?29:28,31,30,31,30,31,31,30,31,30,31][month]},headTemplate:""+""+'‹'+''+'›'+""+"",contTemplate:''};DPGlobal.template='
'+''+DPGlobal.headTemplate+""+"
"+"
"+'
'+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
"+"
"+'
'+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
"+"
";var TPGlobal={hourTemplate:'',minuteTemplate:'',secondTemplate:''};TPGlobal.getTemplate=function(is12Hours,showSeconds){return'
'+'"+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+""+" "+''+" "+(showSeconds?''+"":"")+(is12Hours?''+"":"")+""+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+"
"+TPGlobal.hourTemplate+":"+TPGlobal.minuteTemplate+":"+TPGlobal.secondTemplate+""+''+"
"+"
"+'
'+''+"
"+"
"+'
'+''+"
"+"
"+(showSeconds?'
'+''+"
"+"
":"")}})(window.jQuery); \ No newline at end of file diff --git a/ajax/libs/bootstrap-datetimepicker/1.0.0/css/bootstrap-datetimepicker.min.css b/ajax/libs/bootstrap-datetimepicker/1.0.0/css/bootstrap-datetimepicker.min.css new file mode 100644 index 000000000..bc103a988 --- /dev/null +++ b/ajax/libs/bootstrap-datetimepicker/1.0.0/css/bootstrap-datetimepicker.min.css @@ -0,0 +1,9 @@ +/*! + * Datepicker for Bootstrap v3 + * + * Copyright 2012 Stefan Petre + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + */ + .bootstrap-datetimepicker-widget{top:0;left:0;z-index:3000;width:250px;padding:4px;margin-top:1px;border-radius:4px}.bootstrap-datetimepicker-widget .btn{padding:6px}.bootstrap-datetimepicker-widget:before{position:absolute;top:-7px;left:6px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.bootstrap-datetimepicker-widget:after{position:absolute;top:-6px;left:7px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid white;border-left:6px solid transparent;content:''}.bootstrap-datetimepicker-widget.pull-right:before{right:6px;left:auto}.bootstrap-datetimepicker-widget.pull-right:after{right:7px;left:auto}.bootstrap-datetimepicker-widget>ul{margin:0;list-style-type:none}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-size:1.2em;font-weight:bold}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{width:20px;height:20px;text-align:center;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{cursor:pointer;background:#eee}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#999}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#428bca}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{color:#999;cursor:not-allowed;background:0}.bootstrap-datetimepicker-widget td span{display:block;float:left;width:47px;height:54px;margin:2px;line-height:54px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#428bca}.bootstrap-datetimepicker-widget td span.old{color:#999}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{color:#999;cursor:not-allowed;background:0}.bootstrap-datetimepicker-widget th.switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{color:#999;cursor:not-allowed;background:0}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-group.date .input-group-addon span{display:block;width:16px;height:16px;cursor:pointer}.bootstrap-datetimepicker-widget.left-oriented:before{right:6px;left:auto}.bootstrap-datetimepicker-widget.left-oriented:after{right:7px;left:auto}.bootstrap-datetimepicker-widget ul.list-unstyled li.in div.timepicker div.timepicker-picker table.table-condensed tbody>tr>td{padding:0!important} \ No newline at end of file diff --git a/ajax/libs/bootstrap-datetimepicker/1.0.0/js/bootstrap-datetimepicker.min.js b/ajax/libs/bootstrap-datetimepicker/1.0.0/js/bootstrap-datetimepicker.min.js new file mode 100644 index 000000000..b76263ce8 --- /dev/null +++ b/ajax/libs/bootstrap-datetimepicker/1.0.0/js/bootstrap-datetimepicker.min.js @@ -0,0 +1,27 @@ +/** + * @license + * ========================================================= + * bootstrap-datetimepicker.js + * http://www.eyecon.ro/bootstrap-datepicker + * ========================================================= + * Copyright 2012 Stefan Petre + * + * Contributions: + * - Andrew Rowls + * - Thiago de Arruda + * - updated for Bootstrap v3 by Jonathan Peterson @Eonasdan + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= + */ +(function(e){function c(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function h(e,t,n){if(t'+'
    '+""+'
    '+v.template+"
    "+""+'
  • '+""+'
    '+m.getTemplate(s,o,t,n)+"
    "+""+"
"+""}else if(i){return'"}else{return'"}}function d(){return new Date(Date.UTC.apply(Date,arguments))}var t=window.orientation!=undefined;var n=function(e,t){this.id=i++;this.init(e,t)};var r=function(e){if(typeof e==="string"){return new Date(e)}return e};n.prototype={constructor:n,init:function(t,n){var r;if(!(n.pickTime||n.pickDate))throw new Error("Must choose at least one picker");this.options=n;this.$element=e(t);this.language=n.language in s?n.language:"en";this.pickDate=n.pickDate;this.pickTime=n.pickTime;this.isInput=this.$element.is("input");this.component=false;if(this.$element.find(".input-group"))this.component=this.$element.find(".input-group-addon");this.format=n.format;if(!this.format){if(this.isInput)this.format=this.$element.data("format");else this.format=this.$element.find("input").data("format");if(!this.format)this.format="MM/dd/yyyy"+(this.pickTime?" hh:mm":"")+(this.pickSeconds?":ss":"")}this._compileFormat();if(this.component){r=this.component.find("span")}if(this.pickTime){if(r&&r.length){this.timeIcon=r.data("time-icon");this.upIcon=r.data("up-icon");this.downIcon=r.data("down-icon")}if(!this.timeIcon)this.timeIcon="glyphicon glyphicon-time";if(!this.upIcon)this.upIcon="glyphicon glyphicon-chevron-up";if(!this.downIcon)this.downIcon="glyphicon glyphicon-chevron-down";r.addClass(this.timeIcon)}if(this.pickDate){if(r&&r.length)this.dateIcon=r.data("date-icon");if(!this.dateIcon)this.dateIcon="glyphicon glyphicon-calendar";r.removeClass(this.timeIcon);r.addClass(this.dateIcon)}this.widget=e(p(this.timeIcon,this.upIcon,this.downIcon,n.pickDate,n.pickTime,n.pick12HourFormat,n.pickSeconds,n.collapse)).appendTo("body");this.minViewMode=n.minViewMode||this.$element.data("date-minviewmode")||0;if(typeof this.minViewMode==="string"){switch(this.minViewMode){case"months":this.minViewMode=1;break;case"years":this.minViewMode=2;break;default:this.minViewMode=0;break}}this.viewMode=n.viewMode||this.$element.data("date-viewmode")||0;if(typeof this.viewMode==="string"){switch(this.viewMode){case"months":this.viewMode=1;break;case"years":this.viewMode=2;break;default:this.viewMode=0;break}}this.startViewMode=this.viewMode;this.weekStart=n.weekStart||this.$element.data("date-weekstart")||0;this.weekEnd=this.weekStart===0?6:this.weekStart-1;this.setStartDate(n.startDate||this.$element.data("date-startdate"));this.setEndDate(n.endDate||this.$element.data("date-enddate"));this.fillDow();this.fillMonths();this.fillHours();this.fillMinutes();this.fillSeconds();this.update();this.showMode();this._attachDatePickerEvents()},show:function(e){this.widget.show();this.height=this.component?this.component.outerHeight():this.$element.outerHeight();this.place();this.$element.trigger({type:"show",date:this._date});this._attachDatePickerGlobalEvents();if(e){e.stopPropagation();e.preventDefault()}},disable:function(){this.$element.find("input").prop("disabled",true);this._detachDatePickerEvents()},enable:function(){this.$element.find("input").prop("disabled",false);this._attachDatePickerEvents()},hide:function(){var e=this.widget.find(".collapse");for(var t=0;t");while(t'+s[this.language].daysMin[t++%7]+"")}this.widget.find(".datepicker-days thead").append(n)},fillMonths:function(){var e="";var t=0;while(t<12){e+=''+s[this.language].monthsShort[t++]+""}this.widget.find(".datepicker-months td").append(e)},fillDate:function(){var t=this.viewDate.getUTCFullYear();var n=this.viewDate.getUTCMonth();var r=d(this._date.getUTCFullYear(),this._date.getUTCMonth(),this._date.getUTCDate(),0,0,0,0);var i=typeof this.startDate==="object"?this.startDate.getUTCFullYear():-Infinity;var o=typeof this.startDate==="object"?this.startDate.getUTCMonth():-1;var u=typeof this.endDate==="object"?this.endDate.getUTCFullYear():Infinity;var a=typeof this.endDate==="object"?this.endDate.getUTCMonth():12;this.widget.find(".datepicker-days").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-months").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-years").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-days th:eq(1)").text(s[this.language].months[n]+" "+t);var f=d(t,n-1,28,0,0,0,0);var l=v.getDaysInMonth(f.getUTCFullYear(),f.getUTCMonth());f.setUTCDate(l);f.setUTCDate(l-(f.getUTCDay()-this.weekStart+7)%7);if(t==i&&n<=o||t=a||t>u){this.widget.find(".datepicker-days th:eq(2)").addClass("disabled")}var c=new Date(f.valueOf());c.setUTCDate(c.getUTCDate()+42);c=c.valueOf();var h=[];var p;var m;while(f.valueOf()");h.push(p)}m="";if(f.getUTCFullYear()t||f.getUTCFullYear()==t&&f.getUTCMonth()>n){m+=" new"}if(f.valueOf()===r.valueOf()){m+=" active"}if(f.valueOf()+864e5<=this.startDate){m+=" disabled"}if(f.valueOf()>this.endDate){m+=" disabled"}p.append(''+f.getUTCDate()+"");f.setUTCDate(f.getUTCDate()+1)}this.widget.find(".datepicker-days tbody").empty().append(h);var g=this._date.getUTCFullYear();var y=this.widget.find(".datepicker-months").find("th:eq(1)").text(t).end().find("span").removeClass("active");if(g===t){y.eq(this._date.getUTCMonth()).addClass("active")}if(g-1u){this.widget.find(".datepicker-months th:eq(2)").addClass("disabled")}for(var b=0;b<12;b++){if(t==i&&o>b||tu){e(y[b]).addClass("disabled")}}h="";t=parseInt(t/10,10)*10;var w=this.widget.find(".datepicker-years").find("th:eq(1)").text(t+"-"+(t+9)).end().find("td");this.widget.find(".datepicker-years").find("th").removeClass("disabled");if(i>t){this.widget.find(".datepicker-years").find("th:eq(0)").addClass("disabled")}if(uu?" disabled":"")+'">'+t+"";t+=1}w.html(h)},fillHours:function(){var e=this.widget.find(".timepicker .timepicker-hours table");e.parent().hide();var t="";if(this.options.pick12HourFormat){var n=1;for(var r=0;r<3;r+=1){t+="";for(var i=0;i<4;i+=1){var s=n.toString();t+=''+h(s,2,"0")+"";n++}t+=""}}else{var n=0;for(var r=0;r<6;r+=1){t+="";for(var i=0;i<4;i+=1){var s=n.toString();t+=''+h(s,2,"0")+"";n++}t+=""}}e.html(t)},fillMinutes:function(){var e=this.widget.find(".timepicker .timepicker-minutes table");e.parent().hide();var t="";var n=0;for(var r=0;r<5;r++){t+="";for(var i=0;i<4;i+=1){var s=n.toString();t+=''+h(s,2,"0")+"";n+=3}t+=""}e.html(t)},fillSeconds:function(){var e=this.widget.find(".timepicker .timepicker-seconds table");e.parent().hide();var t="";var n=0;for(var r=0;r<5;r++){t+="";for(var i=0;i<4;i+=1){var s=n.toString();t+=''+h(s,2,"0")+"";n+=3}t+=""}e.html(t)},fillTime:function(){if(!this._date)return;var e=this.widget.find(".timepicker span[data-time-component]");var t=e.closest("table");var n=this.options.pick12HourFormat;var r=this._date.getUTCHours();var i="AM";if(n){if(r>=12)i="PM";if(r===0)r=12;else if(r!=12)r=r%12;this.widget.find(".timepicker [data-action=togglePeriod]").text(i)}r=h(r.toString(),2,"0");var s=h(this._date.getUTCMinutes().toString(),2,"0");var o=h(this._date.getUTCSeconds().toString(),2,"0");e.filter("[data-time-component=hours]").text(r);e.filter("[data-time-component=minutes]").text(s);e.filter("[data-time-component=seconds]").text(o)},click:function(t){t.stopPropagation();t.preventDefault();this._unset=false;var n=e(t.target).closest("span, td, th");if(n.length===1){if(!n.is(".disabled")){switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var r=this.viewDate;var i=v.modes[this.viewMode].navFnc;var s=v.modes[this.viewMode].navStep;if(n[0].className==="prev")s=s*-1;r["set"+i](r["get"+i]()+s);this.fillDate();break}break;case"span":if(n.is(".month")){var o=n.parent().find("span").index(n);this.viewDate.setUTCMonth(o)}else{var u=parseInt(n.text(),10)||0;this.viewDate.setUTCFullYear(u)}if(this.viewMode!==0){this._date=d(this.viewDate.getUTCFullYear(),this.viewDate.getUTCMonth(),this.viewDate.getUTCDate(),this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.notifyChange()}this.showMode(-1);this.fillDate();break;case"td":if(n.is(".day")){var a=parseInt(n.text(),10)||1;var o=this.viewDate.getUTCMonth();var u=this.viewDate.getUTCFullYear();if(n.is(".old")){if(o===0){o=11;u-=1}else{o-=1}}else if(n.is(".new")){if(o==11){o=0;u+=1}else{o+=1}}this._date=d(u,o,a,this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.viewDate=d(u,o,Math.min(28,a),0,0,0,0);this.fillDate();this.set();this.notifyChange()}break}}}},actions:{incrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()+1)},incrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()+1)},incrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()+1)},decrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()-1)},decrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()-1)},decrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()-1)},togglePeriod:function(e){var t=this._date.getUTCHours();if(t>=12)t-=12;else t+=12;this._date.setUTCHours(t)},showPicker:function(){this.widget.find(".timepicker > div:not(.timepicker-picker)").hide();this.widget.find(".timepicker .timepicker-picker").show()},showHours:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-seconds").show()},selectHour:function(t){var n=e(t.target);var r=parseInt(n.text(),10);if(this.options.pick12HourFormat){var i=this._date.getUTCHours();if(i>=12){if(r!=12)r=(r+12)%24}else{if(r===12)r=0;else r=r%12}}this._date.setUTCHours(r);this.actions.showPicker.call(this)},selectMinute:function(t){var n=e(t.target);var r=parseInt(n.text(),10);this._date.setUTCMinutes(r);this.actions.showPicker.call(this)},selectSecond:function(t){var n=e(t.target);var r=parseInt(n.text(),10);this._date.setUTCSeconds(r);this.actions.showPicker.call(this)}},doAction:function(t){t.stopPropagation();t.preventDefault();if(!this._date)this._date=d(1970,0,0,0,0,0,0);var n=e(t.currentTarget).data("action");var r=this.actions[n].apply(this,arguments);this.set();this.fillTime();this.notifyChange();return r},stopEvent:function(e){e.stopPropagation();e.preventDefault()},keydown:function(t){var n=this,r=t.which,i=e(t.target);if(r==8||r==46){setTimeout(function(){n._resetMaskPos(i)})}},keypress:function(t){var n=t.which;if(n==8||n==46){return}var r=e(t.target);var i=String.fromCharCode(n);var s=r.val()||"";s+=i;var o=this._mask[this._maskPos];if(!o){return false}if(o.end!=s.length){return}if(!o.pattern.test(s.slice(o.start))){s=s.slice(0,s.length-1);while((o=this._mask[this._maskPos])&&o.character){s+=o.character;this._maskPos++}s+=i;if(o.end!=s.length){r.val(s);return false}else{if(!o.pattern.test(s.slice(o.start))){r.val(s.slice(0,o.start));return false}else{r.val(s);this._maskPos++;return false}}}else{this._maskPos++}},change:function(t){var n=e(t.target);var r=n.val();if(this._formatPattern.test(r)){this.update();this.setValue(this._date.getTime());this.notifyChange();this.set()}else if(r&&r.trim()){this.setValue(this._date.getTime());if(this._date)this.set();else n.val("")}else{if(this._date){this.setValue(null);this.notifyChange();this._unset=true}}this._resetMaskPos(n)},showMode:function(e){if(e){this.viewMode=Math.max(this.minViewMode,Math.min(2,this.viewMode+e))}this.widget.find(".datepicker > div").hide().filter(".datepicker-"+v.modes[this.viewMode].clsName).show()},destroy:function(){this._detachDatePickerEvents();this._detachDatePickerGlobalEvents();this.widget.remove();this.$element.removeData("datetimepicker");this.component.removeData("datetimepicker")},formatDate:function(e){return this.format.replace(l,function(t){var n,r,i,s=t.length;if(t==="ms")s=1;r=o[t].property;if(r==="Hours12"){i=e.getUTCHours();if(i===0)i=12;else if(i!==12)i=i%12}else if(r==="Period12"){if(e.getUTCHours()>=12)return"PM";else return"AM"}else{n="get"+r;i=e[n]()}if(n==="getUTCMonth")i=i+1;if(n==="getUTCYear")i=i+1900-2e3;return h(i.toString(),s,"0")})},parseDate:function(e){var t,n,r,i,s,o={};if(!(t=this._formatPattern.exec(e)))return null;for(n=1;nt.length){this._maskPos=n;break}else if(this._mask[n].end===t.length){this._maskPos=n+1;break}}},_finishParsingDate:function(e){var t,n,r,i,s,o,u;t=e.UTCFullYear;if(e.UTCYear)t=2e3+e.UTCYear;if(!t)t=1970;if(e.UTCMonth)n=e.UTCMonth-1;else n=0;r=e.UTCDate||1;i=e.UTCHours||0;s=e.UTCMinutes||0;o=e.UTCSeconds||0;u=e.UTCMilliseconds||0;if(e.Hours12){i=e.Hours12}if(e.Period12){if(/pm/i.test(e.Period12)){if(i!=12)i=(i+12)%24}else{i=i%12}}return d(t,n,r,i,s,o,u)},_compileFormat:function(){var e,t,n=[],r=[],i=this.format,s={},u=0,a=0;while(e=f.exec(i)){t=e[0];if(t in o){u++;s[u]=o[t].property;n.push("\\s*"+o[t].getPattern(this)+"\\s*");r.push({pattern:new RegExp(o[t].getPattern(this)),property:o[t].property,start:a,end:a+=t.length})}else{n.push(c(t));r.push({pattern:new RegExp(c(t)),character:t,start:a,end:++a})}i=i.slice(t.length)}this._mask=r;this._maskPos=0;this._formatPattern=new RegExp("^\\s*"+n.join("")+"\\s*$");this._propertiesByIndex=s},_attachDatePickerEvents:function(){var t=this;this.widget.on("click",".datepicker *",e.proxy(this.click,this));this.widget.on("click","[data-action]",e.proxy(this.doAction,this));this.widget.on("mousedown",e.proxy(this.stopEvent,this));if(this.pickDate&&this.pickTime){this.widget.on("click.togglePicker",".accordion-toggle",function(n){n.stopPropagation();var r=e(this);var i=r.closest("ul");var s=i.find(".in");var o=i.find(".collapse:not(.in)");if(s&&s.length){var u=s.data("collapse");if(u&&u.transitioning)return;s.collapse("hide");o.collapse("show");r.find("span").toggleClass(t.timeIcon+" "+t.dateIcon);t.$element.find(".input-group-addon span").toggleClass(t.timeIcon+" "+t.dateIcon)}})}if(this.isInput){this.$element.on({focus:e.proxy(this.show,this),change:e.proxy(this.change,this)});if(this.options.maskInput){this.$element.on({keydown:e.proxy(this.keydown,this),keypress:e.proxy(this.keypress,this)})}}else{this.$element.on({change:e.proxy(this.change,this)},"input");if(this.options.maskInput){this.$element.on({keydown:e.proxy(this.keydown,this),keypress:e.proxy(this.keypress,this)},"input")}if(this.component){this.component.on("click",e.proxy(this.show,this))}else{this.$element.on("click",e.proxy(this.show,this))}}},_attachDatePickerGlobalEvents:function(){e(window).on("resize.datetimepicker"+this.id,e.proxy(this.place,this));if(!this.isInput){e(document).on("mousedown.datetimepicker"+this.id,e.proxy(this.hide,this))}},_detachDatePickerEvents:function(){this.widget.off("click",".datepicker *",this.click);this.widget.off("click","[data-action]");this.widget.off("mousedown",this.stopEvent);if(this.pickDate&&this.pickTime){this.widget.off("click.togglePicker")}if(this.isInput){this.$element.off({focus:this.show,change:this.change});if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress})}}else{this.$element.off({change:this.change},"input");if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress},"input")}if(this.component){this.component.off("click",this.show)}else{this.$element.off("click",this.show)}}},_detachDatePickerGlobalEvents:function(){e(window).off("resize.datetimepicker"+this.id);if(!this.isInput){e(document).off("mousedown.datetimepicker"+this.id)}},_isInFixed:function(){if(this.$element){var t=this.$element.parents();var n=false;for(var r=0;r"+""+'‹'+''+'›'+""+"",contTemplate:''};v.template='
'+''+v.headTemplate+""+"
"+"
"+'
'+''+v.headTemplate+v.contTemplate+"
"+"
"+'
'+''+v.headTemplate+v.contTemplate+"
"+"
";var m={hourTemplate:'',minuteTemplate:'',secondTemplate:''};m.getTemplate=function(e,t,n,r){return'
'+'"+""+''+''+''+(t?''+'':"")+(e?'':"")+""+""+" "+''+" "+(t?''+"":"")+(e?''+"":"")+""+""+''+''+''+(t?''+'':"")+(e?'':"")+""+"
"+m.hourTemplate+":"+m.minuteTemplate+":"+m.secondTemplate+""+''+"
"+"
"+'
'+''+"
"+"
"+'
'+''+"
"+"
"+(t?'
'+''+"
"+"
":"")}})(window.jQuery) diff --git a/ajax/libs/bootstrap-datetimepicker/2.0.1/css/bootstrap-datetimepicker.min.css b/ajax/libs/bootstrap-datetimepicker/2.0.1/css/bootstrap-datetimepicker.min.css new file mode 100644 index 000000000..ed45378df --- /dev/null +++ b/ajax/libs/bootstrap-datetimepicker/2.0.1/css/bootstrap-datetimepicker.min.css @@ -0,0 +1,9 @@ +/*! + * Datepicker for Bootstrap v3 + * + * Copyright 2012 Stefan Petre + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + */ + .bootstrap-datetimepicker-widget{top:0;left:0;z-index:9999;width:250px;padding:4px;margin-top:1px;border-radius:4px}.bootstrap-datetimepicker-widget .btn{padding:6px}.bootstrap-datetimepicker-widget:before{position:absolute;top:-7px;left:6px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.bootstrap-datetimepicker-widget:after{position:absolute;top:-6px;left:7px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid white;border-left:6px solid transparent;content:''}.bootstrap-datetimepicker-widget.pull-right:before{right:6px;left:auto}.bootstrap-datetimepicker-widget.pull-right:after{right:7px;left:auto}.bootstrap-datetimepicker-widget>ul{margin:0;list-style-type:none}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-size:1.2em;font-weight:bold}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{width:20px;height:20px;text-align:center;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{cursor:pointer;background:#eee}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#999}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#428bca}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{color:#999;cursor:not-allowed;background:0}.bootstrap-datetimepicker-widget td span{display:block;float:left;width:47px;height:54px;margin:2px;line-height:54px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#428bca}.bootstrap-datetimepicker-widget td span.old{color:#999}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{color:#999;cursor:not-allowed;background:0}.bootstrap-datetimepicker-widget th.switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{color:#999;cursor:not-allowed;background:0}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-group.date .input-group-addon span{display:block;width:16px;height:16px;cursor:pointer}.bootstrap-datetimepicker-widget.left-oriented:before{right:6px;left:auto}.bootstrap-datetimepicker-widget.left-oriented:after{right:7px;left:auto}.bootstrap-datetimepicker-widget ul.list-unstyled li.in div.timepicker div.timepicker-picker table.table-condensed tbody>tr>td{padding:0!important} \ No newline at end of file diff --git a/ajax/libs/bootstrap-datetimepicker/2.0.1/js/bootstrap-datetimepicker.min.js b/ajax/libs/bootstrap-datetimepicker/2.0.1/js/bootstrap-datetimepicker.min.js new file mode 100644 index 000000000..51ac6cabe --- /dev/null +++ b/ajax/libs/bootstrap-datetimepicker/2.0.1/js/bootstrap-datetimepicker.min.js @@ -0,0 +1,28 @@ +/** + * version 2.0.1 + * @license + * ========================================================= + * bootstrap-datetimepicker.js + * http://www.eyecon.ro/bootstrap-datepicker + * ========================================================= + * Copyright 2012 Stefan Petre + * + * Contributions: + * - Andrew Rowls + * - Thiago de Arruda + * - updated for Bootstrap v3 by Jonathan Peterson @Eonasdan + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= + */ +(function(c){var b=0,a=function(f,h){var r={pickDate:true,pickTime:true,startDate:moment({y:1970}),endDate:moment().add(50,"y"),collapse:true,language:"en",defaultDate:"",disabledDates:[]},p=this,D=function(){var L=false,K,M;p.options=c.extend({},r,h);if(!(p.options.pickTime||p.options.pickDate)){throw new Error("Must choose at least one picker")}p.id=b++;moment.lang(p.options.language);p.date=moment();p.element=c(f);p.unset=false;p.isInput=p.element.is("input");p.component=false;if(p.element.hasClass("input-group")){p.component=p.element.find(".input-group-addon")}p.format=p.options.format;if(!p.format){if(p.isInput){p.format=p.element.data("format")}else{p.format=p.element.find("input").data("format")}if(!p.format){p.format=(p.options.pickDate?"L":"")}p.format+=(p.options.pickTime?" LT":"")}if(p.component){L=p.component.find("span")}if(p.options.pickTime){if(L&&L.length){p.timeIcon=L.data("time-icon");p.upIcon=L.data("up-icon");p.downIcon=L.data("down-icon")}if(!p.timeIcon){p.timeIcon="glyphicon glyphicon-time"}if(!p.upIcon){p.upIcon="glyphicon glyphicon-chevron-up"}if(!p.downIcon){p.downIcon="glyphicon glyphicon-chevron-down"}if(L){L.addClass(p.timeIcon)}}if(p.options.pickDate){if(L&&L.length){p.dateIcon=L.data("date-icon")}if(!p.dateIcon){p.dateIcon="glyphicon glyphicon-calendar"}if(L){L.removeClass(p.timeIcon);L.addClass(p.dateIcon)}}p.widget=c(H(p.timeIcon,p.upIcon,p.downIcon,p.options.pickDate,p.options.pickTime,p.options.collapse)).appendTo("body");p.minViewMode=p.options.minViewMode||p.element.data("date-minviewmode")||0;if(typeof p.minViewMode==="string"){switch(p.minViewMode){case"months":p.minViewMode=1;break;case"years":p.minViewMode=2;break;default:p.minViewMode=0;break}}p.viewMode=p.options.viewMode||p.element.data("date-viewmode")||0;if(typeof p.viewMode==="string"){switch(p.viewMode){case"months":p.viewMode=1;break;case"years":p.viewMode=2;break;default:p.viewMode=0;break}}for(K in p.options.disabledDates){M=p.options.disabledDates[K];M=moment(M);if(!M.isValid){M=moment(startDate).subtract(1,"day").format("L")}p.options.disabledDates[K]=M.format("L")}p.startViewMode=p.viewMode;p.setStartDate(p.options.startDate||p.element.data("date-startdate"));p.setEndDate(p.options.endDate||p.element.data("date-enddate"));G();J();k();B();m();e();I();if(p.options.defaultDate!==""){p.setValue(p.options.defaultDate)}},n=function(){var K="absolute",M=p.component?p.component.offset():p.element.offset(),L=c(window);p.width=p.component?p.component.outerWidth():p.element.outerWidth();M.top=M.top+p.element.outerHeight();if(p.options.width!==undefined){p.widget.width(p.options.width)}if(p.options.orientation==="left"){p.widget.addClass("left-oriented");M.left=M.left-p.widget.width()+20}if(z()){K="fixed";M.top-=L.scrollTop();M.left-=L.scrollLeft()}if(L.width()"),K=moment.weekdaysMin();while(L'+K[(L++)%7]+"")}p.widget.find(".datepicker-days thead").append(M)},J=function(){moment.lang(p.options.language);var L="",K=0,M=moment.monthsShort();while(K<12){L+=''+M[K++]+""}p.widget.find(".datepicker-months td").append(L)},g=function(){moment.lang(p.options.language);var V=p.viewDate.year(),T=p.viewDate.month(),U=p.options.startDate.year(),X=p.options.startDate.month(),Y=p.options.endDate.year(),R=p.options.endDate.month(),N,Q,P=[],Z,M,O,W,L,S,K=moment.months();p.widget.find(".datepicker-days").find(".disabled").removeClass("disabled");p.widget.find(".datepicker-months").find(".disabled").removeClass("disabled");p.widget.find(".datepicker-years").find(".disabled").removeClass("disabled");p.widget.find(".datepicker-days th:eq(1)").text(K[T]+" "+V);N=moment(p.viewDate).subtract("months",1);W=N.daysInMonth();N.date(W).startOf("week");if((V==U&&T<=X)||V=R)||V>Y){p.widget.find(".datepicker-days th:eq(2)").addClass("disabled")}Q=moment(N).add(42,"d");while(N.isBefore(Q)){if(N.weekday()===moment().startOf("week").weekday()){Z=c("");P.push(Z)}M="";if(N.year()V||(N.year()==V&&N.month()>T)){M+=" new"}}if(N===p.viewDate){M+=" active"}if((moment(N).add(1,"d")<=p.options.startDate)||(N>p.options.endDate)||d(N)){M+=" disabled"}Z.append(''+N.date()+"");N.add(1,"d")}p.widget.find(".datepicker-days tbody").empty().append(P);S=moment().year(),K=p.widget.find(".datepicker-months").find("th:eq(1)").text(V).end().find("span").removeClass("active");if(S===V){K.eq(moment().month()).addClass("active")}if(S-1Y){p.widget.find(".datepicker-months th:eq(2)").addClass("disabled")}for(O=0;O<12;O++){if((V==U&&X>O)||(VY)){c(K[O]).addClass("disabled")}}}P="";V=parseInt(V/10,10)*10;L=p.widget.find(".datepicker-years").find("th:eq(1)").text(V+"-"+(V+9)).end().find("td");p.widget.find(".datepicker-years").find("th").removeClass("disabled");if(U>V){p.widget.find(".datepicker-years").find("th:eq(0)").addClass("disabled")}if(YY)?" disabled":"")+'">'+V+"";V+=1}L.html(P)},k=function(){var N=p.widget.find(".timepicker .timepicker-hours table"),M="",O,L,K;N.parent().hide();O=0;for(L=0;L<6;L+=1){M+="";for(K=0;K<4;K+=1){M+=''+C(O.toString())+"";O++}M+=""}N.html(M)},B=function(){var N=p.widget.find(".timepicker .timepicker-minutes table"),M="",O=0,L,K;N.parent().hide();for(L=0;L<5;L++){M+="";for(K=0;K<4;K+=1){M+=''+C(O.toString())+"";O+=3}M+=""}N.html(M)},x=function(){if(!p.date){return}var M=p.widget.find(".timepicker span[data-time-component]"),K=p.date.hours(),L="AM";if(K>=12){L="PM"}if(K===0){K=12}else{if(K!=12){K=K%12}}p.widget.find(".timepicker [data-action=togglePeriod]").text(L);M.filter("[data-time-component=hours]").text(C(K));M.filter("[data-time-component=minutes]").text(C(p.date.minutes()))},A=function(P){P.stopPropagation();P.preventDefault();p.unset=false;var O=c(P.target).closest("span, td, th"),N,L,M,K;if(O.length===1){if(!O.is(".disabled")){switch(O[0].nodeName.toLowerCase()){case"th":switch(O[0].className){case"switch":e(1);break;case"prev":case"next":M=F.modes[p.viewMode].navStep;if(O[0].className==="prev"){M=M*-1}p.viewDate.add(M,F.modes[p.viewMode].navFnc);g();break}break;case"span":if(O.is(".month")){N=O.parent().find("span").index(O);p.viewDate.month(N)}else{L=parseInt(O.text(),10)||0;p.viewDate.year(L)}if(p.viewMode!==0){p.date=moment({y:p.viewDate.year(),M:p.viewDate.month(),d:p.viewDate.date(),h:p.date.hours(),m:p.date.minutes()});y()}e(-1);g();break;case"td":if(O.is(".day")){K=parseInt(O.text(),10)||1;N=p.viewDate.month();L=p.viewDate.year();if(O.is(".old")){if(N===0){N=11;L-=1}else{N-=1}}else{if(O.is(".new")){if(N==11){N=0;L+=1}else{N+=1}}}p.date=moment({y:L,M:N,d:K,h:p.date.hours(),m:p.date.minutes()});p.viewDate=moment({y:L,M:N,d:Math.min(28,K)});g();w();y()}break}}}},q={incrementHours:function(){i("add","hours")},incrementMinutes:function(){i("add","minutes")},decrementHours:function(){i("subtract","hours")},decrementMinutes:function(){i("subtract","minutes")},togglePeriod:function(){var K=p.date.hours();if(K>=12){K-=12}else{K+=12}p.date.hours(K)},showPicker:function(){p.widget.find(".timepicker > div:not(.timepicker-picker)").hide();p.widget.find(".timepicker .timepicker-picker").show()},showHours:function(){p.widget.find(".timepicker .timepicker-picker").hide();p.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){p.widget.find(".timepicker .timepicker-picker").hide();p.widget.find(".timepicker .timepicker-minutes").show()},selectHour:function(K){p.date.hours(parseInt(c(K.target).text(),10));q.showPicker.call(p)},selectMinute:function(K){p.date.minutes(parseInt(c(K.target).text(),10));q.showPicker.call(p)}},u=function(L){E(L);if(!p.date){p.date=moment({y:1970})}var K=c(L.currentTarget).data("action"),M=q[K].apply(p,arguments);w();x();y();return M},E=function(K){K.stopPropagation();K.preventDefault()},t=function(L){var K=c(L.target),M=K.val();if(p.date.isValid){m();p.setValue(p.date.getTime());y();w()}else{if(M&&M.trim()){p.setValue(p.date.getTime());if(p.date.isValid){w()}else{K.val("");v(M)}}else{if(p.date.isValid){p.setValue(null);y();p.unset=true}}}},e=function(K){if(K){p.viewMode=Math.max(p.minViewMode,Math.min(2,p.viewMode+K))}p.widget.find(".datepicker > div").hide().filter(".datepicker-"+F.modes[p.viewMode].clsName).show()},I=function(){var M=this,P,O,L,K,N;p.widget.on("click",".datepicker *",c.proxy(A,this));p.widget.on("click","[data-action]",c.proxy(u,this));p.widget.on("mousedown",c.proxy(E,this));if(p.options.pickDate&&p.options.pickTime){p.widget.on("click.togglePicker",".accordion-toggle",function(Q){Q.stopPropagation();P=c(this);O=P.closest("ul");L=O.find(".in");K=O.find(".collapse:not(.in)");if(L&&L.length){N=L.data("collapse");if(N&&N.transitioning){return}L.collapse("hide");K.collapse("show");P.find("span").toggleClass(M.timeIcon+" "+M.dateIcon);p.element.find(".input-group-addon span").toggleClass(M.timeIcon+" "+M.dateIcon)}})}if(p.isInput){p.element.on({focus:c.proxy(p.show,this),change:c.proxy(t,this),blur:c.proxy(p.hide,this)})}else{p.element.on({change:c.proxy(t,this)},"input");if(p.component){p.component.on("click",c.proxy(p.show,this))}else{p.element.on("click",c.proxy(p.show,this))}}},o=function(){c(window).on("resize.datetimepicker"+p.id,c.proxy(n,this));if(!p.isInput){c(document).on("mousedown.datetimepicker"+p.id,c.proxy(p.hide,this))}},s=function(){p.widget.off("click",".datepicker *",p.click);p.widget.off("click","[data-action]");p.widget.off("mousedown",p.stopEvent);if(p.options.pickDate&&p.options.pickTime){p.widget.off("click.togglePicker")}if(p.isInput){p.element.off({focus:p.show,change:p.change})}else{p.element.off({change:p.change},"input");if(p.component){p.component.off("click",p.show)}else{p.element.off("click",p.show)}}},j=function(){c(window).off("resize.datetimepicker"+p.id);if(!p.isInput){c(document).off("mousedown.datetimepicker"+p.id)}},z=function(){if(p.element){var L=p.element.parents(),K=false,M;for(M=0;M=2){return K}else{return"0"+K}},H=function(N,P,M,L,K,O){if(L&&K){return('")}else{if(K){return('")}else{return('")}}},F={modes:[{clsName:"days",navFnc:"month",navStep:1},{clsName:"months",navFnc:"year",navStep:1},{clsName:"years",navFnc:"year",navStep:10}],headTemplate:'‹›',contTemplate:''},l={hourTemplate:'',minuteTemplate:''};F.template='
'+F.headTemplate+'
'+F.headTemplate+F.contTemplate+'
'+F.headTemplate+F.contTemplate+"
";l.getTemplate=function(L,K){return('
'+l.hourTemplate+' :'+l.minuteTemplate+'
')};p.destroy=function(){s();j();p.widget.remove();p.element.removeData("DateTimePicker");p.component.removeData("DateTimePicker")};p.show=function(K){p.widget.show();p.height=p.component?p.component.outerHeight():p.element.outerHeight();n();p.element.trigger({type:"show.dp",date:p.date});o();if(K){E(K)}},p.disable=function(){p.element.find("input").prop("disabled",true);s()},p.enable=function(){p.element.find("input").prop("disabled",false);I()},p.hide=function(){var M=p.widget.find(".collapse"),K,L;for(K=0;Kul{margin:0;list-style-type:none}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-size:1.2em;font-weight:bold}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{width:20px;height:20px;text-align:center;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{cursor:pointer;background:#eee}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#999}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#428bca}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{color:#999;cursor:not-allowed;background:0}.bootstrap-datetimepicker-widget td span{display:block;float:left;width:47px;height:54px;margin:2px;line-height:54px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#428bca}.bootstrap-datetimepicker-widget td span.old{color:#999}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{color:#999;cursor:not-allowed;background:0}.bootstrap-datetimepicker-widget th.switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{color:#999;cursor:not-allowed;background:0}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-group.date .input-group-addon span{display:block;width:16px;height:16px;cursor:pointer}.bootstrap-datetimepicker-widget.left-oriented:before{right:6px;left:auto}.bootstrap-datetimepicker-widget.left-oriented:after{right:7px;left:auto}.bootstrap-datetimepicker-widget ul.list-unstyled li.in div.timepicker div.timepicker-picker table.table-condensed tbody>tr>td{padding:0!important} \ No newline at end of file diff --git a/ajax/libs/bootstrap-datetimepicker/2.1.11/js/bootstrap-datetimepicker.min.js b/ajax/libs/bootstrap-datetimepicker/2.1.11/js/bootstrap-datetimepicker.min.js new file mode 100644 index 000000000..775fa3f70 --- /dev/null +++ b/ajax/libs/bootstrap-datetimepicker/2.1.11/js/bootstrap-datetimepicker.min.js @@ -0,0 +1,28 @@ +/** + * version 2.1.11 + * @license + * ========================================================= + * bootstrap-datetimepicker.js + * http://www.eyecon.ro/bootstrap-datepicker + * ========================================================= + * Copyright 2012 Stefan Petre + * + * Contributions: + * - updated for Bootstrap v3 by Jonathan Peterson (@Eonasdan) and (almost) + * completely rewritten to use Momentjs + * - based on tarruda's bootstrap-datepicker + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= + */ +(function(d){var c=0,a=moment,b=function(g,i){var s={pickDate:true,pickTime:true,startDate:new a({y:1970}),endDate:new a().add(50,"y"),collapse:true,language:"en",defaultDate:"",disabledDates:[],icons:{},useStrict:false},K={time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down"},q=this,E=function(){var O=false,N,P,M;q.options=d.extend({},s,i);q.options.icons=d.extend({},K,q.options.icons);if(!(q.options.pickTime||q.options.pickDate)){throw new Error("Must choose at least one picker")}q.id=c++;a.lang(q.options.language);q.date=a();q.element=d(g);q.unset=false;q.isInput=q.element.is("input");q.component=false;if(q.element.hasClass("input-group")){if(q.element.find(".datepickerbutton").size()==0){q.component=q.element.find(".input-group-addon")}else{q.component=q.element.find(".datepickerbutton")}}q.format=q.options.format;M=a()._lang._longDateFormat;if(!q.format){if(q.isInput){q.format=q.element.data("format")}else{q.format=q.element.find("input").data("format")}if(!q.format){q.format=(q.options.pickDate?M.L:"");if(q.options.pickDate&&q.options.pickTime){q.format+=" "}q.format+=(q.options.pickTime?M.LT:"")}}q.use24hours=q.format.toLowerCase().indexOf("a")<1;if(q.component){O=q.component.find("span")}if(q.options.pickTime){if(O){O.addClass(q.options.icons.time)}}if(q.options.pickDate){if(O){O.removeClass(q.options.icons.time);O.addClass(q.options.icons.date)}}q.widget=d(I(q.options.pickDate,q.options.pickTime,q.options.collapse)).appendTo("body");q.minViewMode=q.options.minViewMode||q.element.data("date-minviewmode")||0;if(typeof q.minViewMode==="string"){switch(q.minViewMode){case"months":q.minViewMode=1;break;case"years":q.minViewMode=2;break;default:q.minViewMode=0;break}}q.viewMode=q.options.viewMode||q.element.data("date-viewmode")||0;if(typeof q.viewMode==="string"){switch(q.viewMode){case"months":q.viewMode=1;break;case"years":q.viewMode=2;break;default:q.viewMode=0;break}}for(N=0;N"),M=a.weekdaysMin(),N;if(a()._lang._week.dow==0){for(N=0;N<7;N++){O.append(''+M[N]+"")}}else{for(N=1;N<8;N++){if(N==7){O.append(''+M[0]+"")}else{O.append(''+M[N]+"")}}}q.widget.find(".datepicker-days thead").append(O)},L=function(){a.lang(q.options.language);var N="",M=0,O=a.monthsShort();while(M<12){N+=''+O[M++]+""}q.widget.find(".datepicker-months td").append(N)},h=function(){a.lang(q.options.language);var X=q.viewDate.year(),V=q.viewDate.month(),W=q.options.startDate.year(),Z=q.options.startDate.month(),aa=q.options.endDate.year(),T=q.options.endDate.month(),P,S,R=[],ab,O,Q,Y,N,U,M=a.months();q.widget.find(".datepicker-days").find(".disabled").removeClass("disabled");q.widget.find(".datepicker-months").find(".disabled").removeClass("disabled");q.widget.find(".datepicker-years").find(".disabled").removeClass("disabled");q.widget.find(".datepicker-days th:eq(1)").text(M[V]+" "+X);P=a(q.viewDate).subtract("months",1);Y=P.daysInMonth();P.date(Y).startOf("week");if((X==W&&V<=Z)||X=T)||X>aa){q.widget.find(".datepicker-days th:eq(2)").addClass("disabled")}S=a(P).add(42,"d");while(P.isBefore(S)){if(P.weekday()===a().startOf("week").weekday()){ab=d("");R.push(ab)}O="";if(P.year()X||(P.year()==X&&P.month()>V)){O+=" new"}}if(P.isSame(a({y:q.date.year(),M:q.date.month(),d:q.date.date()}))){O+=" active"}if((a(P).add(1,"d")<=q.options.startDate)||(P>q.options.endDate)||e(P)){O+=" disabled"}ab.append(''+P.date()+"");P.add(1,"d")}q.widget.find(".datepicker-days tbody").empty().append(R);U=a().year(),M=q.widget.find(".datepicker-months").find("th:eq(1)").text(X).end().find("span").removeClass("active");if(U===X){M.eq(a().month()).addClass("active")}if(U-1aa){q.widget.find(".datepicker-months th:eq(2)").addClass("disabled")}for(Q=0;Q<12;Q++){if((X==W&&Z>Q)||(Xaa)){d(M[Q]).addClass("disabled")}}}R="";X=parseInt(X/10,10)*10;N=q.widget.find(".datepicker-years").find("th:eq(1)").text(X+"-"+(X+9)).end().find("td");q.widget.find(".datepicker-years").find("th").removeClass("disabled");if(W>X){q.widget.find(".datepicker-years").find("th:eq(0)").addClass("disabled")}if(aaaa)?" disabled":"")+'">'+X+"";X+=1}N.html(R)},l=function(){a.lang(q.options.language);var P=q.widget.find(".timepicker .timepicker-hours table"),O="",Q,N,M;P.parent().hide();if(q.use24hours){Q=0;for(N=0;N<6;N+=1){O+="";for(M=0;M<4;M+=1){O+=''+D(Q.toString())+"";Q++}O+=""}}else{Q=1;for(N=0;N<3;N+=1){O+="";for(M=0;M<4;M+=1){O+=''+D(Q.toString())+"";Q++}O+=""}}P.html(O)},C=function(){var P=q.widget.find(".timepicker .timepicker-minutes table"),O="",Q=0,N,M;P.parent().hide();for(N=0;N<5;N++){O+="";for(M=0;M<4;M+=1){O+=''+D(Q.toString())+"";Q+=3}O+=""}P.html(O)},y=function(){if(!q.date){return}var O=q.widget.find(".timepicker span[data-time-component]"),M=q.date.hours(),N="AM";if(!q.use24hours){if(M>=12){N="PM"}if(M===0){M=12}else{if(M!=12){M=M%12}}q.widget.find(".timepicker [data-action=togglePeriod]").text(N)}O.filter("[data-time-component=hours]").text(D(M));O.filter("[data-time-component=minutes]").text(D(q.date.minutes()))},B=function(S){S.stopPropagation();S.preventDefault();q.unset=false;var R=d(S.target).closest("span, td, th"),Q,O,P,M,N=q.date;if(R.length===1){if(!R.is(".disabled")){switch(R[0].nodeName.toLowerCase()){case"th":switch(R[0].className){case"switch":f(1);break;case"prev":case"next":P=G.modes[q.viewMode].navStep;if(R[0].className==="prev"){P=P*-1}q.viewDate.add(P,G.modes[q.viewMode].navFnc);h();break}break;case"span":if(R.is(".month")){Q=R.parent().find("span").index(R);q.viewDate.month(Q)}else{O=parseInt(R.text(),10)||0;q.viewDate.year(O)}if(q.viewMode!==0){q.date=a({y:q.viewDate.year(),M:q.viewDate.month(),d:q.viewDate.date(),h:q.date.hours(),m:q.date.minutes()});z(N)}f(-1);h();break;case"td":if(R.is(".day")){M=parseInt(R.text(),10)||1;Q=q.viewDate.month();O=q.viewDate.year();if(R.is(".old")){if(Q===0){Q=11;O-=1}else{Q-=1}}else{if(R.is(".new")){if(Q==11){Q=0;O+=1}else{Q+=1}}}q.date=a({y:O,M:Q,d:M,h:q.date.hours(),m:q.date.minutes()});q.viewDate=a({y:O,M:Q,d:Math.min(28,M)});h();x();z(N)}break}}}},r={incrementHours:function(){j("add","hours")},incrementMinutes:function(){j("add","minutes")},decrementHours:function(){j("subtract","hours")},decrementMinutes:function(){j("subtract","minutes")},togglePeriod:function(){var M=q.date.hours();if(M>=12){M-=12}else{M+=12}q.date.hours(M)},showPicker:function(){q.widget.find(".timepicker > div:not(.timepicker-picker)").hide();q.widget.find(".timepicker .timepicker-picker").show()},showHours:function(){q.widget.find(".timepicker .timepicker-picker").hide();q.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){q.widget.find(".timepicker .timepicker-picker").hide();q.widget.find(".timepicker .timepicker-minutes").show()},selectHour:function(M){q.date.hours(parseInt(d(M.target).text(),10));r.showPicker.call(q)},selectMinute:function(M){q.date.minutes(parseInt(d(M.target).text(),10));r.showPicker.call(q)}},v=function(O){var N=d(O.currentTarget).data("action"),P=r[N].apply(q,arguments),M=q.date;F(O);if(!q.date){q.date=a({y:1970})}x();y();z(M);return P},F=function(M){M.stopPropagation();M.preventDefault()},u=function(O){a.lang(q.options.language);var M=d(O.target),N=q.date,P=a(M.val(),q.format,q.options.useStrict);if(P.isValid()){n();q.setValue(P);z(N);x()}else{q.viewDate=N;z(N);w(P);q.unset=true;M.val("")}},f=function(M){if(M){q.viewMode=Math.max(q.minViewMode,Math.min(2,q.viewMode+M))}q.widget.find(".datepicker > div").hide().filter(".datepicker-"+G.modes[q.viewMode].clsName).show()},J=function(){var Q,P,N,M,O;q.widget.on("click",".datepicker *",d.proxy(B,this));q.widget.on("click","[data-action]",d.proxy(v,this));q.widget.on("mousedown",d.proxy(F,this));if(q.options.pickDate&&q.options.pickTime){q.widget.on("click.togglePicker",".accordion-toggle",function(R){R.stopPropagation();Q=d(this);P=Q.closest("ul");N=P.find(".in");M=P.find(".collapse:not(.in)");if(N&&N.length){O=N.data("collapse");if(O&&O.transitioning){return}N.collapse("hide");M.collapse("show");Q.find("span").toggleClass(q.options.icons.time+" "+q.options.icons.date);q.element.find(".input-group-addon span").toggleClass(q.options.icons.time+" "+q.options.icons.date)}})}if(q.isInput){q.element.on({focus:d.proxy(q.show,this),change:d.proxy(u,this),blur:d.proxy(q.hide,this)})}else{q.element.on({change:d.proxy(u,this)},"input");if(q.component){q.component.on("click",d.proxy(q.show,this))}else{q.element.on("click",d.proxy(q.show,this))}}},p=function(){d(window).on("resize.datetimepicker"+q.id,d.proxy(o,this));if(!q.isInput){d(document).on("mousedown.datetimepicker"+q.id,d.proxy(q.hide,this))}},t=function(){q.widget.off("click",".datepicker *",q.click);q.widget.off("click","[data-action]");q.widget.off("mousedown",q.stopEvent);if(q.options.pickDate&&q.options.pickTime){q.widget.off("click.togglePicker")}if(q.isInput){q.element.off({focus:q.show,change:q.change})}else{q.element.off({change:q.change},"input");if(q.component){q.component.off("click",q.show)}else{q.element.off("click",q.show)}}},k=function(){d(window).off("resize.datetimepicker"+q.id);if(!q.isInput){d(document).off("mousedown.datetimepicker"+q.id)}},A=function(){if(q.element){var N=q.element.parents(),M=false,O;for(O=0;O=2){return M}else{return"0"+M}},I=function(N,M,O){if(N&&M){return('")}else{if(M){return('")}else{return('")}}},G={modes:[{clsName:"days",navFnc:"month",navStep:1},{clsName:"months",navFnc:"year",navStep:1},{clsName:"years",navFnc:"year",navStep:10}],headTemplate:'‹›',contTemplate:''},m={hourTemplate:'',minuteTemplate:''};G.template='
'+G.headTemplate+'
'+G.headTemplate+G.contTemplate+'
'+G.headTemplate+G.contTemplate+"
";m.getTemplate=function(){return('
'+(!q.use24hours?'':"")+" "+(!q.use24hours?'':"")+''+(!q.use24hours?'':"")+'
"+m.hourTemplate+' :'+m.minuteTemplate+"
')};q.destroy=function(){t();k();q.widget.remove();q.element.removeData("DateTimePicker");q.component.removeData("DateTimePicker")};q.show=function(M){q.widget.show();q.height=q.component?q.component.outerHeight():q.element.outerHeight();o();q.element.trigger({type:"show.dp",date:q.date});p();if(M){F(M)}},q.disable=function(){q.element.find("input").prop("disabled",true);t()},q.enable=function(){q.element.find("input").prop("disabled",false);J()},q.hide=function(){var O=q.widget.find(".collapse"),M,N;for(M=0;M ul { + list-style-type: none; + margin: 0; +} +.bootstrap-datetimepicker-widget .timepicker-hour, +.bootstrap-datetimepicker-widget .timepicker-minute, +.bootstrap-datetimepicker-widget .timepicker-second { + width: 100%; + font-weight: bold; + font-size: 1.2em; +} +.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator { + width: 4px; + padding: 0; + margin: 0; +} +.bootstrap-datetimepicker-widget .datepicker > div { + display: none; +} +.bootstrap-datetimepicker-widget .picker-switch { + text-align: center; +} +.bootstrap-datetimepicker-widget table { + width: 100%; + margin: 0; +} +.bootstrap-datetimepicker-widget td, +.bootstrap-datetimepicker-widget th { + text-align: center; + width: 20px; + height: 20px; + border-radius: 4px; +} +.bootstrap-datetimepicker-widget td.day:hover, +.bootstrap-datetimepicker-widget td.hour:hover, +.bootstrap-datetimepicker-widget td.minute:hover, +.bootstrap-datetimepicker-widget td.second:hover { + background: #eeeeee; + cursor: pointer; +} +.bootstrap-datetimepicker-widget td.old, +.bootstrap-datetimepicker-widget td.new { + color: #999999; +} +.bootstrap-datetimepicker-widget td.active, +.bootstrap-datetimepicker-widget td.active:hover { + background-color: #428bca; + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.bootstrap-datetimepicker-widget td.disabled, +.bootstrap-datetimepicker-widget td.disabled:hover { + background: none; + color: #999999; + cursor: not-allowed; +} +.bootstrap-datetimepicker-widget td span { + display: block; + width: 47px; + height: 54px; + line-height: 54px; + float: left; + margin: 2px; + cursor: pointer; + border-radius: 4px; +} +.bootstrap-datetimepicker-widget td span:hover { + background: #eeeeee; +} +.bootstrap-datetimepicker-widget td span.active { + background-color: #428bca; + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.bootstrap-datetimepicker-widget td span.old { + color: #999999; +} +.bootstrap-datetimepicker-widget td span.disabled, +.bootstrap-datetimepicker-widget td span.disabled:hover { + background: none; + color: #999999; + cursor: not-allowed; +} +.bootstrap-datetimepicker-widget th.switch { + width: 145px; +} +.bootstrap-datetimepicker-widget th.next, +.bootstrap-datetimepicker-widget th.prev { + font-size: 21px; +} +.bootstrap-datetimepicker-widget th.disabled, +.bootstrap-datetimepicker-widget th.disabled:hover { + background: none; + color: #999999; + cursor: not-allowed; +} +.bootstrap-datetimepicker-widget thead tr:first-child th { + cursor: pointer; +} +.bootstrap-datetimepicker-widget thead tr:first-child th:hover { + background: #eeeeee; +} +.input-group.date .input-group-addon span { + display: block; + cursor: pointer; + width: 16px; + height: 16px; +} +.bootstrap-datetimepicker-widget.left-oriented:before { + left: auto; + right: 6px; +} +.bootstrap-datetimepicker-widget.left-oriented:after { + left: auto; + right: 7px; +} +.bootstrap-datetimepicker-widget ul.list-unstyled li.in div.timepicker div.timepicker-picker table.table-condensed tbody > tr > td { + padding: 0px !important; +} diff --git a/ajax/libs/bootstrap-datetimepicker/2.1.20/css/bootstrap-datetimepicker.min.css b/ajax/libs/bootstrap-datetimepicker/2.1.20/css/bootstrap-datetimepicker.min.css new file mode 100644 index 000000000..00b768767 --- /dev/null +++ b/ajax/libs/bootstrap-datetimepicker/2.1.20/css/bootstrap-datetimepicker.min.css @@ -0,0 +1,8 @@ +/*! + * Datetimepicker for Bootstrap v3 + * https://github.com/Eonasdan/bootstrap-datetimepicker/ + * Copyright 2012 Stefan Petre + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + */.bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:9999;border-radius:4px}.bootstrap-datetimepicker-widget .btn{padding:6px}.bootstrap-datetimepicker-widget:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);position:absolute;top:-7px;left:6px}.bootstrap-datetimepicker-widget:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:7px}.bootstrap-datetimepicker-widget.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-weight:bold;font-size:1.2em}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;width:20px;height:20px;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#999}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:block;width:47px;height:54px;line-height:54px;float:left;margin:2px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget td span.old{color:#999}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget th.switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-group.date .input-group-addon span{display:block;cursor:pointer;width:16px;height:16px}.bootstrap-datetimepicker-widget.left-oriented:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.left-oriented:after{left:auto;right:7px}.bootstrap-datetimepicker-widget ul.list-unstyled li.in div.timepicker div.timepicker-picker table.table-condensed tbody>tr>td{padding:0 !important} \ No newline at end of file diff --git a/ajax/libs/bootstrap-datetimepicker/2.1.20/js/bootstrap-datetimepicker.min.js b/ajax/libs/bootstrap-datetimepicker/2.1.20/js/bootstrap-datetimepicker.min.js new file mode 100644 index 000000000..0b1c8b6f1 --- /dev/null +++ b/ajax/libs/bootstrap-datetimepicker/2.1.20/js/bootstrap-datetimepicker.min.js @@ -0,0 +1,28 @@ +/** + * version 2.1.20 + * @license + * ========================================================= + * bootstrap-datetimepicker.js + * http://www.eyecon.ro/bootstrap-datepicker + * ========================================================= + * Copyright 2012 Stefan Petre + * + * Contributions: + * - updated for Bootstrap v3 by Jonathan Peterson (@Eonasdan) and (almost) + * completely rewritten to use Momentjs + * - based on tarruda's bootstrap-datepicker + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= + */ +(function(a){if(typeof define==="function"&&define.amd){define(["jquery","moment"],a)}else{if(!jQuery){throw"bootstrap-datetimepicker requires jQuery to be loaded first"}else{if(!moment){throw"bootstrap-datetimepicker requires moment.js to be loaded first"}else{a(jQuery,moment)}}}}(function(d,e){if(typeof e==="undefined"){alert("momentjs is requried");throw new Error("momentjs is requried")}var c=0,a=e,b=function(o,q){var z={pickDate:true,pickTime:true,useMinutes:true,useSeconds:false,minuteStepping:1,startDate:new a({y:1970}),endDate:new a().add(50,"y"),collapse:true,language:"en",defaultDate:"",disabledDates:[],enabledDates:false,icons:{},useStrict:false},M={time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down"},l=this,I=function(){var S=false,R,T,Q;l.options=d.extend({},z,q);l.options.icons=d.extend({},M,l.options.icons);l.element=d(o);f();if(!(l.options.pickTime||l.options.pickDate)){throw new Error("Must choose at least one picker")}l.id=c++;a.lang(l.options.language);l.date=a();l.unset=false;l.isInput=l.element.is("input");l.component=false;if(l.element.hasClass("input-group")){if(l.element.find(".datepickerbutton").size()==0){l.component=l.element.find("[class^='input-group-']")}else{l.component=l.element.find(".datepickerbutton")}}l.format=l.options.format;Q=a()._lang._longDateFormat;if(!l.format){if(l.isInput){l.format=l.element.data("format")}else{l.format=l.element.find("input").data("format")}if(!l.format){l.format=(l.options.pickDate?Q.L:"");if(l.options.pickDate&&l.options.pickTime){l.format+=" "}l.format+=(l.options.pickTime?Q.LT:"");if(l.options.useSeconds){if(~Q.LT.indexOf(" A")){l.format=l.format.split(" A")[0]+":ss A"}else{l.format+=":ss"}}}}l.options.use24hours=l.format.toLowerCase().indexOf("a")<1;if(l.component){S=l.component.find("span")}if(l.options.pickTime){if(S){S.addClass(l.options.icons.time)}}if(l.options.pickDate){if(S){S.removeClass(l.options.icons.time);S.addClass(l.options.icons.date)}}l.widget=d(P(l.options.pickDate,l.options.pickTime,l.options.collapse)).appendTo("body");l.minViewMode=l.options.minViewMode||l.element.data("date-minviewmode")||0;if(typeof l.minViewMode==="string"){switch(l.minViewMode){case"months":l.minViewMode=1;break;case"years":l.minViewMode=2;break;default:l.minViewMode=0;break}}l.viewMode=l.options.viewMode||l.element.data("date-viewmode")||0;if(typeof l.viewMode==="string"){switch(l.viewMode){case"months":l.viewMode=1;break;case"years":l.viewMode=2;break;default:l.viewMode=0;break}}for(R=0;R"),Q=a.weekdaysMin(),R;if(a()._lang._week.dow==0){for(R=0;R<7;R++){S.append(''+Q[R]+"")}}else{for(R=1;R<8;R++){if(R==7){S.append(''+Q[0]+"")}else{S.append(''+Q[R]+"")}}}l.widget.find(".datepicker-days thead").append(S)},u=function(){a.lang(l.options.language);var R="",Q=0,S=a.monthsShort();while(Q<12){R+=''+S[Q++]+""}l.widget.find(".datepicker-months td").append(R)},n=function(){a.lang(l.options.language);var ab=l.viewDate.year(),Z=l.viewDate.month(),aa=l.options.startDate.year(),ad=l.options.startDate.month(),ae=l.options.endDate.year(),X=l.options.endDate.month(),T,W,V=[],af,S,U,ac,R,Y,Q=a.months();l.widget.find(".datepicker-days").find(".disabled").removeClass("disabled");l.widget.find(".datepicker-months").find(".disabled").removeClass("disabled");l.widget.find(".datepicker-years").find(".disabled").removeClass("disabled");l.widget.find(".datepicker-days th:eq(1)").text(Q[Z]+" "+ab);T=a(l.viewDate).subtract("months",1);ac=T.daysInMonth();T.date(ac).startOf("week");if((ab==aa&&Z<=ad)||ab=X)||ab>ae){l.widget.find(".datepicker-days th:eq(2)").addClass("disabled")}W=a(T).add(42,"d");while(T.isBefore(W)){if(T.weekday()===a().startOf("week").weekday()){af=d("");V.push(af)}S="";if(T.year()ab||(T.year()==ab&&T.month()>Z)){S+=" new"}}if(T.isSame(a({y:l.date.year(),M:l.date.month(),d:l.date.date()}))){S+=" active"}if((a(T).add(1,"d")<=l.options.startDate)||(T>l.options.endDate)||O(T)||!s(T)){S+=" disabled"}af.append(''+T.date()+"");T.add(1,"d")}l.widget.find(".datepicker-days tbody").empty().append(V);Y=a().year(),Q=l.widget.find(".datepicker-months").find("th:eq(1)").text(ab).end().find("span").removeClass("active");if(Y===ab){Q.eq(a().month()).addClass("active")}if(Y-1ae){l.widget.find(".datepicker-months th:eq(2)").addClass("disabled")}for(U=0;U<12;U++){if((ab==aa&&ad>U)||(abae)){d(Q[U]).addClass("disabled")}}}V="";ab=parseInt(ab/10,10)*10;R=l.widget.find(".datepicker-years").find("th:eq(1)").text(ab+"-"+(ab+9)).end().find("td");l.widget.find(".datepicker-years").find("th").removeClass("disabled");if(aa>ab){l.widget.find(".datepicker-years").find("th:eq(0)").addClass("disabled")}if(aeae)?" disabled":"")+'">'+ab+"";ab+=1}R.html(V)},v=function(){a.lang(l.options.language);var T=l.widget.find(".timepicker .timepicker-hours table"),S="",U,R,Q;T.parent().hide();if(l.options.use24hours){U=0;for(R=0;R<6;R+=1){S+="";for(Q=0;Q<4;Q+=1){S+=''+N(U.toString())+"";U++}S+=""}}else{U=1;for(R=0;R<3;R+=1){S+="";for(Q=0;Q<4;Q+=1){S+=''+N(U.toString())+"";U++}S+=""}}T.html(S)},t=function(){var T=l.widget.find(".timepicker .timepicker-minutes table"),S="",U=0,R,Q;T.parent().hide();for(R=0;R<5;R++){S+="";for(Q=0;Q<4;Q+=1){S+=''+N(U.toString())+"";U+=3}S+=""}T.html(S)},h=function(){var T=l.widget.find(".timepicker .timepicker-seconds table"),S="",U=0,R,Q;T.parent().hide();for(R=0;R<5;R++){S+="";for(Q=0;Q<4;Q+=1){S+=''+N(U.toString())+"";U+=3}S+=""}T.html(S)},k=function(){if(!l.date){return}var S=l.widget.find(".timepicker span[data-time-component]"),Q=l.date.hours(),R="AM";if(!l.options.use24hours){if(Q>=12){R="PM"}if(Q===0){Q=12}else{if(Q!=12){Q=Q%12}}l.widget.find(".timepicker [data-action=togglePeriod]").text(R)}S.filter("[data-time-component=hours]").text(N(Q));S.filter("[data-time-component=minutes]").text(N(l.date.minutes()));S.filter("[data-time-component=seconds]").text(N(l.date.second()))},A=function(W){W.stopPropagation();W.preventDefault();l.unset=false;var V=d(W.target).closest("span, td, th"),U,S,T,Q,R=a(l.date);if(V.length===1){if(!V.is(".disabled")){switch(V[0].nodeName.toLowerCase()){case"th":switch(V[0].className){case"switch":g(1);break;case"prev":case"next":T=w.modes[l.viewMode].navStep;if(V[0].className==="prev"){T=T*-1}l.viewDate.add(T,w.modes[l.viewMode].navFnc);n();break}break;case"span":if(V.is(".month")){U=V.parent().find("span").index(V);l.viewDate.month(U)}else{S=parseInt(V.text(),10)||0;l.viewDate.year(S)}if(l.viewMode!==0){l.date=a({y:l.viewDate.year(),M:l.viewDate.month(),d:l.viewDate.date(),h:l.date.hours(),m:l.date.minutes()});p(R,W.type)}g(-1);n();break;case"td":if(V.is(".day")){Q=parseInt(V.text(),10)||1;U=l.viewDate.month();S=l.viewDate.year();if(V.is(".old")){if(U===0){U=11;S-=1}else{U-=1}}else{if(V.is(".new")){if(U==11){U=0;S+=1}else{U+=1}}}l.date=a({y:S,M:U,d:Q,h:l.date.hours(),m:l.date.minutes()});l.viewDate=a({y:S,M:U,d:Math.min(28,Q)});n();r();p(R,W.type)}break}}}},D={incrementHours:function(){m("add","hours",1)},incrementMinutes:function(){m("add","minutes",l.options.minuteStepping)},incrementSeconds:function(){m("add","seconds",1)},decrementHours:function(){m("subtract","hours",1)},decrementMinutes:function(){m("subtract","minutes",l.options.minuteStepping)},decrementSeconds:function(){m("subtract","seconds",1)},togglePeriod:function(){var Q=l.date.hours();if(Q>=12){Q-=12}else{Q+=12}l.date.hours(Q)},showPicker:function(){l.widget.find(".timepicker > div:not(.timepicker-picker)").hide();l.widget.find(".timepicker .timepicker-picker").show()},showHours:function(){l.widget.find(".timepicker .timepicker-picker").hide();l.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){l.widget.find(".timepicker .timepicker-picker").hide();l.widget.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){l.widget.find(".timepicker .timepicker-picker").hide();l.widget.find(".timepicker .timepicker-seconds").show()},selectHour:function(Q){l.date.hours(parseInt(d(Q.target).text(),10));D.showPicker.call(l)},selectMinute:function(Q){l.date.minutes(parseInt(d(Q.target).text(),10));D.showPicker.call(l)},selectSecond:function(Q){l.date.seconds(parseInt(d(Q.target).text(),10));D.showPicker.call(l)}},x=function(S){var Q=a(l.date),R=d(S.currentTarget).data("action"),T=D[R].apply(l,arguments);K(S);if(!l.date){l.date=a({y:1970})}r();k();p(Q);return T},K=function(Q){Q.stopPropagation();Q.preventDefault()},i=function(S){a.lang(l.options.language);var Q=d(S.target),R=a(l.date),T=a(Q.val(),l.format,l.options.useStrict);if(T.isValid()){y();l.setValue(T);p(R);r()}else{l.viewDate=R;p(R);C(T);l.unset=true;Q.val("")}},g=function(Q){if(Q){l.viewMode=Math.max(l.minViewMode,Math.min(2,l.viewMode+Q))}l.widget.find(".datepicker > div").hide().filter(".datepicker-"+w.modes[l.viewMode].clsName).show()},J=function(){var U,T,R,Q,S;l.widget.on("click",".datepicker *",d.proxy(A,this));l.widget.on("click","[data-action]",d.proxy(x,this));l.widget.on("mousedown",d.proxy(K,this));if(l.options.pickDate&&l.options.pickTime){l.widget.on("click.togglePicker",".accordion-toggle",function(V){V.stopPropagation();U=d(this);T=U.closest("ul");R=T.find(".in");Q=T.find(".collapse:not(.in)");if(R&&R.length){S=R.data("collapse");if(S&&S.transitioning){return}R.collapse("hide");Q.collapse("show");U.find("span").toggleClass(l.options.icons.time+" "+l.options.icons.date);l.element.find(".input-group-addon span").toggleClass(l.options.icons.time+" "+l.options.icons.date)}})}if(l.isInput){l.element.on({focus:d.proxy(l.show,this),change:d.proxy(i,this),blur:d.proxy(l.hide,this)})}else{l.element.on({change:d.proxy(i,this)},"input");if(l.component){l.component.on("click",d.proxy(l.show,this))}else{l.element.on("click",d.proxy(l.show,this))}}},L=function(){d(window).on("resize.datetimepicker"+l.id,d.proxy(j,this));if(!l.isInput){d(document).on("mousedown.datetimepicker"+l.id,d.proxy(l.hide,this))}},F=function(){l.widget.off("click",".datepicker *",l.click);l.widget.off("click","[data-action]");l.widget.off("mousedown",l.stopEvent);if(l.options.pickDate&&l.options.pickTime){l.widget.off("click.togglePicker")}if(l.isInput){l.element.off({focus:l.show,change:l.change})}else{l.element.off({change:l.change},"input");if(l.component){l.component.off("click",l.show)}else{l.element.off("click",l.show)}}},E=function(){d(window).off("resize.datetimepicker"+l.id);if(!l.isInput){d(document).off("mousedown.datetimepicker"+l.id)}},B=function(){if(l.element){var R=l.element.parents(),Q=false,S;for(S=0;S=2){return Q}else{return"0"+Q}},P=function(R,Q,S){if(R&&Q){return('")}else{if(Q){return('")}else{return('")}}},w={modes:[{clsName:"days",navFnc:"month",navStep:1},{clsName:"months",navFnc:"year",navStep:1},{clsName:"years",navFnc:"year",navStep:10}],headTemplate:'‹›',contTemplate:''},G={hourTemplate:'',minuteTemplate:'',secondTemplate:''};w.template='
'+w.headTemplate+'
'+w.headTemplate+w.contTemplate+'
'+w.headTemplate+w.contTemplate+"
";G.getTemplate=function(){return('
"+(l.options.useSeconds?'':"")+(l.options.use24hours?"":'')+" "+(l.options.useSeconds?'":"")+(l.options.use24hours?"":'')+'"+(l.options.useSeconds?'':"")+(l.options.use24hours?"":'')+'
'+(l.options.useMinutes?'':"")+"
"+G.hourTemplate+' :'+(l.options.useMinutes?G.minuteTemplate:'00')+":'+G.secondTemplate+"
'+(l.options.useMinutes?'':"")+"
'+(l.options.useSeconds?'
':""))};l.destroy=function(){F();E();l.widget.remove();l.element.removeData("DateTimePicker");if(l.component){l.component.removeData("DateTimePicker")}};l.show=function(Q){l.widget.show();l.height=l.component?l.component.outerHeight():l.element.outerHeight();j();l.element.trigger({type:"show.dp",date:a(l.date)});L();if(Q){K(Q)}},l.disable=function(){var Q=l.element.find("input");if(!Q.prop("disabled")){return}Q.prop("disabled",true);F()},l.enable=function(){var Q=l.element.find("input");if(!Q.prop("disabled")){return}Q.prop("disabled",true);J()},l.hide=function(S){if(S&&d(S.target).is(l.element.attr("id"))){return}var T=l.widget.find(".collapse"),Q,R;for(Q=0;Q ul { + list-style-type: none; + margin: 0; +} +.bootstrap-datetimepicker-widget .timepicker-hour, +.bootstrap-datetimepicker-widget .timepicker-minute, +.bootstrap-datetimepicker-widget .timepicker-second { + width: 100%; + font-weight: bold; + font-size: 1.2em; +} +.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator { + width: 4px; + padding: 0; + margin: 0; +} +.bootstrap-datetimepicker-widget .datepicker > div { + display: none; +} +.bootstrap-datetimepicker-widget .picker-switch { + text-align: center; +} +.bootstrap-datetimepicker-widget table { + width: 100%; + margin: 0; +} +.bootstrap-datetimepicker-widget td, +.bootstrap-datetimepicker-widget th { + text-align: center; + width: 20px; + height: 20px; + border-radius: 4px; +} +.bootstrap-datetimepicker-widget td.day:hover, +.bootstrap-datetimepicker-widget td.hour:hover, +.bootstrap-datetimepicker-widget td.minute:hover, +.bootstrap-datetimepicker-widget td.second:hover { + background: #eeeeee; + cursor: pointer; +} +.bootstrap-datetimepicker-widget td.old, +.bootstrap-datetimepicker-widget td.new { + color: #999999; +} +.bootstrap-datetimepicker-widget td.active, +.bootstrap-datetimepicker-widget td.active:hover { + background-color: #428bca; + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.bootstrap-datetimepicker-widget td.disabled, +.bootstrap-datetimepicker-widget td.disabled:hover { + background: none; + color: #999999; + cursor: not-allowed; +} +.bootstrap-datetimepicker-widget td span { + display: block; + width: 47px; + height: 54px; + line-height: 54px; + float: left; + margin: 2px; + cursor: pointer; + border-radius: 4px; +} +.bootstrap-datetimepicker-widget td span:hover { + background: #eeeeee; +} +.bootstrap-datetimepicker-widget td span.active { + background-color: #428bca; + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.bootstrap-datetimepicker-widget td span.old { + color: #999999; +} +.bootstrap-datetimepicker-widget td span.disabled, +.bootstrap-datetimepicker-widget td span.disabled:hover { + background: none; + color: #999999; + cursor: not-allowed; +} +.bootstrap-datetimepicker-widget th.switch { + width: 145px; +} +.bootstrap-datetimepicker-widget th.next, +.bootstrap-datetimepicker-widget th.prev { + font-size: 21px; +} +.bootstrap-datetimepicker-widget th.disabled, +.bootstrap-datetimepicker-widget th.disabled:hover { + background: none; + color: #999999; + cursor: not-allowed; +} +.bootstrap-datetimepicker-widget thead tr:first-child th { + cursor: pointer; +} +.bootstrap-datetimepicker-widget thead tr:first-child th:hover { + background: #eeeeee; +} +.input-group.date .input-group-addon span { + display: block; + cursor: pointer; + width: 16px; + height: 16px; +} +.bootstrap-datetimepicker-widget.left-oriented:before { + left: auto; + right: 6px; +} +.bootstrap-datetimepicker-widget.left-oriented:after { + left: auto; + right: 7px; +} +.bootstrap-datetimepicker-widget ul.list-unstyled li.in div.timepicker div.timepicker-picker table.table-condensed tbody > tr > td { + padding: 0px !important; +} diff --git a/ajax/libs/bootstrap-datetimepicker/2.1.30/css/bootstrap-datetimepicker.min.css b/ajax/libs/bootstrap-datetimepicker/2.1.30/css/bootstrap-datetimepicker.min.css new file mode 100644 index 000000000..72846afe3 --- /dev/null +++ b/ajax/libs/bootstrap-datetimepicker/2.1.30/css/bootstrap-datetimepicker.min.css @@ -0,0 +1,8 @@ +/*! + * Datetimepicker for Bootstrap v3 + * https://github.com/Eonasdan/bootstrap-datetimepicker/ + * Copyright 2012 Stefan Petre + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + */.bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:99999;border-radius:4px}.bootstrap-datetimepicker-widget .btn{padding:6px}.bootstrap-datetimepicker-widget:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);position:absolute;top:-7px;left:6px}.bootstrap-datetimepicker-widget:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:7px}.bootstrap-datetimepicker-widget.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-weight:bold;font-size:1.2em}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;width:20px;height:20px;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#999}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:block;width:47px;height:54px;line-height:54px;float:left;margin:2px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget td span.old{color:#999}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget th.switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-group.date .input-group-addon span{display:block;cursor:pointer;width:16px;height:16px}.bootstrap-datetimepicker-widget.left-oriented:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.left-oriented:after{left:auto;right:7px}.bootstrap-datetimepicker-widget ul.list-unstyled li.in div.timepicker div.timepicker-picker table.table-condensed tbody>tr>td{padding:0 !important} \ No newline at end of file diff --git a/ajax/libs/bootstrap-datetimepicker/2.1.30/js/bootstrap-datetimepicker.min.js b/ajax/libs/bootstrap-datetimepicker/2.1.30/js/bootstrap-datetimepicker.min.js new file mode 100644 index 000000000..124a75fef --- /dev/null +++ b/ajax/libs/bootstrap-datetimepicker/2.1.30/js/bootstrap-datetimepicker.min.js @@ -0,0 +1,28 @@ +/** + * version 2.1.30 + * @license + * ========================================================= + * bootstrap-datetimepicker.js + * http://www.eyecon.ro/bootstrap-datepicker + * ========================================================= + * Copyright 2012 Stefan Petre + * + * Contributions: + * - updated for Bootstrap v3 by Jonathan Peterson (@Eonasdan) and (almost) + * completely rewritten to use Momentjs + * - based on tarruda's bootstrap-datepicker + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= + */ +(function(a){if(typeof define==="function"&&define.amd){define(["jquery","moment"],a)}else{if(!jQuery){throw"bootstrap-datetimepicker requires jQuery to be loaded first"}else{if(!moment){throw"bootstrap-datetimepicker requires moment.js to be loaded first"}else{a(jQuery,moment)}}}}(function(d,e){if(typeof e==="undefined"){alert("momentjs is requried");throw new Error("momentjs is required")}var c=0,a=e,b=function(o,q){var z={pickDate:true,pickTime:true,useMinutes:true,useSeconds:false,minuteStepping:1,startDate:new a({y:1970}),endDate:new a().add(50,"y"),collapse:true,language:a.lang(),defaultDate:"",disabledDates:[],enabledDates:false,icons:{},useStrict:false,direction:"auto"},M={time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down"},l=this,I=function(){var S=false,R,T,Q;l.options=d.extend({},z,q);l.options.icons=d.extend({},M,l.options.icons);l.element=d(o);f();if(!(l.options.pickTime||l.options.pickDate)){throw new Error("Must choose at least one picker")}l.id=c++;a.lang(l.options.language);l.date=a();l.unset=false;l.isInput=l.element.is("input");l.component=false;if(l.element.hasClass("input-group")){if(l.element.find(".datepickerbutton").size()==0){l.component=l.element.find("[class^='input-group-']")}else{l.component=l.element.find(".datepickerbutton")}}l.format=l.options.format;Q=a()._lang._longDateFormat;if(!l.format){if(l.isInput){l.format=l.element.data("format")}else{l.format=l.element.find("input").data("format")}if(!l.format){l.format=(l.options.pickDate?Q.L:"");if(l.options.pickDate&&l.options.pickTime){l.format+=" "}l.format+=(l.options.pickTime?Q.LT:"");if(l.options.useSeconds){if(~Q.LT.indexOf(" A")){l.format=l.format.split(" A")[0]+":ss A"}else{l.format+=":ss"}}}}l.options.use24hours=l.format.toLowerCase().indexOf("a")<1;if(l.component){S=l.component.find("span")}if(l.options.pickTime){if(S){S.addClass(l.options.icons.time)}}if(l.options.pickDate){if(S){S.removeClass(l.options.icons.time);S.addClass(l.options.icons.date)}}l.widget=d(P(l.options.pickDate,l.options.pickTime,l.options.collapse)).appendTo("body");l.minViewMode=l.options.minViewMode||l.element.data("date-minviewmode")||0;if(typeof l.minViewMode==="string"){switch(l.minViewMode){case"months":l.minViewMode=1;break;case"years":l.minViewMode=2;break;default:l.minViewMode=0;break}}l.viewMode=l.options.viewMode||l.element.data("date-viewmode")||0;if(typeof l.viewMode==="string"){switch(l.viewMode){case"months":l.viewMode=1;break;case"years":l.viewMode=2;break;default:l.viewMode=0;break}}for(R=0;R"),Q=a.weekdaysMin(),R;if(a()._lang._week.dow==0){for(R=0;R<7;R++){S.append(''+Q[R]+"")}}else{for(R=1;R<8;R++){if(R==7){S.append(''+Q[0]+"")}else{S.append(''+Q[R]+"")}}}l.widget.find(".datepicker-days thead").append(S)},u=function(){a.lang(l.options.language);var R="",Q=0,S=a.monthsShort();while(Q<12){R+=''+S[Q++]+""}l.widget.find(".datepicker-months td").append(R)},n=function(){a.lang(l.options.language);var ab=l.viewDate.year(),Z=l.viewDate.month(),aa=l.options.startDate.year(),ad=l.options.startDate.month(),ae=l.options.endDate.year(),X=l.options.endDate.month(),T,W,V=[],af,S,U,ac,R,Y,Q=a.months();l.widget.find(".datepicker-days").find(".disabled").removeClass("disabled");l.widget.find(".datepicker-months").find(".disabled").removeClass("disabled");l.widget.find(".datepicker-years").find(".disabled").removeClass("disabled");l.widget.find(".datepicker-days th:eq(1)").text(Q[Z]+" "+ab);T=a(l.viewDate).subtract("months",1);ac=T.daysInMonth();T.date(ac).startOf("week");if((ab==aa&&Z<=ad)||ab=X)||ab>ae){l.widget.find(".datepicker-days th:eq(2)").addClass("disabled")}W=a(T).add(42,"d");while(T.isBefore(W)){if(T.weekday()===a().startOf("week").weekday()){af=d("");V.push(af)}S="";if(T.year()ab||(T.year()==ab&&T.month()>Z)){S+=" new"}}if(T.isSame(a({y:l.date.year(),M:l.date.month(),d:l.date.date()}))){S+=" active"}if(O(T)||!s(T)){S+=" disabled"}af.append(''+T.date()+"");T.add(1,"d")}l.widget.find(".datepicker-days tbody").empty().append(V);Y=a().year(),Q=l.widget.find(".datepicker-months").find("th:eq(1)").text(ab).end().find("span").removeClass("active");if(Y===ab){Q.eq(a().month()).addClass("active")}if(Y-1ae){l.widget.find(".datepicker-months th:eq(2)").addClass("disabled")}for(U=0;U<12;U++){if((ab==aa&&ad>U)||(abae)){d(Q[U]).addClass("disabled")}}}V="";ab=parseInt(ab/10,10)*10;R=l.widget.find(".datepicker-years").find("th:eq(1)").text(ab+"-"+(ab+9)).end().find("td");l.widget.find(".datepicker-years").find("th").removeClass("disabled");if(aa>ab){l.widget.find(".datepicker-years").find("th:eq(0)").addClass("disabled")}if(aeae)?" disabled":"")+'">'+ab+"";ab+=1}R.html(V)},v=function(){a.lang(l.options.language);var T=l.widget.find(".timepicker .timepicker-hours table"),S="",U,R,Q;T.parent().hide();if(l.options.use24hours){U=0;for(R=0;R<6;R+=1){S+="";for(Q=0;Q<4;Q+=1){S+=''+N(U.toString())+"";U++}S+=""}}else{U=1;for(R=0;R<3;R+=1){S+="";for(Q=0;Q<4;Q+=1){S+=''+N(U.toString())+"";U++}S+=""}}T.html(S)},t=function(){var T=l.widget.find(".timepicker .timepicker-minutes table"),S="",U=0,R,Q;T.parent().hide();for(R=0;R<5;R++){S+="";for(Q=0;Q<4;Q+=1){S+=''+N(U.toString())+"";U+=3}S+=""}T.html(S)},h=function(){var T=l.widget.find(".timepicker .timepicker-seconds table"),S="",U=0,R,Q;T.parent().hide();for(R=0;R<5;R++){S+="";for(Q=0;Q<4;Q+=1){S+=''+N(U.toString())+"";U+=3}S+=""}T.html(S)},k=function(){if(!l.date){return}var S=l.widget.find(".timepicker span[data-time-component]"),Q=l.date.hours(),R="AM";if(!l.options.use24hours){if(Q>=12){R="PM"}if(Q===0){Q=12}else{if(Q!=12){Q=Q%12}}l.widget.find(".timepicker [data-action=togglePeriod]").text(R)}S.filter("[data-time-component=hours]").text(N(Q));S.filter("[data-time-component=minutes]").text(N(l.date.minutes()));S.filter("[data-time-component=seconds]").text(N(l.date.second()))},A=function(W){W.stopPropagation();W.preventDefault();l.unset=false;var V=d(W.target).closest("span, td, th"),U,S,T,Q,R=a(l.date);if(V.length===1){if(!V.is(".disabled")){switch(V[0].nodeName.toLowerCase()){case"th":switch(V[0].className){case"switch":g(1);break;case"prev":case"next":T=w.modes[l.viewMode].navStep;if(V[0].className==="prev"){T=T*-1}l.viewDate.add(T,w.modes[l.viewMode].navFnc);n();break}break;case"span":if(V.is(".month")){U=V.parent().find("span").index(V);l.viewDate.month(U)}else{S=parseInt(V.text(),10)||0;l.viewDate.year(S)}if(l.viewMode!==0){l.date=a({y:l.viewDate.year(),M:l.viewDate.month(),d:l.viewDate.date(),h:l.date.hours(),m:l.date.minutes()});p(R,W.type)}g(-1);n();break;case"td":if(V.is(".day")){Q=parseInt(V.text(),10)||1;U=l.viewDate.month();S=l.viewDate.year();if(V.is(".old")){if(U===0){U=11;S-=1}else{U-=1}}else{if(V.is(".new")){if(U==11){U=0;S+=1}else{U+=1}}}l.date=a({y:S,M:U,d:Q,h:l.date.hours(),m:l.date.minutes()});l.viewDate=a({y:S,M:U,d:Math.min(28,Q)});n();r();p(R,W.type)}break}}}},D={incrementHours:function(){m("add","hours",1)},incrementMinutes:function(){m("add","minutes",l.options.minuteStepping)},incrementSeconds:function(){m("add","seconds",1)},decrementHours:function(){m("subtract","hours",1)},decrementMinutes:function(){m("subtract","minutes",l.options.minuteStepping)},decrementSeconds:function(){m("subtract","seconds",1)},togglePeriod:function(){var Q=l.date.hours();if(Q>=12){Q-=12}else{Q+=12}l.date.hours(Q)},showPicker:function(){l.widget.find(".timepicker > div:not(.timepicker-picker)").hide();l.widget.find(".timepicker .timepicker-picker").show()},showHours:function(){l.widget.find(".timepicker .timepicker-picker").hide();l.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){l.widget.find(".timepicker .timepicker-picker").hide();l.widget.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){l.widget.find(".timepicker .timepicker-picker").hide();l.widget.find(".timepicker .timepicker-seconds").show()},selectHour:function(Q){l.date.hours(parseInt(d(Q.target).text(),10));D.showPicker.call(l)},selectMinute:function(Q){l.date.minutes(parseInt(d(Q.target).text(),10));D.showPicker.call(l)},selectSecond:function(Q){l.date.seconds(parseInt(d(Q.target).text(),10));D.showPicker.call(l)}},x=function(S){var Q=a(l.date),R=d(S.currentTarget).data("action"),T=D[R].apply(l,arguments);K(S);if(!l.date){l.date=a({y:1970})}r();k();p(Q,S.type);return T},K=function(Q){Q.stopPropagation();Q.preventDefault()},i=function(T){a.lang(l.options.language);var R=d(T.target),S=a(l.date),Q=a(R.val(),l.format,l.options.useStrict);if(Q.isValid()&&!O(Q)&&s(Q)){y();l.setValue(Q);p(S,T.type);r()}else{l.viewDate=S;R.val(a(S).format(l.format));p(S,T.type);C(Q);l.unset=true}},g=function(Q){if(Q){l.viewMode=Math.max(l.minViewMode,Math.min(2,l.viewMode+Q))}l.widget.find(".datepicker > div").hide().filter(".datepicker-"+w.modes[l.viewMode].clsName).show()},J=function(){var U,T,R,Q,S;l.widget.on("click",".datepicker *",d.proxy(A,this));l.widget.on("click","[data-action]",d.proxy(x,this));l.widget.on("mousedown",d.proxy(K,this));if(l.options.pickDate&&l.options.pickTime){l.widget.on("click.togglePicker",".accordion-toggle",function(V){V.stopPropagation();U=d(this);T=U.closest("ul");R=T.find(".in");Q=T.find(".collapse:not(.in)");if(R&&R.length){S=R.data("collapse");if(S&&S.transitioning){return}R.collapse("hide");Q.collapse("show");U.find("span").toggleClass(l.options.icons.time+" "+l.options.icons.date);l.element.find(".input-group-addon span").toggleClass(l.options.icons.time+" "+l.options.icons.date)}})}if(l.isInput){l.element.on({focus:d.proxy(l.show,this),change:d.proxy(i,this),blur:d.proxy(l.hide,this)})}else{l.element.on({change:d.proxy(i,this)},"input");if(l.component){l.component.on("click",d.proxy(l.show,this))}else{l.element.on("click",d.proxy(l.show,this))}}},L=function(){d(window).on("resize.datetimepicker"+l.id,d.proxy(j,this));if(!l.isInput){d(document).on("mousedown.datetimepicker"+l.id,d.proxy(l.hide,this))}},F=function(){l.widget.off("click",".datepicker *",l.click);l.widget.off("click","[data-action]");l.widget.off("mousedown",l.stopEvent);if(l.options.pickDate&&l.options.pickTime){l.widget.off("click.togglePicker")}if(l.isInput){l.element.off({focus:l.show,change:l.change})}else{l.element.off({change:l.change},"input");if(l.component){l.component.off("click",l.show)}else{l.element.off("click",l.show)}}},E=function(){d(window).off("resize.datetimepicker"+l.id);if(!l.isInput){d(document).off("mousedown.datetimepicker"+l.id)}},B=function(){if(l.element){var R=l.element.parents(),Q=false,S;for(S=0;S=2){return Q}else{return"0"+Q}},P=function(R,Q,S){if(R&&Q){return('")}else{if(Q){return('")}else{return('")}}},w={modes:[{clsName:"days",navFnc:"month",navStep:1},{clsName:"months",navFnc:"year",navStep:1},{clsName:"years",navFnc:"year",navStep:10}],headTemplate:'‹›',contTemplate:''},G={hourTemplate:'',minuteTemplate:'',secondTemplate:''};w.template='
'+w.headTemplate+'
'+w.headTemplate+w.contTemplate+'
'+w.headTemplate+w.contTemplate+"
";G.getTemplate=function(){return('
"+(l.options.useSeconds?'':"")+(l.options.use24hours?"":'')+" "+(l.options.useSeconds?'":"")+(l.options.use24hours?"":'')+'"+(l.options.useSeconds?'':"")+(l.options.use24hours?"":'')+'
'+(l.options.useMinutes?'':"")+"
"+G.hourTemplate+' :'+(l.options.useMinutes?G.minuteTemplate:'00')+":'+G.secondTemplate+"
'+(l.options.useMinutes?'':"")+"
'+(l.options.useSeconds?'
':""))};l.destroy=function(){F();E();l.widget.remove();l.element.removeData("DateTimePicker");if(l.component){l.component.removeData("DateTimePicker")}};l.show=function(Q){l.widget.show();l.height=l.component?l.component.outerHeight():l.element.outerHeight();j();l.element.trigger({type:"show.dp",date:a(l.date)});L();if(Q){K(Q)}},l.disable=function(){var Q=l.element.find("input");if(Q.prop("disabled")){return}Q.prop("disabled",true);F()},l.enable=function(){var Q=l.element.find("input");if(!Q.prop("disabled")){return}Q.prop("disabled",false);J()},l.hide=function(S){if(S&&d(S.target).is(l.element.attr("id"))){return}var T=l.widget.find(".collapse"),Q,R;for(Q=0;Qul{margin:0;list-style-type:none}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-size:1.2em;font-weight:bold}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{width:20px;height:20px;text-align:center;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{cursor:pointer;background:#eee}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#999}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#428bca}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{color:#999;cursor:not-allowed;background:0}.bootstrap-datetimepicker-widget td span{display:block;float:left;width:47px;height:54px;margin:2px;line-height:54px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#428bca}.bootstrap-datetimepicker-widget td span.old{color:#999}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{color:#999;cursor:not-allowed;background:0}.bootstrap-datetimepicker-widget th.switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{color:#999;cursor:not-allowed;background:0}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-group.date .input-group-addon span{display:block;width:16px;height:16px;cursor:pointer}.bootstrap-datetimepicker-widget.left-oriented:before{right:6px;left:auto}.bootstrap-datetimepicker-widget.left-oriented:after{right:7px;left:auto}.bootstrap-datetimepicker-widget ul.list-unstyled li.in div.timepicker div.timepicker-picker table.table-condensed tbody>tr>td{padding:0!important} \ No newline at end of file diff --git a/ajax/libs/bootstrap-datetimepicker/2.1.5/js/bootstrap-datetimepicker.min.js b/ajax/libs/bootstrap-datetimepicker/2.1.5/js/bootstrap-datetimepicker.min.js new file mode 100644 index 000000000..afe664352 --- /dev/null +++ b/ajax/libs/bootstrap-datetimepicker/2.1.5/js/bootstrap-datetimepicker.min.js @@ -0,0 +1,28 @@ +/** + * version 2.1.5 + * @license + * ========================================================= + * bootstrap-datetimepicker.js + * http://www.eyecon.ro/bootstrap-datepicker + * ========================================================= + * Copyright 2012 Stefan Petre + * + * Contributions: + * - Andrew Rowls + * - Thiago de Arruda + * - updated for Bootstrap v3 by Jonathan Peterson @Eonasdan + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= + */ +(function(c){var b=0,a=function(f,h){var r={pickDate:true,pickTime:true,startDate:moment({y:1970}),endDate:moment().add(50,"y"),collapse:true,language:"en",defaultDate:"",disabledDates:[],icons:{}},J={time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down"},p=this,D=function(){var N=false,M,O,L;p.options=c.extend({},r,h);p.options.icons=c.extend({},J,p.options.icons);if(!(p.options.pickTime||p.options.pickDate)){throw new Error("Must choose at least one picker")}p.id=b++;moment.lang(p.options.language);p.date=moment();p.element=c(f);p.unset=false;p.isInput=p.element.is("input");p.component=false;if(p.element.hasClass("input-group")){if(p.element.find(".datepickerbutton").size()==0){p.component=p.element.find(".input-group-addon")}else{p.component=p.element.find(".datepickerbutton")}}p.format=p.options.format;L=moment()._lang._longDateFormat;if(!p.format){if(p.isInput){p.format=p.element.data("format")}else{p.format=p.element.find("input").data("format")}if(!p.format){p.format=(p.options.pickDate?L.L:"");p.format+=(p.options.pickTime?" "+L.LT:"")}}p.use24hours=p.format.toLowerCase().indexOf("a")<1;if(p.component){N=p.component.find("span")}if(p.options.pickTime){if(N){N.addClass(p.options.icons.time)}}if(p.options.pickDate){if(N){N.removeClass(p.options.icons.time);N.addClass(p.options.icons.date)}}p.widget=c(H(p.options.pickDate,p.options.pickTime,p.options.collapse)).appendTo("body");p.minViewMode=p.options.minViewMode||p.element.data("date-minviewmode")||0;if(typeof p.minViewMode==="string"){switch(p.minViewMode){case"months":p.minViewMode=1;break;case"years":p.minViewMode=2;break;default:p.minViewMode=0;break}}p.viewMode=p.options.viewMode||p.element.data("date-viewmode")||0;if(typeof p.viewMode==="string"){switch(p.viewMode){case"months":p.viewMode=1;break;case"years":p.viewMode=2;break;default:p.viewMode=0;break}}for(M in p.options.disabledDates){O=p.options.disabledDates[M];O=moment(O);if(!O.isValid()){O=moment(startDate).subtract(1,"day").format("L")}p.options.disabledDates[M]=O.format("L")}p.startViewMode=p.viewMode;p.setStartDate(p.options.startDate||p.element.data("date-startdate"));p.setEndDate(p.options.endDate||p.element.data("date-enddate"));G();K();k();B();m();e();I();if(p.options.defaultDate!==""){p.setValue(p.options.defaultDate)}},n=function(){var L="absolute",N=p.component?p.component.offset():p.element.offset(),M=c(window);p.width=p.component?p.component.outerWidth():p.element.outerWidth();N.top=N.top+p.element.outerHeight();if(p.options.width!==undefined){p.widget.width(p.options.width)}if(p.options.orientation==="left"){p.widget.addClass("left-oriented");N.left=N.left-p.widget.width()+20}if(z()){L="fixed";N.top-=M.scrollTop();N.left-=M.scrollLeft()}if(M.width()"),L=moment.weekdaysMin();while(M'+L[(M++)%7]+"")}p.widget.find(".datepicker-days thead").append(N)},K=function(){moment.lang(p.options.language);var M="",L=0,N=moment.monthsShort();while(L<12){M+=''+N[L++]+""}p.widget.find(".datepicker-months td").append(M)},g=function(){moment.lang(p.options.language);var W=p.viewDate.year(),U=p.viewDate.month(),V=p.options.startDate.year(),Y=p.options.startDate.month(),Z=p.options.endDate.year(),S=p.options.endDate.month(),O,R,Q=[],aa,N,P,X,M,T,L=moment.months();p.widget.find(".datepicker-days").find(".disabled").removeClass("disabled");p.widget.find(".datepicker-months").find(".disabled").removeClass("disabled");p.widget.find(".datepicker-years").find(".disabled").removeClass("disabled");p.widget.find(".datepicker-days th:eq(1)").text(L[U]+" "+W);O=moment(p.viewDate).subtract("months",1);X=O.daysInMonth();O.date(X).startOf("week");if((W==V&&U<=Y)||W=S)||W>Z){p.widget.find(".datepicker-days th:eq(2)").addClass("disabled")}R=moment(O).add(42,"d");while(O.isBefore(R)){if(O.weekday()===moment().startOf("week").weekday()){aa=c("");Q.push(aa)}N="";if(O.year()W||(O.year()==W&&O.month()>U)){N+=" new"}}if(O.isSame(moment({y:p.date.year(),M:p.date.month(),d:p.date.date()}))){N+=" active"}if((moment(O).add(1,"d")<=p.options.startDate)||(O>p.options.endDate)||d(O)){N+=" disabled"}aa.append(''+O.date()+"");O.add(1,"d")}p.widget.find(".datepicker-days tbody").empty().append(Q);T=moment().year(),L=p.widget.find(".datepicker-months").find("th:eq(1)").text(W).end().find("span").removeClass("active");if(T===W){L.eq(moment().month()).addClass("active")}if(T-1Z){p.widget.find(".datepicker-months th:eq(2)").addClass("disabled")}for(P=0;P<12;P++){if((W==V&&Y>P)||(WZ)){c(L[P]).addClass("disabled")}}}Q="";W=parseInt(W/10,10)*10;M=p.widget.find(".datepicker-years").find("th:eq(1)").text(W+"-"+(W+9)).end().find("td");p.widget.find(".datepicker-years").find("th").removeClass("disabled");if(V>W){p.widget.find(".datepicker-years").find("th:eq(0)").addClass("disabled")}if(ZZ)?" disabled":"")+'">'+W+"";W+=1}M.html(Q)},k=function(){moment.lang(p.options.language);var O=p.widget.find(".timepicker .timepicker-hours table"),N="",P,M,L;O.parent().hide();if(p.use24hours){P=0;for(M=0;M<6;M+=1){N+="";for(L=0;L<4;L+=1){N+=''+C(P.toString())+"";P++}N+=""}}else{P=1;for(M=0;M<3;M+=1){N+="";for(L=0;L<4;L+=1){N+=''+C(P.toString())+"";P++}N+=""}}O.html(N)},B=function(){var O=p.widget.find(".timepicker .timepicker-minutes table"),N="",P=0,M,L;O.parent().hide();for(M=0;M<5;M++){N+="";for(L=0;L<4;L+=1){N+=''+C(P.toString())+"";P+=3}N+=""}O.html(N)},x=function(){if(!p.date){return}var N=p.widget.find(".timepicker span[data-time-component]"),L=p.date.hours(),M="AM";if(!p.use24hours){if(L>=12){M="PM"}if(L===0){L=12}else{if(L!=12){L=L%12}}p.widget.find(".timepicker [data-action=togglePeriod]").text(M)}N.filter("[data-time-component=hours]").text(C(L));N.filter("[data-time-component=minutes]").text(C(p.date.minutes()))},A=function(R){R.stopPropagation();R.preventDefault();p.unset=false;var Q=c(R.target).closest("span, td, th"),P,N,O,L,M=p.date;if(Q.length===1){if(!Q.is(".disabled")){switch(Q[0].nodeName.toLowerCase()){case"th":switch(Q[0].className){case"switch":e(1);break;case"prev":case"next":O=F.modes[p.viewMode].navStep;if(Q[0].className==="prev"){O=O*-1}p.viewDate.add(O,F.modes[p.viewMode].navFnc);g();break}break;case"span":if(Q.is(".month")){P=Q.parent().find("span").index(Q);p.viewDate.month(P)}else{N=parseInt(Q.text(),10)||0;p.viewDate.year(N)}if(p.viewMode!==0){p.date=moment({y:p.viewDate.year(),M:p.viewDate.month(),d:p.viewDate.date(),h:p.date.hours(),m:p.date.minutes()});y(M)}e(-1);g();break;case"td":if(Q.is(".day")){L=parseInt(Q.text(),10)||1;P=p.viewDate.month();N=p.viewDate.year();if(Q.is(".old")){if(P===0){P=11;N-=1}else{P-=1}}else{if(Q.is(".new")){if(P==11){P=0;N+=1}else{P+=1}}}p.date=moment({y:N,M:P,d:L,h:p.date.hours(),m:p.date.minutes()});p.viewDate=moment({y:N,M:P,d:Math.min(28,L)});g();w();y(M)}break}}}},q={incrementHours:function(){i("add","hours")},incrementMinutes:function(){i("add","minutes")},decrementHours:function(){i("subtract","hours")},decrementMinutes:function(){i("subtract","minutes")},togglePeriod:function(){var L=p.date.hours();if(L>=12){L-=12}else{L+=12}p.date.hours(L)},showPicker:function(){p.widget.find(".timepicker > div:not(.timepicker-picker)").hide();p.widget.find(".timepicker .timepicker-picker").show()},showHours:function(){p.widget.find(".timepicker .timepicker-picker").hide();p.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){p.widget.find(".timepicker .timepicker-picker").hide();p.widget.find(".timepicker .timepicker-minutes").show()},selectHour:function(L){p.date.hours(parseInt(c(L.target).text(),10));q.showPicker.call(p)},selectMinute:function(L){p.date.minutes(parseInt(c(L.target).text(),10));q.showPicker.call(p)}},u=function(N){var M=c(N.currentTarget).data("action"),O=q[M].apply(p,arguments),L=p.date;E(N);if(!p.date){p.date=moment({y:1970})}w();x();y(L);return O},E=function(L){L.stopPropagation();L.preventDefault()},t=function(N){var L=c(N.target),O=moment(L.val()),M=p.date;if(O.isValid()){m();p.setValue(p.date);y(M);w()}else{p.setValue(L.val());y(M);p.unset=true;L.val("")}},e=function(L){if(L){p.viewMode=Math.max(p.minViewMode,Math.min(2,p.viewMode+L))}p.widget.find(".datepicker > div").hide().filter(".datepicker-"+F.modes[p.viewMode].clsName).show()},I=function(){var P,O,M,L,N;p.widget.on("click",".datepicker *",c.proxy(A,this));p.widget.on("click","[data-action]",c.proxy(u,this));p.widget.on("mousedown",c.proxy(E,this));if(p.options.pickDate&&p.options.pickTime){p.widget.on("click.togglePicker",".accordion-toggle",function(Q){Q.stopPropagation();P=c(this);O=P.closest("ul");M=O.find(".in");L=O.find(".collapse:not(.in)");if(M&&M.length){N=M.data("collapse");if(N&&N.transitioning){return}M.collapse("hide");L.collapse("show");P.find("span").toggleClass(p.options.icons.time+" "+p.options.icons.date);p.element.find(".input-group-addon span").toggleClass(p.options.icons.time+" "+p.options.icons.date)}})}if(p.isInput){p.element.on({focus:c.proxy(p.show,this),change:c.proxy(t,this),blur:c.proxy(p.hide,this)})}else{p.element.on({change:c.proxy(t,this)},"input");if(p.component){p.component.on("click",c.proxy(p.show,this))}else{p.element.on("click",c.proxy(p.show,this))}}},o=function(){c(window).on("resize.datetimepicker"+p.id,c.proxy(n,this));if(!p.isInput){c(document).on("mousedown.datetimepicker"+p.id,c.proxy(p.hide,this))}},s=function(){p.widget.off("click",".datepicker *",p.click);p.widget.off("click","[data-action]");p.widget.off("mousedown",p.stopEvent);if(p.options.pickDate&&p.options.pickTime){p.widget.off("click.togglePicker")}if(p.isInput){p.element.off({focus:p.show,change:p.change})}else{p.element.off({change:p.change},"input");if(p.component){p.component.off("click",p.show)}else{p.element.off("click",p.show)}}},j=function(){c(window).off("resize.datetimepicker"+p.id);if(!p.isInput){c(document).off("mousedown.datetimepicker"+p.id)}},z=function(){if(p.element){var M=p.element.parents(),L=false,N;for(N=0;N=2){return L}else{return"0"+L}},H=function(M,L,N){if(M&&L){return('")}else{if(L){return('")}else{return('")}}},F={modes:[{clsName:"days",navFnc:"month",navStep:1},{clsName:"months",navFnc:"year",navStep:1},{clsName:"years",navFnc:"year",navStep:10}],headTemplate:'‹›',contTemplate:''},l={hourTemplate:'',minuteTemplate:''};F.template='
'+F.headTemplate+'
'+F.headTemplate+F.contTemplate+'
'+F.headTemplate+F.contTemplate+"
";l.getTemplate=function(){return('
'+(!p.use24hours?'':"")+" "+(!p.use24hours?'':"")+''+(!p.use24hours?'':"")+'
"+l.hourTemplate+' :'+l.minuteTemplate+"
')};p.destroy=function(){s();j();p.widget.remove();p.element.removeData("DateTimePicker");p.component.removeData("DateTimePicker")};p.show=function(L){p.widget.show();p.height=p.component?p.component.outerHeight():p.element.outerHeight();n();p.element.trigger({type:"show.dp",date:p.date});o();if(L){E(L)}},p.disable=function(){p.element.find("input").prop("disabled",true);s()},p.enable=function(){p.element.find("input").prop("disabled",false);I()},p.hide=function(){var N=p.widget.find(".collapse"),L,M;for(L=0;L Date: Sat, 1 Feb 2014 21:23:19 +0000 Subject: [PATCH 2/2] Restored filename to package.json --- ajax/libs/bootstrap-datetimepicker/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/ajax/libs/bootstrap-datetimepicker/package.json b/ajax/libs/bootstrap-datetimepicker/package.json index e93521e40..9dc22a9fa 100644 --- a/ajax/libs/bootstrap-datetimepicker/package.json +++ b/ajax/libs/bootstrap-datetimepicker/package.json @@ -1,5 +1,6 @@ { "name": "bootstrap-datetimepicker", + "filename": "js/bootstrap-datetimepicker.min.js", "version": "2.1.30", "repository": { "type": "git",