Update jquery.uls to ffcfdf1
Changes: * Restore compatibility with IE8. * Localisation updates. Bug: T86516 Change-Id: Ia7005416ec769f035b3d6ceb676ec6797bbbc103
This commit is contained in:
committed by
Nikerabbit
parent
69475f0308
commit
b5db283b39
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user