Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
dioslaska committed Apr 3, 2015
2 parents 9857841 + ef3e440 commit 3e9343a
Show file tree
Hide file tree
Showing 35 changed files with 202 additions and 82 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobiscroll",
"version": "2.15.0",
"version": "2.15.1",
"main": [
"js/mobiscroll.core.js",
"js/mobiscroll.frame.js",
Expand Down
3 changes: 3 additions & 0 deletions css/mobiscroll.frame.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
/*outline-color: transparent;*/
outline: none;
}
.dw :focus {
outline-offset: -2px;
}
.dw-rtl {
direction: rtl;
}
Expand Down
1 change: 1 addition & 0 deletions css/mobiscroll.scroller.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
vertical-align: bottom;
opacity: .3;
filter: Alpha(Opacity=30);
cursor: pointer;
}
/* Valid entry */
.dw-li.dw-v,
Expand Down
14 changes: 14 additions & 0 deletions css/mobiscroll.wp-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@
background: rgb(181,181,181);
border-color: rgb(181,181,181);
}
/* Clickpick-mode */
.mbsc-wp-light .dwwb {
background: rgb(222,222,222);
}
.mbsc-wp-light .dwwb:before {
color: rgb(0,0,0);
border-color: rgb(0,0,0);
}
.mbsc-wp-light .dwwl .dwb-a {
background: rgb(222,222,222);
}
.mbsc-wp-light .dwwl .dwb-a:before {
color: rgb(222,222,222);
}
/* Bubble positioning */
.mbsc-wp-light .dw-bubble-bottom .dw-arr {
border-color: transparent transparent rgb(222,222,222) transparent;
Expand Down
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
stopText: 'Stop',
resetText: 'Resetovat',
lapText: 'Etapa',
hideText: 'Schovat'
hideText: 'Schovat',
// Listview
backText: 'Zpět',
undoText: 'Rozlepit'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.de.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
stopText: 'Stoppen',
resetText: 'Zurücksetzen',
lapText: 'Lap',
hideText: 'Ausblenden'
hideText: 'Ausblenden',
// Listview
backText: 'Zurück',
undoText: 'Rückgängig'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
stopText: 'Deténgase',
resetText: 'Reinicializar',
lapText: 'Lap',
hideText: 'Esconder'
hideText: 'Esconder',
// Listview
backText: 'Espalda',
undoText: 'Deshacer'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.fa.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@
stopText: 'پايان',
resetText: 'تنظیم مجدد',
lapText: 'Lap',
hideText: 'پنهان کردن'
hideText: 'پنهان کردن',
// Listview
backText: 'پشت',
undoText: 'واچیدن'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
stopText: 'Arrêter',
resetText: 'Réinitialiser',
lapText: 'Lap',
hideText: 'Cachez'
hideText: 'Cachez',
// Listview
backText: 'Arrière',
undoText: 'Défaire'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.hu.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
stopText: 'Megállít',
resetText: 'Visszaállít',
lapText: 'Lap',
hideText: 'Elrejt'
hideText: 'Elrejt',
// Listview
backText: 'Vissza',
undoText: 'Visszavon'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.it.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
stopText: 'Arresto',
resetText: 'Ripristina',
lapText: 'Lap',
hideText: 'Nascondi'
hideText: 'Nascondi',
// Listview
backText: 'Indietro',
undoText: 'Disfare'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.ja.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
stopText: '停止',
resetText: 'リセット',
lapText: 'ラップ',
hideText: '隠す'
hideText: '隠す',
// Listview
backText: 'バック',
undoText: 'アンドゥ'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.nl.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
stopText: 'Stop',
resetText: 'Reset',
lapText: 'Ronde',
hideText: 'Verbergen'
hideText: 'Verbergen',
// Listview
backText: 'Terug',
undoText: 'Ongedaan'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.no.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
stopText: 'Stopp',
resetText: 'Tilbakestille',
lapText: 'Runde',
hideText: 'Skjul'
hideText: 'Skjul',
// Listview
backText: 'Tilbake',
undoText: 'Angre'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.pl.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
stopText: 'Zatrzymać',
resetText: 'Zresetować',
lapText: 'Zakładka',
hideText: 'Ukryć'
hideText: 'Ukryć',
// Listview
backText: 'Z powrotem',
undoText: 'Odwiązać'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.pt-BR.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
stopText: 'Pare',
resetText: 'Reinicializar',
lapText: 'Lap',
hideText: 'Esconder'
hideText: 'Esconder',
// Listview
backText: 'De volta',
undoText: 'Desfazer'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.pt-PT.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
stopText: 'Parar',
resetText: 'Reinicializar',
lapText: 'Lap',
hideText: 'Esconder'
hideText: 'Esconder',
// Listview
backText: 'De volta',
undoText: 'Desfazer'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.ro.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
stopText: 'Stop',
resetText: 'Resetare',
lapText: 'Tură',
hideText: 'Ascundere'
hideText: 'Ascundere',
// Listview
backText: 'Înapoi',
undoText: 'Desface'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.ru-UA.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
stopText: 'Стоп',
resetText: ' Сброс ',
lapText: ' Этап ',
hideText: ' Скрыть '
hideText: ' Скрыть ',
// Listview
backText: 'назад',
undoText: 'аннулировать'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
stopText: 'Стоп',
resetText: 'Сбросить',
lapText: 'Круг',
hideText: 'Скрыть'
hideText: 'Скрыть',
// Listview
backText: 'назад',
undoText: 'аннулировать'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.sk.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
stopText: 'Stop',
resetText: 'Resetovať',
lapText: 'Etapa',
hideText: 'Schovať'
hideText: 'Schovať',
// Listview
backText: 'Späť',
undoText: 'Zrušiť'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.sv.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
stopText: 'Stopp',
resetText: 'Återställ',
lapText: 'Varv',
hideText: 'Dölj'
hideText: 'Dölj',
// Listview
backText: 'Tillbaka',
undoText: 'Ångra'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.tr.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
stopText: 'Durdur',
resetText: 'Sıfırla',
lapText: 'Tur',
hideText: 'Gizle'
hideText: 'Gizle',
// Listview
backText: 'Geri',
undoText: 'Sökmek'
});
})(jQuery);
5 changes: 4 additions & 1 deletion js/i18n/mobiscroll.i18n.zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
stopText: '停止',
resetText: '重置',
lapText: '圈',
hideText: '隐藏'
hideText: '隐藏',
// Listview
backText: '背部',
undoText: '复原'
});
})(jQuery);
6 changes: 3 additions & 3 deletions js/mobiscroll.core.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*!
* Mobiscroll v2.15.0
* Mobiscroll v2.15.1
* http://mobiscroll.com
*
* Copyright 2010-2014, Acid Media
* Copyright 2010-2015, Acid Media
* Licensed under the MIT license.
*
*/
Expand Down Expand Up @@ -77,7 +77,7 @@
};

