Update from GitHub
RTL and other bug fixes Change-Id: I8d9040a1c140f0ff8f3dd430ff33f9602895f4fe
This commit is contained in:
1 parent
5c8a11482c
commit
a0aae6d1b9
2 files changed
+72
-17
No files matched your search
@@ -543,6 +543,7 @@ img {
|
|||||||
.uls-lcd-region-section ul li:hover {
|
.uls-lcd-region-section ul li:hover {
|
||||||
background-color: #eaeff7;
|
background-color: #eaeff7;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Language list */
|
/* Language list */
|
||||||
.uls-language-list {
|
.uls-language-list {
|
||||||
height: 22em;
|
height: 22em;
|
||||||
@@ -560,7 +561,31 @@ img {
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Some languages have long names for various reasons and we still want
|
||||||
|
* them to appear on one line.
|
||||||
|
* To make it work correctly, the directionality must be set correctly
|
||||||
|
* on the item level.
|
||||||
|
*/
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The directionality (ltr/rtl) for each list item is set dynamically
|
||||||
|
* as HTML attributes in JavaScript. Setting directionality also applies
|
||||||
|
* alignment, but a list with mixed alignment is hard to read.
|
||||||
|
* All items are therefore explicitly aligned to the left, including names
|
||||||
|
* of right-to-left languages in left-to-right environment and vice versa.
|
||||||
|
* As long as the directionality of the item is set correctly, the text
|
||||||
|
* is readable.
|
||||||
|
*/
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We don't want any visible bullets in this list.
|
||||||
|
*/
|
||||||
|
list-style-image: none;
|
||||||
|
list-style-type: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uls-language-list strong {
|
.uls-language-list strong {
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/*! jquery.uls - v0.1.0 - 2012-09-21
|
/*! jquery.uls - v0.1.0 - 2012-10-07
|
||||||
* https://github.com/wikimedia/jquery.uls
|
* https://github.com/wikimedia/jquery.uls
|
||||||
* Copyright (c) 2012 Santhosh Thottingal; Licensed GPL, MIT */
|
* Copyright (c) 2012 Santhosh Thottingal; Licensed GPL, MIT */
|
||||||
|
|
||||||
// Please do not edit. This file is generated from data/langdb.yaml by ulsdata2json.php
|
// Please do not edit. This file is generated from data/langdb.yaml by ulsdata2json.php
|
||||||
( function ( $ ) {
|
( function ( $ ) {
|
||||||
$.uls = $.uls || {};
|
$.uls = $.uls || {};
|
||||||
$.uls.data = {"languages":{"aa":["Latn",["AF"],"Qaf\u00e1r af"],"ab":["Cyrl",["EU"],"\u0410\u04a7\u0441\u0448\u04d9\u0430"],"ace":["Latn",["AS","PA"],"Ac\u00e8h"],"ady-cyrl":["Cyrl",["EU"],"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d"],"ady-latn":["Latn",["EU"],"Adygabze"],"ady":["Cyrl",["EU"],"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d"],"aeb":["Arab",["AF"],"\u0632\u064e\u0648\u064f\u0646"],"af":["Latn",["AF"],"Afrikaans"],"ahr":["Deva",["AS"],"\u0905\u0939\u093f\u0930\u093e\u0923\u0940"],"ak":["Latn",["AF"],"Akan"],"akz":["Latn",["AM"],"Albaamo innaa\u026ciilka"],"aln":["Latn",["EU"],"Geg\u00eb"],"am":["Ethi",["AF"],"\u12a0\u121b\u122d\u129b"],"an":["Latn",["EU"],"aragon\u00e9s"],"ang":["Latn",["EU"],"\u00c6nglisc"],"anp":["Deva",["AS"],"\u0905\u0919\u094d\u0917\u093f\u0915\u093e"],"ar":["Arab",["ME"],"\u0627\u0644\u0639\u0631\u0628\u064a\u0629"],"arc":["Syrc",["ME"],"\u0710\u072a\u0721\u071d\u0710"],"arn":["Latn",["AM"],"mapudungun"],"aro":["Latn",["AM"],"Araona"],"arq":["Latn",["AF"],"Dziri"],"ary":["Latn",["ME"],"Ma\u0121ribi"],"arz":["Arab",["ME"],"\u0645\u0635\u0631\u0649"],"as":["Beng",["AS"],"\u0985\u09b8\u09ae\u09c0\u09df\u09be"],"ase":["Sgnw",["AM"],"American sign language"],"ast":["Latn",["EU"],"asturianu"],"av":["Cyrl",["EU"],"\u0430\u0432\u0430\u0440"],"avk":["Latn",["WW"],"Kotava"],"ay":["Latn",["AM"],"Aymar aru"],"az":["Latn",["EU","ME"],"az\u0259rbaycanca"],"ba":["Cyrl",["EU"],"\u0431\u0430\u0448\u04a1\u043e\u0440\u0442\u0441\u0430"],"bar":["Latn",["EU"],"Boarisch"],"bbc-latn":["Latn",["AS"],"Batak Toba"],"bbc":["Batk",["AS"],"Batak Toba\/Batak autonym unknown"],"bcc":["Arab",["AS","ME"],"\u0628\u0644\u0648\u0686\u06cc \u0645\u06a9\u0631\u0627\u0646\u06cc"],"bcl":["Latn",["AS"],"Bikol Central"],"be-tarask":["Cyrl",["EU"],"\u0431\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f (\u0442\u0430\u0440\u0430\u0448\u043a\u0435\u0432\u0456\u0446\u0430)"],"be-x-old":["Cyrl",["EU"],"\u0431\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f (\u0442\u0430\u0440\u0430\u0448\u043a\u0435\u0432\u0456\u0446\u0430)"],"be":["Cyrl",["EU"],"\u0431\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f"],"bew":["Latn",["AS"],"Bahasa Betawi"],"bfq":["Taml",["AS"],"\u0baa\u0b9f\u0b95\u0bbe"],"bg":["Cyrl",["EU"],"\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438"],"bh":["Deva",["AS"],"\u092d\u094b\u091c\u092a\u0941\u0930\u0940"],"bho":["Deva",["AS"],"\u092d\u094b\u091c\u092a\u0941\u0930\u0940"],"bi":["Latn",["PA"],"Bislama"],"bjn":["Latn",["AS"],"Bahasa Banjar"],"bm":["Latn",["AF"],"bamanankan"],"bn":["Beng",["AS"],"\u09ac\u09be\u0982\u09b2\u09be"],"bo":["Tibt",["AS"],"\u0f56\u0f7c\u0f51\u0f0b\u0f61\u0f72\u0f42"],"bpy":["Beng",["AS"],"\u09ac\u09bf\u09b7\u09cd\u09a3\u09c1\u09aa\u09cd\u09b0\u09bf\u09af\u09bc\u09be \u09ae\u09a3\u09bf\u09aa\u09c1\u09b0\u09c0"],"bqi":["Arab",["ME"],"\u0628\u062e\u062a\u064a\u0627\u0631\u064a"],"br":["Latn",["EU"],"brezhoneg"],"brh":["Latn",["ME","AS"],"Br\u00e1hu\u00ed"],"bs":["Latn",["EU"],"bosanski"],"bto":["Latn",["AS"],"Iriga Bicolano"],"bug":["Bugi",["AS"],"\u1a05\u1a14 \u1a15\u1a18\u1a01\u1a17"],"bxr":["Cyrl",["AS"],"\u0431\u0443\u0440\u044f\u0430\u0434"],"ca":["Latn",["EU"],"catal\u00e0"],"cbk-zam":["Latn",["AS"],"Chavacano de Zamboanga"],"cdo":["Latn",["AS"],"M\u00ecng-d\u0115\u0324ng-ng\u1e73\u0304"],"ce":["Cyrl",["EU"],"\u043d\u043e\u0445\u0447\u0438\u0439\u043d"],"ceb":["Latn",["AS"],"Cebuano"],"ch":["Latn",["PA"],"Chamoru"],"cho":["Latn",["AM"],"Choctaw"],"chr":["Cher",["AM"],"\u13e3\u13b3\u13a9"],"chy":["Latn",["AM"],"Tsets\u00eahest\u00e2hese"],"ckb":["Arab",["ME"],"\u06a9\u0648\u0631\u062f\u06cc"],"co":["Latn",["EU"],"corsu"],"cps":["Latn",["AS"],"Capice\u00f1o"],"cr-cans":["Cans",["AM"],"\u14c0\u1426\u1403\u152d\u140d\u140f\u1423"],"cr-latn":["Latn",["AM"],"N\u0113hiyaw\u0113win"],"cr":["Cans",["AM"],"N\u0113hiyaw\u0113win \/ \u14c0\u1426\u1403\u152d\u140d\u140f\u1423"],"crh-cyrl":["Cyrl",["EU"],"\u043a\u044a\u044b\u0440\u044b\u043c\u0442\u0430\u0442\u0430\u0440\u0434\u0436\u0430 (\u041a\u0438\u0440\u0438\u043b\u043b)"],"crh-latn":["Latn",["EU"],"q\u0131r\u0131mtatarca (Latin)"],"crh":["Latn",["EU"],"\u043a\u044a\u044b\u0440\u044b\u043c\u0442\u0430\u0442\u0430\u0440\u0434\u0436\u0430 \/ q\u0131r\u0131mtatarca"],"cs":["Latn",["EU"],"\u010desky"],"csb":["Latn",["EU"],"kasz\u00ebbsczi"],"cu":["Cyrl",["EU"],"\u0441\u043b\u043e\u0432\u0463\u0301\u043d\u044c\u0441\u043a\u044a \/ \u2c14\u2c0e\u2c11\u2c02\u2c21\u2c10\u2c20\u2c14\u2c0d\u2c1f"],"cv":["Cyrl",["EU"],"\u0427\u04d1\u0432\u0430\u0448\u043b\u0430"],"cy":["Latn",["EU"],"Cymraeg"],"da":["Latn",["EU"],"dansk"],"de-at":["Latn",["EU"],"\u00d6sterreichisches Deutsch"],"de-ch":["Latn",["EU"],"Schweizer Hochdeutsch"],"de-formal":["Latn",["EU"],"Deutsch (Sie-Form)"],"de":["Latn",["EU"],"Deutsch"],"diq":["Latn",["EU","AS"],"Zazaki"],"dsb":["Latn",["EU"],"dolnoserbski"],"dtp":["Latn",["AS"],"Dusun Bundu-liwan"],"dv":["Thaa",["AS"],"\u078b\u07a8\u0788\u07ac\u0780\u07a8\u0784\u07a6\u0790\u07b0"],"dz":["TibtLine truncated
|
$.uls.data = {"languages":{"aa":["Latn",["AF"],"Qaf\u00e1r af"],"ab":["Cyrl",["EU"],"\u0410\u04a7\u0441\u0448\u04d9\u0430"],"ace":["Latn",["AS","PA"],"Ac\u00e8h"],"ady-cyrl":["Cyrl",["EU"],"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d"],"ady-latn":["Latn",["EU"],"Adygabze"],"ady":["Cyrl",["EU"],"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d"],"aeb":["Arab",["AF"],"\u0632\u064e\u0648\u064f\u0646"],"af":["Latn",["AF"],"Afrikaans"],"ahr":["Deva",["AS"],"\u0905\u0939\u093f\u0930\u093e\u0923\u0940"],"ak":["Latn",["AF"],"Akan"],"akz":["Latn",["AM"],"Albaamo innaa\u026ciilka"],"aln":["Latn",["EU"],"Geg\u00eb"],"am":["Ethi",["AF"],"\u12a0\u121b\u122d\u129b"],"an":["Latn",["EU"],"aragon\u00e9s"],"ang":["Latn",["EU"],"\u00c6nglisc"],"anp":["Deva",["AS"],"\u0905\u0919\u094d\u0917\u093f\u0915\u093e"],"ar":["Arab",["ME"],"\u0627\u0644\u0639\u0631\u0628\u064a\u0629"],"arc":["Syrc",["ME"],"\u0710\u072a\u0721\u071d\u0710"],"arn":["Latn",["AM"],"mapudungun"],"aro":["Latn",["AM"],"Araona"],"arq":["Latn",["AF"],"Dziri"],"ary":["Latn",["ME"],"Ma\u0121ribi"],"arz":["Arab",["ME"],"\u0645\u0635\u0631\u0649"],"as":["Beng",["AS"],"\u0985\u09b8\u09ae\u09c0\u09af\u09bc\u09be"],"ase":["Sgnw",["AM"],"American sign language"],"ast":["Latn",["EU"],"asturianu"],"av":["Cyrl",["EU"],"\u0430\u0432\u0430\u0440"],"avk":["Latn",["WW"],"Kotava"],"ay":["Latn",["AM"],"Aymar aru"],"az":["Latn",["EU","ME"],"az\u0259rbaycanca"],"ba":["Cyrl",["EU"],"\u0431\u0430\u0448\u04a1\u043e\u0440\u0442\u0441\u0430"],"bar":["Latn",["EU"],"Boarisch"],"bbc-latn":["Latn",["AS"],"Batak Toba"],"bbc":["Batk",["AS"],"Batak Toba\/Batak autonym unknown"],"bcc":["Arab",["AS","ME"],"\u0628\u0644\u0648\u0686\u06cc \u0645\u06a9\u0631\u0627\u0646\u06cc"],"bcl":["Latn",["AS"],"Bikol Central"],"be-tarask":["Cyrl",["EU"],"\u0431\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f (\u0442\u0430\u0440\u0430\u0448\u043a\u0435\u0432\u0456\u0446\u0430)"],"be-x-old":["Cyrl",["EU"],"\u0431\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f (\u0442\u0430\u0440\u0430\u0448\u043a\u0435\u0432\u0456\u0446\u0430)"],"be":["Cyrl",["EU"],"\u0431\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f"],"bew":["Latn",["AS"],"Bahasa Betawi"],"bfq":["Taml",["AS"],"\u0baa\u0b9f\u0b95\u0bbe"],"bg":["Cyrl",["EU"],"\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438"],"bh":["Deva",["AS"],"\u092d\u094b\u091c\u092a\u0941\u0930\u0940"],"bho":["Deva",["AS"],"\u092d\u094b\u091c\u092a\u0941\u0930\u0940"],"bi":["Latn",["PA"],"Bislama"],"bjn":["Latn",["AS"],"Bahasa Banjar"],"bm":["Latn",["AF"],"bamanankan"],"bn":["Beng",["AS"],"\u09ac\u09be\u0982\u09b2\u09be"],"bo":["Tibt",["AS"],"\u0f56\u0f7c\u0f51\u0f0b\u0f61\u0f72\u0f42"],"bpy":["Beng",["AS"],"\u09ac\u09bf\u09b7\u09cd\u09a3\u09c1\u09aa\u09cd\u09b0\u09bf\u09af\u09bc\u09be \u09ae\u09a3\u09bf\u09aa\u09c1\u09b0\u09c0"],"bqi":["Arab",["ME"],"\u0628\u062e\u062a\u064a\u0627\u0631\u064a"],"br":["Latn",["EU"],"brezhoneg"],"brh":["Latn",["ME","AS"],"Br\u00e1hu\u00ed"],"bs":["Latn",["EU"],"bosanski"],"bto":["Latn",["AS"],"Iriga Bicolano"],"bug":["Bugi",["AS"],"\u1a05\u1a14 \u1a15\u1a18\u1a01\u1a17"],"bxr":["Cyrl",["AS"],"\u0431\u0443\u0440\u044f\u0430\u0434"],"ca":["Latn",["EU"],"catal\u00e0"],"cbk-zam":["Latn",["AS"],"Chavacano de Zamboanga"],"cdo":["Latn",["AS"],"M\u00ecng-d\u0115\u0324ng-ng\u1e73\u0304"],"ce":["Cyrl",["EU"],"\u043d\u043e\u0445\u0447\u0438\u0439\u043d"],"ceb":["Latn",["AS"],"Cebuano"],"ch":["Latn",["PA"],"Chamoru"],"cho":["Latn",["AM"],"Choctaw"],"chr":["Cher",["AM"],"\u13e3\u13b3\u13a9"],"chy":["Latn",["AM"],"Tsets\u00eahest\u00e2hese"],"ckb":["Arab",["ME"],"\u06a9\u0648\u0631\u062f\u06cc"],"co":["Latn",["EU"],"corsu"],"cps":["Latn",["AS"],"Capice\u00f1o"],"cr-cans":["Cans",["AM"],"\u14c0\u1426\u1403\u152d\u140d\u140f\u1423"],"cr-latn":["Latn",["AM"],"N\u0113hiyaw\u0113win"],"cr":["Cans",["AM"],"N\u0113hiyaw\u0113win \/ \u14c0\u1426\u1403\u152d\u140d\u140f\u1423"],"crh-cyrl":["Cyrl",["EU"],"\u043a\u044a\u044b\u0440\u044b\u043c\u0442\u0430\u0442\u0430\u0440\u0434\u0436\u0430 (\u041a\u0438\u0440\u0438\u043b\u043b)"],"crh-latn":["Latn",["EU"],"q\u0131r\u0131mtatarca (Latin)"],"crh":["Latn",["EU"],"\u043a\u044a\u044b\u0440\u044b\u043c\u0442\u0430\u0442\u0430\u0440\u0434\u0436\u0430 \/ q\u0131r\u0131mtatarca"],"cs":["Latn",["EU"],"\u010desky"],"csb":["Latn",["EU"],"kasz\u00ebbsczi"],"cu":["Cyrl",["EU"],"\u0441\u043b\u043e\u0432\u0463\u0301\u043d\u044c\u0441\u043a\u044a \/ \u2c14\u2c0e\u2c11\u2c02\u2c21\u2c10\u2c20\u2c14\u2c0d\u2c1f"],"cv":["Cyrl",["EU"],"\u0427\u04d1\u0432\u0430\u0448\u043b\u0430"],"cy":["Latn",["EU"],"Cymraeg"],"da":["Latn",["EU"],"dansk"],"de-at":["Latn",["EU"],"\u00d6sterreichisches Deutsch"],"de-ch":["Latn",["EU"],"Schweizer Hochdeutsch"],"de-formal":["Latn",["EU"],"Deutsch (Sie-Form)"],"de":["Latn",["EU"],"Deutsch"],"diq":["Latn",["EU","AS"],"Zazaki"],"dsb":["Latn",["EU"],"dolnoserbski"],"dtp":["Latn",["AS"],"Dusun Bundu-liwan"],"dv":["Thaa",["AS"],"\u078b\u07a8\u0788\u07ac\u0780\u07a8\u0784\u07a6\u0790\u07b0"],"dz":Line truncated
|
||||||
} ( jQuery ) );
|
} ( jQuery ) );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
* @licence MIT License
|
* @licence MIT License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
( function ( $ ) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -349,6 +349,15 @@
|
|||||||
return $.inArray( $.uls.data.script( language ), $.uls.data.rtlscripts ) !== -1;
|
return $.inArray( $.uls.data.script( language ), $.uls.data.rtlscripts ) !== -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the direction of the language
|
||||||
|
* @param string language code
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
$.uls.data.getDir = function( language ) {
|
||||||
|
return $.uls.data.isRtl( language ) ? 'rtl' : 'ltr';
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the languages spoken in a territory.
|
* Returns the languages spoken in a territory.
|
||||||
* @param string Territory code
|
* @param string Territory code
|
||||||
@@ -380,10 +389,9 @@
|
|||||||
* @licence MIT License
|
* @licence MIT License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function( $ ) {
|
( function( $ ) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
var noResultsTemplate = '\
|
var noResultsTemplate = '\
|
||||||
<div class="twelve columns uls-no-results-view">\
|
<div class="twelve columns uls-no-results-view">\
|
||||||
<h2 data-i18n="uls-no-results-found" class="eleven columns end offset-by-one">\
|
<h2 data-i18n="uls-no-results-found" class="eleven columns end offset-by-one">\
|
||||||
@@ -455,6 +463,10 @@
|
|||||||
|
|
||||||
var $li = $( '<li>' )
|
var $li = $( '<li>' )
|
||||||
.data( 'code', langCode )
|
.data( 'code', langCode )
|
||||||
|
.attr( {
|
||||||
|
lang: langCode,
|
||||||
|
dir: $.uls.data.getDir( langCode )
|
||||||
|
} )
|
||||||
.append(
|
.append(
|
||||||
$( '<a>' ).prop( 'href', '#' ).prop( 'title', language ).html( langName )
|
$( '<a>' ).prop( 'href', '#' ).prop( 'title', language ).html( langName )
|
||||||
);
|
);
|
||||||
@@ -537,7 +549,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
i18n: function( ) {
|
i18n: function( ) {
|
||||||
this.$element.i18n();
|
this.$element.find( '[data-i18n]' ).i18n();
|
||||||
},
|
},
|
||||||
|
|
||||||
quicklist: function() {
|
quicklist: function() {
|
||||||
@@ -567,6 +579,10 @@
|
|||||||
var langName = $.uls.data.autonym( langCode ) || language || langCode;
|
var langName = $.uls.data.autonym( langCode ) || language || langCode;
|
||||||
var $li = $( '<li>' )
|
var $li = $( '<li>' )
|
||||||
.data( 'code', langCode )
|
.data( 'code', langCode )
|
||||||
|
.attr( {
|
||||||
|
lang: langCode,
|
||||||
|
dir: $.uls.data.getDir( langCode )
|
||||||
|
} )
|
||||||
.append(
|
.append(
|
||||||
$( '<a>' ).prop( 'href', '#' ).prop( 'title', language ).html( langName )
|
$( '<a>' ).prop( 'href', '#' ).prop( 'title', language ).html( langName )
|
||||||
);
|
);
|
||||||
@@ -602,7 +618,7 @@
|
|||||||
this.$noResults.find( 'h2' ).after( $suggestions );
|
this.$noResults.find( 'h2' ).after( $suggestions );
|
||||||
},
|
},
|
||||||
|
|
||||||
listen: function() {
|
listen: function () {
|
||||||
var that = this;
|
var that = this;
|
||||||
if ( this.options.clickhandler ) {
|
if ( this.options.clickhandler ) {
|
||||||
this.$element.on( 'click', 'div.row li', function() {
|
this.$element.on( 'click', 'div.row li', function() {
|
||||||
@@ -612,11 +628,26 @@
|
|||||||
|
|
||||||
// The region section need to be in sync with the map filter.
|
// The region section need to be in sync with the map filter.
|
||||||
that.$element.scroll( function () {
|
that.$element.scroll( function () {
|
||||||
if ( this.offsetHeight + this.scrollTop >= this.scrollHeight ) {
|
var scrollTop = $( this ).position().top;
|
||||||
|
var scrollBottom = $( this ).height();
|
||||||
|
if ( this.offsetHeight + this.scrollTop >= this.scrollHeight/2 ) {
|
||||||
that.$element.trigger( 'scrollend' );
|
that.$element.trigger( 'scrollend' );
|
||||||
}
|
}
|
||||||
|
// The region section need to be in sync with the map filter.
|
||||||
|
var inviewRegion = 'WW';
|
||||||
|
that.$element.find( 'div.uls-lcd-region-section' ).each( function () {
|
||||||
|
var top = $( this ).position().top;
|
||||||
|
var height = $( this ).height();
|
||||||
|
if ( top < scrollTop && height > scrollBottom ) {
|
||||||
|
inviewRegion = $( this ).attr( 'id' );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
var inview = $.uls.data.regiongroups[inviewRegion];
|
||||||
|
$( '.regionselector' ).removeClass( 'active' );
|
||||||
|
$( '#uls-region-' + inview ).addClass( 'active' );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -1010,13 +1041,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
show: function() {
|
show: function() {
|
||||||
// Make the selected region (and it only) active
|
|
||||||
$( '.regionselector' ).removeClass( 'active' );
|
|
||||||
if ( this.regionGroup ) {
|
|
||||||
// if there is a region group, make it active.
|
|
||||||
this.$element.addClass( 'active' );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( this.cache ) {
|
if ( this.cache ) {
|
||||||
// If the result cache is present, render the results from there.
|
// If the result cache is present, render the results from there.
|
||||||
var result = null;
|
var result = null;
|
||||||
@@ -1086,6 +1110,12 @@
|
|||||||
// Re-populate the list of languages
|
// Re-populate the list of languages
|
||||||
this.options.$target.empty();
|
this.options.$target.empty();
|
||||||
this.show();
|
this.show();
|
||||||
|
// Make the selected region (and it only) active
|
||||||
|
$( '.regionselector' ).removeClass( 'active' );
|
||||||
|
if ( this.regionGroup ) {
|
||||||
|
// if there is a region group, make it active.
|
||||||
|
this.$element.addClass( 'active' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -1279,7 +1309,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
i18n: function() {
|
i18n: function() {
|
||||||
this.$menu.i18n();
|
this.$menu.find( '[data-i18n]' ).i18n();
|
||||||
},
|
},
|
||||||
|
|
||||||
defaultSearch: function () {
|
defaultSearch: function () {
|
||||||
|
|||||||
Reference in new issue
Block a user