Update jquery.uls to ffcfdf1

Changes:
* Restore compatibility with IE8.
* Localisation updates.

Bug: T86516
Change-Id: Ia7005416ec769f035b3d6ceb676ec6797bbbc103
This commit is contained in:
Kartik Mistry
2015-02-26 15:46:07 +05:30
committed by Nikerabbit
parent 69475f0308
commit b5db283b39
6 changed files with 75 additions and 4 deletions

View File

@@ -354,13 +354,26 @@
* @return string
*/
getMenuWidth: function () {
var languagesCount;
var language,
languagesCount = 0;
if ( this.options.menuWidth ) {
return this.options.menuWidth;
}
languagesCount = Object.keys( this.options.languages ).length;
// IE8 does not support Object.keys
if ( Object.keys ) {
languagesCount = Object.keys( this.options.languages ).length;
} else {
for ( language in this.options.languages ) {
if ( Object.prototype.hasOwnProperty.call(
this.options.languages,
language
) ) {
languagesCount++;
}
}
}
if ( languagesCount < 12 ) {
return 'narrow';