From 8e05c840b4ef34461e93dce1948c6e2e97fe8550 Mon Sep 17 00:00:00 2001 From: Istvan Halmen Date: Fri, 16 Oct 2015 16:39:32 +0300 Subject: [PATCH 01/16] Fix clear method --- js/mobiscroll.frame.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/mobiscroll.frame.js b/js/mobiscroll.frame.js index d06c35fc..af43dd4e 100644 --- a/js/mobiscroll.frame.js +++ b/js/mobiscroll.frame.js @@ -391,7 +391,7 @@ */ that.clear = function () { event('onClear', [$markup]); - if (isModal && !that.live) { + if (isModal && that._isVisible && !that.live) { that.hide(false, 'clear', false, clear); } else { clear(); @@ -653,9 +653,9 @@ } if (has3d && isModal && doAnim && !prevAnim && !$markup.hasClass('dw-trans')) { // If dw-trans class was not removed, means that there was no animation - $markup.addClass('dw-out dw-trans').find('.dw').addClass('dw-' + doAnim).on(animEnd, function () { + $markup.addClass('dw-out dw-trans').on(animEnd, function () { onHide(prevAnim); - }); + }).find('.dw').addClass('dw-' + doAnim); } else { onHide(prevAnim); } From 38b328cf9735f3fe6730c019157124bf66487a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miquel=20Labo=CC=80ria?= Date: Wed, 28 Oct 2015 15:58:59 +0100 Subject: [PATCH 02/16] Catalan translate --- js/i18n/mobiscroll.i18n.ca.js | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 js/i18n/mobiscroll.i18n.ca.js diff --git a/js/i18n/mobiscroll.i18n.ca.js b/js/i18n/mobiscroll.i18n.ca.js new file mode 100644 index 00000000..d890e4a9 --- /dev/null +++ b/js/i18n/mobiscroll.i18n.ca.js @@ -0,0 +1,56 @@ +(function ($) { + $.mobiscroll.i18n.es = { + // Core + setText: 'Acceptar', + cancelText: 'Cancel·lar', + clearText: 'Esborrar', + selectedText: '{count} seleccionat', + selectedPluralText: '{count} seleccionats', + // Datetime component + dateFormat: 'dd/mm/yy', + dateOrder: 'ddmmyy', + dayNames: ['Diumenge', 'Dilluns', 'Dimarts', 'Dimecres', 'Dijous', 'Divendres', 'Dissabte'], + dayNamesShort: ['Dg', 'Dl', 'Dt', 'Dc', 'Dj', 'Dv', 'Ds'], + dayNamesMin: ['Dg', 'Dl', 'Dt', 'Dc', 'Dj', 'Dv', 'Ds'], + dayText: 'Dia', + hourText: 'Hores', + minuteText: 'Minuts', + monthNames: ['Gener', 'Febrer', 'Març', 'Abril', 'Maig', 'Juny', 'Juliol', 'Agost', 'Setembre', 'Octubre', 'Novembre', 'Desembre'], + monthNamesShort: ['Gen', 'Feb', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Oct', 'Nov', 'Des'], + monthText: 'Mes', + secText: 'Segons', + timeFormat: 'HH:ii', + timeWheels: 'HHii', + yearText: 'Any', + nowText: 'Ara', + pmText: 'pm', + amText: 'am', + // Calendar component + dateText: 'Data', + timeText: 'Temps', + calendarText: 'Calendari', + closeText: 'Tancar', + // Daterange component + fromText: 'Iniciar', + toText: 'Final', + // Measurement components + wholeText: 'Sencer', + fractionText: 'Fracció', + unitText: 'Unitat', + // Time / Timespan component + labels: ['Anys', 'Mesos', 'Dies', 'Hores', 'Minuts', 'Segons', ''], + labelsShort: ['Anys', 'Mesos', 'Dies', 'Hrs', 'Mins', 'Secs', ''], + // Timer component + startText: 'Iniciar', + stopText: 'Aturar', + resetText: 'Reiniciar', + lapText: 'Volta', + hideText: 'Amagar', + // Listview + backText: 'Tornar', + undoText: 'Desfer', + // Form + offText: 'No', + onText: 'Si' + }; +})(jQuery); From 5108ec12995241dd4f37a9db17c03bc686d21151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miquel=20Labo=CC=80ria?= Date: Wed, 28 Oct 2015 15:59:09 +0100 Subject: [PATCH 03/16] Fix Spanish translation --- js/i18n/mobiscroll.i18n.es.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/i18n/mobiscroll.i18n.es.js b/js/i18n/mobiscroll.i18n.es.js index 28125510..a0a42986 100644 --- a/js/i18n/mobiscroll.i18n.es.js +++ b/js/i18n/mobiscroll.i18n.es.js @@ -3,7 +3,7 @@ // Core setText: 'Aceptar', cancelText: 'Cancelar', - clearText: 'Claro', + clearText: 'Borrar', selectedText: '{count} seleccionado', selectedPluralText: '{count} seleccionados', // Datetime component @@ -47,7 +47,7 @@ lapText: 'Lap', hideText: 'Esconder', // Listview - backText: 'Espalda', + backText: 'Volver', undoText: 'Deshacer', // Form offText: 'No', From 06fd203163f7bd56d1cb3f7305805b9c7155f852 Mon Sep 17 00:00:00 2001 From: Kali Gabriella Date: Thu, 29 Oct 2015 14:50:22 +0200 Subject: [PATCH 04/16] Limit number of selectable elements --- js/mobiscroll.select.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/mobiscroll.select.js b/js/mobiscroll.select.js index 5206c8d3..5a04f506 100644 --- a/js/mobiscroll.select.js +++ b/js/mobiscroll.select.js @@ -46,6 +46,7 @@ isLiquid = layout == 'liquid', elm = $(this), multiple = s.multiple || elm.prop('multiple'), + maxSelect = util.isNumeric(s.multiple) ? s.multiple : Infinity, id = this.id + '_dummy', lbl = $('label[for="' + this.id + '"]').attr('for', id), label = s.label !== undefined ? s.label : (lbl.length ? lbl.text() : elm.attr('name')), @@ -303,7 +304,7 @@ if (selected) { li.removeClass(selectedClass).removeAttr('aria-selected'); delete selectedValues[val]; - } else { + } else if (util.objectToArray(selectedValues).length < maxSelect) { li.addClass(selectedClass).attr('aria-selected', 'true'); selectedValues[val] = val; } From ccb88f7341e698536a8dc9214c6a8403796a5f03 Mon Sep 17 00:00:00 2001 From: Kali Gabriella Date: Wed, 2 Dec 2015 16:19:35 +0200 Subject: [PATCH 05/16] Thousands and decimal separators --- js/i18n/mobiscroll.i18n.cs.js | 7 ++++++- js/i18n/mobiscroll.i18n.de.js | 7 ++++++- js/i18n/mobiscroll.i18n.es.js | 7 ++++++- js/i18n/mobiscroll.i18n.fr.js | 7 ++++++- js/i18n/mobiscroll.i18n.hu.js | 7 ++++++- js/i18n/mobiscroll.i18n.it.js | 7 ++++++- js/i18n/mobiscroll.i18n.lt.js | 7 ++++++- js/i18n/mobiscroll.i18n.nl.js | 7 ++++++- js/i18n/mobiscroll.i18n.no.js | 7 ++++++- js/i18n/mobiscroll.i18n.pl.js | 7 ++++++- js/i18n/mobiscroll.i18n.pt-BR.js | 7 ++++++- js/i18n/mobiscroll.i18n.pt-PT.js | 7 ++++++- js/i18n/mobiscroll.i18n.ro.js | 7 ++++++- js/i18n/mobiscroll.i18n.ru-UA.js | 7 ++++++- js/i18n/mobiscroll.i18n.ru.js | 7 ++++++- js/i18n/mobiscroll.i18n.sk.js | 7 ++++++- js/i18n/mobiscroll.i18n.tr.js | 7 ++++++- js/i18n/mobiscroll.i18n.zh.js | 7 ++++++- 18 files changed, 108 insertions(+), 18 deletions(-) diff --git a/js/i18n/mobiscroll.i18n.cs.js b/js/i18n/mobiscroll.i18n.cs.js index 08d8f1ef..97ca5845 100644 --- a/js/i18n/mobiscroll.i18n.cs.js +++ b/js/i18n/mobiscroll.i18n.cs.js @@ -51,6 +51,11 @@ undoText: 'Rozlepit', // Form offText: 'O', - onText: 'I' + onText: 'I', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.de.js b/js/i18n/mobiscroll.i18n.de.js index 1e9c6da8..8df4d23f 100644 --- a/js/i18n/mobiscroll.i18n.de.js +++ b/js/i18n/mobiscroll.i18n.de.js @@ -52,6 +52,11 @@ undoText: 'Rückgängig machen', // Form offText: 'Aus', - onText: 'Ein' + onText: 'Ein', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.es.js b/js/i18n/mobiscroll.i18n.es.js index 28125510..2935e4b4 100644 --- a/js/i18n/mobiscroll.i18n.es.js +++ b/js/i18n/mobiscroll.i18n.es.js @@ -51,6 +51,11 @@ undoText: 'Deshacer', // Form offText: 'No', - onText: 'Sí' + onText: 'Sí', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.fr.js b/js/i18n/mobiscroll.i18n.fr.js index 64115bab..3d62f26d 100644 --- a/js/i18n/mobiscroll.i18n.fr.js +++ b/js/i18n/mobiscroll.i18n.fr.js @@ -52,6 +52,11 @@ undoText: 'Défaire', // Form offText: 'Non', - onText: 'Oui' + onText: 'Oui', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.hu.js b/js/i18n/mobiscroll.i18n.hu.js index 86c00581..ac647f2d 100644 --- a/js/i18n/mobiscroll.i18n.hu.js +++ b/js/i18n/mobiscroll.i18n.hu.js @@ -59,6 +59,11 @@ undoText: 'Visszavon', // Form offText: 'Ki', - onText: 'Be' + onText: 'Be', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.it.js b/js/i18n/mobiscroll.i18n.it.js index 57b8bc89..f40ba71a 100644 --- a/js/i18n/mobiscroll.i18n.it.js +++ b/js/i18n/mobiscroll.i18n.it.js @@ -52,6 +52,11 @@ undoText: 'Annulla', // Form offText: 'Via', - onText: 'Su' + onText: 'Su', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.lt.js b/js/i18n/mobiscroll.i18n.lt.js index b1905b8e..f1489c68 100644 --- a/js/i18n/mobiscroll.i18n.lt.js +++ b/js/i18n/mobiscroll.i18n.lt.js @@ -53,6 +53,11 @@ undoText: 'Atšaukti veiksmą', // Form offText: 'Išj.', - onText: 'Įj.' + onText: 'Įj.', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.nl.js b/js/i18n/mobiscroll.i18n.nl.js index 5e4d9d13..b91cd919 100644 --- a/js/i18n/mobiscroll.i18n.nl.js +++ b/js/i18n/mobiscroll.i18n.nl.js @@ -51,6 +51,11 @@ undoText: 'Onged. maken', // Form offText: 'Uit', - onText: 'Aan' + onText: 'Aan', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.no.js b/js/i18n/mobiscroll.i18n.no.js index 85f686e3..c9725cf2 100644 --- a/js/i18n/mobiscroll.i18n.no.js +++ b/js/i18n/mobiscroll.i18n.no.js @@ -52,6 +52,11 @@ undoText: 'Angre', // Form offText: 'Av', - onText: 'På' + onText: 'På', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.pl.js b/js/i18n/mobiscroll.i18n.pl.js index 6f1ad7b0..0ee3435b 100644 --- a/js/i18n/mobiscroll.i18n.pl.js +++ b/js/i18n/mobiscroll.i18n.pl.js @@ -51,6 +51,11 @@ undoText: 'Cofnij', // Form offText: 'Wył', - onText: 'Wł' + onText: 'Wł', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.pt-BR.js b/js/i18n/mobiscroll.i18n.pt-BR.js index 86eb868f..02ec01ef 100644 --- a/js/i18n/mobiscroll.i18n.pt-BR.js +++ b/js/i18n/mobiscroll.i18n.pt-BR.js @@ -54,6 +54,11 @@ undoText: 'Desfazer', // Form offText: 'Desl', - onText: 'Lig' + onText: 'Lig', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.pt-PT.js b/js/i18n/mobiscroll.i18n.pt-PT.js index cd2e78c4..bebb99c6 100644 --- a/js/i18n/mobiscroll.i18n.pt-PT.js +++ b/js/i18n/mobiscroll.i18n.pt-PT.js @@ -55,6 +55,11 @@ undoText: 'Anular', // Form offText: 'Desl', - onText: 'Lig' + onText: 'Lig', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.ro.js b/js/i18n/mobiscroll.i18n.ro.js index 0fb06feb..3efbc20f 100644 --- a/js/i18n/mobiscroll.i18n.ro.js +++ b/js/i18n/mobiscroll.i18n.ro.js @@ -53,6 +53,11 @@ undoText: 'Anulaţi', // Form offText: 'Nu', - onText: 'Da' + onText: 'Da', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.ru-UA.js b/js/i18n/mobiscroll.i18n.ru-UA.js index 984b3358..91ec38fe 100644 --- a/js/i18n/mobiscroll.i18n.ru-UA.js +++ b/js/i18n/mobiscroll.i18n.ru-UA.js @@ -52,6 +52,11 @@ undoText: 'аннулировать', // Form offText: 'O', - onText: 'I' + onText: 'I', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.ru.js b/js/i18n/mobiscroll.i18n.ru.js index e847bb8b..33b01b44 100644 --- a/js/i18n/mobiscroll.i18n.ru.js +++ b/js/i18n/mobiscroll.i18n.ru.js @@ -52,6 +52,11 @@ undoText: 'аннулировать', // Form offText: 'O', - onText: 'I' + onText: 'I', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.sk.js b/js/i18n/mobiscroll.i18n.sk.js index 4f595f58..66f2bd96 100644 --- a/js/i18n/mobiscroll.i18n.sk.js +++ b/js/i18n/mobiscroll.i18n.sk.js @@ -51,6 +51,11 @@ undoText: 'Späť', // Form offText: 'O', - onText: 'I' + onText: 'I', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.tr.js b/js/i18n/mobiscroll.i18n.tr.js index 718e5d87..35b9c918 100644 --- a/js/i18n/mobiscroll.i18n.tr.js +++ b/js/i18n/mobiscroll.i18n.tr.js @@ -52,6 +52,11 @@ undoText: 'Geri Al', // Form offText: 'O', - onText: 'I' + onText: 'I', + // Numpad + separators: { + decimal: ',', + thousands: '.' + } }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.zh.js b/js/i18n/mobiscroll.i18n.zh.js index b4c07aef..8ed00f2f 100644 --- a/js/i18n/mobiscroll.i18n.zh.js +++ b/js/i18n/mobiscroll.i18n.zh.js @@ -50,6 +50,11 @@ undoText: '复原', // Form offText: '关闭', - onText: '开启' + onText: '开启', + // Numpad + separators: { + decimal: ',', + thousands: ' ' + } }; })(jQuery); From 7f846f627cabaf58626a5052482d4e0b51a9835c Mon Sep 17 00:00:00 2001 From: Istvan Halmen Date: Thu, 3 Dec 2015 12:54:17 +0200 Subject: [PATCH 06/16] Default to current date if date is not specified --- js/mobiscroll.datetimebase.js | 106 ++++++++++++++++++++++++---------- 1 file changed, 75 insertions(+), 31 deletions(-) diff --git a/js/mobiscroll.datetimebase.js b/js/mobiscroll.datetimebase.js index 235e798c..a041c1f8 100644 --- a/js/mobiscroll.datetimebase.js +++ b/js/mobiscroll.datetimebase.js @@ -5,7 +5,7 @@ date = new Date(), defaults = { startYear: date.getFullYear() - 100, - endYear: date.getFullYear() + 1, + endYear: date.getFullYear() + 1, separator: ' ', // Localization dateFormat: 'mm/dd/yy', @@ -33,22 +33,22 @@ // Force format for html5 date inputs (experimental) if (that.is('input')) { switch (that.attr('type')) { - case 'date': - format = 'yy-mm-dd'; - break; - case 'datetime': - format = 'yy-mm-ddTHH:ii:ssZ'; - break; - case 'datetime-local': - format = 'yy-mm-ddTHH:ii:ss'; - break; - case 'month': - format = 'yy-mm'; - html5def.dateOrder = 'mmyy'; - break; - case 'time': - format = 'HH:ii:ss'; - break; + case 'date': + format = 'yy-mm-dd'; + break; + case 'datetime': + format = 'yy-mm-ddTHH:ii:ssZ'; + break; + case 'datetime-local': + format = 'yy-mm-ddTHH:ii:ss'; + break; + case 'month': + format = 'yy-mm'; + html5def.dateOrder = 'mmyy'; + break; + case 'time': + format = 'HH:ii:ss'; + break; } // Check for min/max attributes var min = that.attr('min'), @@ -80,7 +80,16 @@ ord = [], o = {}, innerValues = {}, - f = { y: getYear, m: getMonth, d: getDay, h: getHour, i: getMinute, s: getSecond, u: getMillisecond, a: getAmPm }, + f = { + y: getYear, + m: getMonth, + d: getDay, + h: getHour, + i: getMinute, + s: getSecond, + u: getMillisecond, + a: getAmPm + }, invalid = s.invalid, valid = s.valid, p = s.preset, @@ -113,10 +122,15 @@ $.each(['y', 'm', 'd'], function (j, v) { i = dord.search(new RegExp(v, 'i')); if (i > -1) { - ord.push({ o: i, v: v }); + ord.push({ + o: i, + v: v + }); } }); - ord.sort(function (a, b) { return a.o > b.o ? 1 : -1; }); + ord.sort(function (a, b) { + return a.o > b.o ? 1 : -1; + }); $.each(ord, function (i, v) { o[v.v] = i; }); @@ -166,7 +180,10 @@ $.each(['h', 'i', 's', 'a'], function (i, v) { i = tord.search(new RegExp(v, 'i')); if (i > -1) { - ord.push({ o: i, v: v }); + ord.push({ + o: i, + v: v + }); } }); ord.sort(function (a, b) { @@ -281,7 +298,7 @@ var year = get(d, 'y'), month = get(d, 'm'), - day = Math.min(get(d, 'd', 1), s.getMaxDayOfMonth(year, month)), + day = Math.min(get(d, 'd'), s.getMaxDayOfMonth(year, month)), hour = get(d, 'h', 0); return s.getDate(year, month, day, get(d, 'a', 0) ? hour + 12 : hour, get(d, 'i', 0), get(d, 's', 0), get(d, 'u', 0)); @@ -441,7 +458,12 @@ function validateTimes(vobj, i, v, temp, y, m, d, target, valid) { var dd, ss, str, parts1, parts2, prop1, prop2, v1, v2, j, i1, i2, add, remove, all, hours1, hours2, hours3, spec = {}, - steps = { h: stepH, i: stepM, s: stepS, a: 1 }, + steps = { + h: stepH, + i: stepM, + s: stepS, + a: 1 + }, day = s.getDate(y, m, d), w = ['a', 'h', 'i', 's']; @@ -453,8 +475,8 @@ ss = dd + ''; str = ss.split('/'); if (dd && ((dd.getTime && y == s.getYear(dd) && m == s.getMonth(dd) && d == s.getDay(dd)) || // Exact date - (!ss.match(/w/i) && ((str[1] && d == str[1] && m == str[0] - 1) || (!str[1] && d == str[0]))) || // Day of month - (ss.match(/w/i) && day.getDay() == +ss.replace('w', '')) // Day of week + (!ss.match(/w/i) && ((str[1] && d == str[1] && m == str[0] - 1) || (!str[1] && d == str[0]))) || // Day of month + (ss.match(/w/i) && day.getDay() == +ss.replace('w', '')) // Day of week )) { obj.apply = true; spec[day] = true; // Prevent applying generic rule on day, if specific exists @@ -543,7 +565,7 @@ } } } - + if (!all) { // Calculate min and max values v1 = step(parts1[i], steps[v], mins[v], maxs[v]) + add; @@ -566,7 +588,7 @@ $('.dw-li', target).slice(i1, i2).removeClass('dw-v'); } } - + } }); } @@ -664,14 +686,36 @@ inst.format = hformat; inst.order = o; - inst.handlers.now = function () { inst.setDate(new Date(), false, 0.3, true, true); }; - inst.buttons.now = { text: s.nowText, handler: 'now' }; + inst.handlers.now = function () { + inst.setDate(new Date(), false, 0.3, true, true); + }; + + inst.buttons.now = { + text: s.nowText, + handler: 'now' + }; invalid = convertRanges(invalid); valid = convertRanges(valid); - mins = { y: mind.getFullYear(), m: 0, d: 1, h: minH, i: minM, s: minS, a: 0 }; - maxs = { y: maxd.getFullYear(), m: 11, d: 31, h: maxH, i: maxM, s: maxS, a: 1 }; + mins = { + y: mind.getFullYear(), + m: 0, + d: 1, + h: minH, + i: minM, + s: minS, + a: 0 + }; + maxs = { + y: maxd.getFullYear(), + m: 11, + d: 31, + h: maxH, + i: maxM, + s: maxS, + a: 1 + }; // --- From d71636f56446a7253cb127c04c83ca1b86a255de Mon Sep 17 00:00:00 2001 From: szily20 Date: Fri, 4 Dec 2015 15:37:53 +0200 Subject: [PATCH 07/16] es and ca translations added fristDay --- js/i18n/mobiscroll.i18n.ca.js | 3 ++- js/i18n/mobiscroll.i18n.es.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/js/i18n/mobiscroll.i18n.ca.js b/js/i18n/mobiscroll.i18n.ca.js index d890e4a9..373ea1fb 100644 --- a/js/i18n/mobiscroll.i18n.ca.js +++ b/js/i18n/mobiscroll.i18n.ca.js @@ -1,5 +1,5 @@ (function ($) { - $.mobiscroll.i18n.es = { + $.mobiscroll.i18n.ca = { // Core setText: 'Acceptar', cancelText: 'Cancel·lar', @@ -26,6 +26,7 @@ pmText: 'pm', amText: 'am', // Calendar component + firstDay: 1, dateText: 'Data', timeText: 'Temps', calendarText: 'Calendari', diff --git a/js/i18n/mobiscroll.i18n.es.js b/js/i18n/mobiscroll.i18n.es.js index a0a42986..6c9235e8 100644 --- a/js/i18n/mobiscroll.i18n.es.js +++ b/js/i18n/mobiscroll.i18n.es.js @@ -26,6 +26,7 @@ pmText: 'pm', amText: 'am', // Calendar component + firstDay: 1, dateText: 'Fecha', timeText: 'Tiempo', calendarText: 'Calendario', From 3f5709e14dad5f3e6a88c07d2509c7b884675dd8 Mon Sep 17 00:00:00 2001 From: Beat Date: Mon, 7 Dec 2015 12:34:51 +0100 Subject: [PATCH 08/16] Added missing german short label translations --- js/i18n/mobiscroll.i18n.de.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/i18n/mobiscroll.i18n.de.js b/js/i18n/mobiscroll.i18n.de.js index 1e9c6da8..385f4415 100644 --- a/js/i18n/mobiscroll.i18n.de.js +++ b/js/i18n/mobiscroll.i18n.de.js @@ -40,7 +40,7 @@ unitText: 'Maßeinheit', // Time / Timespan component labels: ['Jahre', 'Monate', 'Tage', 'Stunden', 'Minuten', 'Sekunden', ''], - labelsShort: ['Yrs', 'Mths', 'Days', 'Hrs', 'Mins', 'Secs', ''], + labelsShort: ['Jahr.', 'Mon.', 'Tag.', 'Std.', 'Min.', 'Sek.', ''], // Timer component startText: 'Starten', stopText: 'Stoppen', From f9a2ca4912b801c8092ebb90b5be08cfa5c0c3d8 Mon Sep 17 00:00:00 2001 From: Beat Date: Mon, 7 Dec 2015 12:37:16 +0100 Subject: [PATCH 09/16] Code cleanup --- js/i18n/mobiscroll.i18n.de.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/i18n/mobiscroll.i18n.de.js b/js/i18n/mobiscroll.i18n.de.js index 385f4415..42d7a649 100644 --- a/js/i18n/mobiscroll.i18n.de.js +++ b/js/i18n/mobiscroll.i18n.de.js @@ -40,7 +40,7 @@ unitText: 'Maßeinheit', // Time / Timespan component labels: ['Jahre', 'Monate', 'Tage', 'Stunden', 'Minuten', 'Sekunden', ''], - labelsShort: ['Jahr.', 'Mon.', 'Tag.', 'Std.', 'Min.', 'Sek.', ''], + labelsShort: ['Jahr.', 'Mon.', 'Tag.', 'Std.', 'Min.', 'Sek.', ''], // Timer component startText: 'Starten', stopText: 'Stoppen', From cd5327c923e467864045a06cdbc312d66d0e9e5b Mon Sep 17 00:00:00 2001 From: szily20 Date: Tue, 8 Dec 2015 12:38:24 +0200 Subject: [PATCH 10/16] Translations labelsShort option fixes --- js/i18n/mobiscroll.i18n.es.js | 2 +- js/i18n/mobiscroll.i18n.fr.js | 2 +- js/i18n/mobiscroll.i18n.it.js | 2 +- js/i18n/mobiscroll.i18n.no.js | 2 +- js/i18n/mobiscroll.i18n.pt-BR.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/i18n/mobiscroll.i18n.es.js b/js/i18n/mobiscroll.i18n.es.js index 6c9235e8..6e68d04e 100644 --- a/js/i18n/mobiscroll.i18n.es.js +++ b/js/i18n/mobiscroll.i18n.es.js @@ -40,7 +40,7 @@ unitText: 'Unidad', // Time / Timespan component labels: ['Años', 'Meses', 'Días', 'Horas', 'Minutos', 'Segundos', ''], - labelsShort: ['Yrs', 'Mths', 'Days', 'Hrs', 'Mins', 'Secs', ''], + labelsShort: ['Año', 'Mes', 'Día', 'Hora', 'Min', 'Seg', ''], // Timer component startText: 'Iniciar', stopText: 'Deténgase', diff --git a/js/i18n/mobiscroll.i18n.fr.js b/js/i18n/mobiscroll.i18n.fr.js index 64115bab..68e0ff2e 100644 --- a/js/i18n/mobiscroll.i18n.fr.js +++ b/js/i18n/mobiscroll.i18n.fr.js @@ -40,7 +40,7 @@ unitText: 'Unité', // Time / Timespan component labels: ['Ans', 'Mois', 'Jours', 'Heures', 'Minutes', 'Secondes', ''], - labelsShort: ['Yrs', 'Mths', 'Days', 'Hrs', 'Mins', 'Secs', ''], + labelsShort: ['Ans', 'Mois', 'Jours', 'Hrs', 'Min', 'Sec', ''], // Timer component startText: 'Démarrer', stopText: 'Arrêter', diff --git a/js/i18n/mobiscroll.i18n.it.js b/js/i18n/mobiscroll.i18n.it.js index 57b8bc89..09f6888b 100644 --- a/js/i18n/mobiscroll.i18n.it.js +++ b/js/i18n/mobiscroll.i18n.it.js @@ -40,7 +40,7 @@ unitText: 'Unità', // Time / Timespan component labels: ['Anni', 'Mesi', 'Giorni', 'Ore', 'Minuti', 'Secondi', ''], - labelsShort: ['Yrs', 'Mths', 'Days', 'Hrs', 'Mins', 'Secs', ''], + labelsShort: ['Anni', 'Mesi', 'Gio', 'Ore', 'Min', 'Sec', ''], // Timer component startText: 'Inizio', stopText: 'Arresto', diff --git a/js/i18n/mobiscroll.i18n.no.js b/js/i18n/mobiscroll.i18n.no.js index 85f686e3..f1fc22d9 100644 --- a/js/i18n/mobiscroll.i18n.no.js +++ b/js/i18n/mobiscroll.i18n.no.js @@ -40,7 +40,7 @@ unitText: 'Enhet', // Time / Timespan component labels: ['År', 'Måneder', 'Dager', 'Timer', 'Minutter', 'Sekunder', ''], - labelsShort: ['Yrs', 'Mths', 'Days', 'Hrs', 'Mins', 'Secs', ''], + labelsShort: ['År', 'Mån', 'Dag', 'Time', 'Min', 'Sek', ''], // Timer component startText: 'Start', stopText: 'Stopp', diff --git a/js/i18n/mobiscroll.i18n.pt-BR.js b/js/i18n/mobiscroll.i18n.pt-BR.js index 86eb868f..9f564eb5 100644 --- a/js/i18n/mobiscroll.i18n.pt-BR.js +++ b/js/i18n/mobiscroll.i18n.pt-BR.js @@ -42,7 +42,7 @@ unitText: 'Unidade', // Time / Timespan component labels: ['Anos', 'Meses', 'Dias', 'Horas', 'Minutos', 'Segundos', ''], - labelsShort: ['Yrs', 'Mths', 'Days', 'Hrs', 'Mins', 'Secs', ''], + labelsShort: ['Ano', 'Mês', 'Dia', 'Hora', 'Min', 'Seg', ''], // Timer component startText: 'Começar', stopText: 'Pare', From 9fa3a6600d70f4e9af8926d0f5cd4d4ccc7cc601 Mon Sep 17 00:00:00 2001 From: Kali Gabriella Date: Wed, 9 Dec 2015 12:31:10 +0200 Subject: [PATCH 11/16] Separators name change --- js/i18n/mobiscroll.i18n.cs.js | 6 ++---- js/i18n/mobiscroll.i18n.de.js | 6 ++---- js/i18n/mobiscroll.i18n.es.js | 6 ++---- js/i18n/mobiscroll.i18n.fr.js | 6 ++---- js/i18n/mobiscroll.i18n.hu.js | 6 ++---- js/i18n/mobiscroll.i18n.it.js | 6 ++---- js/i18n/mobiscroll.i18n.lt.js | 6 ++---- js/i18n/mobiscroll.i18n.nl.js | 6 ++---- js/i18n/mobiscroll.i18n.no.js | 6 ++---- js/i18n/mobiscroll.i18n.pl.js | 6 ++---- js/i18n/mobiscroll.i18n.pt-BR.js | 6 ++---- js/i18n/mobiscroll.i18n.pt-PT.js | 6 ++---- js/i18n/mobiscroll.i18n.ro.js | 6 ++---- js/i18n/mobiscroll.i18n.ru-UA.js | 6 ++---- js/i18n/mobiscroll.i18n.ru.js | 6 ++---- js/i18n/mobiscroll.i18n.sk.js | 6 ++---- js/i18n/mobiscroll.i18n.tr.js | 6 ++---- js/i18n/mobiscroll.i18n.zh.js | 6 ++---- 18 files changed, 36 insertions(+), 72 deletions(-) diff --git a/js/i18n/mobiscroll.i18n.cs.js b/js/i18n/mobiscroll.i18n.cs.js index 97ca5845..f847dd7c 100644 --- a/js/i18n/mobiscroll.i18n.cs.js +++ b/js/i18n/mobiscroll.i18n.cs.js @@ -53,9 +53,7 @@ offText: 'O', onText: 'I', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.de.js b/js/i18n/mobiscroll.i18n.de.js index 8df4d23f..e9895d99 100644 --- a/js/i18n/mobiscroll.i18n.de.js +++ b/js/i18n/mobiscroll.i18n.de.js @@ -54,9 +54,7 @@ offText: 'Aus', onText: 'Ein', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.es.js b/js/i18n/mobiscroll.i18n.es.js index 2935e4b4..a5d6e2bc 100644 --- a/js/i18n/mobiscroll.i18n.es.js +++ b/js/i18n/mobiscroll.i18n.es.js @@ -53,9 +53,7 @@ offText: 'No', onText: 'Sí', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.fr.js b/js/i18n/mobiscroll.i18n.fr.js index 3d62f26d..ebd84ed0 100644 --- a/js/i18n/mobiscroll.i18n.fr.js +++ b/js/i18n/mobiscroll.i18n.fr.js @@ -54,9 +54,7 @@ offText: 'Non', onText: 'Oui', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.hu.js b/js/i18n/mobiscroll.i18n.hu.js index ac647f2d..7da4cf8c 100644 --- a/js/i18n/mobiscroll.i18n.hu.js +++ b/js/i18n/mobiscroll.i18n.hu.js @@ -61,9 +61,7 @@ offText: 'Ki', onText: 'Be', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.it.js b/js/i18n/mobiscroll.i18n.it.js index f40ba71a..e5db0f02 100644 --- a/js/i18n/mobiscroll.i18n.it.js +++ b/js/i18n/mobiscroll.i18n.it.js @@ -54,9 +54,7 @@ offText: 'Via', onText: 'Su', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.lt.js b/js/i18n/mobiscroll.i18n.lt.js index f1489c68..f3acf446 100644 --- a/js/i18n/mobiscroll.i18n.lt.js +++ b/js/i18n/mobiscroll.i18n.lt.js @@ -55,9 +55,7 @@ offText: 'Išj.', onText: 'Įj.', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.nl.js b/js/i18n/mobiscroll.i18n.nl.js index b91cd919..9c0a46ee 100644 --- a/js/i18n/mobiscroll.i18n.nl.js +++ b/js/i18n/mobiscroll.i18n.nl.js @@ -53,9 +53,7 @@ offText: 'Uit', onText: 'Aan', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.no.js b/js/i18n/mobiscroll.i18n.no.js index c9725cf2..005f4181 100644 --- a/js/i18n/mobiscroll.i18n.no.js +++ b/js/i18n/mobiscroll.i18n.no.js @@ -54,9 +54,7 @@ offText: 'Av', onText: 'På', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.pl.js b/js/i18n/mobiscroll.i18n.pl.js index 0ee3435b..ad97b8f5 100644 --- a/js/i18n/mobiscroll.i18n.pl.js +++ b/js/i18n/mobiscroll.i18n.pl.js @@ -53,9 +53,7 @@ offText: 'Wył', onText: 'Wł', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.pt-BR.js b/js/i18n/mobiscroll.i18n.pt-BR.js index 02ec01ef..a4e2040f 100644 --- a/js/i18n/mobiscroll.i18n.pt-BR.js +++ b/js/i18n/mobiscroll.i18n.pt-BR.js @@ -56,9 +56,7 @@ offText: 'Desl', onText: 'Lig', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.pt-PT.js b/js/i18n/mobiscroll.i18n.pt-PT.js index bebb99c6..aed60158 100644 --- a/js/i18n/mobiscroll.i18n.pt-PT.js +++ b/js/i18n/mobiscroll.i18n.pt-PT.js @@ -57,9 +57,7 @@ offText: 'Desl', onText: 'Lig', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.ro.js b/js/i18n/mobiscroll.i18n.ro.js index 3efbc20f..08d9a507 100644 --- a/js/i18n/mobiscroll.i18n.ro.js +++ b/js/i18n/mobiscroll.i18n.ro.js @@ -55,9 +55,7 @@ offText: 'Nu', onText: 'Da', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.ru-UA.js b/js/i18n/mobiscroll.i18n.ru-UA.js index 91ec38fe..3b32063c 100644 --- a/js/i18n/mobiscroll.i18n.ru-UA.js +++ b/js/i18n/mobiscroll.i18n.ru-UA.js @@ -54,9 +54,7 @@ offText: 'O', onText: 'I', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.ru.js b/js/i18n/mobiscroll.i18n.ru.js index 33b01b44..74aa347d 100644 --- a/js/i18n/mobiscroll.i18n.ru.js +++ b/js/i18n/mobiscroll.i18n.ru.js @@ -54,9 +54,7 @@ offText: 'O', onText: 'I', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.sk.js b/js/i18n/mobiscroll.i18n.sk.js index 66f2bd96..d2b4a353 100644 --- a/js/i18n/mobiscroll.i18n.sk.js +++ b/js/i18n/mobiscroll.i18n.sk.js @@ -53,9 +53,7 @@ offText: 'O', onText: 'I', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.tr.js b/js/i18n/mobiscroll.i18n.tr.js index 35b9c918..e4331805 100644 --- a/js/i18n/mobiscroll.i18n.tr.js +++ b/js/i18n/mobiscroll.i18n.tr.js @@ -54,9 +54,7 @@ offText: 'O', onText: 'I', // Numpad - separators: { - decimal: ',', - thousands: '.' - } + decimalSeparator: ',', + thousandsSeparator: '.' }; })(jQuery); diff --git a/js/i18n/mobiscroll.i18n.zh.js b/js/i18n/mobiscroll.i18n.zh.js index 8ed00f2f..d35a4f7a 100644 --- a/js/i18n/mobiscroll.i18n.zh.js +++ b/js/i18n/mobiscroll.i18n.zh.js @@ -52,9 +52,7 @@ offText: '关闭', onText: '开启', // Numpad - separators: { - decimal: ',', - thousands: ' ' - } + decimalSeparator: ',', + thousandsSeparator: ' ' }; })(jQuery); From 7720c65cac4f69f9cf0491ec42fa526bd3ecdb0d Mon Sep 17 00:00:00 2001 From: Istvan Halmen Date: Mon, 14 Dec 2015 12:28:43 +0200 Subject: [PATCH 12/16] Tap improvements --- js/mobiscroll.core.js | 6 +++--- js/mobiscroll.scroller.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/mobiscroll.core.js b/js/mobiscroll.core.js index 03912a2e..9452a555 100644 --- a/js/mobiscroll.core.js +++ b/js/mobiscroll.core.js @@ -129,9 +129,9 @@ isString: function (s) { return typeof s === 'string'; }, - getCoord: function (e, c, client) { + getCoord: function (e, c, page) { var ev = e.originalEvent || e, - prop = (client ? 'client' : 'page') + c; + prop = (page ? 'page' : 'client') + c; return ev.changedTouches ? ev.changedTouches[0][prop] : e[prop]; }, getPosition: function (t, vertical) { @@ -344,7 +344,7 @@ function onMove(ev) { // If movement is more than 20px, don't fire the click event handler - if (target && !moved && Math.abs(getCoord(ev, 'X') - startX) > 20 || Math.abs(getCoord(ev, 'Y') - startY) > 20) { + if (target && !moved && Math.abs(getCoord(ev, 'X') - startX) > 9 || Math.abs(getCoord(ev, 'Y') - startY) > 9) { moved = true; } } diff --git a/js/mobiscroll.scroller.js b/js/mobiscroll.scroller.js index 5cf70358..a341972c 100644 --- a/js/mobiscroll.scroller.js +++ b/js/mobiscroll.scroller.js @@ -56,7 +56,7 @@ setGlobals(target); moved = iv[index] !== undefined; // Don't allow tap, if still moving p = moved ? getCurrentPosition(target) : pos[index]; - start = getCoord(ev, 'Y'); + start = getCoord(ev, 'Y', true); startTime = new Date(); stop = start; scroll(target, index, p, 0.001); @@ -77,7 +77,7 @@ // Prevent scroll ev.preventDefault(); ev.stopPropagation(); - stop = getCoord(ev, 'Y'); + stop = getCoord(ev, 'Y', true); if (Math.abs(stop - start) > 3 || moved) { scroll(target, index, constrain(p + (start - stop) / itemHeight, min - 1, max + 1)); moved = true; From f4d2ff5a4796a156401f476859e6858a2894d04e Mon Sep 17 00:00:00 2001 From: Istvan Halmen Date: Mon, 14 Dec 2015 16:49:06 +0200 Subject: [PATCH 13/16] Component compatibility improvements --- css/mobiscroll.frame.css | 2 +- js/mobiscroll.core.js | 2 ++ js/mobiscroll.frame.js | 13 ++++++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/css/mobiscroll.frame.css b/css/mobiscroll.frame.css index e624aa36..c3bc4410 100644 --- a/css/mobiscroll.frame.css +++ b/css/mobiscroll.frame.css @@ -208,7 +208,7 @@ } /* Widget content styling */ -.mbsc-wdg .dwcc { +.mbsc-wdg .mbsc-wdg-c { position: relative; z-index: 0; padding: 1em; diff --git a/js/mobiscroll.core.js b/js/mobiscroll.core.js index 9452a555..2c55b52b 100644 --- a/js/mobiscroll.core.js +++ b/js/mobiscroll.core.js @@ -423,6 +423,8 @@ settings = settings || {}; + $(el).addClass('mbsc-comp'); + // Autogenerate id if (!el.id) { el.id = 'mobiscroll' + (++id); diff --git a/js/mobiscroll.frame.js b/js/mobiscroll.frame.js index af43dd4e..628c3dd5 100644 --- a/js/mobiscroll.frame.js +++ b/js/mobiscroll.frame.js @@ -320,6 +320,14 @@ wndWidth = nw; wndHeight = nh; + + // Call position for nested mobiscroll components + $('.mbsc-comp', $markup).each(function () { + var inst = $(this).mobiscroll('getInst'); + if (inst !== that && inst.position) { + inst.position(); + } + }); }; /** @@ -764,10 +772,9 @@ buttons = s.buttons || []; isModal = s.display !== 'inline'; setReadOnly = s.showOnFocus || s.showOnTap; - $wnd = $(s.context == 'body' ? window : s.context); - $ctx = $(s.context); - that.context = $wnd; + that._window = $wnd = $(s.context == 'body' ? window : s.context); + that._context = $ctx = $(s.context); that.live = true; From f16ccfa4413657e9f32a0c967c5e0bfdf7bc162b Mon Sep 17 00:00:00 2001 From: Istvan Halmen Date: Wed, 16 Dec 2015 10:45:49 +0200 Subject: [PATCH 14/16] Keep focused input in view on iOS --- js/mobiscroll.frame.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/js/mobiscroll.frame.js b/js/mobiscroll.frame.js index 628c3dd5..7e52ec81 100644 --- a/js/mobiscroll.frame.js +++ b/js/mobiscroll.frame.js @@ -145,6 +145,11 @@ } } + function onBlur() { + $(this).off('blur', onBlur); + that.position(); + } + function show(beforeShow, $elm) { if (beforeShow) { beforeShow(); @@ -204,7 +209,13 @@ minw = 0, css = {}, nw = Math.min($wnd[0].innerWidth || $wnd.innerWidth(), $persp.width()), //$persp.width(), // To get the width without scrollbar - nh = $wnd[0].innerHeight || $wnd.innerHeight(); + nh = $wnd[0].innerHeight || $wnd.innerHeight(), + $focused = $(document.activeElement); + + if ($focused.is('input,textarea') && !/(button|submit|checkbox|radio)/.test($focused.attr('type'))) { + $focused.on('blur', onBlur); + return; + } if ((wndWidth === nw && wndHeight === nh && check) || preventPos) { return; From 0c5340a3413b7be564ded4ed0b0b7b311b8563cd Mon Sep 17 00:00:00 2001 From: Istvan Halmen Date: Wed, 16 Dec 2015 14:20:00 +0200 Subject: [PATCH 15/16] Positioning fixes --- js/mobiscroll.frame.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/js/mobiscroll.frame.js b/js/mobiscroll.frame.js index 7e52ec81..effe9acc 100644 --- a/js/mobiscroll.frame.js +++ b/js/mobiscroll.frame.js @@ -147,7 +147,9 @@ function onBlur() { $(this).off('blur', onBlur); - that.position(); + setTimeout(function () { + that.position(); + }, 100); } function show(beforeShow, $elm) { @@ -270,7 +272,9 @@ l = Math.max(0, sl + (nw - modalWidth) / 2); t = st + (nh - modalHeight) / 2; } else if (s.display == 'bubble') { - scroll = true; + // Scroll only if width also changed + // to prevent scroll when address bar appears / hides + scroll = wndWidth !== nw; arr = $('.dw-arrw-i', $markup); ap = anchor.offset(); at = Math.abs($ctx.offset().top - ap.top); @@ -326,7 +330,7 @@ setTimeout(function () { preventPos = false; }, 300); - $wnd.scrollTop(Math.min(t + modalHeight - nh, dh - nh)); + $wnd.scrollTop(Math.min(at, t + modalHeight - nh, dh - nh)); } wndWidth = nw; From a69dc0777d0ae1398732bc7301ab0760dd76f5c3 Mon Sep 17 00:00:00 2001 From: Istvan Halmen Date: Wed, 16 Dec 2015 14:20:26 +0200 Subject: [PATCH 16/16] 2.17.1 version numbers --- bower.json | 2 +- css/mobiscroll.mobiscroll-dark.css | 2 ++ css/mobiscroll.wp-light.css | 4 +++- js/mobiscroll.core.js | 4 ++-- mobiscroll.datetime.jquery.json | 2 +- mobiscroll.imageandtext.jquery.json | 2 +- mobiscroll.select.jquery.json | 2 +- mobiscroll.treelist.jquery.json | 2 +- 8 files changed, 12 insertions(+), 8 deletions(-) diff --git a/bower.json b/bower.json index 5fae435f..8b2423b5 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "mobiscroll", - "version": "2.17.0", + "version": "2.17.1", "main": [ "js/mobiscroll.core.js", "js/mobiscroll.frame.js", diff --git a/css/mobiscroll.mobiscroll-dark.css b/css/mobiscroll.mobiscroll-dark.css index 9534737c..30741ffe 100644 --- a/css/mobiscroll.mobiscroll-dark.css +++ b/css/mobiscroll.mobiscroll-dark.css @@ -44,6 +44,8 @@ } .mbsc-mobiscroll-dark .dw-cal-days { color: #50ccc4; +} +.mbsc-mobiscroll-dark .dw-cal-days th { border-color: #50ccc4; } .mbsc-mobiscroll-dark .dw-cal-btn-txt { diff --git a/css/mobiscroll.wp-light.css b/css/mobiscroll.wp-light.css index 48cd2068..56964896 100644 --- a/css/mobiscroll.wp-light.css +++ b/css/mobiscroll.wp-light.css @@ -179,7 +179,7 @@ } /* Progress */ .mbsc-wp-light.mbsc-progress .mbsc-label { - color: #878787; + color: #000000; } .mbsc-wp-light.mbsc-progress .mbsc-input-ic { color: #000000; @@ -234,6 +234,8 @@ .mbsc-wp-light .mbsc-input textarea:disabled, .mbsc-wp-light .mbsc-input input:disabled { background-color: transparent; + color: #4f4f4f; + border-color: #4f4f4f; } /* Checkbox */ .mbsc-wp-light .mbsc-checkbox-box { diff --git a/js/mobiscroll.core.js b/js/mobiscroll.core.js index 2c55b52b..b6eeb063 100644 --- a/js/mobiscroll.core.js +++ b/js/mobiscroll.core.js @@ -1,5 +1,5 @@ /*! - * Mobiscroll v2.17.0 + * Mobiscroll v2.17.1 * http://mobiscroll.com * * Copyright 2010-2015, Acid Media @@ -78,7 +78,7 @@ }; ms = $.mobiscroll = $.mobiscroll || { - version: '2.17.0', + version: '2.17.1', util: { prefix: prefix, jsPrefix: pr, diff --git a/mobiscroll.datetime.jquery.json b/mobiscroll.datetime.jquery.json index 1aa28c80..d73da947 100644 --- a/mobiscroll.datetime.jquery.json +++ b/mobiscroll.datetime.jquery.json @@ -14,7 +14,7 @@ "scroller", "clickpick" ], - "version": "2.17.0", + "version": "2.17.1", "author": { "name": "Acid Media", "url": "http://theacidmedia.net" diff --git a/mobiscroll.imageandtext.jquery.json b/mobiscroll.imageandtext.jquery.json index fd586ec4..b0d42264 100644 --- a/mobiscroll.imageandtext.jquery.json +++ b/mobiscroll.imageandtext.jquery.json @@ -13,7 +13,7 @@ "scroller", "clickpick" ], - "version": "2.17.0", + "version": "2.17.1", "author": { "name": "Acid Media", "url": "http://theacidmedia.net" diff --git a/mobiscroll.select.jquery.json b/mobiscroll.select.jquery.json index 2291fc43..c99fb92d 100644 --- a/mobiscroll.select.jquery.json +++ b/mobiscroll.select.jquery.json @@ -14,7 +14,7 @@ "scroller", "clickpick" ], - "version": "2.17.0", + "version": "2.17.1", "author": { "name": "Acid Media", "url": "http://theacidmedia.net" diff --git a/mobiscroll.treelist.jquery.json b/mobiscroll.treelist.jquery.json index f0d53fea..87ab2725 100644 --- a/mobiscroll.treelist.jquery.json +++ b/mobiscroll.treelist.jquery.json @@ -13,7 +13,7 @@ "scroller", "clickpick" ], - "version": "2.17.0", + "version": "2.17.1", "author": { "name": "Acid Media", "url": "http://theacidmedia.net"