vishwamano

source of vishwamano.com
git clone git://git.ricketyspace.net/vishwamano.git
Log | Files | Refs

commit a658faf6339ba787f77971ec79dd736610bb4f40
parent c3dbd01e60edadfbf20ec7cff307e998626d01b5
Author: rsiddharth <rsiddharth@ninthfloor.org>
Date:   Wed, 31 Dec 2014 21:41:33 -0500

updated jquery datetimepicker to version 2.3.7
	modified:   bs3/css/jquery.datetimepicker.css
	modified:   bs3/js/jquery.datetimepicker.js

Diffstat:
themes/bs3/css/jquery.datetimepicker.css | 48++++++++++++++++++++++++------------------------
themes/bs3/js/jquery.datetimepicker.js | 208+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 223 insertions(+), 33 deletions(-)

diff --git a/themes/bs3/css/jquery.datetimepicker.css b/themes/bs3/css/jquery.datetimepicker.css @@ -1,5 +1,5 @@ .xdsoft_datetimepicker{ - box-shadow: 0px 5px 15px -5px rgba(0, 0, 0, 0.506); + box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.506); background: #FFFFFF; border-bottom: 1px solid #BBBBBB; border-left: 1px solid #CCCCCC; @@ -8,7 +8,7 @@ color: #333333; font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif; padding: 8px; - padding-left: 0px; + padding-left: 0; padding-top: 2px; position: absolute; z-index: 9999; @@ -50,8 +50,8 @@ .xdsoft_datetimepicker *{ -moz-box-sizing: border-box; box-sizing: border-box; - padding:0px; - margin:0px; + padding: 0; + margin: 0; } .xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker{ display:none; @@ -72,7 +72,7 @@ float:left; text-align:center; margin-left:8px; - margin-top:0px; + margin-top: 0; } .xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker{ margin-top:8px; @@ -101,17 +101,17 @@ .xdsoft_datetimepicker .xdsoft_prev{ float: left; - background-position:-20px 0px; + background-position:-20px 0; } .xdsoft_datetimepicker .xdsoft_today_button{ float: left; - background-position:-70px 0px; + background-position:-70px 0; margin-left:5px; } .xdsoft_datetimepicker .xdsoft_next{ float: right; - background-position:0px 0px; + background-position: 0 0; } .xdsoft_datetimepicker .xdsoft_next, @@ -119,7 +119,7 @@ .xdsoft_datetimepicker .xdsoft_today_button{ background-color: transparent; background-repeat: no-repeat; - border: 0px none currentColor; + border: 0 none currentColor; cursor: pointer; display: block; height: 30px; @@ -127,7 +127,7 @@ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; outline: medium none currentColor; overflow: hidden; - padding: 0px; + padding: 0; position: relative; text-indent: 100%; white-space: nowrap; @@ -144,9 +144,9 @@ margin-top:7px; } .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{ - background-position:-40px 0px; + background-position:-40px 0; margin-bottom:7px; - margin-top:0px; + margin-top: 0; } .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box{ height:151px; @@ -161,13 +161,13 @@ text-align: center; border-collapse:collapse; cursor:pointer; - border-bottom-width:0px; + border-bottom-width: 0; height:25px; line-height:25px; } .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child{ - border-top-width:0px; + border-top-width: 0; } .xdsoft_datetimepicker .xdsoft_today_button:hover, .xdsoft_datetimepicker .xdsoft_next:hover, @@ -199,7 +199,7 @@ .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select{ border:1px solid #ccc; position:absolute; - right:0px; + right: 0; top:30px; z-index:101; display:none; @@ -219,7 +219,7 @@ } .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{ background: #33AAFF; - box-shadow: #178FE5 0px 1px 3px 0px inset; + box-shadow: #178FE5 0 1px 3px 0 inset; color:#fff; font-weight: 700; } @@ -253,7 +253,7 @@ font-size: 12px; text-align: right; vertical-align: middle; - padding:0px; + padding: 0; border-collapse:collapse; cursor:pointer; height: 25px; @@ -271,7 +271,7 @@ .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current, .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current{ background: #33AAFF; - box-shadow: #178FE5 0px 1px 3px 0px inset; + box-shadow: #178FE5 0 1px 3px 0 inset; color:#fff; font-weight: 700; } @@ -320,9 +320,9 @@ .xdsoft_scrollbar{ position:absolute; width:7px; - right:0px; - top:0px; - bottom:0px; + right: 0; + top: 0; + bottom: 0; cursor:pointer; } .xdsoft_scroller_box{ @@ -331,7 +331,7 @@ position:relative; .xdsoft_datetimepicker.xdsoft_dark{ - box-shadow: 0px 5px 15px -5px rgba(255, 255, 255, 0.506); + box-shadow: 0 5px 15px -5px rgba(255, 255, 255, 0.506); background: #000000; border-bottom: 1px solid #444444; border-left: 1px solid #333333; @@ -364,7 +364,7 @@ position:relative; .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{ background: #cc5500; - box-shadow: #b03e00 0px 1px 3px 0px inset; + box-shadow: #b03e00 0 1px 3px 0 inset; color:#000; } @@ -392,7 +392,7 @@ position:relative; .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current, .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current{ background: #cc5500; - box-shadow: #b03e00 0px 1px 3px 0px inset; + box-shadow: #b03e00 0 1px 3px 0 inset; color:#000; } diff --git a/themes/bs3/js/jquery.datetimepicker.js b/themes/bs3/js/jquery.datetimepicker.js @@ -1,5 +1,5 @@ /** - * @preserve jQuery DateTimePicker plugin v2.4.0 + * @preserve jQuery DateTimePicker plugin v2.4.1 * @homepage http://xdsoft.net/jqplugins/datetimepicker/ * (c) 2014, Chupurnov Valeriy. */ @@ -231,6 +231,190 @@ dayOfWeek: [ "Va", "Hé", "Ke", "Sze", "Cs", "Pé", "Szo" ] + }, + az: { //Azerbaijanian (Azeri) + months: [ + "Yanvar", "Fevral", "Mart", "Aprel", "May", "Iyun", "Iyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr" + ], + dayOfWeek: [ + "B", "Be", "Ça", "Ç", "Ca", "C", "Ş" + ] + }, + bs: { //Bosanski + months: [ + "Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar" + ], + dayOfWeek: [ + "Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub" + ] + }, + ca: { //Català + months: [ + "Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre" + ], + dayOfWeek: [ + "Dg", "Dl", "Dt", "Dc", "Dj", "Dv", "Ds" + ] + }, + 'en-GB': { //English (British) + months: [ + "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" + ], + dayOfWeek: [ + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" + ] + }, + et: { //"Eesti" + months: [ + "Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember" + ], + dayOfWeek: [ + "P", "E", "T", "K", "N", "R", "L" + ] + }, + eu: { //Euskara + months: [ + "Urtarrila", "Otsaila", "Martxoa", "Apirila", "Maiatza", "Ekaina", "Uztaila", "Abuztua", "Iraila", "Urria", "Azaroa", "Abendua" + ], + dayOfWeek: [ + "Ig.", "Al.", "Ar.", "Az.", "Og.", "Or.", "La." + ] + }, + fi: { //Finnish (Suomi) + months: [ + "Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu" + ], + dayOfWeek: [ + "Su", "Ma", "Ti", "Ke", "To", "Pe", "La" + ] + }, + gl: { //Galego + months: [ + "Xan", "Feb", "Maz", "Abr", "Mai", "Xun", "Xul", "Ago", "Set", "Out", "Nov", "Dec" + ], + dayOfWeek: [ + "Dom", "Lun", "Mar", "Mer", "Xov", "Ven", "Sab" + ] + }, + hr: { //Hrvatski + months: [ + "Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac" + ], + dayOfWeek: [ + "Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub" + ] + }, + ko: { //Korean (한국어) + months: [ + "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월" + ], + dayOfWeek: [ + "일", "월", "화", "수", "목", "금", "토" + ] + }, + lt: { //Lithuanian (lietuvių) + months: [ + "Sausio", "Vasario", "Kovo", "Balandžio", "Gegužės", "Birželio", "Liepos", "Rugpjūčio", "Rugsėjo", "Spalio", "Lapkričio", "Gruodžio" + ], + dayOfWeek: [ + "Sek", "Pir", "Ant", "Tre", "Ket", "Pen", "Šeš" + ] + }, + lv: { //Latvian (Latviešu) + months: [ + "Janvāris", "Februāris", "Marts", "Aprīlis ", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris" + ], + dayOfWeek: [ + "Sv", "Pr", "Ot", "Tr", "Ct", "Pk", "St" + ] + }, + mk: { //Macedonian (Македонски) + months: [ + "јануари", "февруари", "март", "април", "мај", "јуни", "јули", "август", "септември", "октомври", "ноември", "декември" + ], + dayOfWeek: [ + "нед", "пон", "вто", "сре", "чет", "пет", "саб" + ] + }, + mn: { //Mongolian (Монгол) + months: [ + "1-р сар", "2-р сар", "3-р сар", "4-р сар", "5-р сар", "6-р сар", "7-р сар", "8-р сар", "9-р сар", "10-р сар", "11-р сар", "12-р сар" + ], + dayOfWeek: [ + "Дав", "Мяг", "Лха", "Пүр", "Бсн", "Бям", "Ням" + ] + }, + 'pt-BR': { //Português(Brasil) + months: [ + "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro" + ], + dayOfWeek: [ + "Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb" + ] + }, + sk: { //Slovenčina + months: [ + "Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December" + ], + dayOfWeek: [ + "Ne", "Po", "Ut", "St", "Št", "Pi", "So" + ] + }, + sq: { //Albanian (Shqip) + months: [ + "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" + ], + dayOfWeek: [ + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" + ] + }, + 'sr-YU': { //Serbian (Srpski) + months: [ + "Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar" + ], + dayOfWeek: [ + "Ned", "Pon", "Uto", "Sre", "čet", "Pet", "Sub" + ] + }, + sr: { //Serbian Cyrillic (Српски) + months: [ + "јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар" + ], + dayOfWeek: [ + "нед", "пон", "уто", "сре", "чет", "пет", "суб" + ] + }, + sv: { //Svenska + months: [ + "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December" + ], + dayOfWeek: [ + "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör" + ] + }, + 'zh-TW': { //Traditional Chinese (繁體中文) + months: [ + "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月" + ], + dayOfWeek: [ + "日", "一", "二", "三", "四", "五", "六" + ] + }, + zh: { //Simplified Chinese (简体中文) + months: [ + "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月" + ], + dayOfWeek: [ + "日", "一", "二", "三", "四", "五", "六" + ] + }, + he: { //Hebrew (עברית) + months: [ + 'ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר' + ], + dayOfWeek: [ + 'א\'', 'ב\'', 'ג\'', 'ד\'', 'ה\'', 'ו\'', 'שבת' + ] } }, value: '', @@ -506,12 +690,11 @@ lazyInitTimer = 0, createDateTimePicker, destroyDateTimePicker, - _xdsoft_datetime, 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')) { + if (input.is(':disabled') || input.data('xdsoft_datetimepicker')) { return; } clearTimeout(lazyInitTimer); @@ -551,7 +734,8 @@ current_time_index, setPos, timer = 0, - timer1 = 0; + timer1 = 0, + _xdsoft_datetime; mounth_picker .find('.xdsoft_month span') @@ -1218,9 +1402,11 @@ h = parseInt(now.getHours(), 10); now.setMinutes(m); m = parseInt(now.getMinutes(), 10); - + var optionDateTime = new Date(_xdsoft_datetime.currentTime) + optionDateTime.setHours(h); + optionDateTime.setMinutes(m); classes = []; - if ((options.maxTime !== false && _xdsoft_datetime.strtotime(options.maxTime).getTime() < now.getTime()) || (options.minTime !== false && _xdsoft_datetime.strtotime(options.minTime).getTime() > now.getTime())) { + if((options.minDateTime !== false && options.minDateTime > optionDateTime) || (options.maxTime !== false && _xdsoft_datetime.strtotime(options.maxTime).getTime() < now.getTime()) || (options.minTime !== false && _xdsoft_datetime.strtotime(options.minTime).getTime() > now.getTime())) { classes.push('xdsoft_disabled'); } if ((options.initTime || options.defaultSelect || datetimepicker.data('changed')) && parseInt(_xdsoft_datetime.currentTime.getHours(), 10) === parseInt(h, 10) && (options.step > 59 || Math[options.roundTime](_xdsoft_datetime.currentTime.getMinutes() / options.step) * options.step === parseInt(m, 10))) { @@ -1488,7 +1674,11 @@ event.stopPropagation(); }) .on('toggle.xdsoft', function (event) { - datetimepicker.is(':visible') ? datetimepicker.trigger('close.xdsoft') : datetimepicker.trigger('open.xdsoft'); + if (datetimepicker.is(':visible')) { + datetimepicker.trigger('close.xdsoft'); + } else { + datetimepicker.trigger('open.xdsoft'); + } }) .data('input', input); @@ -1532,12 +1722,12 @@ input .data('xdsoft_datetimepicker', datetimepicker) .on('open.xdsoft focusin.xdsoft mousedown.xdsoft', function (event) { - if (input.is(':disabled') || input.is(':hidden') || !input.is(':visible') || (input.data('xdsoft_datetimepicker').is(':visible') && options.closeOnInputClick)) { + if (input.is(':disabled') || (input.data('xdsoft_datetimepicker').is(':visible') && options.closeOnInputClick)) { return; } clearTimeout(timer); timer = setTimeout(function () { - if (input.is(':disabled') || input.is(':hidden') || !input.is(':visible')) { + if (input.is(':disabled')) { return; }