Revert #4401 for build 458.
Reverts commit 22847e7892. Will be redeployed in build 459.
This commit is contained in:
parent
b5a3c64bf1
commit
199407f1a0
|
|
@ -653,8 +653,6 @@ body.slim-container .layout .layout-container {padding-left:0 !important;padding
|
|||
.flex-layout-item.center {-webkit-align-self:center;-moz-align-self:center;-ms-align-self:center;align-self:center}
|
||||
.flex-layout-item.relative {position:relative}
|
||||
.flex-layout-item.layout-container {max-width:none}
|
||||
.js-focus-visible:focus:not(.focus-visible) {outline:none}
|
||||
.js-focus-visible .focus-visible {border:.0625rem solid #3578E5;-webkit-box-shadow:0 0 .1875rem .125rem #3578E5;box-shadow:0 0 .1875rem .125rem #3578E5;z-index:1;position:relative}
|
||||
body.mainmenu-open {overflow:hidden;position:fixed}
|
||||
.mainmenu-tooltip .tooltip-inner {font-size:13px;padding:6px 16px}
|
||||
ul.mainmenu-nav {font-size:14px}
|
||||
|
|
|
|||
|
|
@ -160,93 +160,4 @@
|
|||
}
|
||||
|
||||
$.oc.tabFormExpandControls = TabFormExpandControls
|
||||
|
||||
}(window.jQuery);
|
||||
|
||||
/*
|
||||
* Auto update WAI-ARIA when a user updates the tabs
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
|
||||
/* Update wai-aria on navigation */
|
||||
$('body').on('click keydown', '.master-tabs a[role="tab"],.primary-tabs a[role="tab"],.secondary-tabs a[role="tab"],.content-tabs a[role="tab"]', function(event) {
|
||||
|
||||
/*
|
||||
* Tab - Move forwards
|
||||
* Shift and Tab - Move backwards
|
||||
* Enter - Select that tab (PC)
|
||||
* Space bar - Select that tab (MAC)
|
||||
* Home - First tab
|
||||
* End - Last tab
|
||||
* Arrow Keys - Scroll through the tabs
|
||||
*/
|
||||
var whitelist = [
|
||||
'ArrowLeft',
|
||||
'ArrowUp',
|
||||
'ArrowDown',
|
||||
'ArrowRight',
|
||||
'Home',
|
||||
'End',
|
||||
'Tab',
|
||||
'Shift',
|
||||
'Enter',
|
||||
'(Space character)',
|
||||
'Spacebar',
|
||||
' '
|
||||
];
|
||||
if ((event.shiftKey && event.key === 'Tab') || (event.type === 'keydown' && !whitelist.includes(event.key))) {
|
||||
return;
|
||||
}
|
||||
|
||||
var $target = $(event.currentTarget);
|
||||
var tabName = '';
|
||||
var tabPanel = $target.attr('data-target');
|
||||
|
||||
if ($target.closest('.master-tabs').length) {
|
||||
tabName = '.master-tabs';
|
||||
} else if ($target.closest('.primary-tabs').length) {
|
||||
tabName = '.primary-tabs';
|
||||
} else if ($target.closest('.secondary-tabs').length) {
|
||||
tabName = '.secondary-tabs';
|
||||
} else if ($target.closest('.content-tabs').length) {
|
||||
tabName = '.content-tabs';
|
||||
}
|
||||
|
||||
// Set all tabs to false
|
||||
$(tabName + ' a').attr('aria-selected', 'false');
|
||||
// Set all tab panels to hidden
|
||||
$(tabName + ' div.tab-pane').attr('hidden', 'hidden');
|
||||
|
||||
// Add wai-aria selected on the active tab
|
||||
$target.attr('aria-selected', 'true');
|
||||
// Remove hidden attribute on active tab panel
|
||||
$(tabPanel).attr('hidden', false);
|
||||
|
||||
var strikeUpOrRightTab = event.key === 'ArrowLeft' || event.key === 'ArrowUp';
|
||||
var strikeDownOrLeftTab = event.key === 'ArrowDown' || event.key === 'ArrowRight';
|
||||
if (strikeUpOrRightTab || strikeDownOrLeftTab) {
|
||||
event.preventDefault();
|
||||
|
||||
var position = strikeUpOrRightTab ? 'first-child' : 'last-child';
|
||||
var $activated = $(tabName + ' a[aria-selected="true"]').parent();
|
||||
if ($activated.is(tabName + ' li:' + position)) {
|
||||
$(tabName + ' li:' + position + ' a').click().focus();
|
||||
} else {
|
||||
// else activate previous
|
||||
$activated.prev().children(tabName + ' a').click().focus();
|
||||
}
|
||||
} else if (event.key === 'Home') {
|
||||
event.preventDefault();
|
||||
|
||||
$(tabName + ' li ' + ' a').first().click().focus();
|
||||
} else if (event.key === 'End') {
|
||||
event.preventDefault();
|
||||
|
||||
$(tabName + ' li ' + ' a').end().click().focus();
|
||||
}
|
||||
|
||||
// Important - Must be set to true for October to set class="active" in the <li>
|
||||
return true;
|
||||
});
|
||||
|
||||
});
|
||||
|
|
@ -11,25 +11,6 @@
|
|||
@mainmenu-tile-label-height: 20px;
|
||||
@mainmenu-tile-label-width: 100px;
|
||||
|
||||
//
|
||||
// Focus Ring Support for accessibility
|
||||
//
|
||||
|
||||
.js-focus-visible {
|
||||
&:focus {
|
||||
&:not(.focus-visible) {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
.focus-visible {
|
||||
border: .0625rem solid #3578E5;
|
||||
-webkit-box-shadow: 0 0 .1875rem .125rem #3578E5;
|
||||
box-shadow: 0 0 .1875rem .125rem #3578E5;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
body.mainmenu-open {
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'لوحة الإدارة'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'تذييل',
|
||||
'side_panel' => 'لوحة جانبية',
|
||||
'breadcrumb' => 'التفصيلي',
|
||||
'main_content' => 'المجال الرئيسي',
|
||||
'tabs' => 'علامات التبويب',
|
||||
],
|
||||
'page' => [
|
||||
'access_denied' => [
|
||||
'label' => 'ممنوع الوصول',
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => "Панэль кіравання"
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'ніжні колер',
|
||||
'side_panel' => 'бакавая панэль',
|
||||
'breadcrumb' => 'сухар',
|
||||
'main_content' => 'Асноўная плошча',
|
||||
'tabs' => 'ўкладкі',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => "Выкарыстаны няправільны тып поля: \":type\"",
|
||||
'options_method_invalid_model' => "Для атрыбуту \":field\" не была знойздена адпаведная мадэль. Паспрабуйце яўна вызначыць метад опцый для мадэлі \":model\"",
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Администраторски Панел'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'долния',
|
||||
'side_panel' => 'страничен панел',
|
||||
'breadcrumb' => 'галета',
|
||||
'main_content' => 'основната зона',
|
||||
'tabs' => 'разделите',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Използвано невалиден тип поле :type.',
|
||||
'options_method_not_exists' => "Моделът клас :model трябва да се определя метод :method() връщайки настройки за ':field' поле."
|
||||
|
|
|
|||
|
|
@ -5,13 +5,6 @@ return [
|
|||
'title' => "Àrea d'Administració",
|
||||
'invalid_login' => "Els detalls que has introduït no corresponen als nostres registres. Si us plau revisa'ls i torna-ho a intentar."
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'Peu de pàgina',
|
||||
'side_panel' => 'panell lateral',
|
||||
'breadcrumb' => 'Pa ratllat',
|
||||
'main_content' => 'àrea principal',
|
||||
'tabs' => 'pestanyes',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'El tipus de camp :type utilitzat és invàlid.',
|
||||
'options_method_invalid_model' => "L'atribut ':field' no resol a un model vàlid. Intenta especificar explícitament el mètode d'opcions per la classe de model :model.",
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Administrace'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'zápatí',
|
||||
'side_panel' => 'boční panel',
|
||||
'breadcrumb' => 'strouhanka',
|
||||
'main_content' => 'hlavní oblasty',
|
||||
'tabs' => 'karty',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Byl použitý špatný typ :type.',
|
||||
'options_method_invalid_model' => "Vlastnost ':field' neodpovídá platnému modelu. Zkuste specifikovat metodu voleb pro modelovou třídu :model explicitně.",
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Administrationsområde'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'sidefod',
|
||||
'side_panel' => 'sidepanel',
|
||||
'breadcrumb' => 'brødkrummer',
|
||||
'main_content' => 'hovedområdey',
|
||||
'tabs' => 'faner',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Ugyldig felttype :type.',
|
||||
'options_method_not_exists' => "Model klassen :model skal implementere :method() som returnerer valgmuligheder for feltet ':field'."
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Admin-Bereich'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'Fußzeile',
|
||||
'side_panel' => 'Seitenwand',
|
||||
'breadcrumb' => 'Semmelbrösel',
|
||||
'main_content' => 'Hauptbereich',
|
||||
'tabs' => 'Registerkarten auf',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Ungültiger Feldtyp :type.',
|
||||
'options_method_invalid_model' => 'Das Attribut ":field" löst sich nicht zu einen gültigen Model auf. Probiere die options Methode der Model-Klasse :model explicit zu definieren.',
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Περιοχή Διαχείρισης',
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'υποσέλιδα',
|
||||
'side_panel' => 'πλευρά',
|
||||
'breadcrumb' => 'τριμμένη φρυγανιά',
|
||||
'main_content' => 'κύρια περιοχή',
|
||||
'tabs' => 'καρτέλες',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Χρησιμοποιήθηκε μη έγκυρος τύπος πεδίου :type.',
|
||||
'options_method_not_exists' => "H κλάση του μοντέλου πρέπει να καθορίζει μια μέθοδο :method() επιστροφής επίλογων για το πεδίο ':field'",
|
||||
|
|
|
|||
|
|
@ -5,13 +5,6 @@ return [
|
|||
'title' => 'Administration Area',
|
||||
'invalid_login' => 'The details you entered did not match our records. Please double-check and try again.'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'Footer Section',
|
||||
'side_panel' => 'Side panel',
|
||||
'breadcrumb' => 'Breadcrumb Navigation',
|
||||
'main_content' => 'Main Content Body',
|
||||
'tabs' => 'Tabs',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Invalid field type used :type.',
|
||||
'options_method_invalid_model' => "The attribute ':field' does not resolve to a valid model. Try specifying the options method for model class :model explicitly.",
|
||||
|
|
|
|||
|
|
@ -1,13 +1,6 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'aria-label' => [
|
||||
'footer' => 'pie de página',
|
||||
'side_panel' => 'panel lateral',
|
||||
'breadcrumb' => 'migaja de pan',
|
||||
'main_content' => 'área principal',
|
||||
'tabs' => 'pestañas',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'El tipo de campo utilizado es inválido :type.',
|
||||
'options_method_not_exists' => 'La clase del modelo :model debe definir un método :method() que devuelva opciones para el campo ":field".',
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Area de Administración'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'pie de página',
|
||||
'side_panel' => 'panel lateral',
|
||||
'breadcrumb' => 'migaja de pan',
|
||||
'main_content' => 'área principal',
|
||||
'tabs' => 'pestañas',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'El tipo de campo utilizado es inválido :type.',
|
||||
'options_method_not_exists' => 'El modelo clase: model debe definir un método: method() opciones recurrentes para el ":field" desde campo.'
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Haldusliides'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'jalus',
|
||||
'side_panel' => 'kõrvalpaneel',
|
||||
'breadcrumb' => 'riivsai',
|
||||
'main_content' => 'peamine ala',
|
||||
'tabs' => 'vahekaardid',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Välja tüüpi :type pole olemas.',
|
||||
'options_method_invalid_model' => "Atribuut ':field' ei vasta ühelegi olemasolevale andmemudelile. Palun defineeri valikväärtuste funktioon :model andmemudelis.",
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'بخش مدیریت',
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'پاورقی',
|
||||
'side_panel' => 'پنل کناری',
|
||||
'breadcrumb' => 'پودرهای سوخاری',
|
||||
'main_content' => 'منطقه اصلی',
|
||||
'tabs' => 'زبانه ها',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'نوع فیلد :type نا معتبر می باشد.',
|
||||
'options_method_invalid_model' => "خصیصه ':field' به مدل معتبری اشاره نمی کند. گزینه مورد نظر را در مدل :model ایجاد نمایید.",
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Ylläpitoalue'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'alatunniste',
|
||||
'side_panel' => 'sivupaneeli',
|
||||
'breadcrumb' => 'leivänmuru',
|
||||
'main_content' => 'pääalue',
|
||||
'tabs' => 'välilehdet',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Kentän tyyppi :type ei ole sallittu.',
|
||||
'options_method_invalid_model' => "Attribuutti ':field' ratkaise kelvollista mallia. Spesifioit vaihtoehtoinen metodi mallille :model explisiittisesti.",
|
||||
|
|
|
|||
|
|
@ -5,13 +5,6 @@ return [
|
|||
'title' => 'Zone d’administration',
|
||||
'invalid_login' => 'L\'utilisateur saisie ne correspond à aucun utilisateur enregistré. Merci de vérifier votre saisie et de réessayer.'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'bas de page',
|
||||
'side_panel' => 'panneau latéral',
|
||||
'breadcrumb' => 'miette de pain',
|
||||
'main_content' => 'Zone principale',
|
||||
'tabs' => 'onglets',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Type de champ invalide :type.',
|
||||
'options_method_invalid_model' => "L’attribut ':field' ne correspond à aucun modèle valide. Essayez de spécifier explicitement la méthode d’options pour la classe du modèle ':model'.",
|
||||
|
|
|
|||
|
|
@ -5,13 +5,6 @@ return [
|
|||
'title' => 'Admin felület',
|
||||
'invalid_login' => 'A megadott adatok nem egyeznek. Kérjük ellenőrizze őket és próbálja újra.'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'Lábjegyzet',
|
||||
'side_panel' => 'oldalsó panel',
|
||||
'breadcrumb' => 'kenyérmorzsa',
|
||||
'main_content' => 'fő terület',
|
||||
'tabs' => 'lap',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'A(z) :type mezőtípus érvénytelen.',
|
||||
'options_method_invalid_model' => "A(z) ':field' tulajdonság nem passzol a modellhez. Próbálja meghatározni a beállítást, ami megfelelő a(z) :model osztály számára.",
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Area Administrasi'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'menu footer',
|
||||
'side_panel' => 'panel samping',
|
||||
'breadcrumb' => 'remah roti',
|
||||
'main_content' => 'area utama',
|
||||
'tabs' => 'tab',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Jenis medan tidak valid digunakan :type.',
|
||||
'options_method_not_exists' => "Kelas model :model harus menentukan metode :method() yang mengembalikan opsi untuk borang medan ':field'."
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Area di Amministrazione'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'menu a piè di pagina',
|
||||
'side_panel' => 'pannello laterale',
|
||||
'breadcrumb' => 'elenco dei breadcrumb',
|
||||
'main_content' => 'area principale',
|
||||
'tabs' => 'schede',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Il tipo di campo :type non è valido.',
|
||||
'options_method_not_exists' => 'La classe :model deve definire un metodo :method() che ritorni le opzioni per il campo ":field".'
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'システム管理者領域'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'フッター',
|
||||
'side_panel' => 'サイドパネル',
|
||||
'breadcrumb' => 'パン粉',
|
||||
'main_content' => 'メインエリア',
|
||||
'tabs' => 'タブ',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => '無効なフィールドタイプ :type が使用されています。',
|
||||
'options_method_not_exists' => 'モデルクラスの:modelは、":field"フォームフィールドのためにオプションを返す、:method()メソッドを定義しなくてはなりません。',
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => '시스템관리자영역'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => '보행인',
|
||||
'side_panel' => '측면 패널',
|
||||
'breadcrumb' => '빵 부스러기 흔적',
|
||||
'main_content' => '주요 지역',
|
||||
'tabs' => '탭',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => '유효하지 않은 필드타입 사용 :type ',
|
||||
'options_method_invalid_model' => "':field' 속성은 리졸브 될 수 없습니다. :model 모델 클래스의 특정 옵션 메소드를 명시적으로 사용해 보세요.",
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Administracijos zona'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'poraštė',
|
||||
'side_panel' => 'šoninis skydas',
|
||||
'breadcrumb' => 'kirtimo takas',
|
||||
'main_content' => 'pagrindinė sritis',
|
||||
'tabs' => 'skirtukus',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Netinkamas laukelio tipas :type.',
|
||||
'options_method_invalid_model' => "Artributas ':field' nenuskaito tinkamo modelio. Bandykite nurodyti parinkties metodą išskirtinai modelio klasei :model",
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Administrācijas vide'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'kājene',
|
||||
'side_panel' => 'sānu panelis',
|
||||
'breadcrumb' => 'maizes taku',
|
||||
'main_content' => 'galvenā joma',
|
||||
'tabs' => 'cilnes',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Nederīgs lauka tips :type.',
|
||||
'options_method_not_exists' => "Moduļa klasei :model jādefinē metodi :method() atgrieztās vērtības ':field' formas laukam."
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Administrasjonsområde'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'bunntekstmeny',
|
||||
'side_panel' => 'sidepanel',
|
||||
'breadcrumb' => 'breadcrumb sti',
|
||||
'main_content' => 'hovedområde',
|
||||
'tabs' => 'faner',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Ugyldig felttype brukt :type.',
|
||||
'options_method_not_exists' => "Modellklassen :model må definere en metode :method() som returnerer vilkår for formfeltet ':field'."
|
||||
|
|
|
|||
|
|
@ -5,13 +5,6 @@ return [
|
|||
'title' => 'Beheeromgeving',
|
||||
'invalid_login' => 'De ingevoerde gegevens leveren geen resultaat. Controleer je invoer en probeer het opnieuw.'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'voettekst navigatie',
|
||||
'side_panel' => 'zijpaneel',
|
||||
'breadcrumb' => 'broodkruimel spoor',
|
||||
'main_content' => 'hoofdgebied',
|
||||
'tabs' => 'klikt op',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Ongeldig type veld: :type.',
|
||||
'options_method_invalid_model' => "Het attribuut ':field' levert geen geldig model op. Probeer de opties methode expliciet te specifieren voor modelklasse :model.",
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Panel Administracyjny',
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'stopka',
|
||||
'side_panel' => 'panel boczny',
|
||||
'breadcrumb' => 'szlak nawigacyjny',
|
||||
'main_content' => 'główna strefa',
|
||||
'tabs' => 'zakładki na',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Użyto nieprawidłowego typu pola :type.',
|
||||
'options_method_not_exists' => "Model :model musi definiować metodę :method() zwracając opcję z pola ':field' formularza.",
|
||||
|
|
|
|||
|
|
@ -5,13 +5,6 @@ return [
|
|||
'title' => 'Área Administrativa',
|
||||
'invalid_login' => 'Os dados digitados não correspondem aos nossos registros. Por favor, verifique e tente novamente.'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'Menu de Rodapé',
|
||||
'side_panel' => 'painel lateral',
|
||||
'breadcrumb' => 'trilha de migalhas',
|
||||
'main_content' => 'área principal',
|
||||
'tabs' => 'guias',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Tipo de campo inválido :type.',
|
||||
'options_method_invalid_model' => 'O atributo ":field" não resolve a classe. Tente especificar as opções do método para o modelo :model.',
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Área Administrativa',
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'Menu de Rodapé',
|
||||
'side_panel' => 'painel lateral',
|
||||
'breadcrumb' => 'trilha de migalhas',
|
||||
'main_content' => 'área principal',
|
||||
'tabs' => 'guias',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Invalid field type used :type.',
|
||||
'options_method_invalid_model' => "O atributo ':field' não é resolvido para um modelo válidol. Tente especificar o método de opções para a classe de modelo :model explicitamente.",
|
||||
|
|
|
|||
|
|
@ -5,13 +5,6 @@ return [
|
|||
'invalid_type' => 'Tipul campului folosit este invalid - :type.',
|
||||
'options_method_not_exists' => 'Clasa model :model trebuie sa defineasca o metoda :method() returnand optiuni pentru campul ":field".',
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'subsol meniu',
|
||||
'side_panel' => 'panou lateral',
|
||||
'breadcrumb' => 'traseu de pescuit',
|
||||
'main_content' => 'zona principală',
|
||||
'tabs' => 'file',
|
||||
],
|
||||
'widget' => [
|
||||
'not_registered' => "Un nume de clasa de widget ':name' nu a fost inregistrat",
|
||||
'not_bound' => "Un widget cu numele de clasa ':name' nu a fost mapat la controller",
|
||||
|
|
|
|||
|
|
@ -5,13 +5,6 @@ return [
|
|||
'title' => 'Панель управления',
|
||||
'invalid_login' => 'Вы ввели некорректные данные. Пожалуйста, перепроверьте их и попробуйте ещё раз.'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'меню нижнего колонтитула',
|
||||
'side_panel' => 'боковая панель',
|
||||
'breadcrumb' => 'след крошки',
|
||||
'main_content' => 'основная площадь',
|
||||
'tabs' => 'вкладки',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Использован неверный тип поля: :type.',
|
||||
'options_method_invalid_model' => "The attribute ':field' does not resolve to a valid model. Try specifying the options method for model class :model explicitly.",
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Administrácia'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'zápätie',
|
||||
'side_panel' => 'bočný panel',
|
||||
'breadcrumb' => 'chodník',
|
||||
'main_content' => 'oblasti',
|
||||
'tabs' => 'karty',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Bol použitý zlý typ :type.',
|
||||
'options_method_invalid_model' => "Vlastnosť ':field' nezodpovedá platnému modelu. Skúste špecifikovať metódu možností pre triedu modelu :model explicitne.",
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Administrationsområde'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'footer-menyn',
|
||||
'side_panel' => 'sidopanel',
|
||||
'breadcrumb' => 'breadcrumb trail',
|
||||
'main_content' => 'huvudområde',
|
||||
'tabs' => 'flikar',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Felaktig fälttyp använd :type.',
|
||||
'options_method_not_exists' => 'Modellklassen :model måste definera en metod :method() som returnerar villkor för formfältet ":field"',
|
||||
|
|
|
|||
|
|
@ -5,13 +5,6 @@ return [
|
|||
'title' => 'Yönetim Paneli',
|
||||
'invalid_login' => 'Girdiğiniz bilgiler kayıtlarla eşleşmiyor. Lütfen kontrol edip tekrar deneyin.',
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'altbilgi menüsü',
|
||||
'side_panel' => 'yan panel',
|
||||
'breadcrumb' => 'kırıntı izi',
|
||||
'main_content' => 'ana alan',
|
||||
'tabs' => 'sekmeler',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Geçersiz alan tipi :type.',
|
||||
'options_method_invalid_model' => "':field' metodu, geçerli bir model ile eşleşmiyor. :model Model'i için options metodu tanımlamalısınız.",
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Зона адміністрування'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'меню нижнього колонтитула',
|
||||
'side_panel' => 'бічну панель',
|
||||
'breadcrumb' => 'прохідна стежка',
|
||||
'main_content' => 'основний район',
|
||||
'tabs' => 'вкладки',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Неправильний тип поля :type.',
|
||||
'options_method_invalid_model' => "The attribute ':field' does not resolve to a valid model. Try specifying the options method for model class :model explicitly.",
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => 'Khu vực quản trị'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => 'menu chân trang',
|
||||
'side_panel' => 'bảng điều khiển bên',
|
||||
'breadcrumb' => 'đường mòn bánh mì',
|
||||
'main_content' => 'khu vực chính',
|
||||
'tabs' => 'tab',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => 'Loại Field không hợp lệ :type.',
|
||||
'options_method_invalid_model' => "Thuộc tính ':field' không đưa ra được model hợp lệ. Hãy thử chỉ định phương pháp tùy chọn cho model :model một cách rõ ràng.",
|
||||
|
|
|
|||
|
|
@ -5,13 +5,6 @@ return [
|
|||
'title' => '管理',
|
||||
'invalid_login' => '无法匹配到您输入的相关内容,请检查后重试。'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => '页脚菜单',
|
||||
'side_panel' => '侧板',
|
||||
'breadcrumb' => '面包屑踪迹',
|
||||
'main_content' => '主要区域',
|
||||
'tabs' => '标签',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => '不合法的字段类型 :type.',
|
||||
'options_method_invalid_model' => "属性 ':field' 不能解析为有效模型. 请尝试为模型类:model指定一个可选方法.",
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ return [
|
|||
'auth' => [
|
||||
'title' => '管理介面'
|
||||
],
|
||||
'aria-label' => [
|
||||
'footer' => '页脚菜单',
|
||||
'side_panel' => '侧板',
|
||||
'breadcrumb' => '面包屑踪迹',
|
||||
'main_content' => '主要区域',
|
||||
'tabs' => '标签',
|
||||
],
|
||||
'field' => [
|
||||
'invalid_type' => '錯誤的字串類型 :type',
|
||||
'options_method_not_exists' => "模型 :model 必須定義一個返回 ':field' 表單字串選項的方法 :method()。"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<footer id="layout-footer" role="contentinfo" aria-label="<?= e(trans('system::lang.aria-label.footer')) ?>">
|
||||
<footer id="layout-footer">
|
||||
<div class="brand">
|
||||
<span class="logo"><i class="icon-leaf"></i></span>
|
||||
<span class="name"><?= e(trans('system::lang.app.name')) ?></span>
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@
|
|||
</span>
|
||||
</a>
|
||||
|
||||
<ul class="nav mainmenu-nav" role="list">
|
||||
<ul class="nav mainmenu-nav">
|
||||
<?php foreach (BackendMenu::listMainMenuItems() as $item): ?>
|
||||
<?php
|
||||
$isActive = BackendMenu::isMainMenuItemActive($item);
|
||||
?>
|
||||
<li class="<?= $isActive ? 'active' : null ?> svg-icon-container svg-active-effects" role="listitem">
|
||||
<li class="<?= $isActive ? 'active' : null ?> svg-icon-container svg-active-effects">
|
||||
<a href="<?= $item->url ?>">
|
||||
<span class="nav-icon">
|
||||
<?php if ($item->iconSvg): ?>
|
||||
|
|
@ -46,8 +46,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="toolbar-item" data-calculate-width>
|
||||
<ul class="mainmenu-toolbar" role="list">
|
||||
<li class="mainmenu-preview with-tooltip" role="listitem">
|
||||
<ul class="mainmenu-toolbar">
|
||||
<li class="mainmenu-preview with-tooltip">
|
||||
<a
|
||||
href="<?= Url::to('/') ?>"
|
||||
target="_blank"
|
||||
|
|
@ -55,17 +55,17 @@
|
|||
<i class="icon-crosshairs"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="mainmenu-account with-tooltip" role="listitem">
|
||||
<li class="mainmenu-account with-tooltip">
|
||||
<a
|
||||
href="javascript:;" onclick="$.oc.layout.toggleAccountMenu(this)"
|
||||
title="<?= e(trans('backend::lang.account.signed_in_as', ['full_name' => $this->user->full_name])) ?>">
|
||||
<img src="<?= $this->user->getAvatarThumb(90, ['mode' => 'crop', 'extension' => 'png']) ?>" class="account-avatar" />
|
||||
</a>
|
||||
<div class="mainmenu-accountmenu">
|
||||
<ul role="presentation">
|
||||
<ul>
|
||||
<?php foreach ($mySettings as $category => $items): ?>
|
||||
<?php foreach ($items as $item): ?>
|
||||
<li role="listitem">
|
||||
<li>
|
||||
<a href="<?= $item->url ?>">
|
||||
<?= e(trans($item->label)) ?>
|
||||
</a>
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
<li class="divider"></li>
|
||||
<?php endforeach ?>
|
||||
|
||||
<li role="listitem">
|
||||
<li>
|
||||
<a href="<?= Backend::url('backend/auth/signout') ?>">
|
||||
<?php if (\BackendAuth::isImpersonator()) : ?>
|
||||
<?= e(trans('backend::lang.account.stop_impersonating')) ?>
|
||||
|
|
|
|||
|
|
@ -7,16 +7,16 @@
|
|||
$sideMenuItems = BackendMenu::listSideMenuItems();
|
||||
?>
|
||||
<?php if ($sideMenuItems): ?>
|
||||
<div class="layout-cell layout-sidenav-container" aria-label="Side Navigation">
|
||||
<div class="layout-cell layout-sidenav-container">
|
||||
<div class="layout-relative">
|
||||
<nav
|
||||
id="layout-sidenav"
|
||||
class="layout-sidenav bg-p"
|
||||
data-active-class="active"
|
||||
data-control="sidenav">
|
||||
<ul class="nav" role="list">
|
||||
<ul class="nav">
|
||||
<?php foreach ($sideMenuItems as $sideItemCode => $item): ?>
|
||||
<li role="listitem"
|
||||
<li
|
||||
class="<?= BackendMenu::isSideMenuItemActive($item) ? 'active' : null ?>"
|
||||
<?= Html::attributes($item->attributes) ?>
|
||||
>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
<!-- Side panel -->
|
||||
<?php if ($sidePanelContent = Block::placeholder('sidepanel')): ?>
|
||||
<div class="layout-cell w-350 hide-on-small" id="layout-side-panel" data-control="layout-sidepanel" aria-label="<?= e(trans('system::lang.aria-label.side_panel')) ?>">
|
||||
<div class="layout-cell w-350 hide-on-small" id="layout-side-panel" data-control="layout-sidepanel">
|
||||
<?= $sidePanelContent ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
|
@ -44,13 +44,13 @@
|
|||
<div class="layout">
|
||||
<?php if ($breadcrumbContent = Block::placeholder('breadcrumb')): ?>
|
||||
<!-- Breadcrumb -->
|
||||
<div class="control-breadcrumb" aria-label="<?= e(trans('system::lang.aria-label.breadcrumb')) ?>">
|
||||
<div class="control-breadcrumb">
|
||||
<?= $breadcrumbContent ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Content -->
|
||||
<div class="layout-row" aria-label="<?= e(trans('system::lang.aria-label.main_content')) ?>">
|
||||
<div class="layout-row">
|
||||
<?= Block::placeholder('body') ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@
|
|||
}
|
||||
?>
|
||||
<div class="<?= $navCss ?>">
|
||||
<ul class="nav nav-tabs" role="tablist" aria-orientation="horizontal" aria-label="<?= e(trans('system::lang.aria-label.tabs')) ?>">
|
||||
<ul class="nav nav-tabs">
|
||||
<?php $index = 0; foreach ($tabs as $name => $fields): ?>
|
||||
<li class="<?= $index==0?'active':''?>" role="presentation">
|
||||
<a href="#<?= $type.'tab-'.$index ?>" role="tab" tabindex="0" aria-selected="<?= $index++==0?'true':'false'?>"><?php if ($tabs->getIcon($name)): ?><span class="<?= $tabs->getIcon($name) ?>"></span><?php endif; ?><?= e(trans($name)) ?></a>
|
||||
<li class="<?= $index++==0?'active':''?>">
|
||||
<a href="#<?= $type.'tab-'.$index ?>"><?php if ($tabs->getIcon($name)): ?><span class="<?= $tabs->getIcon($name) ?>"></span><?php endif; ?><?= e(trans($name)) ?></a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
<div class="tab-content <?= $contentCss ?>">
|
||||
<?php $index = 0; foreach ($tabs as $name => $fields): ?>
|
||||
<div tabindex="0" role="tabpanel" <?= $index==0?'':'hidden="hidden"'?> aria-label="<?= e(trans($name)) ?>"
|
||||
<div
|
||||
class="tab-pane <?= e($tabs->getPaneCssClass($index, $name)) ?> <?= $index++==0?'active':''?> <?= $paneCss ?>"
|
||||
id="<?= $type.'tab-'.$index ?>">
|
||||
<?= $this->makePartial('form_fields', ['fields' => $fields]) ?>
|
||||
|
|
|
|||
|
|
@ -19,19 +19,19 @@ These modifiers can be added in addition to the `control-tabs` class:
|
|||
### Master tabs
|
||||
|
||||
<div class="control-tabs master-tabs" data-control="tab">
|
||||
<ul class="nav nav-tabs" role="tablist" aria-orientation="horizontal" aria-label="Tabs">
|
||||
<li role="presentation" class="active"><a href="#primaryTabOne" role="tab" aria-selected="true" tabindex="0">One</a></li>
|
||||
<li role="presentation"><a href="#primaryTabTwo" role="tab" aria-selected="false" tabindex="0">Two</a></li>
|
||||
<li role="presentation"><a href="#primaryTabThree" role="tab" aria-selected="false" tabindex="0">Three</a></li>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#primaryTabOne">One</a></li>
|
||||
<li><a href="#primaryTabTwo">Two</a></li>
|
||||
<li><a href="#primaryTabThree">Three</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" tabindex="0" role="tabpanel" aria-label="Tab one content">
|
||||
<div class="tab-pane active">
|
||||
Tab one content
|
||||
</div>
|
||||
<div class="tab-pane" tabindex="0" role="tabpanel" hidden="hidden" aria-label="Tab two content">
|
||||
<div class="tab-pane">
|
||||
Tab two content
|
||||
</div>
|
||||
<div class="tab-pane" tabindex="0" role="tabpanel" hidden="hidden" aria-label="Tab three content">
|
||||
<div class="tab-pane">
|
||||
Tab three content
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -40,19 +40,19 @@ These modifiers can be added in addition to the `control-tabs` class:
|
|||
### Primary tabs
|
||||
|
||||
<div class="control-tabs primary-tabs" data-control="tab">
|
||||
<ul class="nav nav-tabs" role="tablist" aria-orientation="horizontal" aria-label="Tabs">
|
||||
<li role="presentation" class="active"><a href="#primaryTabOne" role="tab" aria-selected="true" tabindex="0">One</a></li>
|
||||
<li role="presentation"><a href="#primaryTabTwo" role="tab" aria-selected="false" tabindex="0">Two</a></li>
|
||||
<li role="presentation"><a href="#primaryTabThree" role="tab" aria-selected="false" tabindex="0">Three</a></li>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#primaryTabOne">One</a></li>
|
||||
<li><a href="#primaryTabTwo">Two</a></li>
|
||||
<li><a href="#primaryTabThree">Three</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" tabindex="0" role="tabpanel" aria-label="Tab one content">
|
||||
<div class="tab-pane active">
|
||||
Tab one content
|
||||
</div>
|
||||
<div class="tab-pane" tabindex="0" role="tabpanel" hidden="hidden" aria-label="Tab two content">
|
||||
<div class="tab-pane">
|
||||
Tab two content
|
||||
</div>
|
||||
<div class="tab-pane" tabindex="0" role="tabpanel" hidden="hidden" aria-label="Tab three content">
|
||||
<div class="tab-pane">
|
||||
Tab three content
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -63,19 +63,19 @@ These modifiers can be added in addition to the `control-tabs` class:
|
|||
### Secondary tabs
|
||||
|
||||
<div class="control-tabs secondary-tabs" data-control="tab">
|
||||
<ul class="nav nav-tabs" role="tablist" aria-orientation="horizontal" aria-label="Tabs">
|
||||
<li role="presentation" class="active"><a href="#secondaryTabOne" role="tab" aria-selected="true" tabindex="0">One</a></li>
|
||||
<li role="presentation"><a href="#secondaryTabTwo" role="tab" aria-selected="false" tabindex="0">Two</a></li>
|
||||
<li role="presentation"><a href="#secondaryTabThree" role="tab" aria-selected="false" tabindex="0">Three</a></li>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#secondaryTabOne">One</a></li>
|
||||
<li><a href="#secondaryTabTwo">Two</a></li>
|
||||
<li><a href="#secondaryTabThree">Three</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" tabindex="0" role="tabpanel" aria-label="Tab one content">
|
||||
<div class="tab-pane active">
|
||||
Tab one content
|
||||
</div>
|
||||
<div class="tab-pane" tabindex="0" role="tabpanel" hidden="hidden" aria-label="Tab two content">
|
||||
<div class="tab-pane">
|
||||
Tab two content
|
||||
</div>
|
||||
<div class="tab-pane" tabindex="0" role="tabpanel" hidden="hidden" aria-label="Tab three content">
|
||||
<div class="tab-pane">
|
||||
Tab three content
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -84,19 +84,19 @@ These modifiers can be added in addition to the `control-tabs` class:
|
|||
### Content tabs
|
||||
|
||||
<div class="control-tabs content-tabs" data-control="tab">
|
||||
<ul class="nav nav-tabs" role="tablist" aria-orientation="horizontal" aria-label="Tabs">
|
||||
<li role="presentation" class="active"><a href="#contentTabOne" role="tab" aria-selected="true" tabindex="0">One</a></li>
|
||||
<li role="presentation"><a href="#contentTabTwo" role="tab" aria-selected="false" tabindex="0">Two</a></li>
|
||||
<li role="presentation"><a href="#contentTabThree" role="tab" aria-selected="false" tabindex="0">Three</a></li>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#contentTabOne">One</a></li>
|
||||
<li><a href="#contentTabTwo">Two</a></li>
|
||||
<li><a href="#contentTabThree">Three</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" tabindex="0" role="tabpanel" aria-label="Tab one content">
|
||||
<div class="tab-pane active">
|
||||
Tab one content
|
||||
</div>
|
||||
<div class="tab-pane" tabindex="0" role="tabpanel" hidden="hidden" aria-label="Tab two content">
|
||||
<div class="tab-pane">
|
||||
Tab two content
|
||||
</div>
|
||||
<div class="tab-pane" tabindex="0" role="tabpanel" hidden="hidden" aria-label="Tab three content">
|
||||
<div class="tab-pane">
|
||||
Tab three content
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -112,11 +112,11 @@ These modifiers can be added in addition to the `control-tabs` class:
|
|||
Example with data attributes (data-control="tab"):
|
||||
|
||||
<div class="control-tabs master" data-control="tab" data-closable>
|
||||
<ul class="nav nav-tabs" role="tablist" aria-orientation="horizontal" aria-label="Tabs">
|
||||
<li role="presentation" class="active"><a href="#home" role="tab" aria-selected="true" tabindex="0">Home</a></li>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#home">Home</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" tabindex="0" role="tabpanel" aria-label="Home">Home</div>
|
||||
<div class="tab-pane active">Home</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -2590,9 +2590,7 @@ var cx=Math.sin(radian)*radius,cy=-Math.cos(radian)*radius;this.hand.setAttribut
|
|||
this.input.prop('value',value);if(value!==last){this.input.triggerHandler('change');if(!this.isInput){this.element.trigger('change');}}
|
||||
if(this.options.autoclose){this.input.trigger('blur');}
|
||||
raiseCallback(this.options.afterDone);};ClockPicker.prototype.remove=function(){this.element.removeData('clockpicker');this.input.off('focus.clockpicker click.clockpicker');this.addon.off('click.clockpicker');if(this.isShown){this.hide();}
|
||||
if(this.isAppended){$win.off('resize.clockpicker'+this.id);this.popover.remove();}};$.fn.clockpicker=function(option){var args=Array.prototype.slice.call(arguments,1);return this.each(function(){var $this=$(this),data=$this.data('clockpicker');if(!data){var options=$.extend({},ClockPicker.DEFAULTS,$this.data(),typeof option=='object'&&option);$this.data('clockpicker',new ClockPicker($this,options));}else{if(typeof data[option]==='function'){data[option].apply(data,args);}}});};}());
|
||||
function applyFocusVisiblePolyfill(t){var n=!0,o=!1,i=null,d={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function s(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function u(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function e(e){n=!1}function a(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c)}function c(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(n=!1,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c))}document.addEventListener("keydown",function(e){e.metaKey||e.altKey||e.ctrlKey||(s(t.activeElement)&&u(t.activeElement),n=!0)},!0),document.addEventListener("mousedown",e,!0),document.addEventListener("pointerdown",e,!0),document.addEventListener("touchstart",e,!0),document.addEventListener("visibilitychange",function(e){"hidden"===document.visibilityState&&(o&&(n=!0),a())},!0),a(),t.addEventListener("focus",function(e){s(e.target)&&(n||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!d[t]||e.readOnly)||("TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable)}(e.target))&&u(e.target)},!0),t.addEventListener("blur",function(e){s(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(o=!0,window.clearTimeout(i),i=window.setTimeout(function(){o=!1,window.clearTimeout(i)},100),function(e){e.hasAttribute("data-focus-visible-added")&&(e.classList.remove("focus-visible"),e.removeAttribute("data-focus-visible-added"))}(e.target))},!0),t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host?t.host.setAttribute("data-js-focus-visible",""):t.nodeType===Node.DOCUMENT_NODE&&document.documentElement.classList.add("js-focus-visible")}var event;window.applyFocusVisiblePolyfill=applyFocusVisiblePolyfill;try{event=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(event=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(event),applyFocusVisiblePolyfill(document);
|
||||
!function(){var e,r={polyfill:function(){var e=0<navigator.userAgent.indexOf("MSIE ")||!!navigator.userAgent.match(/Trident.*rv\:11\./)||0<navigator.userAgent.indexOf("Edge/");if(!("KeyboardEvent"in window)||"key"in KeyboardEvent.prototype&&!e)return!1;var o={get:function(e){var o=r.keys[this.which||this.keyCode];return Array.isArray(o)&&(o=o[+this.shiftKey]),o},enumerable:!0,configurable:!0};return Object.defineProperty(KeyboardEvent.prototype,"key",o),o},keys:{3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",106:"*",107:"+",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"}};for(e=1;e<25;e++)r.keys[111+e]="F"+e;var o="";for(e=65;e<91;e++)o=String.fromCharCode(e),r.keys[e]=[o.toLowerCase(),o.toUpperCase()];for(e=96;e<106;e++)o=String.fromCharCode(e-48),r.keys[e]=o;"function"==typeof define&&define.amd?define("keyboardevent-key-polyfill",r):"undefined"!=typeof exports&&"undefined"!=typeof module?module.exports=r:window&&(window.keyboardeventKeyPolyfill=r)}(),keyboardeventKeyPolyfill.polyfill();+function($){"use strict";if($.oc===undefined)
|
||||
if(this.isAppended){$win.off('resize.clockpicker'+this.id);this.popover.remove();}};$.fn.clockpicker=function(option){var args=Array.prototype.slice.call(arguments,1);return this.each(function(){var $this=$(this),data=$this.data('clockpicker');if(!data){var options=$.extend({},ClockPicker.DEFAULTS,$this.data(),typeof option=='object'&&option);$this.data('clockpicker',new ClockPicker($this,options));}else{if(typeof data[option]==='function'){data[option].apply(data,args);}}});};}());+function($){"use strict";if($.oc===undefined)
|
||||
$.oc={}
|
||||
if($.oc.foundation===undefined)
|
||||
$.oc.foundation={}
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
=require vendor/pikaday/js/pikaday.js
|
||||
=require vendor/pikaday/js/pikaday.jquery.js
|
||||
=require vendor/clockpicker/js/jquery-clockpicker.js
|
||||
=require vendor/focus-visible/focus-visible.js
|
||||
=require vendor/keyboardevent-key-polyfill/index.js
|
||||
|
||||
=require js/foundation.baseclass.js
|
||||
=require js/foundation.element.js
|
||||
|
|
|
|||
|
|
@ -1,294 +0,0 @@
|
|||
/**
|
||||
* Release Version v5.0.0
|
||||
* Allow October CMS to work properly with screen readers.
|
||||
* Applies the :focus-visible polyfill at the given scope.
|
||||
* A scope in this case is either the top-level Document or a Shadow Root.
|
||||
*
|
||||
* @param {(Document|ShadowRoot)} scope
|
||||
* @see https://github.com/WICG/focus-visible
|
||||
*/
|
||||
function applyFocusVisiblePolyfill(scope) {
|
||||
var hadKeyboardEvent = true;
|
||||
var hadFocusVisibleRecently = false;
|
||||
var hadFocusVisibleRecentlyTimeout = null;
|
||||
|
||||
var inputTypesWhitelist = {
|
||||
text: true,
|
||||
search: true,
|
||||
url: true,
|
||||
tel: true,
|
||||
email: true,
|
||||
password: true,
|
||||
number: true,
|
||||
date: true,
|
||||
month: true,
|
||||
week: true,
|
||||
time: true,
|
||||
datetime: true,
|
||||
'datetime-local': true
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper function for legacy browsers and iframes which sometimes focus
|
||||
* elements like document, body, and non-interactive SVG.
|
||||
* @param {Element} el
|
||||
*/
|
||||
function isValidFocusTarget(el) {
|
||||
return !!(el &&
|
||||
el !== document &&
|
||||
el.nodeName !== 'HTML' &&
|
||||
el.nodeName !== 'BODY' &&
|
||||
'classList' in el &&
|
||||
'contains' in el.classList);
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes whether the given element should automatically trigger the
|
||||
* `focus-visible` class being added, i.e. whether it should always match
|
||||
* `:focus-visible` when focused.
|
||||
* @param {Element} el
|
||||
* @return {boolean}
|
||||
*/
|
||||
function focusTriggersKeyboardModality(el) {
|
||||
var type = el.type;
|
||||
var tagName = el.tagName;
|
||||
|
||||
if (tagName === 'INPUT' && inputTypesWhitelist[type] && !el.readOnly) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (tagName === 'TEXTAREA' && !el.readOnly) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (el.isContentEditable) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the `focus-visible` class to the given element if it was not added by
|
||||
* the author.
|
||||
* @param {Element} el
|
||||
*/
|
||||
function addFocusVisibleClass(el) {
|
||||
if (el.classList.contains('focus-visible')) {
|
||||
return;
|
||||
}
|
||||
el.classList.add('focus-visible');
|
||||
el.setAttribute('data-focus-visible-added', '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the `focus-visible` class from the given element if it was not
|
||||
* originally added by the author.
|
||||
* @param {Element} el
|
||||
*/
|
||||
function removeFocusVisibleClass(el) {
|
||||
if (!el.hasAttribute('data-focus-visible-added')) {
|
||||
return;
|
||||
}
|
||||
el.classList.remove('focus-visible');
|
||||
el.removeAttribute('data-focus-visible-added');
|
||||
}
|
||||
|
||||
/**
|
||||
* If the most recent user interaction was via the keyboard;
|
||||
* and the key press did not include a meta, alt/option, or control key;
|
||||
* then the modality is keyboard. Otherwise, the modality is not keyboard.
|
||||
* Apply `focus-visible` to any current active element and keep track
|
||||
* of our keyboard modality state with `hadKeyboardEvent`.
|
||||
* @param {KeyboardEvent} e
|
||||
*/
|
||||
function onKeyDown(e) {
|
||||
if (e.metaKey || e.altKey || e.ctrlKey) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isValidFocusTarget(scope.activeElement)) {
|
||||
addFocusVisibleClass(scope.activeElement);
|
||||
}
|
||||
|
||||
hadKeyboardEvent = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* If at any point a user clicks with a pointing device, ensure that we change
|
||||
* the modality away from keyboard.
|
||||
* This avoids the situation where a user presses a key on an already focused
|
||||
* element, and then clicks on a different element, focusing it with a
|
||||
* pointing device, while we still think we're in keyboard modality.
|
||||
* @param {Event} e
|
||||
*/
|
||||
function onPointerDown(e) {
|
||||
hadKeyboardEvent = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* On `focus`, add the `focus-visible` class to the target if:
|
||||
* - the target received focus as a result of keyboard navigation, or
|
||||
* - the event target is an element that will likely require interaction
|
||||
* via the keyboard (e.g. a text box)
|
||||
* @param {Event} e
|
||||
*/
|
||||
function onFocus(e) {
|
||||
// Prevent IE from focusing the document or HTML element.
|
||||
if (!isValidFocusTarget(e.target)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (hadKeyboardEvent || focusTriggersKeyboardModality(e.target)) {
|
||||
addFocusVisibleClass(e.target);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* On `blur`, remove the `focus-visible` class from the target.
|
||||
* @param {Event} e
|
||||
*/
|
||||
function onBlur(e) {
|
||||
if (!isValidFocusTarget(e.target)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
e.target.classList.contains('focus-visible') ||
|
||||
e.target.hasAttribute('data-focus-visible-added')
|
||||
) {
|
||||
// To detect a tab/window switch, we look for a blur event followed
|
||||
// rapidly by a visibility change.
|
||||
// If we don't see a visibility change within 100ms, it's probably a
|
||||
// regular focus change.
|
||||
hadFocusVisibleRecently = true;
|
||||
window.clearTimeout(hadFocusVisibleRecentlyTimeout);
|
||||
hadFocusVisibleRecentlyTimeout = window.setTimeout(function() {
|
||||
hadFocusVisibleRecently = false;
|
||||
window.clearTimeout(hadFocusVisibleRecentlyTimeout);
|
||||
}, 100);
|
||||
removeFocusVisibleClass(e.target);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* If the user changes tabs, keep track of whether or not the previously
|
||||
* focused element had .focus-visible.
|
||||
* @param {Event} e
|
||||
*/
|
||||
function onVisibilityChange(e) {
|
||||
if (document.visibilityState === 'hidden') {
|
||||
// If the tab becomes active again, the browser will handle calling focus
|
||||
// on the element (Safari actually calls it twice).
|
||||
// If this tab change caused a blur on an element with focus-visible,
|
||||
// re-apply the class when the user switches back to the tab.
|
||||
if (hadFocusVisibleRecently) {
|
||||
hadKeyboardEvent = true;
|
||||
}
|
||||
addInitialPointerMoveListeners();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a group of listeners to detect usage of any pointing devices.
|
||||
* These listeners will be added when the polyfill first loads, and anytime
|
||||
* the window is blurred, so that they are active when the window regains
|
||||
* focus.
|
||||
*/
|
||||
function addInitialPointerMoveListeners() {
|
||||
document.addEventListener('mousemove', onInitialPointerMove);
|
||||
document.addEventListener('mousedown', onInitialPointerMove);
|
||||
document.addEventListener('mouseup', onInitialPointerMove);
|
||||
document.addEventListener('pointermove', onInitialPointerMove);
|
||||
document.addEventListener('pointerdown', onInitialPointerMove);
|
||||
document.addEventListener('pointerup', onInitialPointerMove);
|
||||
document.addEventListener('touchmove', onInitialPointerMove);
|
||||
document.addEventListener('touchstart', onInitialPointerMove);
|
||||
document.addEventListener('touchend', onInitialPointerMove);
|
||||
}
|
||||
|
||||
function removeInitialPointerMoveListeners() {
|
||||
document.removeEventListener('mousemove', onInitialPointerMove);
|
||||
document.removeEventListener('mousedown', onInitialPointerMove);
|
||||
document.removeEventListener('mouseup', onInitialPointerMove);
|
||||
document.removeEventListener('pointermove', onInitialPointerMove);
|
||||
document.removeEventListener('pointerdown', onInitialPointerMove);
|
||||
document.removeEventListener('pointerup', onInitialPointerMove);
|
||||
document.removeEventListener('touchmove', onInitialPointerMove);
|
||||
document.removeEventListener('touchstart', onInitialPointerMove);
|
||||
document.removeEventListener('touchend', onInitialPointerMove);
|
||||
}
|
||||
|
||||
/**
|
||||
* When the polfyill first loads, assume the user is in keyboard modality.
|
||||
* If any event is received from a pointing device (e.g. mouse, pointer,
|
||||
* touch), turn off keyboard modality.
|
||||
* This accounts for situations where focus enters the page from the URL bar.
|
||||
* @param {Event} e
|
||||
*/
|
||||
function onInitialPointerMove(e) {
|
||||
// Work around a Safari quirk that fires a mousemove on <html> whenever the
|
||||
// window blurs, even if you're tabbing out of the page. ¯\_(ツ)_/¯
|
||||
if (e.target.nodeName && e.target.nodeName.toLowerCase() === 'html') {
|
||||
return;
|
||||
}
|
||||
|
||||
hadKeyboardEvent = false;
|
||||
removeInitialPointerMoveListeners();
|
||||
}
|
||||
|
||||
// For some kinds of state, we are interested in changes at the global scope
|
||||
// only. For example, global pointer input, global key presses and global
|
||||
// visibility change should affect the state at every scope:
|
||||
document.addEventListener('keydown', onKeyDown, true);
|
||||
document.addEventListener('mousedown', onPointerDown, true);
|
||||
document.addEventListener('pointerdown', onPointerDown, true);
|
||||
document.addEventListener('touchstart', onPointerDown, true);
|
||||
document.addEventListener('visibilitychange', onVisibilityChange, true);
|
||||
|
||||
addInitialPointerMoveListeners();
|
||||
|
||||
// For focus and blur, we specifically care about state changes in the local
|
||||
// scope. This is because focus / blur events that originate from within a
|
||||
// shadow root are not re-dispatched from the host element if it was already
|
||||
// the active element in its own scope:
|
||||
scope.addEventListener('focus', onFocus, true);
|
||||
scope.addEventListener('blur', onBlur, true);
|
||||
|
||||
// We detect that a node is a ShadowRoot by ensuring that it is a
|
||||
// DocumentFragment and also has a host property. This check covers native
|
||||
// implementation and polyfill implementation transparently. If we only cared
|
||||
// about the native implementation, we could just check if the scope was
|
||||
// an instance of a ShadowRoot.
|
||||
if (scope.nodeType === Node.DOCUMENT_FRAGMENT_NODE && scope.host) {
|
||||
// Since a ShadowRoot is a special kind of DocumentFragment, it does not
|
||||
// have a root element to add a class to. So, we add this attribute to the
|
||||
// host element instead:
|
||||
scope.host.setAttribute('data-js-focus-visible', '');
|
||||
} else if (scope.nodeType === Node.DOCUMENT_NODE) {
|
||||
document.documentElement.classList.add('js-focus-visible');
|
||||
}
|
||||
}
|
||||
|
||||
// Make the polyfill helper globally available. This can be used as a signal to
|
||||
// interested libraries that wish to coordinate with the polyfill for e.g.,
|
||||
// applying the polyfill to a shadow root:
|
||||
window.applyFocusVisiblePolyfill = applyFocusVisiblePolyfill;
|
||||
|
||||
// Notify interested libraries of the polyfill's presence, in case the polyfill
|
||||
// was loaded lazily:
|
||||
var event;
|
||||
|
||||
try {
|
||||
event = new CustomEvent('focus-visible-polyfill-ready');
|
||||
} catch (error) {
|
||||
// IE11 does not support using CustomEvent as a constructor directly:
|
||||
event = document.createEvent('CustomEvent');
|
||||
event.initCustomEvent('focus-visible-polyfill-ready', false, false, {});
|
||||
}
|
||||
|
||||
window.dispatchEvent(event);
|
||||
|
||||
// Apply the polyfill to the global document, so that no JavaScript coordination
|
||||
// is required to use the polyfill in the top-level document:
|
||||
applyFocusVisiblePolyfill(document);
|
||||
|
|
@ -1,148 +0,0 @@
|
|||
/*
|
||||
* @deprecated, remove if year >= 2021.
|
||||
* Remove this Polyfill when Edge fixes this issue: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11509049/
|
||||
* and October CMS decides to drop IE11 Support.
|
||||
* Polyfill for KeyboardEvent.prototype.key Version V1.1.0
|
||||
* Release URL: https://github.com/cvan/keyboardevent-key-polyfill/releases
|
||||
* This will still enable KeyboardEvent.prototype.key in environments where it may not yet be available.
|
||||
*
|
||||
* WARNING: The Initialize has been placed at the bottom, to autoload the Polyfill in October CMS
|
||||
*/
|
||||
(function() {
|
||||
|
||||
var keyboardeventKeyPolyfill = {
|
||||
polyfill: polyfill,
|
||||
keys: {
|
||||
3: 'Cancel',
|
||||
6: 'Help',
|
||||
8: 'Backspace',
|
||||
9: 'Tab',
|
||||
12: 'Clear',
|
||||
13: 'Enter',
|
||||
16: 'Shift',
|
||||
17: 'Control',
|
||||
18: 'Alt',
|
||||
19: 'Pause',
|
||||
20: 'CapsLock',
|
||||
27: 'Escape',
|
||||
28: 'Convert',
|
||||
29: 'NonConvert',
|
||||
30: 'Accept',
|
||||
31: 'ModeChange',
|
||||
32: ' ',
|
||||
33: 'PageUp',
|
||||
34: 'PageDown',
|
||||
35: 'End',
|
||||
36: 'Home',
|
||||
37: 'ArrowLeft',
|
||||
38: 'ArrowUp',
|
||||
39: 'ArrowRight',
|
||||
40: 'ArrowDown',
|
||||
41: 'Select',
|
||||
42: 'Print',
|
||||
43: 'Execute',
|
||||
44: 'PrintScreen',
|
||||
45: 'Insert',
|
||||
46: 'Delete',
|
||||
48: ['0', ')'],
|
||||
49: ['1', '!'],
|
||||
50: ['2', '@'],
|
||||
51: ['3', '#'],
|
||||
52: ['4', '$'],
|
||||
53: ['5', '%'],
|
||||
54: ['6', '^'],
|
||||
55: ['7', '&'],
|
||||
56: ['8', '*'],
|
||||
57: ['9', '('],
|
||||
91: 'OS',
|
||||
93: 'ContextMenu',
|
||||
106: '*',
|
||||
107: '+',
|
||||
109: '-',
|
||||
110: '.',
|
||||
111: '/',
|
||||
144: 'NumLock',
|
||||
145: 'ScrollLock',
|
||||
181: 'VolumeMute',
|
||||
182: 'VolumeDown',
|
||||
183: 'VolumeUp',
|
||||
186: [';', ':'],
|
||||
187: ['=', '+'],
|
||||
188: [',', '<'],
|
||||
189: ['-', '_'],
|
||||
190: ['.', '>'],
|
||||
191: ['/', '?'],
|
||||
192: ['`', '~'],
|
||||
219: ['[', '{'],
|
||||
220: ['\\', '|'],
|
||||
221: [']', '}'],
|
||||
222: ["'", '"'],
|
||||
224: 'Meta',
|
||||
225: 'AltGraph',
|
||||
246: 'Attn',
|
||||
247: 'CrSel',
|
||||
248: 'ExSel',
|
||||
249: 'EraseEof',
|
||||
250: 'Play',
|
||||
251: 'ZoomOut'
|
||||
}
|
||||
};
|
||||
|
||||
// Function keys (F1-24).
|
||||
var i;
|
||||
for (i = 1; i < 25; i++) {
|
||||
keyboardeventKeyPolyfill.keys[111 + i] = 'F' + i;
|
||||
}
|
||||
|
||||
// Printable ASCII characters.
|
||||
var letter = '';
|
||||
for (i = 65; i < 91; i++) {
|
||||
letter = String.fromCharCode(i);
|
||||
keyboardeventKeyPolyfill.keys[i] = [letter.toLowerCase(), letter.toUpperCase()];
|
||||
}
|
||||
|
||||
// Numbers on numeric keyboard.
|
||||
for (i = 96; i < 106; i++) {
|
||||
letter = String.fromCharCode(i - 48);
|
||||
keyboardeventKeyPolyfill.keys[i] = letter;
|
||||
}
|
||||
|
||||
function polyfill() {
|
||||
var isEdgeOrIE = (navigator.userAgent.indexOf("MSIE ") > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./) || navigator.userAgent.indexOf("Edge/") > 0);
|
||||
if (!('KeyboardEvent' in window) ||
|
||||
('key' in KeyboardEvent.prototype && !isEdgeOrIE)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Polyfill `key` on `KeyboardEvent`.
|
||||
var proto = {
|
||||
get: function(x) {
|
||||
var key = keyboardeventKeyPolyfill.keys[this.which || this.keyCode];
|
||||
|
||||
if (Array.isArray(key)) {
|
||||
key = key[+this.shiftKey];
|
||||
}
|
||||
|
||||
return key;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
Object.defineProperty(KeyboardEvent.prototype, 'key', proto);
|
||||
return proto;
|
||||
}
|
||||
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('keyboardevent-key-polyfill', keyboardeventKeyPolyfill);
|
||||
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
|
||||
module.exports = keyboardeventKeyPolyfill;
|
||||
} else if (window) {
|
||||
window.keyboardeventKeyPolyfill = keyboardeventKeyPolyfill;
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
/* Initialize the polyfill
|
||||
* Load KeyboardEvent polyfill for old browsers
|
||||
*/
|
||||
keyboardeventKeyPolyfill.polyfill();
|
||||
Loading…
Reference in New Issue