Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/246116
Change subject: Update OOjs UI to v0.12.12 ...................................................................... Update OOjs UI to v0.12.12 Release notes: https://git.wikimedia.org/blob/oojs%2Fui.git/v0.12.12/History.md Change-Id: If241c883b8c079ea9f1d73c8eb6f51c99dd615ac --- M composer.json M resources/lib/oojs-ui/i18n/af.json M resources/lib/oojs-ui/i18n/as.json M resources/lib/oojs-ui/i18n/ca.json M resources/lib/oojs-ui/i18n/el.json M resources/lib/oojs-ui/i18n/en-ca.json M resources/lib/oojs-ui/i18n/en.json M resources/lib/oojs-ui/i18n/eo.json M resources/lib/oojs-ui/i18n/fa.json M resources/lib/oojs-ui/i18n/ia.json M resources/lib/oojs-ui/i18n/is.json M resources/lib/oojs-ui/i18n/it.json M resources/lib/oojs-ui/i18n/ka.json M resources/lib/oojs-ui/i18n/ko.json M resources/lib/oojs-ui/i18n/krc.json A resources/lib/oojs-ui/i18n/krl.json M resources/lib/oojs-ui/i18n/ml.json M resources/lib/oojs-ui/i18n/nb.json A resources/lib/oojs-ui/i18n/olo.json M resources/lib/oojs-ui/i18n/pa.json M resources/lib/oojs-ui/i18n/pl.json M resources/lib/oojs-ui/i18n/pt.json M resources/lib/oojs-ui/i18n/qqq.json M resources/lib/oojs-ui/i18n/sr-ec.json M resources/lib/oojs-ui/i18n/vec.json M resources/lib/oojs-ui/i18n/vi.json M resources/lib/oojs-ui/i18n/yue.json M resources/lib/oojs-ui/oojs-ui-apex-noimages.css M resources/lib/oojs-ui/oojs-ui-apex.js M resources/lib/oojs-ui/oojs-ui-mediawiki-noimages.css M resources/lib/oojs-ui/oojs-ui-mediawiki.js M resources/lib/oojs-ui/oojs-ui.js M resources/lib/oojs-ui/themes/apex/images/icons/picture.png M resources/lib/oojs-ui/themes/apex/images/icons/picture.svg M resources/lib/oojs-ui/themes/apex/images/icons/table.png M resources/lib/oojs-ui/themes/apex/images/icons/table.svg M resources/lib/oojs-ui/themes/mediawiki/images/icons/picture-invert.png M resources/lib/oojs-ui/themes/mediawiki/images/icons/picture-invert.svg M resources/lib/oojs-ui/themes/mediawiki/images/icons/picture.png M resources/lib/oojs-ui/themes/mediawiki/images/icons/picture.svg M resources/lib/oojs-ui/themes/mediawiki/images/icons/table-invert.png M resources/lib/oojs-ui/themes/mediawiki/images/icons/table-invert.svg M resources/lib/oojs-ui/themes/mediawiki/images/icons/table.png M resources/lib/oojs-ui/themes/mediawiki/images/icons/table.svg 44 files changed, 734 insertions(+), 384 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/16/246116/1 diff --git a/composer.json b/composer.json index 282f9da..ad14780 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "liuggio/statsd-php-client": "1.0.16", "oyejorge/less.php": "1.7.0.9", "mediawiki/at-ease": "1.1.0", - "oojs/oojs-ui": "0.12.8.1", + "oojs/oojs-ui": "0.12.12", "php": ">=5.3.3", "psr/log": "1.0.0", "wikimedia/assert": "0.2.2", diff --git a/resources/lib/oojs-ui/i18n/af.json b/resources/lib/oojs-ui/i18n/af.json index 6f79e37..67ec517 100644 --- a/resources/lib/oojs-ui/i18n/af.json +++ b/resources/lib/oojs-ui/i18n/af.json @@ -1,7 +1,8 @@ { "@metadata": { "authors": [ - "Naudefj" + "Naudefj", + "Fwolff" ] }, "ooui-outline-control-move-down": "Skuif item af", @@ -15,5 +16,8 @@ "ooui-dialog-process-error": "Iets het verkeerd gegaan", "ooui-dialog-process-dismiss": "Sluit", "ooui-dialog-process-retry": "Probeer weer", - "ooui-dialog-process-continue": "Gaan voort" + "ooui-dialog-process-continue": "Gaan voort", + "ooui-selectfile-button-select": "Kies 'n lêer", + "ooui-selectfile-placeholder": "Geen lêer is gekies nie", + "ooui-selectfile-dragdrop-placeholder": "Laat val die lêer hier" } diff --git a/resources/lib/oojs-ui/i18n/as.json b/resources/lib/oojs-ui/i18n/as.json index c373601..5053280 100644 --- a/resources/lib/oojs-ui/i18n/as.json +++ b/resources/lib/oojs-ui/i18n/as.json @@ -2,7 +2,8 @@ "@metadata": { "authors": [ "Gitartha.bordoloi", - "Dibya Dutta" + "Dibya Dutta", + "IKHazarika" ] }, "ooui-outline-control-move-down": "সমল তললৈ স্থানান্তৰ কৰক", @@ -17,6 +18,8 @@ "ooui-dialog-process-dismiss": "বাতিল", "ooui-dialog-process-retry": "পুনৰ চেষ্টা কৰক", "ooui-dialog-process-continue": "অব্যাহত ৰাখক", + "ooui-selectfile-button-select": "ফাইল নিৰ্বাচন কৰক", "ooui-selectfile-not-supported": "নথি নিৰ্বাচন সমৰ্থন কৰা নাই", - "ooui-selectfile-placeholder": "কোনো নথি নিৰ্বাচিত কৰা হোৱা নাই" + "ooui-selectfile-placeholder": "কোনো নথি নিৰ্বাচিত কৰা হোৱা নাই", + "ooui-selectfile-dragdrop-placeholder": "ইয়াত ফাইল এৰক" } diff --git a/resources/lib/oojs-ui/i18n/ca.json b/resources/lib/oojs-ui/i18n/ca.json index 33b0ce0..3077b60 100644 --- a/resources/lib/oojs-ui/i18n/ca.json +++ b/resources/lib/oojs-ui/i18n/ca.json @@ -12,7 +12,8 @@ "Edustus", "Davidpar", "Maceleiro", - "Kippelboy" + "Kippelboy", + "Macofe" ] }, "ooui-outline-control-move-down": "Baixa l'element", @@ -27,6 +28,7 @@ "ooui-dialog-process-dismiss": "Descarta", "ooui-dialog-process-retry": "Torneu-ho a provar", "ooui-dialog-process-continue": "Continua", + "ooui-selectfile-button-select": "Seleccioneu un fitxer", "ooui-selectfile-not-supported": "El tipus de fitxer no és compatible", "ooui-selectfile-placeholder": "No s'ha seleccionat cap fitxer", "ooui-selectfile-dragdrop-placeholder": "Deixeu-hi anar el fitxer (o feu clic a navega)" diff --git a/resources/lib/oojs-ui/i18n/el.json b/resources/lib/oojs-ui/i18n/el.json index b3c4845..8538417 100644 --- a/resources/lib/oojs-ui/i18n/el.json +++ b/resources/lib/oojs-ui/i18n/el.json @@ -26,5 +26,5 @@ "ooui-dialog-process-continue": "Συνέχεια", "ooui-selectfile-not-supported": "Επιλογή αρχείου δεν υποστηρίζεται", "ooui-selectfile-placeholder": "Κανένα αρχείο δεν είναι επιλεγμένο", - "ooui-selectfile-dragdrop-placeholder": "Σύρετε ένα αρχείο εδώ (ή κάντε κλικ για αναζήτηση)" + "ooui-selectfile-dragdrop-placeholder": "Σύρετε το αρχείο εδώ" } diff --git a/resources/lib/oojs-ui/i18n/en-ca.json b/resources/lib/oojs-ui/i18n/en-ca.json index 218ece2..1a8e31b 100644 --- a/resources/lib/oojs-ui/i18n/en-ca.json +++ b/resources/lib/oojs-ui/i18n/en-ca.json @@ -18,6 +18,5 @@ "ooui-dialog-process-continue": "Continue", "ooui-selectfile-not-supported": "File(s) not supported", "ooui-selectfile-placeholder": "No file selected", - "ooui-selectfile-dragdrop-placeholder": "Drop file here (or click to browse your computer)", - "ooui-semicolon-separator": ";" + "ooui-selectfile-dragdrop-placeholder": "Drop file here (or click to browse your computer)" } diff --git a/resources/lib/oojs-ui/i18n/en.json b/resources/lib/oojs-ui/i18n/en.json index 7cf2eb1..be00832 100644 --- a/resources/lib/oojs-ui/i18n/en.json +++ b/resources/lib/oojs-ui/i18n/en.json @@ -31,6 +31,5 @@ "ooui-selectfile-button-select": "Select a file", "ooui-selectfile-not-supported": "File selection is not supported", "ooui-selectfile-placeholder": "No file is selected", - "ooui-selectfile-dragdrop-placeholder": "Drop file here", - "ooui-semicolon-separator": "; " + "ooui-selectfile-dragdrop-placeholder": "Drop file here" } diff --git a/resources/lib/oojs-ui/i18n/eo.json b/resources/lib/oojs-ui/i18n/eo.json index 2ead5c5..e789565 100644 --- a/resources/lib/oojs-ui/i18n/eo.json +++ b/resources/lib/oojs-ui/i18n/eo.json @@ -20,6 +20,7 @@ "ooui-dialog-process-dismiss": "Elimini", "ooui-dialog-process-retry": "Reprovi", "ooui-dialog-process-continue": "Daŭrigi", + "ooui-selectfile-button-select": "Elekti dosieron", "ooui-selectfile-not-supported": "Dosieroselekto ne estas subtenata.", "ooui-selectfile-placeholder": "Vi ne selektis dosieron" } diff --git a/resources/lib/oojs-ui/i18n/fa.json b/resources/lib/oojs-ui/i18n/fa.json index 11bd4b8..0375c8e 100644 --- a/resources/lib/oojs-ui/i18n/fa.json +++ b/resources/lib/oojs-ui/i18n/fa.json @@ -29,7 +29,8 @@ "ooui-dialog-process-dismiss": "رد", "ooui-dialog-process-retry": "دوباره امتحان کنید", "ooui-dialog-process-continue": "ادامه", + "ooui-selectfile-button-select": "یک فایل انتخاب کنید", "ooui-selectfile-not-supported": "انتخاب پرونده پشتیبانی نمیشود", "ooui-selectfile-placeholder": "هیچ پروندهای انتخاب نشده است", - "ooui-selectfile-dragdrop-placeholder": "رها کردن فایل در اینجا (و یا کلیک کنید به فهرست)" + "ooui-selectfile-dragdrop-placeholder": "فایل را اینجا رها کنید" } diff --git a/resources/lib/oojs-ui/i18n/ia.json b/resources/lib/oojs-ui/i18n/ia.json index b374b6f..ceb27c9 100644 --- a/resources/lib/oojs-ui/i18n/ia.json +++ b/resources/lib/oojs-ui/i18n/ia.json @@ -8,9 +8,16 @@ "ooui-outline-control-move-up": "Displaciar elemento in alto", "ooui-outline-control-remove": "Remover elemento", "ooui-toolbar-more": "Plus", + "ooui-toolgroup-expand": "Plus", + "ooui-toolgroup-collapse": "Minus", "ooui-dialog-message-accept": "OK", "ooui-dialog-message-reject": "Cancellar", "ooui-dialog-process-error": "Qualcosa ha vadite mal", "ooui-dialog-process-dismiss": "Clauder", - "ooui-dialog-process-retry": "Reprobar" + "ooui-dialog-process-retry": "Reprobar", + "ooui-dialog-process-continue": "Continuar", + "ooui-selectfile-button-select": "Selige un file", + "ooui-selectfile-not-supported": "Le selection de files non es supportate", + "ooui-selectfile-placeholder": "Nulle file es seligite", + "ooui-selectfile-dragdrop-placeholder": "Depone file hic" } diff --git a/resources/lib/oojs-ui/i18n/is.json b/resources/lib/oojs-ui/i18n/is.json index 3a4e145..574c592 100644 --- a/resources/lib/oojs-ui/i18n/is.json +++ b/resources/lib/oojs-ui/i18n/is.json @@ -16,5 +16,9 @@ "ooui-dialog-process-error": "Eitthvað mistókst", "ooui-dialog-process-dismiss": "Loka", "ooui-dialog-process-retry": "Reyna aftur", - "ooui-dialog-process-continue": "Halda áfram" + "ooui-dialog-process-continue": "Halda áfram", + "ooui-selectfile-button-select": "Velja skrá", + "ooui-selectfile-not-supported": "Skráar val er ekki stutt.", + "ooui-selectfile-placeholder": "Engin skrá er valin", + "ooui-selectfile-dragdrop-placeholder": "Slepptu skránni hérna" } diff --git a/resources/lib/oojs-ui/i18n/it.json b/resources/lib/oojs-ui/i18n/it.json index 387d736..68a25b5 100644 --- a/resources/lib/oojs-ui/i18n/it.json +++ b/resources/lib/oojs-ui/i18n/it.json @@ -13,14 +13,16 @@ "Raoli", "Una giornata uggiosa '94", "Ontsed", - "Alexmar983" + "Alexmar983", + "Nemo bis", + "Jdforrester" ] }, "ooui-outline-control-move-down": "Sposta in basso", "ooui-outline-control-move-up": "Sposta in alto", "ooui-outline-control-remove": "Rimuovi elemento", "ooui-toolbar-more": "Altro", - "ooui-toolgroup-expand": "Più", + "ooui-toolgroup-expand": "Altro", "ooui-toolgroup-collapse": "Meno", "ooui-dialog-message-accept": "OK", "ooui-dialog-message-reject": "Annulla", @@ -28,6 +30,8 @@ "ooui-dialog-process-dismiss": "Nascondi", "ooui-dialog-process-retry": "Riprova", "ooui-dialog-process-continue": "Continua", + "ooui-selectfile-button-select": "Seleziona un file", "ooui-selectfile-not-supported": "La selezione del file non è supportata", - "ooui-selectfile-placeholder": "Nessun file è selezionato" + "ooui-selectfile-placeholder": "Nessun file è selezionato", + "ooui-selectfile-dragdrop-placeholder": "Posiziona i files qui" } diff --git a/resources/lib/oojs-ui/i18n/ka.json b/resources/lib/oojs-ui/i18n/ka.json index efacb63..f1a1a47 100644 --- a/resources/lib/oojs-ui/i18n/ka.json +++ b/resources/lib/oojs-ui/i18n/ka.json @@ -24,6 +24,5 @@ "ooui-dialog-process-retry": "კიდევ სცადეთ", "ooui-dialog-process-continue": "გაგრძელება", "ooui-selectfile-not-supported": "ფაილის არჩევა არ არის მხარდაჭერილი", - "ooui-selectfile-placeholder": "ფაილი არ არის არჩეული", - "ooui-semicolon-separator": ";" + "ooui-selectfile-placeholder": "ფაილი არ არის არჩეული" } diff --git a/resources/lib/oojs-ui/i18n/ko.json b/resources/lib/oojs-ui/i18n/ko.json index bf47f6f..3894417 100644 --- a/resources/lib/oojs-ui/i18n/ko.json +++ b/resources/lib/oojs-ui/i18n/ko.json @@ -9,7 +9,8 @@ "고기랑", "Ryuch", "Revi", - "Infinity" + "Infinity", + "Hwangjy9" ] }, "ooui-outline-control-move-down": "항목을 아래로 옮기기", @@ -24,6 +25,8 @@ "ooui-dialog-process-dismiss": "숨기기", "ooui-dialog-process-retry": "다시 시도하세요", "ooui-dialog-process-continue": "계속", + "ooui-selectfile-button-select": "파일을 선택하세요", "ooui-selectfile-not-supported": "파일 선택은 지원하지 않습니다", - "ooui-selectfile-placeholder": "선택한 파일 없음" + "ooui-selectfile-placeholder": "선택한 파일 없음", + "ooui-selectfile-dragdrop-placeholder": "여기에 파일을 놓으세요" } diff --git a/resources/lib/oojs-ui/i18n/krc.json b/resources/lib/oojs-ui/i18n/krc.json index bc3cf0b..d4068c8 100644 --- a/resources/lib/oojs-ui/i18n/krc.json +++ b/resources/lib/oojs-ui/i18n/krc.json @@ -17,6 +17,5 @@ "ooui-dialog-process-retry": "Энтда сынаб кёр", "ooui-dialog-process-continue": "Бардыр", "ooui-selectfile-not-supported": "Файл сайлау тутулмайды", - "ooui-selectfile-placeholder": "Бир файл да сайланмагъанды", - "ooui-semicolon-separator": ";" + "ooui-selectfile-placeholder": "Бир файл да сайланмагъанды" } diff --git a/resources/lib/oojs-ui/i18n/krl.json b/resources/lib/oojs-ui/i18n/krl.json new file mode 100644 index 0000000..6ff25eb --- /dev/null +++ b/resources/lib/oojs-ui/i18n/krl.json @@ -0,0 +1,10 @@ +{ + "@metadata": { + "authors": [ + "Mashoi7" + ] + }, + "ooui-toolbar-more": "Enämpi", + "ooui-toolgroup-expand": "Enämpi", + "ooui-toolgroup-collapse": "Vähempi" +} diff --git a/resources/lib/oojs-ui/i18n/ml.json b/resources/lib/oojs-ui/i18n/ml.json index 326dd14..9649b2e 100644 --- a/resources/lib/oojs-ui/i18n/ml.json +++ b/resources/lib/oojs-ui/i18n/ml.json @@ -4,7 +4,8 @@ "Kavya Manohar", "Praveenp", "Santhosh.thottingal", - "Vssun" + "Vssun", + "Ranjithsiji" ] }, "ooui-outline-control-move-down": "ഇനം താഴേയ്ക്ക് മാറ്റുക", @@ -19,6 +20,8 @@ "ooui-dialog-process-dismiss": "ഒഴിവാക്കുക", "ooui-dialog-process-retry": "വീണ്ടും ശ്രമിക്കുക", "ooui-dialog-process-continue": "തുടരുക", + "ooui-selectfile-button-select": "പ്രമാണം തിരഞ്ഞെടുക്കുക", "ooui-selectfile-not-supported": "പ്രമാണം തിരഞ്ഞെടുക്കൽ പിന്തുണയ്ക്കുന്നില്ല", - "ooui-selectfile-placeholder": "പ്രമാണങ്ങൾ ഒന്നും തിരഞ്ഞെടുത്തിട്ടില്ല" + "ooui-selectfile-placeholder": "പ്രമാണങ്ങൾ ഒന്നും തിരഞ്ഞെടുത്തിട്ടില്ല", + "ooui-selectfile-dragdrop-placeholder": "പ്രമാണം ഇവിടെ ഇടുക" } diff --git a/resources/lib/oojs-ui/i18n/nb.json b/resources/lib/oojs-ui/i18n/nb.json index 4efb02a..d3fad8d 100644 --- a/resources/lib/oojs-ui/i18n/nb.json +++ b/resources/lib/oojs-ui/i18n/nb.json @@ -22,6 +22,8 @@ "ooui-dialog-process-dismiss": "Lukk", "ooui-dialog-process-retry": "Prøv igjen", "ooui-dialog-process-continue": "Fortsett", + "ooui-selectfile-button-select": "Velg en fil", "ooui-selectfile-not-supported": "Filvalg er ikke støttet", - "ooui-selectfile-placeholder": "Ingen fil er valgt" + "ooui-selectfile-placeholder": "Ingen fil er valgt", + "ooui-selectfile-dragdrop-placeholder": "Slipp fil her" } diff --git a/resources/lib/oojs-ui/i18n/olo.json b/resources/lib/oojs-ui/i18n/olo.json new file mode 100644 index 0000000..1dc994e --- /dev/null +++ b/resources/lib/oojs-ui/i18n/olo.json @@ -0,0 +1,23 @@ +{ + "@metadata": { + "authors": [ + "Mashoi7" + ] + }, + "ooui-outline-control-move-down": "Siirrä kohteh alah", + "ooui-outline-control-move-up": "Siirrä kohteh yläh", + "ooui-outline-control-remove": "Ota kohteh iäre", + "ooui-toolbar-more": "Enämbi", + "ooui-toolgroup-expand": "Enämbi", + "ooui-toolgroup-collapse": "Vähembi", + "ooui-dialog-message-accept": "OK", + "ooui-dialog-message-reject": "Hylgiä", + "ooui-dialog-process-error": "Mitah haireh rodih", + "ooui-dialog-process-dismiss": "Hylgiä", + "ooui-dialog-process-retry": "Opi vie", + "ooui-dialog-process-continue": "Jatka", + "ooui-selectfile-button-select": "Valliče failu", + "ooui-selectfile-not-supported": "Failan valličendua ei tuveta", + "ooui-selectfile-placeholder": "Failua ei ole vallittu", + "ooui-selectfile-dragdrop-placeholder": "Kirvota failu täh" +} diff --git a/resources/lib/oojs-ui/i18n/pa.json b/resources/lib/oojs-ui/i18n/pa.json index 0661b3f..a69d76f 100644 --- a/resources/lib/oojs-ui/i18n/pa.json +++ b/resources/lib/oojs-ui/i18n/pa.json @@ -10,6 +10,7 @@ }, "ooui-outline-control-move-down": "ਨੀਚੇ ਲੈਕੇ ਜਾਓ", "ooui-outline-control-move-up": "ਉੱਤੇ ਲੈਕੇ ਜਾਓ", + "ooui-outline-control-remove": "ਆਈਟਮ ਹਟਾਓ", "ooui-toolbar-more": "ਹੋਰ", "ooui-toolgroup-expand": "ਹੋਰ", "ooui-toolgroup-collapse": "ਥੋੜ੍ਹੇ", @@ -18,5 +19,9 @@ "ooui-dialog-process-error": "ਕੁਝ ਗਲਤ ਹੋ ਗਿਆ", "ooui-dialog-process-dismiss": "ਰੱਦ ਕਰੋ", "ooui-dialog-process-retry": "ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ", - "ooui-dialog-process-continue": "ਜਾਰੀ ਰੱਖੋ" + "ooui-dialog-process-continue": "ਜਾਰੀ ਰੱਖੋ", + "ooui-selectfile-button-select": "ਫ਼ਾਈਲ ਚੁਣੋ", + "ooui-selectfile-not-supported": "ਚੁਣੀ ਗਈ ਫ਼ਾਈਲ ਖੋਲੀ ਨਹੀਂ ਜਾ ਸਕਦੀ", + "ooui-selectfile-placeholder": "ਕੋਈ ਫ਼ਾਈਲ ਚੁਣੀ ਨਹੀਂ ਗਈ", + "ooui-selectfile-dragdrop-placeholder": "ਫ਼ਾਈਲ ਇੱਥੇ ਸਿੱਟੋ" } diff --git a/resources/lib/oojs-ui/i18n/pl.json b/resources/lib/oojs-ui/i18n/pl.json index 486e87f..9ceb96f 100644 --- a/resources/lib/oojs-ui/i18n/pl.json +++ b/resources/lib/oojs-ui/i18n/pl.json @@ -29,7 +29,7 @@ "ooui-dialog-message-accept": "OK", "ooui-dialog-message-reject": "Anuluj", "ooui-dialog-process-error": "Coś poszło nie tak", - "ooui-dialog-process-dismiss": "Ukryj", + "ooui-dialog-process-dismiss": "Powrót", "ooui-dialog-process-retry": "Spróbuj ponownie", "ooui-dialog-process-continue": "Kontynuuj", "ooui-selectfile-button-select": "Wybierz plik", diff --git a/resources/lib/oojs-ui/i18n/pt.json b/resources/lib/oojs-ui/i18n/pt.json index 8379cac..8d9071a 100644 --- a/resources/lib/oojs-ui/i18n/pt.json +++ b/resources/lib/oojs-ui/i18n/pt.json @@ -10,7 +10,8 @@ "Jdforrester", "Luckas", "Vitorvicentevalente", - "SandroHc" + "SandroHc", + "Jkb8" ] }, "ooui-outline-control-move-down": "Mover item para baixo", @@ -27,5 +28,5 @@ "ooui-dialog-process-continue": "Continuar", "ooui-selectfile-not-supported": "A seleção de ficheiros não é suportada", "ooui-selectfile-placeholder": "Nenhum ficheiro selecionado", - "ooui-selectfile-dragdrop-placeholder": "Soltar ficheiro aqui (ou clicar para navegar)" + "ooui-selectfile-dragdrop-placeholder": "Soltar ficheiro aqui" } diff --git a/resources/lib/oojs-ui/i18n/qqq.json b/resources/lib/oojs-ui/i18n/qqq.json index cd9c0c2..1a096ef 100644 --- a/resources/lib/oojs-ui/i18n/qqq.json +++ b/resources/lib/oojs-ui/i18n/qqq.json @@ -35,6 +35,5 @@ "ooui-selectfile-button-select": "Label for the file selection widget's select file button", "ooui-selectfile-not-supported": "Label for the file selection widget if file selection is not supported", "ooui-selectfile-placeholder": "Label for the file selection widget when no file is currently selected", - "ooui-selectfile-dragdrop-placeholder": "Label for the file selection widget's drop target", - "ooui-semicolon-separator": "{{optional}} Semicolon used as a separator" + "ooui-selectfile-dragdrop-placeholder": "Label for the file selection widget's drop target" } diff --git a/resources/lib/oojs-ui/i18n/sr-ec.json b/resources/lib/oojs-ui/i18n/sr-ec.json index c827554..de52812 100644 --- a/resources/lib/oojs-ui/i18n/sr-ec.json +++ b/resources/lib/oojs-ui/i18n/sr-ec.json @@ -17,5 +17,7 @@ "ooui-dialog-process-error": "Нешто је пошло наопако", "ooui-dialog-process-dismiss": "Одбаци", "ooui-dialog-process-retry": "Покушај поново", - "ooui-dialog-process-continue": "Настави" + "ooui-dialog-process-continue": "Настави", + "ooui-selectfile-button-select": "Изабери датотеку", + "ooui-selectfile-placeholder": "Није изабрана ниједна датотека" } diff --git a/resources/lib/oojs-ui/i18n/vec.json b/resources/lib/oojs-ui/i18n/vec.json index 1ccc67b..ddd27c5 100644 --- a/resources/lib/oojs-ui/i18n/vec.json +++ b/resources/lib/oojs-ui/i18n/vec.json @@ -9,9 +9,14 @@ "ooui-outline-control-move-down": "Sposta in baso", "ooui-outline-control-move-up": "Sposta in sima", "ooui-toolbar-more": "Altro", + "ooui-toolgroup-expand": "Piassè", + "ooui-toolgroup-collapse": "Manco", "ooui-dialog-message-accept": "Va ben", + "ooui-dialog-message-reject": "Fa gnente", "ooui-dialog-process-error": "Xe 'ndà storto calcossa", "ooui-dialog-process-dismiss": "Scondi", "ooui-dialog-process-retry": "Proa da novo", - "ooui-dialog-process-continue": "Và vanti" + "ooui-dialog-process-continue": "Và vanti", + "ooui-selectfile-button-select": "Siegli un file", + "ooui-selectfile-dragdrop-placeholder": "Mola zo el file chì rento" } diff --git a/resources/lib/oojs-ui/i18n/vi.json b/resources/lib/oojs-ui/i18n/vi.json index ff14801..fd63081 100644 --- a/resources/lib/oojs-ui/i18n/vi.json +++ b/resources/lib/oojs-ui/i18n/vi.json @@ -20,7 +20,8 @@ "ooui-dialog-process-dismiss": "Bỏ qua", "ooui-dialog-process-retry": "Thử lại", "ooui-dialog-process-continue": "Tiếp tục", + "ooui-selectfile-button-select": "Chọn tập tin", "ooui-selectfile-not-supported": "Không hỗ trợ việc chọn tập tin", "ooui-selectfile-placeholder": "Không có tập tin nào được chọn", - "ooui-selectfile-dragdrop-placeholder": "Thả tập tin vào đây (hoặc nhấn chuột để duyệt)" + "ooui-selectfile-dragdrop-placeholder": "Thả tập tin vào đây" } diff --git a/resources/lib/oojs-ui/i18n/yue.json b/resources/lib/oojs-ui/i18n/yue.json index 7d4e710..629528d 100644 --- a/resources/lib/oojs-ui/i18n/yue.json +++ b/resources/lib/oojs-ui/i18n/yue.json @@ -3,7 +3,8 @@ "authors": [ "Deryck Chan", "William915", - "Shinjiman" + "Shinjiman", + "Ktchankt" ] }, "ooui-outline-control-move-down": "向下搬", @@ -11,12 +12,15 @@ "ooui-outline-control-remove": "拎走", "ooui-toolbar-more": "仲有", "ooui-toolgroup-expand": "更多", + "ooui-toolgroup-collapse": "少啲", "ooui-dialog-message-accept": "好", "ooui-dialog-message-reject": "取消", "ooui-dialog-process-error": "唔對路", "ooui-dialog-process-dismiss": "閂咗佢", "ooui-dialog-process-retry": "再試過", "ooui-dialog-process-continue": "繼續", + "ooui-selectfile-button-select": "揀檔案", "ooui-selectfile-not-supported": "未有文件選擇功能", - "ooui-selectfile-placeholder": "無揀到文件" + "ooui-selectfile-placeholder": "無揀到文件", + "ooui-selectfile-dragdrop-placeholder": "放檔案響度" } diff --git a/resources/lib/oojs-ui/oojs-ui-apex-noimages.css b/resources/lib/oojs-ui/oojs-ui-apex-noimages.css index ede6ea9..5012934 100644 --- a/resources/lib/oojs-ui/oojs-ui-apex-noimages.css +++ b/resources/lib/oojs-ui/oojs-ui-apex-noimages.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.12.8 + * OOjs UI v0.12.12 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2015 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2015-09-08T20:56:08Z + * Date: 2015-10-13T20:38:26Z */ @-webkit-keyframes oo-ui-progressBarWidget-slide { from { @@ -589,57 +589,57 @@ right: 18em; bottom: 18em; } -.oo-ui-menuLayout.oo-ui-menuLayout-hideMenu .oo-ui-menuLayout-menu { +.oo-ui-menuLayout.oo-ui-menuLayout-hideMenu > .oo-ui-menuLayout-menu { width: 0 !important; height: 0 !important; overflow: hidden; } -.oo-ui-menuLayout.oo-ui-menuLayout-hideMenu .oo-ui-menuLayout-content { +.oo-ui-menuLayout.oo-ui-menuLayout-hideMenu > .oo-ui-menuLayout-content { top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; } -.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-top .oo-ui-menuLayout-menu { +.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-top > .oo-ui-menuLayout-menu { width: auto !important; left: 0; top: 0; right: 0; } -.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-top .oo-ui-menuLayout-content { +.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-top > .oo-ui-menuLayout-content { right: 0 !important; bottom: 0 !important; left: 0 !important; } -.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-after .oo-ui-menuLayout-menu { +.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-after > .oo-ui-menuLayout-menu { height: auto !important; top: 0; right: 0; bottom: 0; } -.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-after .oo-ui-menuLayout-content { +.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-after > .oo-ui-menuLayout-content { bottom: 0 !important; left: 0 !important; top: 0 !important; } -.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-bottom .oo-ui-menuLayout-menu { +.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-bottom > .oo-ui-menuLayout-menu { width: auto !important; right: 0; bottom: 0; left: 0; } -.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-bottom .oo-ui-menuLayout-content { +.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-bottom > .oo-ui-menuLayout-content { left: 0 !important; top: 0 !important; right: 0 !important; } -.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-before .oo-ui-menuLayout-menu { +.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-before > .oo-ui-menuLayout-menu { height: auto !important; bottom: 0; left: 0; top: 0; } -.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-before .oo-ui-menuLayout-content { +.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-before > .oo-ui-menuLayout-content { top: 0 !important; right: 0 !important; bottom: 0 !important; @@ -772,6 +772,7 @@ display: inline; } .oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-disabled > .oo-ui-tool-link { + outline: 0; cursor: default; } .oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool { @@ -815,6 +816,9 @@ .oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-tool-active.oo-ui-widget-enabled + .oo-ui-tool-active.oo-ui-widget-enabled { border-left-color: rgba(0, 0, 0, 0.1); } +.oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-disabled > .oo-ui-tool-link:focus { + outline: 0; +} .oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-disabled > .oo-ui-tool-link .oo-ui-tool-title { color: #cccccc; } @@ -823,6 +827,12 @@ } .oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-enabled:hover > .oo-ui-tool-link .oo-ui-iconElement-icon { opacity: 1; +} +.oo-ui-barToolGroup.oo-ui-widget-disabled > .oo-ui-toolGroup-tools > .oo-ui-tool:focus { + outline: 0; +} +.oo-ui-barToolGroup.oo-ui-widget-disabled > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link:focus { + outline: 0; } .oo-ui-barToolGroup.oo-ui-widget-disabled > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link .oo-ui-tool-title { color: #cccccc; @@ -844,6 +854,7 @@ position: absolute; } .oo-ui-popupToolGroup.oo-ui-widget-disabled .oo-ui-popupToolGroup-handle { + outline: 0; cursor: default; } .oo-ui-popupToolGroup .oo-ui-toolGroup-tools { @@ -1792,10 +1803,6 @@ .oo-ui-textInputWidget textarea.oo-ui-pendingElement-pending { background-color: transparent; } -.oo-ui-textInputWidget-decorated input, -.oo-ui-textInputWidget-decorated textarea { - padding-left: 2em; -} .oo-ui-textInputWidget-icon { width: 2em; } @@ -1830,15 +1837,15 @@ } .oo-ui-textInputWidget.oo-ui-iconElement input, .oo-ui-textInputWidget.oo-ui-iconElement textarea { - padding-left: 2em; + padding-left: 2.475em; } .oo-ui-textInputWidget.oo-ui-iconElement .oo-ui-iconElement-icon { width: 1.875em; - margin-left: 0.1em; + margin-left: 0.3em; } .oo-ui-textInputWidget.oo-ui-indicatorElement input, .oo-ui-textInputWidget.oo-ui-indicatorElement textarea { - padding-right: 1.5em; + padding-right: 2.4875em; } .oo-ui-textInputWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator { width: 0.9375em; @@ -1850,10 +1857,10 @@ color: #888888; } .oo-ui-textInputWidget-labelPosition-after.oo-ui-indicatorElement > .oo-ui-labelElement-label { - margin-right: 1.6em; + margin-right: 2.0875em; } .oo-ui-textInputWidget-labelPosition-before.oo-ui-iconElement > .oo-ui-labelElement-label { - margin-left: 2.1em; + margin-left: 2.075em; } .oo-ui-menuSelectWidget { position: absolute; @@ -1964,6 +1971,9 @@ border-color: #dddddd; background-color: #f3f3f3; } +.oo-ui-dropdownWidget.oo-ui-widget-disabled .oo-ui-dropdownWidget-handle:focus { + outline: 0; +} .oo-ui-dropdownWidget.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator { opacity: 0.2; } @@ -2024,6 +2034,9 @@ right: 0; text-overflow: ellipsis; } +.oo-ui-selectFileWidget-info > .oo-ui-selectFileWidget-label > .oo-ui-selectFileWidget-fileType { + float: right; +} .oo-ui-selectFileWidget-info > .oo-ui-indicatorElement-indicator, .oo-ui-selectFileWidget-info > .oo-ui-iconElement-icon, .oo-ui-selectFileWidget-info > .oo-ui-selectFileWidget-clearButton { @@ -2057,9 +2070,9 @@ right: 0; } .oo-ui-selectFileWidget-info > .oo-ui-iconElement-icon { - left: 0.25em; + left: 0; } -.oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-label { +.oo-ui-selectFileWidget-info > .oo-ui-selectFileWidget-label { line-height: 2.3em; margin: 0; overflow: hidden; @@ -2071,23 +2084,28 @@ left: 0.5em; right: 0.5em; } -.oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-clearButton { +.oo-ui-selectFileWidget-info > .oo-ui-selectFileWidget-label > .oo-ui-selectFileWidget-fileType { + color: #888888; +} +.oo-ui-selectFileWidget-info > .oo-ui-selectFileWidget-clearButton { top: 0; width: 1.875em; - height: 1.875em; - margin: 0.3em; + margin-right: 0; +} +.oo-ui-selectFileWidget-info > .oo-ui-selectFileWidget-clearButton .oo-ui-buttonElement-button > .oo-ui-iconElement-icon { + height: 2.3em; } .oo-ui-selectFileWidget-info > .oo-ui-indicatorElement-indicator { top: 0; width: 0.9375em; - height: 0.9375em; - margin: 0.775em; + height: 2.3em; + margin-right: 0.775em; } .oo-ui-selectFileWidget-info > .oo-ui-iconElement-icon { top: 0; width: 1.875em; - height: 1.875em; - margin: 0.3em; + height: 2.3em; + margin-left: 0.3em; } .oo-ui-selectFileWidget.oo-ui-widget-disabled .oo-ui-selectFileWidget-info { color: #cccccc; @@ -2103,23 +2121,23 @@ color: #cccccc; } .oo-ui-selectFileWidget.oo-ui-iconElement .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-label { - left: 2.75em; + left: 2.475em; } .oo-ui-selectFileWidget .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-label { - right: 3em; + right: 2.175em; } .oo-ui-selectFileWidget .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-clearButton { right: 0; } .oo-ui-selectFileWidget.oo-ui-indicatorElement .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-label { - right: 5em; + right: 4.2625em; } .oo-ui-selectFileWidget.oo-ui-indicatorElement .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-clearButton { - right: 2em; + right: 2.0875em; } .oo-ui-selectFileWidget-empty .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-label, .oo-ui-selectFileWidget-notsupported .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-label { - right: 1em; + right: 0.5em; } .oo-ui-selectFileWidget-empty.oo-ui-indicatorElement .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-label, .oo-ui-selectFileWidget-notsupported.oo-ui-indicatorElement .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-label { @@ -2294,7 +2312,7 @@ width: 100%; } .oo-ui-capsuleMultiSelectWidget-handle { - background: #ffffff; + background-color: #ffffff; cursor: text; min-height: 2.4em; margin-right: 0.5em; diff --git a/resources/lib/oojs-ui/oojs-ui-apex.js b/resources/lib/oojs-ui/oojs-ui-apex.js index 83452d0..dab3c78 100644 --- a/resources/lib/oojs-ui/oojs-ui-apex.js +++ b/resources/lib/oojs-ui/oojs-ui-apex.js @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.12.8 + * OOjs UI v0.12.12 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2015 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2015-09-08T20:55:55Z + * Date: 2015-10-13T20:38:18Z */ /** * @class diff --git a/resources/lib/oojs-ui/oojs-ui-mediawiki-noimages.css b/resources/lib/oojs-ui/oojs-ui-mediawiki-noimages.css index 87ae9a5..a19ebea 100644 --- a/resources/lib/oojs-ui/oojs-ui-mediawiki-noimages.css +++ b/resources/lib/oojs-ui/oojs-ui-mediawiki-noimages.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.12.8 + * OOjs UI v0.12.12 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2015 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2015-09-08T20:56:08Z + * Date: 2015-10-13T20:38:26Z */ @-webkit-keyframes oo-ui-progressBarWidget-slide { from { @@ -107,6 +107,7 @@ } .oo-ui-buttonElement > .oo-ui-buttonElement-button { font-weight: bold; + text-decoration: none; } .oo-ui-buttonElement.oo-ui-iconElement > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon { margin-left: 0; @@ -114,7 +115,6 @@ .oo-ui-buttonElement.oo-ui-indicatorElement > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator { width: 0.9375em; height: 0.9375em; - margin: 0.46875em; } .oo-ui-buttonElement.oo-ui-iconElement > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator { margin-left: 0.46875em; @@ -186,19 +186,29 @@ .oo-ui-buttonElement-frameless.oo-ui-widget-disabled > .oo-ui-buttonElement-button { color: #cccccc; } +.oo-ui-buttonElement-frameless.oo-ui-widget-disabled > .oo-ui-buttonElement-button:focus { + box-shadow: none; +} .oo-ui-buttonElement-frameless.oo-ui-widget-disabled > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon, .oo-ui-buttonElement-frameless.oo-ui-widget-disabled > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator { opacity: 0.2; } +.oo-ui-buttonElement-framed.oo-ui-iconElement.oo-ui-labelElement > .oo-ui-buttonElement-button, +.oo-ui-buttonElement-framed.oo-ui-iconElement.oo-ui-indicatorElement > .oo-ui-buttonElement-button { + padding-left: 2.4em; +} .oo-ui-buttonElement-framed > .oo-ui-buttonElement-button { margin: 0.1em 0; - padding: 0.2em 0.8em; + padding: 0.5em 1em; + min-height: 1.2em; + min-width: 1em; border-radius: 2px; - -webkit-transition: background 100ms ease, color 100ms ease, box-shadow 100ms ease; - -moz-transition: background 100ms ease, color 100ms ease, box-shadow 100ms ease; - -ms-transition: background 100ms ease, color 100ms ease, box-shadow 100ms ease; - -o-transition: background 100ms ease, color 100ms ease, box-shadow 100ms ease; - transition: background 100ms ease, color 100ms ease, box-shadow 100ms ease; + position: relative; + -webkit-transition: background 100ms ease, color 100ms ease, border-color 100ms ease, box-shadow 100ms ease; + -moz-transition: background 100ms ease, color 100ms ease, border-color 100ms ease, box-shadow 100ms ease; + -ms-transition: background 100ms ease, color 100ms ease, border-color 100ms ease, box-shadow 100ms ease; + -o-transition: background 100ms ease, color 100ms ease, border-color 100ms ease, box-shadow 100ms ease; + transition: background 100ms ease, color 100ms ease, border-color 100ms ease, box-shadow 100ms ease; } .oo-ui-buttonElement-framed > .oo-ui-buttonElement-button:hover, .oo-ui-buttonElement-framed > .oo-ui-buttonElement-button:focus { @@ -206,24 +216,28 @@ } .oo-ui-buttonElement-framed > input.oo-ui-buttonElement-button, .oo-ui-buttonElement-framed.oo-ui-labelElement > .oo-ui-buttonElement-button > .oo-ui-labelElement-label { - line-height: 1.875em; + line-height: 1.2em; + display: inline-block; } .oo-ui-buttonElement-framed.oo-ui-iconElement > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon { - margin-left: -0.5em; - margin-right: -0.5em; + position: absolute; + top: 0.2em; + left: 0.5625em; } -.oo-ui-buttonElement-framed.oo-ui-iconElement.oo-ui-labelElement > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon { - margin-right: 0.3em; +.oo-ui-buttonElement-framed.oo-ui-iconElement.oo-ui-labelElement > .oo-ui-buttonElement-button > .oo-ui-labelElement-label { + margin-left: 0.3em; } .oo-ui-buttonElement-framed.oo-ui-indicatorElement > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator { - /* -0.5 - 0.475 */ - margin-left: -0.005em; - margin-right: -0.005em; + display: inline-block; } .oo-ui-buttonElement-framed.oo-ui-indicatorElement.oo-ui-labelElement > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator, .oo-ui-buttonElement-framed.oo-ui-indicatorElement.oo-ui-iconElement:not( .oo-ui-labelElement ) > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator { margin-left: 0.46875em; margin-right: -0.275em; +} +.oo-ui-buttonElement-framed.oo-ui-indicatorElement.oo-ui-labelElement > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator { + position: relative; + left: 0.2em; } .oo-ui-buttonElement-framed.oo-ui-widget-disabled > .oo-ui-buttonElement-button { color: #ffffff; @@ -478,6 +492,12 @@ .oo-ui-indexLayout-stackLayout > .oo-ui-panelLayout { padding: 1.5em; } +.oo-ui-indexLayout > .oo-ui-menuLayout-menu { + height: 2.75em; +} +.oo-ui-indexLayout > .oo-ui-menuLayout-content { + top: 2.75em; +} .oo-ui-fieldLayout { display: block; margin-bottom: 1em; @@ -667,57 +687,57 @@ right: 18em; bottom: 18em; } -.oo-ui-menuLayout.oo-ui-menuLayout-hideMenu .oo-ui-menuLayout-menu { +.oo-ui-menuLayout.oo-ui-menuLayout-hideMenu > .oo-ui-menuLayout-menu { width: 0 !important; height: 0 !important; overflow: hidden; } -.oo-ui-menuLayout.oo-ui-menuLayout-hideMenu .oo-ui-menuLayout-content { +.oo-ui-menuLayout.oo-ui-menuLayout-hideMenu > .oo-ui-menuLayout-content { top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; } -.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-top .oo-ui-menuLayout-menu { +.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-top > .oo-ui-menuLayout-menu { width: auto !important; left: 0; top: 0; right: 0; } -.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-top .oo-ui-menuLayout-content { +.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-top > .oo-ui-menuLayout-content { right: 0 !important; bottom: 0 !important; left: 0 !important; } -.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-after .oo-ui-menuLayout-menu { +.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-after > .oo-ui-menuLayout-menu { height: auto !important; top: 0; right: 0; bottom: 0; } -.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-after .oo-ui-menuLayout-content { +.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-after > .oo-ui-menuLayout-content { bottom: 0 !important; left: 0 !important; top: 0 !important; } -.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-bottom .oo-ui-menuLayout-menu { +.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-bottom > .oo-ui-menuLayout-menu { width: auto !important; right: 0; bottom: 0; left: 0; } -.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-bottom .oo-ui-menuLayout-content { +.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-bottom > .oo-ui-menuLayout-content { left: 0 !important; top: 0 !important; right: 0 !important; } -.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-before .oo-ui-menuLayout-menu { +.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-before > .oo-ui-menuLayout-menu { height: auto !important; bottom: 0; left: 0; top: 0; } -.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-before .oo-ui-menuLayout-content { +.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-before > .oo-ui-menuLayout-content { top: 0 !important; right: 0 !important; bottom: 0 !important; @@ -842,6 +862,7 @@ display: inline; } .oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-disabled > .oo-ui-tool-link { + outline: 0; cursor: default; } .oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link { @@ -909,6 +930,7 @@ position: absolute; } .oo-ui-popupToolGroup.oo-ui-widget-disabled .oo-ui-popupToolGroup-handle { + outline: 0; cursor: default; } .oo-ui-popupToolGroup .oo-ui-toolGroup-tools { @@ -1307,9 +1329,6 @@ display: inline-block; vertical-align: middle; } -.oo-ui-buttonOptionWidget .oo-ui-buttonElement-button { - height: 1.875em; -} .oo-ui-buttonOptionWidget.oo-ui-iconElement .oo-ui-iconElement-icon { margin-top: 0; } @@ -1520,6 +1539,7 @@ .oo-ui-toggleSwitchWidget.oo-ui-widget-disabled { background: #dddddd; border-color: #dddddd; + outline: 0; } .oo-ui-toggleSwitchWidget.oo-ui-widget-disabled .oo-ui-toggleSwitchWidget-grip { background: #ffffff; @@ -1596,7 +1616,7 @@ border: 1px solid #aaaaaa; border-radius: 0.2em; background-color: #ffffff; - box-shadow: inset 0 -0.2em 0 0 rgba(0, 0, 0, 0.2); + box-shadow: 0 0.15em 0 0 rgba(0, 0, 0, 0.15); } .oo-ui-popupWidget-anchored .oo-ui-popupWidget-popup { margin-top: 9px; @@ -1686,13 +1706,13 @@ opacity: 0; z-index: 1; position: relative; + cursor: pointer; margin: 0; width: 1.6em; height: 1.6em; max-width: none; } .oo-ui-checkboxInputWidget input[type="checkbox"] + span { - cursor: pointer; -webkit-transition: background-size 200ms cubic-bezier(0.175, 0.885, 0.32, 1.275); -moz-transition: background-size 200ms cubic-bezier(0.175, 0.885, 0.32, 1.275); -ms-transition: background-size 200ms cubic-bezier(0.175, 0.885, 0.32, 1.275); @@ -1768,6 +1788,9 @@ -moz-box-sizing: border-box; box-sizing: border-box; border: 1px solid #cccccc; + border-radius: 0.1em; + padding-left: 1em; + vertical-align: middle; } .oo-ui-dropdownInputWidget.oo-ui-widget-enabled select:hover, .oo-ui-dropdownInputWidget.oo-ui-widget-enabled select:focus { @@ -1792,13 +1815,13 @@ opacity: 0; z-index: 1; position: relative; + cursor: pointer; margin: 0; width: 1.6em; height: 1.6em; max-width: none; } .oo-ui-radioInputWidget input[type="radio"] + span { - cursor: pointer; -webkit-transition: background-size 200ms cubic-bezier(0.175, 0.885, 0.32, 1.275); -moz-transition: background-size 200ms cubic-bezier(0.175, 0.885, 0.32, 1.275); -ms-transition: background-size 200ms cubic-bezier(0.175, 0.885, 0.32, 1.275); @@ -1952,10 +1975,6 @@ .oo-ui-textInputWidget textarea.oo-ui-pendingElement-pending { background-color: transparent; } -.oo-ui-textInputWidget-decorated input, -.oo-ui-textInputWidget-decorated textarea { - padding-left: 2em; -} .oo-ui-textInputWidget-icon { width: 2em; } @@ -2010,18 +2029,18 @@ } .oo-ui-textInputWidget.oo-ui-iconElement input, .oo-ui-textInputWidget.oo-ui-iconElement textarea { - padding-left: 2.75em; + padding-left: 2.875em; } .oo-ui-textInputWidget.oo-ui-iconElement .oo-ui-iconElement-icon { - left: 0.4em; + left: 0; width: 1.875em; - margin-left: 0.1em; + margin-left: 0.5em; height: 100%; background-position: right center; } .oo-ui-textInputWidget.oo-ui-indicatorElement input, .oo-ui-textInputWidget.oo-ui-indicatorElement textarea { - padding-right: 1.875em; + padding-right: 2.4875em; } .oo-ui-textInputWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator { width: 0.9375em; @@ -2034,10 +2053,10 @@ color: #888888; } .oo-ui-textInputWidget-labelPosition-after.oo-ui-indicatorElement > .oo-ui-labelElement-label { - margin-right: 2em; + margin-right: 2.0875em; } .oo-ui-textInputWidget-labelPosition-before.oo-ui-iconElement > .oo-ui-labelElement-label { - margin-left: 2.5em; + margin-right: 2.475em; } .oo-ui-menuSelectWidget { position: absolute; @@ -2045,8 +2064,7 @@ margin-top: -1px; border: 1px solid #aaaaaa; border-radius: 0 0 0.2em 0.2em; - padding-bottom: 0.25em; - box-shadow: inset 0 -0.2em 0 0 rgba(0, 0, 0, 0.2), 0 0.1em 0 0 rgba(0, 0, 0, 0.2); + box-shadow: 0 0.15em 0 0 rgba(0, 0, 0, 0.15); } .oo-ui-menuSelectWidget input { position: absolute; @@ -2124,6 +2142,7 @@ } .oo-ui-dropdownWidget-handle { padding: 0.5em 0; + height: 2.275em; border: 1px solid #cccccc; border-radius: 0.1em; } @@ -2157,6 +2176,9 @@ text-shadow: 0 1px 1px #ffffff; border-color: #dddddd; background-color: #f3f3f3; +} +.oo-ui-dropdownWidget.oo-ui-widget-disabled .oo-ui-dropdownWidget-handle:focus { + outline: 0; } .oo-ui-dropdownWidget.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator { opacity: 0.2; @@ -2221,6 +2243,9 @@ right: 0; text-overflow: ellipsis; } +.oo-ui-selectFileWidget-info > .oo-ui-selectFileWidget-label > .oo-ui-selectFileWidget-fileType { + float: right; +} .oo-ui-selectFileWidget-info > .oo-ui-indicatorElement-indicator, .oo-ui-selectFileWidget-info > .oo-ui-iconElement-icon, .oo-ui-selectFileWidget-info > .oo-ui-selectFileWidget-clearButton { @@ -2254,9 +2279,9 @@ right: 0; } .oo-ui-selectFileWidget-info > .oo-ui-iconElement-icon { - left: 0.25em; + left: 0; } -.oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-label { +.oo-ui-selectFileWidget-info > .oo-ui-selectFileWidget-label { line-height: 2.3em; margin: 0; overflow: hidden; @@ -2265,26 +2290,31 @@ -moz-box-sizing: border-box; box-sizing: border-box; text-overflow: ellipsis; - left: 1em; - right: 1em; + left: 0.5em; + right: 0.5em; } -.oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-clearButton { +.oo-ui-selectFileWidget-info > .oo-ui-selectFileWidget-label > .oo-ui-selectFileWidget-fileType { + color: #888888; +} +.oo-ui-selectFileWidget-info > .oo-ui-selectFileWidget-clearButton { top: 0; width: 1.875em; - height: 1.875em; - margin: 0.3em; + margin-right: 0; +} +.oo-ui-selectFileWidget-info > .oo-ui-selectFileWidget-clearButton .oo-ui-buttonElement-button > .oo-ui-iconElement-icon { + height: 2.3em; } .oo-ui-selectFileWidget-info > .oo-ui-indicatorElement-indicator { top: 0; width: 0.9375em; - height: 0.9375em; - margin: 0.775em; + height: 2.3em; + margin-right: 0.775em; } .oo-ui-selectFileWidget-info > .oo-ui-iconElement-icon { top: 0; width: 1.875em; - height: 1.875em; - margin: 0.3em; + height: 2.3em; + margin-left: 0.5em; } .oo-ui-selectFileWidget.oo-ui-widget-disabled .oo-ui-selectFileWidget-info { color: #cccccc; @@ -2300,23 +2330,23 @@ color: #cccccc; } .oo-ui-selectFileWidget.oo-ui-iconElement .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-label { - left: 2.75em; + left: 2.875em; } .oo-ui-selectFileWidget .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-label { - right: 3em; + right: 2.375em; } .oo-ui-selectFileWidget .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-clearButton { right: 0; } .oo-ui-selectFileWidget.oo-ui-indicatorElement .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-label { - right: 5em; + right: 4.4625em; } .oo-ui-selectFileWidget.oo-ui-indicatorElement .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-clearButton { - right: 2em; + right: 2.0875em; } .oo-ui-selectFileWidget-empty .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-label, .oo-ui-selectFileWidget-notsupported .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-label { - right: 1em; + right: 0.5em; } .oo-ui-selectFileWidget-empty.oo-ui-indicatorElement .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-label, .oo-ui-selectFileWidget-notsupported.oo-ui-indicatorElement .oo-ui-selectFileWidget-info .oo-ui-selectFileWidget-label { @@ -2489,7 +2519,7 @@ width: 100%; } .oo-ui-capsuleMultiSelectWidget-handle { - background: #ffffff; + background-color: #ffffff; cursor: text; min-height: 2.4em; margin-right: 0.5em; @@ -2932,34 +2962,10 @@ font-weight: bold; line-height: 1.875em; } -.oo-ui-processDialog-actions-safe .oo-ui-actionWidget .oo-ui-buttonElement-button, -.oo-ui-processDialog-actions-primary .oo-ui-actionWidget .oo-ui-buttonElement-button, -.oo-ui-processDialog-actions-other .oo-ui-actionWidget .oo-ui-buttonElement-button { - min-width: 1.875em; - min-height: 1.875em; -} -.oo-ui-processDialog-actions-safe .oo-ui-actionWidget .oo-ui-labelElement-label, -.oo-ui-processDialog-actions-primary .oo-ui-actionWidget .oo-ui-labelElement-label, -.oo-ui-processDialog-actions-other .oo-ui-actionWidget .oo-ui-labelElement-label { - line-height: 1.875em; -} -.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-iconElement .oo-ui-iconElement-icon, -.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-iconElement .oo-ui-iconElement-icon, -.oo-ui-processDialog-actions-other .oo-ui-actionWidget.oo-ui-iconElement .oo-ui-iconElement-icon { - margin-top: -0.125em; -} .oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-framed, .oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-framed, .oo-ui-processDialog-actions-other .oo-ui-actionWidget.oo-ui-buttonElement-framed { - margin: 0.75em; -} -.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-framed .oo-ui-buttonElement-button, -.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-framed .oo-ui-buttonElement-button, -.oo-ui-processDialog-actions-other .oo-ui-actionWidget.oo-ui-buttonElement-framed .oo-ui-buttonElement-button { - padding: 0 1em; - vertical-align: middle; - /* Adjust for border so text aligns with title */ - margin: -1px; + margin: 0.5em; } .oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-frameless, .oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-frameless, @@ -2972,40 +2978,45 @@ padding: 0.75em 1em; vertical-align: middle; } -.oo-ui-processDialog-actions-safe .oo-ui-actionWidget:hover, -.oo-ui-processDialog-actions-primary .oo-ui-actionWidget:hover { +.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-frameless .oo-ui-labelElement-label, +.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-frameless .oo-ui-labelElement-label, +.oo-ui-processDialog-actions-other .oo-ui-actionWidget.oo-ui-buttonElement-frameless .oo-ui-labelElement-label { + line-height: 1.875em; +} +.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-frameless:hover, +.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-frameless:hover { background-color: rgba(0, 0, 0, 0.05); } -.oo-ui-processDialog-actions-safe .oo-ui-actionWidget:active, -.oo-ui-processDialog-actions-primary .oo-ui-actionWidget:active { +.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-frameless:active, +.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-frameless:active { background-color: rgba(0, 0, 0, 0.1); } -.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-progressive:hover, -.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-progressive:hover { +.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-progressive:hover, +.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-progressive:hover { background-color: rgba(8, 126, 204, 0.05); } -.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-progressive:active, -.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-progressive:active { +.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-progressive:active, +.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-progressive:active { background-color: rgba(8, 126, 204, 0.1); } -.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-progressive .oo-ui-labelElement-label, -.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-progressive .oo-ui-labelElement-label { +.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-progressive .oo-ui-labelElement-label, +.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-progressive .oo-ui-labelElement-label { font-weight: bold; } -.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-constructive:hover, -.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-constructive:hover { +.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-constructive:hover, +.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-constructive:hover { background-color: rgba(118, 171, 54, 0.05); } -.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-constructive:active, -.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-constructive:active { +.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-constructive:active, +.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-constructive:active { background-color: rgba(118, 171, 54, 0.1); } -.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-destructive:hover, -.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-destructive:hover { +.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-destructive:hover, +.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-destructive:hover { background-color: rgba(212, 83, 83, 0.05); } -.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-destructive:active, -.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-destructive:active { +.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-destructive:active, +.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-destructive:active { background-color: rgba(212, 83, 83, 0.1); } .oo-ui-processDialog-actions-other .oo-ui-actionWidget.oo-ui-buttonElement { diff --git a/resources/lib/oojs-ui/oojs-ui-mediawiki.js b/resources/lib/oojs-ui/oojs-ui-mediawiki.js index a291570..e6344f2 100644 --- a/resources/lib/oojs-ui/oojs-ui-mediawiki.js +++ b/resources/lib/oojs-ui/oojs-ui-mediawiki.js @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.12.8 + * OOjs UI v0.12.12 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2015 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2015-09-08T20:55:55Z + * Date: 2015-10-13T20:38:18Z */ /** * @class @@ -30,7 +30,7 @@ */ OO.ui.MediaWikiTheme.prototype.getElementClasses = function ( element ) { // Parent method - var variant, + var variant, isFramed, isActive, variants = { warning: false, invert: false, @@ -39,13 +39,13 @@ destructive: false }, // Parent method - classes = OO.ui.MediaWikiTheme.parent.prototype.getElementClasses.call( this, element ), - isFramed; + classes = OO.ui.MediaWikiTheme.parent.prototype.getElementClasses.call( this, element ); if ( element.supports( [ 'hasFlag' ] ) ) { isFramed = element.supports( [ 'isFramed' ] ) && element.isFramed(); + isActive = element.supports( [ 'isActive' ] ) && element.isActive(); if ( - ( isFramed && ( element.isDisabled() || element.hasFlag( 'primary' ) ) ) || + ( isFramed && ( isActive || element.isDisabled() || element.hasFlag( 'primary' ) ) ) || ( !isFramed && element.hasFlag( 'primary' ) ) ) { variants.invert = true; diff --git a/resources/lib/oojs-ui/oojs-ui.js b/resources/lib/oojs-ui/oojs-ui.js index 81677ed..aeff69e 100644 --- a/resources/lib/oojs-ui/oojs-ui.js +++ b/resources/lib/oojs-ui/oojs-ui.js @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.12.8 + * OOjs UI v0.12.12 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2015 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2015-09-08T20:55:55Z + * Date: 2015-10-13T20:38:18Z */ ( function ( OO ) { @@ -67,30 +67,79 @@ * @return {boolean} */ OO.ui.isFocusableElement = function ( $element ) { - var node = $element[ 0 ], - nodeName = node.nodeName.toLowerCase(), - // Check if the element have tabindex set - isInElementGroup = /^(input|select|textarea|button|object)$/.test( nodeName ), - // Check if the element is a link with href or if it has tabindex - isOtherElement = ( - ( nodeName === 'a' && node.href ) || - !isNaN( $element.attr( 'tabindex' ) ) - ), - // Check if the element is visible - isVisible = ( - // This is quicker than calling $element.is( ':visible' ) - $.expr.filters.visible( node ) && - // Check that all parents are visible - !$element.parents().addBack().filter( function () { - return $.css( this, 'visibility' ) === 'hidden'; - } ).length - ), - isTabOk = isNaN( $element.attr( 'tabindex' ) ) || +$element.attr( 'tabindex' ) >= 0; + var nodeName, + element = $element[ 0 ]; - return ( - ( isInElementGroup ? !node.disabled : isOtherElement ) && - isVisible && isTabOk - ); + // Anything disabled is not focusable + if ( element.disabled ) { + return false; + } + + // Check if the element is visible + if ( !( + // This is quicker than calling $element.is( ':visible' ) + $.expr.filters.visible( element ) && + // Check that all parents are visible + !$element.parents().addBack().filter( function () { + return $.css( this, 'visibility' ) === 'hidden'; + } ).length + ) ) { + return false; + } + + // Check if the element is ContentEditable, which is the string 'true' + if ( element.contentEditable === 'true' ) { + return true; + } + + // Anything with a non-negative numeric tabIndex is focusable. + // Use .prop to avoid browser bugs + if ( $element.prop( 'tabIndex' ) >= 0 ) { + return true; + } + + // Some element types are naturally focusable + // (indexOf is much faster than regex in Chrome and about the + // same in FF: https://jsperf.com/regex-vs-indexof-array2) + nodeName = element.nodeName.toLowerCase(); + if ( [ 'input', 'select', 'textarea', 'button', 'object' ].indexOf( nodeName ) !== -1 ) { + return true; + } + + // Links and areas are focusable if they have an href + if ( ( nodeName === 'a' || nodeName === 'area' ) && $element.attr( 'href' ) !== undefined ) { + return true; + } + + return false; +}; + +/** + * Find a focusable child + * + * @param {jQuery} $container Container to search in + * @param {boolean} [backwards] Search backwards + * @return {jQuery} Focusable child, an empty jQuery object if none found + */ +OO.ui.findFocusable = function ( $container, backwards ) { + var $focusable = $( [] ), + // $focusableCandidates is a superset of things that + // could get matched by isFocusableElement + $focusableCandidates = $container + .find( 'input, select, textarea, button, object, a, area, [contenteditable], [tabindex]' ); + + if ( backwards ) { + $focusableCandidates = Array.prototype.reverse.call( $focusableCandidates ); + } + + $focusableCandidates.each( function () { + var $this = $( this ); + if ( OO.ui.isFocusableElement( $this ) ) { + $focusable = $this; + return false; + } + } ); + return $focusable; }; /** @@ -286,9 +335,7 @@ // Label for the file selection widget when no file is currently selected 'ooui-selectfile-placeholder': 'No file is selected', // Label for the file selection widget's drop target - 'ooui-selectfile-dragdrop-placeholder': 'Drop file here', - // Semicolon separator - 'ooui-semicolon-separator': '; ' + 'ooui-selectfile-dragdrop-placeholder': 'Drop file here' }; /** @@ -1058,7 +1105,8 @@ * @cfg {Array} [content] An array of content elements to append (after #text). * Strings will be html-escaped; use an OO.ui.HtmlSnippet to append raw HTML. * Instances of OO.ui.Element will have their $element appended. - * @cfg {jQuery} [$content] Content elements to append (after #text) + * @cfg {jQuery} [$content] Content elements to append (after #text). + * @cfg {jQuery} [$element] Wrapper element. Defaults to a new element with #getTagName. * @cfg {Mixed} [data] Custom data of any type or combination of types (e.g., string, number, array, object). * Data can also be specified with the #setData method. */ @@ -1960,7 +2008,8 @@ /** * @event disable * - * A 'disable' event is emitted when a widget is disabled. + * A 'disable' event is emitted when the disabled state of the widget changes + * (i.e. on disable **and** enable). * * @param {boolean} disabled Widget is disabled */ @@ -2081,6 +2130,10 @@ this.$overlay = $( '<div>' ); this.$content = $( '<div>' ); + this.$focusTrapBefore = $( '<div>' ).prop( 'tabIndex', 0 ); + this.$focusTrapAfter = $( '<div>' ).prop( 'tabIndex', 0 ); + this.$focusTraps = this.$focusTrapBefore.add( this.$focusTrapAfter ); + // Initialization this.$overlay.addClass( 'oo-ui-window-overlay' ); this.$content @@ -2088,7 +2141,7 @@ .attr( 'tabindex', 0 ); this.$frame .addClass( 'oo-ui-window-frame' ) - .append( this.$content ); + .append( this.$focusTrapBefore, this.$content, this.$focusTrapAfter ); this.$element .addClass( 'oo-ui-window' ) @@ -2522,6 +2575,21 @@ }; /** + * Called when someone tries to focus the hidden element at the end of the dialog. + * Sends focus back to the start of the dialog. + * + * @param {jQuery.Event} event Focus event + */ +OO.ui.Window.prototype.onFocusTrapFocused = function ( event ) { + if ( this.$focusTrapBefore.is( event.target ) ) { + OO.ui.findFocusable( this.$content, true ).focus(); + } else { + // this.$content is the part of the focus cycle, and is the first focusable element + this.$content.focus(); + } +}; + +/** * Open the window. * * This method is a wrapper around a call to the window manager’s {@link OO.ui.WindowManager#openWindow openWindow} @@ -2580,6 +2648,9 @@ deferred = $.Deferred(); this.toggle( true ); + + this.focusTrapHandler = OO.ui.bind( this.onFocusTrapFocused, this ); + this.$focusTraps.on( 'focus', this.focusTrapHandler ); this.getSetupProcess( data ).execute().done( function () { // Force redraw by asking the browser to measure the elements' widths @@ -2663,6 +2734,7 @@ // Force redraw by asking the browser to measure the elements' widths win.$element.removeClass( 'oo-ui-window-active oo-ui-window-setup' ).width(); win.$content.removeClass( 'oo-ui-window-content-setup' ).width(); + win.$focusTraps.off( 'focus', win.focusTrapHandler ); win.toggle( false ); } ); }; @@ -4162,7 +4234,7 @@ * @param {OO.ui.Element} element Element for which to get classes * @return {Object.<string,string[]>} Categorized class names with `on` and `off` lists */ -OO.ui.Theme.prototype.getElementClasses = function ( /* element */ ) { +OO.ui.Theme.prototype.getElementClasses = function () { return { on: [], off: [] }; }; @@ -4554,18 +4626,28 @@ }; /** - * Set the button to its 'active' state. + * Set the button's active state. * * The active state occurs when a {@link OO.ui.ButtonOptionWidget ButtonOptionWidget} or * a {@link OO.ui.ToggleButtonWidget ToggleButtonWidget} is pressed. This method does nothing * for other button types. * - * @param {boolean} [value] Make button active + * @param {boolean} value Make button active * @chainable */ OO.ui.mixin.ButtonElement.prototype.setActive = function ( value ) { - this.$element.toggleClass( 'oo-ui-buttonElement-active', !!value ); + this.active = !!value; + this.$element.toggleClass( 'oo-ui-buttonElement-active', this.active ); return this; +}; + +/** + * Check if the button is active + * + * @return {boolean} The button is active + */ +OO.ui.mixin.ButtonElement.prototype.isActive = function () { + return this.active; }; /** @@ -6755,6 +6837,163 @@ }; /** + * Element that will stick under a specified container, even when it is inserted elsewhere in the + * document (for example, in a OO.ui.Window's $overlay). + * + * The elements's position is automatically calculated and maintained when window is resized or the + * page is scrolled. If you reposition the container manually, you have to call #position to make + * sure the element is still placed correctly. + * + * As positioning is only possible when both the element and the container are attached to the DOM + * and visible, it's only done after you call #togglePositioning. You might want to do this inside + * the #toggle method to display a floating popup, for example. + * + * @abstract + * @class + * + * @constructor + * @param {Object} [config] Configuration options + * @cfg {jQuery} [$floatable] Node to position, assigned to #$floatable, omit to use #$element + * @cfg {jQuery} [$floatableContainer] Node to position below + */ +OO.ui.mixin.FloatableElement = function OoUiMixinFloatableElement( config ) { + // Configuration initialization + config = config || {}; + + // Properties + this.$floatable = null; + this.$floatableContainer = null; + this.$floatableWindow = null; + this.$floatableClosestScrollable = null; + this.onFloatableScrollHandler = this.position.bind( this ); + this.onFloatableWindowResizeHandler = this.position.bind( this ); + + // Initialization + this.setFloatableContainer( config.$floatableContainer ); + this.setFloatableElement( config.$floatable || this.$element ); +}; + +/* Methods */ + +/** + * Set floatable element. + * + * If an element is already set, it will be cleaned up before setting up the new element. + * + * @param {jQuery} $floatable Element to make floatable + */ +OO.ui.mixin.FloatableElement.prototype.setFloatableElement = function ( $floatable ) { + if ( this.$floatable ) { + this.$floatable.removeClass( 'oo-ui-floatableElement-floatable' ); + this.$floatable.css( { left: '', top: '' } ); + } + + this.$floatable = $floatable.addClass( 'oo-ui-floatableElement-floatable' ); + this.position(); +}; + +/** + * Set floatable container. + * + * The element will be always positioned under the specified container. + * + * @param {jQuery|null} $floatableContainer Container to keep visible, or null to unset + */ +OO.ui.mixin.FloatableElement.prototype.setFloatableContainer = function ( $floatableContainer ) { + this.$floatableContainer = $floatableContainer; + if ( this.$floatable ) { + this.position(); + } +}; + +/** + * Toggle positioning. + * + * Do not turn positioning on until after the element is attached to the DOM and visible. + * + * @param {boolean} [positioning] Enable positioning, omit to toggle + * @chainable + */ +OO.ui.mixin.FloatableElement.prototype.togglePositioning = function ( positioning ) { + var closestScrollableOfContainer, closestScrollableOfFloatable; + + positioning = positioning === undefined ? !this.positioning : !!positioning; + + if ( this.positioning !== positioning ) { + this.positioning = positioning; + + closestScrollableOfContainer = OO.ui.Element.static.getClosestScrollableContainer( this.$floatableContainer[ 0 ] ); + closestScrollableOfFloatable = OO.ui.Element.static.getClosestScrollableContainer( this.$floatable[ 0 ] ); + if ( closestScrollableOfContainer !== closestScrollableOfFloatable ) { + // If the scrollable is the root, we have to listen to scroll events + // on the window because of browser inconsistencies (or do we? someone should verify this) + if ( $( closestScrollableOfContainer ).is( 'html, body' ) ) { + closestScrollableOfContainer = OO.ui.Element.static.getWindow( closestScrollableOfContainer ); + } + } + + if ( positioning ) { + this.$floatableWindow = $( this.getElementWindow() ); + this.$floatableWindow.on( 'resize', this.onFloatableWindowResizeHandler ); + + if ( closestScrollableOfContainer !== closestScrollableOfFloatable ) { + this.$floatableClosestScrollable = $( closestScrollableOfContainer ); + this.$floatableClosestScrollable.on( 'scroll', this.onFloatableScrollHandler ); + } + + // Initial position after visible + this.position(); + } else { + if ( this.$floatableWindow ) { + this.$floatableWindow.off( 'resize', this.onFloatableWindowResizeHandler ); + this.$floatableWindow = null; + } + + if ( this.$floatableClosestScrollable ) { + this.$floatableClosestScrollable.off( 'scroll', this.onFloatableScrollHandler ); + this.$floatableClosestScrollable = null; + } + + this.$floatable.css( { left: '', top: '' } ); + } + } + + return this; +}; + +/** + * Position the floatable below its container. + * + * This should only be done when both of them are attached to the DOM and visible. + * + * @chainable + */ +OO.ui.mixin.FloatableElement.prototype.position = function () { + var pos; + + if ( !this.positioning ) { + return this; + } + + pos = OO.ui.Element.static.getRelativePosition( this.$floatableContainer, this.$floatable.offsetParent() ); + + // Position under container + pos.top += this.$floatableContainer.height(); + this.$floatable.css( pos ); + + // We updated the position, so re-evaluate the clipping state. + // (ClippableElement does not listen to 'scroll' events on $floatableContainer's parent, and so + // will not notice the need to update itself.) + // TODO: This is terrible, we shouldn't need to know about ClippableElement at all here. Why does + // it not listen to the right events in the right places? + if ( this.clip ) { + this.clip(); + } + + return this; +}; + +/** * AccessKeyedElement is mixed into other classes to provide an `accesskey` attribute. * Accesskeys allow an user to go to a specific element by using * a shortcut combination of a browser specific keys + the key @@ -8182,7 +8421,6 @@ /** * Toggle action layout between vertical and horizontal. * - * * @private * @param {boolean} [value] Layout actions vertically, omit to toggle * @chainable @@ -8998,7 +9236,6 @@ * * $( 'body' ).append( actionFieldLayout.$element ); * - * * @class * @extends OO.ui.FieldLayout * @@ -9589,7 +9826,7 @@ * @param {number} [itemIndex] A specific item to focus on */ OO.ui.BookletLayout.prototype.focus = function ( itemIndex ) { - var $input, page, + var page, items = this.stackLayout.getItems(); if ( itemIndex !== undefined && items[ itemIndex ] ) { @@ -9606,11 +9843,8 @@ return; } // Only change the focus if is not already in the current page - if ( !page.$element.find( ':focus' ).length ) { - $input = page.$element.find( ':input:first' ); - if ( $input.length ) { - $input[ 0 ].focus(); - } + if ( !OO.ui.contains( page.$element[ 0 ], this.getElementDocument().activeElement, true ) ) { + page.focus(); } }; @@ -9619,28 +9853,7 @@ * on it. */ OO.ui.BookletLayout.prototype.focusFirstFocusable = function () { - var i, len, - found = false, - items = this.stackLayout.getItems(), - checkAndFocus = function () { - if ( OO.ui.isFocusableElement( $( this ) ) ) { - $( this ).focus(); - found = true; - return false; - } - }; - - for ( i = 0, len = items.length; i < len; i++ ) { - if ( found ) { - break; - } - // Find all potentially focusable elements in the item - // and check if they are focusable - items[ i ].$element - .find( 'input, select, textarea, button, object' ) - /* jshint loopfunc:true */ - .each( checkAndFocus ); - } + OO.ui.findFocusable( this.stackLayout.$element ).focus(); }; /** @@ -9908,7 +10121,8 @@ OO.ui.BookletLayout.prototype.setPage = function ( name ) { var selectedItem, $focused, - page = this.pages[ name ]; + page = this.pages[ name ], + previousPage = this.currentPageName && this.pages[ this.currentPageName ]; if ( name !== this.currentPageName ) { if ( this.outlined ) { @@ -9918,21 +10132,34 @@ } } if ( page ) { - if ( this.currentPageName && this.pages[ this.currentPageName ] ) { - this.pages[ this.currentPageName ].setActive( false ); - // Blur anything focused if the next page doesn't have anything focusable - this - // is not needed if the next page has something focusable because once it is focused - // this blur happens automatically - if ( this.autoFocus && !page.$element.find( ':input' ).length ) { - $focused = this.pages[ this.currentPageName ].$element.find( ':focus' ); + if ( previousPage ) { + previousPage.setActive( false ); + // Blur anything focused if the next page doesn't have anything focusable. + // This is not needed if the next page has something focusable (because once it is focused + // this blur happens automatically). If the layout is non-continuous, this check is + // meaningless because the next page is not visible yet and thus can't hold focus. + if ( + this.autoFocus && + this.stackLayout.continuous && + OO.ui.findFocusable( page.$element ).length !== 0 + ) { + $focused = previousPage.$element.find( ':focus' ); if ( $focused.length ) { $focused[ 0 ].blur(); } } } this.currentPageName = name; - this.stackLayout.setItem( page ); page.setActive( true ); + this.stackLayout.setItem( page ); + if ( !this.stackLayout.continuous && previousPage ) { + // This should not be necessary, since any inputs on the previous page should have been + // blurred when it was hidden, but browsers are not very consistent about this. + $focused = previousPage.$element.find( ':focus' ); + if ( $focused.length ) { + $focused[ 0 ].blur(); + } + } this.emit( 'set', page ); } } @@ -9969,20 +10196,13 @@ * } * OO.inheritClass( CardOneLayout, OO.ui.CardLayout ); * CardOneLayout.prototype.setupTabItem = function () { - * this.tabItem.setLabel( 'Card One' ); - * }; - * - * function CardTwoLayout( name, config ) { - * CardTwoLayout.parent.call( this, name, config ); - * this.$element.append( '<p>Second card</p>' ); - * } - * OO.inheritClass( CardTwoLayout, OO.ui.CardLayout ); - * CardTwoLayout.prototype.setupTabItem = function () { - * this.tabItem.setLabel( 'Card Two' ); + * this.tabItem.setLabel( 'Card one' ); * }; * * var card1 = new CardOneLayout( 'one' ), - * card2 = new CardTwoLayout( 'two' ); + * card2 = new CardLayout( 'two', { label: 'Card two' } ); + * + * card2.$element.append( '<p>Second card</p>' ); * * var index = new OO.ui.IndexLayout(); * @@ -9995,6 +10215,7 @@ * @constructor * @param {Object} [config] Configuration options * @cfg {boolean} [continuous=false] Show all cards, one after another + * @cfg {boolean} [expanded=true] Expand the content panel to fill the entire parent element. * @cfg {boolean} [autoFocus=true] Focus on the first focusable element when a new card is displayed. */ OO.ui.IndexLayout = function OoUiIndexLayout( config ) { @@ -10008,7 +10229,10 @@ this.currentCardName = null; this.cards = {}; this.ignoreFocus = false; - this.stackLayout = new OO.ui.StackLayout( { continuous: !!config.continuous } ); + this.stackLayout = new OO.ui.StackLayout( { + continuous: !!config.continuous, + expanded: config.expanded + } ); this.$content.append( this.stackLayout.$element ); this.autoFocus = config.autoFocus === undefined || !!config.autoFocus; @@ -10109,7 +10333,7 @@ * @param {number} [itemIndex] A specific item to focus on */ OO.ui.IndexLayout.prototype.focus = function ( itemIndex ) { - var $input, card, + var card, items = this.stackLayout.getItems(); if ( itemIndex !== undefined && items[ itemIndex ] ) { @@ -10125,12 +10349,9 @@ if ( !card ) { return; } - // Only change the focus if is not already in the current card - if ( !card.$element.find( ':focus' ).length ) { - $input = card.$element.find( ':input:first' ); - if ( $input.length ) { - $input[ 0 ].focus(); - } + // Only change the focus if is not already in the current page + if ( !OO.ui.contains( card.$element[ 0 ], this.getElementDocument().activeElement, true ) ) { + card.focus(); } }; @@ -10139,27 +10360,7 @@ * on it. */ OO.ui.IndexLayout.prototype.focusFirstFocusable = function () { - var i, len, - found = false, - items = this.stackLayout.getItems(), - checkAndFocus = function () { - if ( OO.ui.isFocusableElement( $( this ) ) ) { - $( this ).focus(); - found = true; - return false; - } - }; - - for ( i = 0, len = items.length; i < len; i++ ) { - if ( found ) { - break; - } - // Find all potentially focusable elements in the item - // and check if they are focusable - items[ i ].$element - .find( 'input, select, textarea, button, object' ) - .each( checkAndFocus ); - } + OO.ui.findFocusable( this.stackLayout.$element ).focus(); }; /** @@ -10363,7 +10564,8 @@ OO.ui.IndexLayout.prototype.setCard = function ( name ) { var selectedItem, $focused, - card = this.cards[ name ]; + card = this.cards[ name ], + previousCard = this.currentCardName && this.cards[ this.currentCardName ]; if ( name !== this.currentCardName ) { selectedItem = this.tabSelectWidget.getSelectedItem(); @@ -10371,21 +10573,34 @@ this.tabSelectWidget.selectItemByData( name ); } if ( card ) { - if ( this.currentCardName && this.cards[ this.currentCardName ] ) { - this.cards[ this.currentCardName ].setActive( false ); - // Blur anything focused if the next card doesn't have anything focusable - this - // is not needed if the next card has something focusable because once it is focused - // this blur happens automatically - if ( this.autoFocus && !card.$element.find( ':input' ).length ) { - $focused = this.cards[ this.currentCardName ].$element.find( ':focus' ); + if ( previousCard ) { + previousCard.setActive( false ); + // Blur anything focused if the next card doesn't have anything focusable. + // This is not needed if the next card has something focusable (because once it is focused + // this blur happens automatically). If the layout is non-continuous, this check is + // meaningless because the next card is not visible yet and thus can't hold focus. + if ( + this.autoFocus && + this.stackLayout.continuous && + OO.ui.findFocusable( card.$element ).length !== 0 + ) { + $focused = previousCard.$element.find( ':focus' ); if ( $focused.length ) { $focused[ 0 ].blur(); } } } this.currentCardName = name; - this.stackLayout.setItem( card ); card.setActive( true ); + this.stackLayout.setItem( card ); + if ( !this.stackLayout.continuous && previousCard ) { + // This should not be necessary, since any inputs on the previous card should have been + // blurred when it was hidden, but browsers are not very consistent about this. + $focused = previousCard.$element.find( ':focus' ); + if ( $focused.length ) { + $focused[ 0 ].blur(); + } + } this.emit( 'set', card ); } } @@ -10460,6 +10675,17 @@ OO.inheritClass( OO.ui.PanelLayout, OO.ui.Layout ); +/* Methods */ + +/** + * Focus the panel layout + * + * The default implementation just focuses the first focusable element in the panel + */ +OO.ui.PanelLayout.prototype.focus = function () { + OO.ui.findFocusable( this.$element ).focus(); +}; + /** * CardLayouts are used within {@link OO.ui.IndexLayout index layouts} to create cards that users can select and display * from the index's optional {@link OO.ui.TabSelectWidget tab} navigation. Cards are usually not instantiated directly, @@ -10475,6 +10701,7 @@ * @constructor * @param {string} name Unique symbolic name of card * @param {Object} [config] Configuration options + * @cfg {jQuery|string|Function|OO.ui.HtmlSnippet} [label] Label for card's tab */ OO.ui.CardLayout = function OoUiCardLayout( name, config ) { // Allow passing positional parameters inside the config object @@ -10491,6 +10718,7 @@ // Properties this.name = name; + this.label = config.label; this.tabItem = null; this.active = false; @@ -10576,6 +10804,9 @@ * @chainable */ OO.ui.CardLayout.prototype.setupTabItem = function () { + if ( this.label ) { + this.tabItem.setLabel( this.label ); + } return this; }; @@ -11310,8 +11541,8 @@ } if ( this.isClippedHorizontally() ) { // Anchoring to the right also caused the popup to clip, so just make it fill the container - containerWidth = this.$clippableContainer.width(); - containerLeft = this.$clippableContainer.offset().left; + containerWidth = this.$clippableScrollableContainer.width(); + containerLeft = this.$clippableScrollableContainer.offset().left; this.toggleClipping( false ); this.$element.removeClass( 'oo-ui-popupToolGroup-right' ); @@ -12119,7 +12350,6 @@ }; /** - * * @private * Handle outline change events. */ @@ -13032,6 +13262,18 @@ /* Methods */ /** + * Construct a OO.ui.CapsuleItemWidget (or a subclass thereof) from given label and data. + * + * @protected + * @param {Mixed} data Custom data of any type. + * @param {string} label The label text. + * @return {OO.ui.CapsuleItemWidget} + */ +OO.ui.CapsuleMultiSelectWidget.prototype.createItemWidget = function ( data, label ) { + return new OO.ui.CapsuleItemWidget( { data: data, label: label } ); +}; + +/** * Get the data of the items in the capsule * @return {Mixed[]} */ @@ -13071,7 +13313,7 @@ } } if ( !item ) { - item = new OO.ui.CapsuleItemWidget( { data: data, label: label } ); + item = widget.createItemWidget( data, label ); } widget.addItems( [ item ], i ); } ); @@ -13100,9 +13342,9 @@ if ( !widget.getItemFromData( data ) ) { item = menu.getItemFromData( data ); if ( item ) { - items.push( new OO.ui.CapsuleItemWidget( { data: data, label: item.label } ) ); + items.push( widget.createItemWidget( data, item.label ) ); } else if ( widget.allowArbitrary ) { - items.push( new OO.ui.CapsuleItemWidget( { data: data, label: String( data ) } ) ); + items.push( widget.createItemWidget( data, String( data ) ) ); } } } ); @@ -13224,6 +13466,9 @@ * @param {jQuery.Event} event */ OO.ui.CapsuleMultiSelectWidget.prototype.onInputBlur = function () { + if ( this.allowArbitrary && this.$input.val().trim() !== '' ) { + this.addItemsFromData( [ this.$input.val() ] ); + } this.clearInput(); }; @@ -13469,7 +13714,6 @@ keydown: this.onCloseKeyDown.bind( this ), click: this.onCloseClick.bind( this ) } ); - this.$element.on( 'click', false ); // Initialization this.$element @@ -13548,6 +13792,10 @@ * } ); * * $( 'body' ).append( dropDown.$element ); + * + * dropDown.getMenu().selectItemByData( 'b' ); + * + * dropDown.getMenu().getSelectedItem().getData(); // returns 'b' * * For more information, please see the [OOjs UI documentation on MediaWiki] [1]. * @@ -13865,11 +14113,24 @@ }; /** + * Focus the widget. + * + * Focusses the select file button. + * + * @chainable + */ +OO.ui.SelectFileWidget.prototype.focus = function () { + this.selectButton.$button[ 0 ].focus(); + return this; +}; + +/** * Update the user interface when a file is selected or unselected * * @protected */ OO.ui.SelectFileWidget.prototype.updateUI = function () { + var $label; if ( !this.isSupported ) { this.$element.addClass( 'oo-ui-selectFileWidget-notsupported' ); this.$element.removeClass( 'oo-ui-selectFileWidget-empty' ); @@ -13878,9 +14139,12 @@ this.$element.addClass( 'oo-ui-selectFileWidget-supported' ); if ( this.currentFile ) { this.$element.removeClass( 'oo-ui-selectFileWidget-empty' ); - this.setLabel( this.currentFile.name + - ( this.currentFile.type !== '' ? OO.ui.msg( 'ooui-semicolon-separator' ) + this.currentFile.type : '' ) - ); + $label = $( [] ); + if ( this.currentFile.type !== '' ) { + $label = $label.add( $( '<span>' ).addClass( 'oo-ui-selectFileWidget-fileType' ).text( this.currentFile.type ) ); + } + $label = $label.add( $( '<span>' ).text( this.currentFile.name ) ); + this.setLabel( $label ); } else { this.$element.addClass( 'oo-ui-selectFileWidget-empty' ); this.setLabel( this.placeholder ); @@ -15303,6 +15567,18 @@ } if ( config.autocomplete === false ) { this.$input.attr( 'autocomplete', 'off' ); + // Turning off autocompletion also disables "form caching" when the user navigates to a + // different page and then clicks "Back". Re-enable it when leaving. Borrowed from jQuery UI. + $( window ).on( { + beforeunload: function () { + this.$input.removeAttr( 'autocomplete' ); + }.bind( this ), + pageshow: function () { + // Browsers don't seem to actually fire this event on "Back", they instead just reload the + // whole page... it shouldn't hurt, though. + this.$input.attr( 'autocomplete', 'off' ); + }.bind( this ) + } ); } if ( this.multiline && config.rows ) { this.$input.attr( 'rows', config.rows ); @@ -16026,7 +16302,6 @@ /** * Handle mouse click events. * - * * @private * @param {jQuery.Event} e Mouse click event */ @@ -16040,7 +16315,6 @@ /** * Handle key press events. - * * * @private * @param {jQuery.Event} e Key press event @@ -16133,7 +16407,6 @@ * new OO.ui.FieldLayout( label2 ) * ] ); * $( 'body' ).append( fieldset.$element ); - * * * @class * @extends OO.ui.Widget @@ -16644,7 +16917,6 @@ * } ); * $( 'body' ).append( myDropdown.$element ); * - * * @class * @extends OO.ui.DecoratedOptionWidget * @@ -16854,6 +17126,7 @@ * @class * @extends OO.ui.Widget * @mixins OO.ui.mixin.LabelElement + * @mixins OO.ui.mixin.ClippableElement * * @constructor * @param {Object} [config] Configuration options @@ -17443,8 +17716,10 @@ * @param {string} value New value */ OO.ui.SearchWidget.prototype.onQueryEnter = function () { - // Reset - this.results.chooseItem( this.results.getHighlightedItem() ); + var highlightedItem = this.results.getHighlightedItem(); + if ( highlightedItem ) { + this.results.chooseItem( highlightedItem ); + } }; /** @@ -18166,8 +18441,10 @@ * @chainable */ OO.ui.SelectWidget.prototype.chooseItem = function ( item ) { - this.selectItem( item ); - this.emit( 'choose', item ); + if ( item ) { + this.selectItem( item ); + this.emit( 'choose', item ); + } return this; }; @@ -18748,6 +19025,7 @@ * * @class * @extends OO.ui.MenuSelectWidget + * @mixins OO.ui.mixin.FloatableElement * * @constructor * @param {OO.ui.Widget} [inputWidget] Widget to provide the menu for. @@ -18768,10 +19046,12 @@ // Parent constructor OO.ui.FloatingMenuSelectWidget.parent.call( this, config ); - // Properties + // Properties (must be set before mixin constructors) this.inputWidget = inputWidget; // For backwards compatibility this.$container = config.$container || this.inputWidget.$element; - this.onWindowResizeHandler = this.onWindowResize.bind( this ); + + // Mixins constructors + OO.ui.mixin.FloatableElement.call( this, $.extend( {}, config, { $floatableContainer: this.$container } ) ); // Initialization this.$element.addClass( 'oo-ui-floatingMenuSelectWidget' ); @@ -18782,6 +19062,7 @@ /* Setup */ OO.inheritClass( OO.ui.FloatingMenuSelectWidget, OO.ui.MenuSelectWidget ); +OO.mixinClass( OO.ui.FloatingMenuSelectWidget, OO.ui.mixin.FloatableElement ); // For backwards compatibility OO.ui.TextInputMenuSelectWidget = OO.ui.FloatingMenuSelectWidget; @@ -18789,64 +19070,25 @@ /* Methods */ /** - * Handle window resize event. - * - * @private - * @param {jQuery.Event} e Window resize event - */ -OO.ui.FloatingMenuSelectWidget.prototype.onWindowResize = function () { - this.position(); -}; - -/** * @inheritdoc */ OO.ui.FloatingMenuSelectWidget.prototype.toggle = function ( visible ) { var change; visible = visible === undefined ? !this.isVisible() : !!visible; - change = visible !== this.isVisible(); if ( change && visible ) { // Make sure the width is set before the parent method runs. - // After this we have to call this.position(); again to actually - // position ourselves correctly. - this.position(); + this.setIdealSize( this.$container.width() ); } // Parent method + // This will call this.clip(), which is nonsensical since we're not positioned yet... OO.ui.FloatingMenuSelectWidget.parent.prototype.toggle.call( this, visible ); if ( change ) { - if ( this.isVisible() ) { - this.position(); - $( this.getElementWindow() ).on( 'resize', this.onWindowResizeHandler ); - } else { - $( this.getElementWindow() ).off( 'resize', this.onWindowResizeHandler ); - } + this.togglePositioning( this.isVisible() ); } - - return this; -}; - -/** - * Position the menu. - * - * @private - * @chainable - */ -OO.ui.FloatingMenuSelectWidget.prototype.position = function () { - var $container = this.$container, - pos = OO.ui.Element.static.getRelativePosition( $container, this.$element.offsetParent() ); - - // Position under input - pos.top += $container.height(); - this.$element.css( pos ); - - // Set width - this.setIdealSize( $container.width() ); - // We updated the position, so re-evaluate the clipping state - this.clip(); return this; }; @@ -19234,7 +19476,6 @@ /** * Handle key down events. - * * * @private * @param {jQuery.Event} e Key down event diff --git a/resources/lib/oojs-ui/themes/apex/images/icons/picture.png b/resources/lib/oojs-ui/themes/apex/images/icons/picture.png index 2043424..d680396 100644 --- a/resources/lib/oojs-ui/themes/apex/images/icons/picture.png +++ b/resources/lib/oojs-ui/themes/apex/images/icons/picture.png Binary files differ diff --git a/resources/lib/oojs-ui/themes/apex/images/icons/picture.svg b/resources/lib/oojs-ui/themes/apex/images/icons/picture.svg index 24d7315..246e130 100644 --- a/resources/lib/oojs-ui/themes/apex/images/icons/picture.svg +++ b/resources/lib/oojs-ui/themes/apex/images/icons/picture.svg @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> <g id="picture"> - <path id="frame" d="M18 4H6c-2-.007-3 .993-3 2.993L3.014 16C3 18 4 18.988 6 19h12c2-.012 2.994-1 3-3.006v-9c-.006-2-1-3-3-2.994zm1 13H5V6h14v11z"/> - <path id="mountains" d="M6 13.5L9.5 10l2.328 2.312-1.312 1.094.875 1.032L15.5 11l2.5 2v3H6z"/> - <path id="sky" d="M6 12l3.516-4.156 3.046 3.172L15.5 9l2.5 2V7H6z"/> + <path id="frame" d="M4 5v13h16v-13zm15 12h-14v-11h14z"/> + <path id="mountains" d="M9.5 10l2.328 2.312-1.312 1.094.875 1.032 4.109-3.438 2.5 2v3h-12v-2.5z"/> + <path id="sky" d="M9.516 7.844l3.046 3.172 2.938-2.016 2.5 2v-4h-12v5z"/> </g> </svg> diff --git a/resources/lib/oojs-ui/themes/apex/images/icons/table.png b/resources/lib/oojs-ui/themes/apex/images/icons/table.png index fb6b985..2eedd1e 100644 --- a/resources/lib/oojs-ui/themes/apex/images/icons/table.png +++ b/resources/lib/oojs-ui/themes/apex/images/icons/table.png Binary files differ diff --git a/resources/lib/oojs-ui/themes/apex/images/icons/table.svg b/resources/lib/oojs-ui/themes/apex/images/icons/table.svg index 3c901f7..b5733fb 100644 --- a/resources/lib/oojs-ui/themes/apex/images/icons/table.svg +++ b/resources/lib/oojs-ui/themes/apex/images/icons/table.svg @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> <g id="table-insert"> - <path id="table" d="M4 5v13h16V5zm2 2h5v4H6zm7 0h5v4h-5zm-7 5h5v4H6zm7 0h5v4h-5z"/> + <path id="table" d="M4 6v11h15V6zm1 3h6v3H5zm7 0h6v3h-6zm-7 4h6v3H5zm7 0h6v3h-6z"/> </g> </svg> diff --git a/resources/lib/oojs-ui/themes/mediawiki/images/icons/picture-invert.png b/resources/lib/oojs-ui/themes/mediawiki/images/icons/picture-invert.png index d6dc62c..f63756b 100644 --- a/resources/lib/oojs-ui/themes/mediawiki/images/icons/picture-invert.png +++ b/resources/lib/oojs-ui/themes/mediawiki/images/icons/picture-invert.png Binary files differ diff --git a/resources/lib/oojs-ui/themes/mediawiki/images/icons/picture-invert.svg b/resources/lib/oojs-ui/themes/mediawiki/images/icons/picture-invert.svg index be2c66d..a969967 100644 --- a/resources/lib/oojs-ui/themes/mediawiki/images/icons/picture-invert.svg +++ b/resources/lib/oojs-ui/themes/mediawiki/images/icons/picture-invert.svg @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #FFFFFF }</style> <g id="picture"> - <path id="frame" d="M18 4H6c-2-.007-3 .993-3 2.993L3.014 16C3 18 4 18.988 6 19h12c2-.012 2.994-1 3-3.006v-9c-.006-2-1-3-3-2.994zm1 13H5V6h14v11z"/> - <path id="mountains" d="M6 13.5L9.5 10l2.328 2.312-1.312 1.094.875 1.032L15.5 11l2.5 2v3H6z"/> - <path id="sky" d="M6 12l3.516-4.156 3.046 3.172L15.5 9l2.5 2V7H6z"/> + <path id="frame" d="M4 5v13h16v-13zm15 12h-14v-11h14z"/> + <path id="mountains" d="M9.5 10l2.328 2.312-1.312 1.094.875 1.032 4.109-3.438 2.5 2v3h-12v-2.5z"/> + <path id="sky" d="M9.516 7.844l3.046 3.172 2.938-2.016 2.5 2v-4h-12v5z"/> </g> </svg> diff --git a/resources/lib/oojs-ui/themes/mediawiki/images/icons/picture.png b/resources/lib/oojs-ui/themes/mediawiki/images/icons/picture.png index 2043424..d680396 100644 --- a/resources/lib/oojs-ui/themes/mediawiki/images/icons/picture.png +++ b/resources/lib/oojs-ui/themes/mediawiki/images/icons/picture.png Binary files differ diff --git a/resources/lib/oojs-ui/themes/mediawiki/images/icons/picture.svg b/resources/lib/oojs-ui/themes/mediawiki/images/icons/picture.svg index 24d7315..246e130 100644 --- a/resources/lib/oojs-ui/themes/mediawiki/images/icons/picture.svg +++ b/resources/lib/oojs-ui/themes/mediawiki/images/icons/picture.svg @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> <g id="picture"> - <path id="frame" d="M18 4H6c-2-.007-3 .993-3 2.993L3.014 16C3 18 4 18.988 6 19h12c2-.012 2.994-1 3-3.006v-9c-.006-2-1-3-3-2.994zm1 13H5V6h14v11z"/> - <path id="mountains" d="M6 13.5L9.5 10l2.328 2.312-1.312 1.094.875 1.032L15.5 11l2.5 2v3H6z"/> - <path id="sky" d="M6 12l3.516-4.156 3.046 3.172L15.5 9l2.5 2V7H6z"/> + <path id="frame" d="M4 5v13h16v-13zm15 12h-14v-11h14z"/> + <path id="mountains" d="M9.5 10l2.328 2.312-1.312 1.094.875 1.032 4.109-3.438 2.5 2v3h-12v-2.5z"/> + <path id="sky" d="M9.516 7.844l3.046 3.172 2.938-2.016 2.5 2v-4h-12v5z"/> </g> </svg> diff --git a/resources/lib/oojs-ui/themes/mediawiki/images/icons/table-invert.png b/resources/lib/oojs-ui/themes/mediawiki/images/icons/table-invert.png index 9cc620a..ee9885f 100644 --- a/resources/lib/oojs-ui/themes/mediawiki/images/icons/table-invert.png +++ b/resources/lib/oojs-ui/themes/mediawiki/images/icons/table-invert.png Binary files differ diff --git a/resources/lib/oojs-ui/themes/mediawiki/images/icons/table-invert.svg b/resources/lib/oojs-ui/themes/mediawiki/images/icons/table-invert.svg index 246be85..808d8d8 100644 --- a/resources/lib/oojs-ui/themes/mediawiki/images/icons/table-invert.svg +++ b/resources/lib/oojs-ui/themes/mediawiki/images/icons/table-invert.svg @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #FFFFFF }</style> <g id="table-insert"> - <path id="table" d="M4 5v13h16V5zm2 2h5v4H6zm7 0h5v4h-5zm-7 5h5v4H6zm7 0h5v4h-5z"/> + <path id="table" d="M4 6v11h15V6zm1 3h6v3H5zm7 0h6v3h-6zm-7 4h6v3H5zm7 0h6v3h-6z"/> </g> </svg> diff --git a/resources/lib/oojs-ui/themes/mediawiki/images/icons/table.png b/resources/lib/oojs-ui/themes/mediawiki/images/icons/table.png index fb6b985..2eedd1e 100644 --- a/resources/lib/oojs-ui/themes/mediawiki/images/icons/table.png +++ b/resources/lib/oojs-ui/themes/mediawiki/images/icons/table.png Binary files differ diff --git a/resources/lib/oojs-ui/themes/mediawiki/images/icons/table.svg b/resources/lib/oojs-ui/themes/mediawiki/images/icons/table.svg index 3c901f7..b5733fb 100644 --- a/resources/lib/oojs-ui/themes/mediawiki/images/icons/table.svg +++ b/resources/lib/oojs-ui/themes/mediawiki/images/icons/table.svg @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> <g id="table-insert"> - <path id="table" d="M4 5v13h16V5zm2 2h5v4H6zm7 0h5v4h-5zm-7 5h5v4H6zm7 0h5v4h-5z"/> + <path id="table" d="M4 6v11h15V6zm1 3h6v3H5zm7 0h6v3h-6zm-7 4h6v3H5zm7 0h6v3h-6z"/> </g> </svg> -- To view, visit https://gerrit.wikimedia.org/r/246116 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If241c883b8c079ea9f1d73c8eb6f51c99dd615ac Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_26 Gerrit-Owner: Bartosz Dziewoński <[email protected]> Gerrit-Reviewer: Jforrester <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
