{I" class:ETI"BundledAsset; FI"logical_path; TI"jquery.datetimepicker.js; FI" pathname; TI":$root/app/assets/javascripts/jquery.datetimepicker.js; FI"content_type; TI"application/javascript; TI" mtime; Tl+~SI"length; TiI"digest; TI"%2d5c880ac0a51379388f8e8f25f089e8; FI"source; TI"/** * @preserve jQuery DateTimePicker plugin v2.3.4 * @homepage http://xdsoft.net/jqplugins/datetimepicker/ * (c) 2014, Chupurnov Valeriy. */ (function( $ ) { 'use strict'; var default_options = { i18n:{ ar: { // Arabic months: [ "كانون الثاني", "شباط", "آذار", "نيسان", "مايو", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول" ], dayOfWeek: [ "ن", "ث", "ع", "خ", "ج", "س", "ح" ] }, ro: { // Romanian months: [ "ianuarie", "februarie", "martie", "aprilie", "mai", "iunie", "iulie", "august", "septembrie", "octombrie", "noiembrie", "decembrie" ], dayOfWeek: [ "l", "ma", "mi", "j", "v", "s", "d" ] }, id: { // Indonesian months: [ "Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember" ], dayOfWeek: [ "Sen", "Sel", "Rab", "Kam", "Jum", "Sab", "Min" ] }, bg:{ // Bulgarian months:[ "Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември" ], dayOfWeek:[ "Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб" ] }, fa:{ // Persian/Farsi months:[ 'فروردین', 'اردیبهشت', 'خرداد', 'تیر', 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند' ], dayOfWeek:[ 'یکشنبه', 'دوشنبه', 'سه شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه' ] }, ru:{ // Russian months:[ 'Январь','Февраль','Март','Апрель','Май','Июнь','Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь' ], dayOfWeek:[ "Вск", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб" ] }, uk:{ // Ukrainian months:[ 'Січень','Лютий','Березень','Квітень','Травень','Червень','Липень','Серпень','Вересень','Жовтень','Листопад','Грудень' ], dayOfWeek:[ "Ндл", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Сбт" ] }, en:{ // English months: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], dayOfWeek: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ] }, el:{ // Ελληνικά months: [ "Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος" ], dayOfWeek: [ "Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ" ] }, de:{ // German months:[ 'Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember' ], dayOfWeek:[ "So", "Mo", "Di", "Mi", "Do", "Fr", "Sa" ] }, nl:{ // Dutch months:[ "januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december" ], dayOfWeek:[ "zo", "ma", "di", "wo", "do", "vr", "za" ] }, tr:{ // Turkish months:[ "Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık" ], dayOfWeek:[ "Paz", "Pts", "Sal", "Çar", "Per", "Cum", "Cts" ] }, fr:{ //French months:[ "Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre" ], dayOfWeek:[ "Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam" ] }, es:{ // Spanish months: [ "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre" ], dayOfWeek: [ "Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb" ] }, th:{ // Thai months:[ 'มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน','กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม' ], dayOfWeek:[ 'อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.' ] }, pl:{ // Polish months: [ "styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień" ], dayOfWeek: [ "nd", "pn", "wt", "śr", "cz", "pt", "sb" ] }, pt:{ // Portuguese months: [ "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro" ], dayOfWeek: [ "Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab" ] }, ch:{ // Simplified Chinese months: [ "一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月" ], dayOfWeek: [ "日", "一","二","三","四","五","六" ] }, se:{ // Swedish months: [ "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September","Oktober", "November", "December" ], dayOfWeek: [ "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör" ] }, kr:{ // Korean months: [ "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월" ], dayOfWeek: [ "일", "월", "화", "수", "목", "금", "토" ] }, it:{ // Italian months: [ "Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre" ], dayOfWeek: [ "Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab" ] }, da:{ // Dansk months: [ "January", "Februar", "Marts", "April", "Maj", "Juni", "July", "August", "September", "Oktober", "November", "December" ], dayOfWeek: [ "Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør" ] }, no:{ // Norwegian months: [ "Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember" ], dayOfWeek: [ "Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør" ] }, ja:{ // Japanese months: [ "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月" ], dayOfWeek: [ "日", "月", "火", "水", "木", "金", "土" ] }, vi:{ // Vietnamese months: [ "Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12" ], dayOfWeek: [ "CN", "T2", "T3", "T4", "T5", "T6", "T7" ] }, sl:{ // Slovenščina months: [ "Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December" ], dayOfWeek: [ "Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob" ] }, cs:{ // Čeština months: [ "Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec" ], dayOfWeek: [ "Ne", "Po", "Út", "St", "Čt", "Pá", "So" ] }, hu:{ // Hungarian months: [ "Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December" ], dayOfWeek: [ "Va", "Hé", "Ke", "Sze", "Cs", "Pé", "Szo" ] } }, value:'', lang:'en', format: 'Y/m/d H:i', formatTime: 'H:i', formatDate: 'Y/m/d', startDate: false, // new Date(), '1986/12/08', '-1970/01/05','-1970/01/05', step:60, monthChangeSpinner:true, closeOnDateSelect:false, closeOnWithoutClick:true, closeOnInputClick: true, timepicker:true, datepicker:true, weeks:false, defaultTime:false, // use formatTime format (ex. '10:00' for formatTime: 'H:i') defaultDate:false, // use formatDate format (ex new Date() or '1986/12/08' or '-1970/01/05' or '-1970/01/05') minDate:false, maxDate:false, minTime:false, maxTime:false, allowTimes:[], opened:false, initTime:true, inline:false, onSelectDate:function() {}, onSelectTime:function() {}, onChangeMonth:function() {}, onChangeDateTime:function() {}, onShow:function() {}, onClose:function() {}, onGenerate:function() {}, withoutCopyright:true, inverseButton:false, hours12:false, next: 'xdsoft_next', prev : 'xdsoft_prev', dayOfWeekStart:0, timeHeightInTimePicker:25, timepickerScrollbar:true, todayButton:true, // 2.1.0 defaultSelect:true, // 2.1.0 scrollMonth:true, scrollTime:true, scrollInput:true, lazyInit:false, mask:false, validateOnBlur:true, allowBlank:true, yearStart:1950, yearEnd:2050, style:'', id:'', fixed: false, roundTime:'round', // ceil, floor className:'', weekends : [], yearOffset:0, beforeShowDay: null }; // fix for ie8 if ( !Array.prototype.indexOf ) { Array.prototype.indexOf = function(obj, start) { for (var i = (start || 0), j = this.length; i < j; i++) { if (this[i] === obj) { return i; } } return -1; } } Date.prototype.countDaysInMonth = function(){ return new Date(this.getFullYear(), this.getMonth()+1, 0).getDate(); }; $.fn.xdsoftScroller = function( _percent ) { return this.each(function() { var timeboxparent = $(this); if( !$(this).hasClass('xdsoft_scroller_box') ) { var pointerEventToXY = function( e ) { var out = {x:0, y:0}; if( e.type == 'touchstart' || e.type == 'touchmove' || e.type == 'touchend' || e.type == 'touchcancel' ) { var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]; out.x = touch.pageX; out.y = touch.pageY; }else if (e.type == 'mousedown' || e.type == 'mouseup' || e.type == 'mousemove' || e.type == 'mouseover'|| e.type=='mouseout' || e.type=='mouseenter' || e.type=='mouseleave') { out.x = e.pageX; out.y = e.pageY; } return out; }, move = 0, timebox = timeboxparent.children().eq(0), parentHeight = timeboxparent[0].clientHeight, height = timebox[0].offsetHeight, scrollbar = $('
'), scroller = $(''), maximumOffset = 100, start = false; scrollbar.append(scroller); timeboxparent.addClass('xdsoft_scroller_box').append(scrollbar); scroller.on('mousedown.xdsoft_scroller',function ( event ) { if( !parentHeight ) timeboxparent.trigger('resize_scroll.xdsoft_scroller',[_percent]); var pageY = event.pageY, top = parseInt(scroller.css('margin-top')), h1 = scrollbar[0].offsetHeight; $(document.body).addClass('xdsoft_noselect'); $([document.body,window]).on('mouseup.xdsoft_scroller',function arguments_callee() { $([document.body,window]).off('mouseup.xdsoft_scroller',arguments_callee) .off('mousemove.xdsoft_scroller',move) .removeClass('xdsoft_noselect'); }); $(document.body).on('mousemove.xdsoft_scroller',move = function(event) { var offset = event.pageY-pageY+top; if( offset<0 ) offset = 0; if( offset+scroller[0].offsetHeight>h1 ) offset = h1-scroller[0].offsetHeight; timeboxparent.trigger('scroll_element.xdsoft_scroller',[maximumOffset?offset/maximumOffset:0]); }); }); timeboxparent .on('scroll_element.xdsoft_scroller',function( event,percent ) { if( !parentHeight ) timeboxparent.trigger('resize_scroll.xdsoft_scroller',[percent,true]); percent = percent>1?1:(percent<0||isNaN(percent))?0:percent; scroller.css('margin-top',maximumOffset*percent); timebox.css('marginTop',-parseInt((height-parentHeight)*percent)) }) .on('resize_scroll.xdsoft_scroller',function( event,_percent,noTriggerScroll ) { parentHeight = timeboxparent[0].clientHeight; height = timebox[0].offsetHeight; var percent = parentHeight/height, sh = percent*scrollbar[0].offsetHeight; if( percent>1 ) scroller.hide(); else{ scroller.show(); scroller.css('height',parseInt(sh>10?sh:10)); maximumOffset = scrollbar[0].offsetHeight-scroller[0].offsetHeight; if( noTriggerScroll!==true ) timeboxparent.trigger('scroll_element.xdsoft_scroller',[_percent?_percent:Math.abs(parseInt(timebox.css('marginTop')))/(height-parentHeight)]); } }); timeboxparent.mousewheel&&timeboxparent.mousewheel(function(event, delta, deltaX, deltaY) { var top = Math.abs(parseInt(timebox.css('marginTop'))); timeboxparent.trigger('scroll_element.xdsoft_scroller',[(top-delta*20)/(height-parentHeight)]); event.stopPropagation(); return false; }); timeboxparent.on('touchstart',function( event ) { start = pointerEventToXY(event); }); timeboxparent.on('touchmove',function( event ) { if( start ) { var coord = pointerEventToXY(event), top = Math.abs(parseInt(timebox.css('marginTop'))); timeboxparent.trigger('scroll_element.xdsoft_scroller',[(top-(coord.y-start.y))/(height-parentHeight)]); event.stopPropagation(); event.preventDefault(); start = pointerEventToXY(event); } }); timeboxparent.on('touchend touchcancel',function( event ) { start = false; }); } timeboxparent.trigger('resize_scroll.xdsoft_scroller',[_percent]); }); }; $.fn.datetimepicker = function( opt ) { var KEY0 = 48, KEY9 = 57, _KEY0 = 96, _KEY9 = 105, CTRLKEY = 17, DEL = 46, ENTER = 13, ESC = 27, BACKSPACE = 8, ARROWLEFT = 37, ARROWUP = 38, ARROWRIGHT = 39, ARROWDOWN = 40, TAB = 9, F5 = 116, AKEY = 65, CKEY = 67, VKEY = 86, ZKEY = 90, YKEY = 89, ctrlDown = false, options = ($.isPlainObject(opt)||!opt)?$.extend(true,{},default_options,opt):$.extend({},default_options), lazyInitTimer = 0, lazyInit = function( input ){ input .on('open.xdsoft focusin.xdsoft mousedown.xdsoft',function initOnActionCallback(event) { if( input.is(':disabled')||input.is(':hidden')||!input.is(':visible')||input.data( 'xdsoft_datetimepicker') ) return; clearTimeout(lazyInitTimer); lazyInitTimer = setTimeout(function() { if( !input.data( 'xdsoft_datetimepicker') ) createDateTimePicker(input); input .off('open.xdsoft focusin.xdsoft mousedown.xdsoft',initOnActionCallback) .trigger('open.xdsoft'); },100); }); }, createDateTimePicker = function( input ) { var datetimepicker = $(''), xdsoft_copyright = $(''), datepicker = $(''), mounth_picker = $(''; } // days for(var j = 0; j<7; j++) { table+=' | '+options.i18n[options.lang].dayOfWeek[(j+options.dayOfWeekStart)%7]+' | '; } table+='
---|---|
'+w+' | '; } } table+=''+
' '+d+' '+
' | ';
if( start.getDay()==options.dayOfWeekStartPrev ) {
table+='