Update jquery.uls from upstream

Upstream: https://github.com/wikimedia/jquery.uls/

Changes:

* Update Autonym font
* Code formatting fixes
* Localization updates
* Language autonym correction and language additions
* Performance fix for region selector

Change-Id: I1da30aa31ad8a4fe430a12fef05c4e6b54fc6648
This commit is contained in:
Santhosh Thottingal
2013-10-23 20:31:26 +05:30
parent 55eb19ecc5
commit 63a0dd5666
13 changed files with 18 additions and 21 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -71,4 +71,4 @@
border-bottom: 4px solid transparent; border-bottom: 4px solid transparent;
content: ""; content: "";
margin: 0 6px 0 0; margin: 0 6px 0 0;
} }

View File

@@ -111,10 +111,8 @@ div.uls-region {
/*Cross-browser background transparency*/ /*Cross-browser background transparency*/
background: #3366bb; background: #3366bb;
background: rgba(51, 102, 187, 0.1); background: rgba(51, 102, 187, 0.1);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#253366bb, filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#253366bb, endColorstr=#253366bb );
endColorstr=#253366bb ); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#253366bb, endColorstr=#253366bb)";
-ms-filter:
"progid:DXImageTransform.Microsoft.gradient(startColorstr=#253366bb, endColorstr=#253366bb)";
} }
.map-block .active { .map-block .active {
@@ -270,4 +268,4 @@ div.uls-region {
.autonym { .autonym {
font-family: 'Autonym', sans-serif; font-family: 'Autonym', sans-serif;
} }

View File

@@ -16,9 +16,9 @@
"uls-region-AS": "\u0a8f\u0ab6\u0abf\u0aaf\u0abe", "uls-region-AS": "\u0a8f\u0ab6\u0abf\u0aaf\u0abe",
"uls-region-ME": "\u0aae\u0aa7\u0acd\u0aaf \u0aaa\u0ac2\u0ab0\u0acd\u0ab5", "uls-region-ME": "\u0aae\u0aa7\u0acd\u0aaf \u0aaa\u0ac2\u0ab0\u0acd\u0ab5",
"uls-region-PA": "\u0aaa\u0ac5\u0ab8\u0abf\u0aab\u0abf\u0a95", "uls-region-PA": "\u0aaa\u0ac5\u0ab8\u0abf\u0aab\u0abf\u0a95",
"uls-no-results-found": "\u0a95\u0acb\u0a88 \u0aaa\u0ab0\u0abf\u0aa3\u0abe\u0aae \u0aae\u0ab3\u0ac7\u0ab2 \u0aa8\u0aa5\u0ac0", "uls-no-results-found": "\u0a95\u0acb\u0a88 \u0aaa\u0ab0\u0abf\u0aa3\u0abe\u0aae \u0aae\u0ab3\u0acd\u0aaf\u0abe \u0aa8\u0ab9\u0ac0",
"uls-common-languages": "\u0ab8\u0abe\u0aae\u0abe\u0aa8\u0acd\u0aaf \u0aad\u0abe\u0ab7\u0abe\u0a93", "uls-common-languages": "\u0ab8\u0abe\u0aae\u0abe\u0aa8\u0acd\u0aaf \u0aad\u0abe\u0ab7\u0abe\u0a93",
"uls-no-results-suggestion-title": "\u0aa4\u0aae\u0aa8\u0ac7 \u0ab0\u0ab8 \u0ab9\u0acb\u0a88 \u0ab6\u0a95\u0ac7:", "uls-no-results-suggestion-title": "\u0aa4\u0aae\u0aa8\u0ac7 \u0a86\u0aae\u0abe\u0a82 \u0ab0\u0ab8 \u0ab9\u0acb\u0a88 \u0ab6\u0a95\u0ac7 \u0a9b\u0ac7:",
"uls-search-help": "\u0aa4\u0aae\u0ac7 \u0aad\u0abe\u0ab7\u0abe \u0aa8\u0abe\u0aae, \u0ab8\u0acd\u0a95\u0acd\u0ab0\u0abf\u0aaa\u0acd\u0a9f \u0aa8\u0abe\u0aae, \u0aad\u0abe\u0ab7\u0abe ISO \u0a95\u0acb\u0aa1 \u0aa6\u0acd\u0ab5\u0abe\u0ab0\u0abe \u0ab6\u0acb\u0aa7\u0ac0 \u0ab6\u0a95\u0acb \u0a9b\u0ac7 \u0a85\u0aa5\u0ab5\u0abe \u0aa4\u0aae\u0ac7 \u0aaa\u0acd\u0ab0\u0aa6\u0ac7\u0ab6 \u0aa6\u0acd\u0ab5\u0abe\u0ab0\u0abe \u0ab6\u0acb\u0aa7\u0ac0 \u0a95\u0ab0\u0ac0 \u0ab6\u0a95\u0acb \u0a9b\u0acb:", "uls-search-help": "\u0aa4\u0aae\u0ac7 \u0aad\u0abe\u0ab7\u0abe \u0aa8\u0abe\u0aae, \u0ab8\u0acd\u0a95\u0acd\u0ab0\u0abf\u0aaa\u0acd\u0a9f \u0aa8\u0abe\u0aae, \u0aad\u0abe\u0ab7\u0abe ISO \u0a95\u0acb\u0aa1 \u0aa6\u0acd\u0ab5\u0abe\u0ab0\u0abe \u0ab6\u0acb\u0aa7\u0ac0 \u0ab6\u0a95\u0acb \u0a9b\u0ac7 \u0a85\u0aa5\u0ab5\u0abe \u0aa4\u0aae\u0ac7 \u0aaa\u0acd\u0ab0\u0aa6\u0ac7\u0ab6 \u0aa6\u0acd\u0ab5\u0abe\u0ab0\u0abe \u0ab6\u0acb\u0aa7\u0ac0 \u0a95\u0ab0\u0ac0 \u0ab6\u0a95\u0acb \u0a9b\u0acb:",
"uls-search-placeholder": "\u0aad\u0abe\u0ab7\u0abe \u0ab6\u0acb\u0aa7" "uls-search-placeholder": "\u0aad\u0abe\u0ab7\u0abe \u0ab6\u0acb\u0aa7"
} }

View File

@@ -6,7 +6,7 @@
}, },
"uls-select-language": "\u0698\u0628\u0647 \u067c\u0627\u06a9\u0644", "uls-select-language": "\u0698\u0628\u0647 \u067c\u0627\u06a9\u0644",
"uls-region-WW": "\u0646\u0693\u06d0\u0648\u0627\u0644", "uls-region-WW": "\u0646\u0693\u06d0\u0648\u0627\u0644",
"uls-region-SP": "\u0681\u0627\u0646\u06ab\u0693\u06cc", "uls-region-SP": "\u0681\u0627\u0646\u06af\u0693\u06cc",
"uls-region-AM": "\u0627\u0645\u0631\u064a\u06a9\u0627", "uls-region-AM": "\u0627\u0645\u0631\u064a\u06a9\u0627",
"uls-region-AF": "\u0627\u0641\u0631\u064a\u0642\u0627", "uls-region-AF": "\u0627\u0641\u0631\u064a\u0642\u0627",
"uls-region-EU": "\u0627\u0631\u0648\u067e\u0627", "uls-region-EU": "\u0627\u0631\u0648\u067e\u0627",