$.mobiscroll = $.mobiscroll || {
version: '2.15.0',
version: '2.15.1',
util: {
prefix: prefix,
jsPrefix: pr,
Expand Down
9 changes: 5 additions & 4 deletions js/mobiscroll.datetimebase.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
timeWheels: 'hhiiA',
timeFormat: 'hh:ii A',
dayText: 'Day',
monthText: 'Month',
yearText: 'Year',
hourText: 'Hours',
minuteText: 'Minutes',
Expand Down Expand Up @@ -298,6 +299,10 @@
up = 0,
down = 0;

// Normalize min and max dates for comparing later (set default values where there are no values from wheels)
mind = getDate(getArray(mind));
maxd = getDate(getArray(maxd));

if (isValid(d)) {
return d;
}
Expand Down Expand Up @@ -665,10 +670,6 @@
invalid = convertRanges(invalid);
valid = convertRanges(valid);

// Normalize min and max dates for comparing later (set default values where there are no values from wheels)
mind = getDate(getArray(mind));
maxd = getDate(getArray(maxd));

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 };

Expand Down
38 changes: 36 additions & 2 deletions js/mobiscroll.frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@
}, 200);
}

function onFocus(ev) {
if (!$popup[0].contains(ev.target)) {
$popup.focus();
}
}

function show(beforeShow, $elm) {
if (!ms.tapped) {

Expand Down Expand Up @@ -510,7 +516,9 @@
// Set position
that.position();

$wnd.on(posEvents, onPosition);
$wnd
.on(posEvents, onPosition)
.on('focusin', onFocus);

// Events
$markup
Expand All @@ -522,6 +530,30 @@
ev.stopPropagation();
$(this).click();
}
})
.on('keydown', function (ev) { // Trap focus inside modal
if (ev.keyCode == 32) { // Space
ev.preventDefault();
} else if (ev.keyCode == 9) { // Tab

var $focusable = $markup.find('[tabindex="0"]').filter(function () {
return this.offsetWidth > 0 || this.offsetHeight > 0;
}),
index = $focusable.index($(':focus', $markup)),
i = $focusable.length - 1,
target = 0;

if (ev.shiftKey) {
i = 0;
target = -1;
}

if (index === i) {
$focusable.eq(target).focus();
ev.preventDefault();
}

}
});

$('input', $markup).on('selectstart mousedown', function (ev) {
Expand Down Expand Up @@ -587,7 +619,9 @@
}

// Stop positioning on window resize
$wnd.off(posEvents, onPosition);
$wnd
.off(posEvents, onPosition)
.off('focusin', onFocus);
}

if (isModal) {
Expand Down
Loading

0 comments on commit 3e9343a

Please sign in to comment.