2016-03-01 14:14:46 +00:00
|
|
|
|
!function(e){"function"==typeof define&&define.amd?define(["jquery","jquery-mousewheel"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){"use strict";function t(e,t,a){this.date=e,this.desc=t,this.style=a}var a={i18n:{ar:{months:["كانون الثاني","شباط","آذار","نيسان","مايو","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],dayOfWeekShort:["ن","ث","ع","خ","ج","س","ح"],dayOfWeek:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت","الأحد"]},ro:{months:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],dayOfWeekShort:["Du","Lu","Ma","Mi","Jo","Vi","Sâ"],dayOfWeek:["Duminică","Luni","Marţi","Miercuri","Joi","Vineri","Sâmbătă"]},id:{months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],dayOfWeekShort:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],dayOfWeek:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},is:{months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],dayOfWeekShort:["Sun","Mán","Þrið","Mið","Fim","Fös","Lau"],dayOfWeek:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"]},bg:{months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],dayOfWeekShort:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],dayOfWeek:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота"]},fa:{months:["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],dayOfWeekShort:["یکشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],dayOfWeek:["یکشنبه","دوشنبه","سهشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه","یکشنبه"]},ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayOfWeekShort:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],dayOfWeek:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"]},uk:{months:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],dayOfWeekShort:["Ндл","Пнд","Втр","Срд","Чтв","Птн","Сбт"],dayOfWeek:["Неділя","Понеділок","Вівторок","Середа","Четвер","П'ятниця","Субота"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},el:{months:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],dayOfWeekShort:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],dayOfWeek:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeekShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayOfWeek:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},nl:{months:["
|
|
|
|
|
o>t||(a.val(J.str()),a.trigger("change"),H.trigger("close.xdsoft")))}),N.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",function(){var t=e(this),a=0,o=!1;!function r(e){t.hasClass(C.next)?J.nextMonth():t.hasClass(C.prev)&&J.prevMonth(),C.monthChangeSpinner&&(o||(a=setTimeout(r,e||100)))}(500),e([document.body,window]).on("touchend mouseup.xdsoft",function n(){clearTimeout(a),o=!0,e([document.body,window]).off("touchend mouseup.xdsoft",n)})}),L.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",function(){var t=e(this),a=0,o=!1,r=110;!function n(e){var i=R[0].clientHeight,s=V[0].offsetHeight,d=Math.abs(parseInt(V.css("marginTop"),10));t.hasClass(C.next)&&s-i-C.timeHeightInTimePicker>=d?V.css("marginTop","-"+(d+C.timeHeightInTimePicker)+"px"):t.hasClass(C.prev)&&d-C.timeHeightInTimePicker>=0&&V.css("marginTop","-"+(d-C.timeHeightInTimePicker)+"px"),R.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(V.css("marginTop"),10)/(s-i))]),r=r>10?10:r-10,o||(a=setTimeout(n,e||r))}(500),e([document.body,window]).on("touchend mouseup.xdsoft",function i(){clearTimeout(a),o=!0,e([document.body,window]).off("touchend mouseup.xdsoft",i)})}),u=0,H.on("xchange.xdsoft",function(t){clearTimeout(u),u=setTimeout(function(){(void 0===J.currentTime||null===J.currentTime)&&(J.currentTime=J.now());for(var t,a,i,s,d,u,l,f,c,m,h="",g=new Date(J.currentTime.getFullYear(),J.currentTime.getMonth(),1,12,0,0),p=0,y=J.now(),k=!1,b=!1,x=[],v=!0,D="",T="";g.getDay()!==C.dayOfWeekStart;)g.setDate(g.getDate()-1);for(h+="<table><thead><tr>",C.weeks&&(h+="<th></th>"),t=0;7>t;t+=1)h+="<th>"+C.i18n[n].dayOfWeekShort[(t+C.dayOfWeekStart)%7]+"</th>";for(h+="</tr></thead>",h+="<tbody>",C.maxDate!==!1&&(k=J.strToDate(C.maxDate),k=new Date(k.getFullYear(),k.getMonth(),k.getDate(),23,59,59,999)),C.minDate!==!1&&(b=J.strToDate(C.minDate),b=new Date(b.getFullYear(),b.getMonth(),b.getDate()));p<J.currentTime.countDaysInMonth()||g.getDay()!==C.dayOfWeekStart||J.currentTime.getMonth()===g.getMonth();)x=[],p+=1,i=g.getDay(),s=g.getDate(),d=g.getFullYear(),u=g.getMonth(),l=J.getWeekOfYear(g),m="",x.push("xdsoft_date"),f=C.beforeShowDay&&e.isFunction(C.beforeShowDay.call)?C.beforeShowDay.call(H,g):null,C.allowDateRe&&"[object RegExp]"===Object.prototype.toString.call(C.allowDateRe)?C.allowDateRe.test(o.formatDate(g,C.formatDate))||x.push("xdsoft_disabled"):C.allowDates&&C.allowDates.length>0?-1===C.allowDates.indexOf(o.formatDate(g,C.formatDate))&&x.push("xdsoft_disabled"):k!==!1&&g>k||b!==!1&&b>g||f&&f[0]===!1?x.push("xdsoft_disabled"):-1!==C.disabledDates.indexOf(o.formatDate(g,C.formatDate))?x.push("xdsoft_disabled"):-1!==C.disabledWeekDays.indexOf(i)&&x.push("xdsoft_disabled"),f&&""!==f[1]&&x.push(f[1]),J.currentTime.getMonth()!==u&&x.push("xdsoft_other_month"),(C.defaultSelect||H.data("changed"))&&o.formatDate(J.currentTime,C.formatDate)===o.formatDate(g,C.formatDate)&&x.push("xdsoft_current"),o.formatDate(y,C.formatDate)===o.formatDate(g,C.formatDate)&&x.push("xdsoft_today"),(0===g.getDay()||6===g.getDay()||-1!==C.weekends.indexOf(o.formatDate(g,C.formatDate)))&&x.push("xdsoft_weekend"),void 0!==C.highlightedDates[o.formatDate(g,C.formatDate)]&&(a=C.highlightedDates[o.formatDate(g,C.formatDate)],x.push(void 0===a.style?"xdsoft_highlighted_default":a.style),m=void 0===a.desc?"":a.desc),C.beforeShowDay&&e.isFunction(C.beforeShowDay)&&x.push(C.beforeShowDay(g)),v&&(h+="<tr>",v=!1,C.weeks&&(h+="<th>"+l+"</th>")),h+='<td data-date="'+s+'" data-month="'+u+'" data-year="'+d+'" class="xdsoft_date xdsoft_day_of_week'+g.getDay()+" "+x.join(" ")+'" title="'+m+'"><div>'+s+"</div></td>",g.getDay()===C.dayOfWeekStartPrev&&(h+="</tr>",v=!0),g.setDate(s+1);if(h+="</tbody></table>",I.html(h),N.find(".xdsoft_label span").eq(0).text(C.i18n[n].months[J.currentTime.getMonth()]),N.find(".xdsoft_label span").eq(1).text(J.currentTime.getFullYear()),D="",T="",u="",c=function(t,a){var r,n,i=J.now(),s=C.allowTimes&&e.isArray(C.allowTimes)&&C.allowTimes.length;i.setHours(t),t=parseInt(i.getHours(),10),i.setMinutes(a),a=parseInt(i.getMinutes(),10),r=new Dat
|