View File

@@ -1,11 +1,12 @@
{ {
"@metadata": { "@metadata": {
"authors": [ "authors": [
"Andriykopanytsia",
"Base" "Base"
] ]
}, },
"uls-select-language": "\u041e\u0431\u0435\u0440\u0456\u0442\u044c \u043c\u043e\u0432\u0443", "uls-select-language": "\u041e\u0431\u0435\u0440\u0456\u0442\u044c \u043c\u043e\u0432\u0443",
"uls-region-WW": "\u0412\u0441\u0435\u0441\u0432\u0456\u0442\u043e\u0432\u0456", "uls-region-WW": "\u0412\u0441\u0435\u0441\u0432\u0456\u0442\u043d\u0456",
"uls-region-SP": "\u0421\u043f\u0435\u0446\u0456\u0430\u043b\u044c\u043d\u0456", "uls-region-SP": "\u0421\u043f\u0435\u0446\u0456\u0430\u043b\u044c\u043d\u0456",
"uls-region-AM": "\u0410\u043c\u0435\u0440\u0438\u043a\u0430", "uls-region-AM": "\u0410\u043c\u0435\u0440\u0438\u043a\u0430",
"uls-region-AF": "\u0410\u0444\u0440\u0438\u043a\u0430", "uls-region-AF": "\u0410\u0444\u0440\u0438\u043a\u0430",

File diff suppressed because one or more lines are too long

View File

@@ -114,7 +114,6 @@
return allRegions; return allRegions;
}; };
/** /**
* Returns all languages written in script. * Returns all languages written in script.
* @param script string * @param script string
@@ -364,7 +363,6 @@
return regionsInGroup; return regionsInGroup;
}; };
/** /**
* Returns the script group of a script or 'Other' if it doesn't * Returns the script group of a script or 'Other' if it doesn't
* belong to any group. * belong to any group.
@@ -464,5 +462,4 @@
return false; return false;
}; };
} ( jQuery ) ); } ( jQuery ) );

View File

@@ -33,7 +33,7 @@
this.$element.addClass( 'languagefilter' ); this.$element.addClass( 'languagefilter' );
this.resultCount = 0; this.resultCount = 0;
this.$suggestion = this.$element.parents().find( '#' + this.$element.data( 'suggestion' ) ); this.$suggestion = this.$element.parents().find( '#' + this.$element.data( 'suggestion' ) );
this.$clear = this.$element.parents().find( '#'+ this.$element.data( 'clear' ) ); this.$clear = this.$element.parents().find( '#' + this.$element.data( 'clear' ) );
this.selectedLanguage = null; this.selectedLanguage = null;
this.listen(); this.listen();

View File

@@ -331,5 +331,4 @@
}; };
$.fn.lcd.Constructor = LanguageCategoryDisplay; $.fn.lcd.Constructor = LanguageCategoryDisplay;
} ( jQuery ) ); } ( jQuery ) );

View File

@@ -35,7 +35,7 @@
this.options = $.extend( {}, $.fn.regionselector.defaults, options ); this.options = $.extend( {}, $.fn.regionselector.defaults, options );
this.$element.addClass( 'regionselector' ); this.$element.addClass( 'regionselector' );
this.regions = []; this.regions = [];
this.cache= null; this.cache = null;
this.regionGroup = this.$element.data( 'regiongroup' ); this.regionGroup = this.$element.data( 'regiongroup' );
this.init(); this.init();
this.listen(); this.listen();
@@ -149,9 +149,12 @@
return; return;
} }
// Re-populate the list of languages // Scroll to appropriate area
this.options.$target.empty(); this.options.$target.$element
this.show(); .find( '#' + this.regions[0] )
.get( 0 )
.scrollIntoView( true, { behavior: 'smooth' } );
// Make the selected region (and it only) active // Make the selected region (and it only) active
$( '.regionselector' ).removeClass( 'active' ); $( '.regionselector' ).removeClass( 'active' );
@@ -188,5 +191,4 @@
}; };
$.fn.regionselector.Constructor = RegionSelector; $.fn.regionselector.Constructor = RegionSelector;
} ( jQuery ) ); } ( jQuery ) );