Display Settings - ULS - Display settings navigation

Change-Id: I9d16cbac8f0f897378f769b0b98e48441503fe1a
This commit is contained in:
Santhosh Thottingal
2012-08-17 18:27:35 +05:30
committed by Amir E. Aharoni
parent 9da90921c4
commit 26b43a6d6f

View File

@@ -27,7 +27,7 @@
<span id="uls-close" class="icon-close"></span> \ <span id="uls-close" class="icon-close"></span> \
</div> \ </div> \
<div class="row"> \ <div class="row"> \
<div class="four columns">\ <div class="uls-title four columns">\
<h1>Select language</h1>\ <h1>Select language</h1>\
</div>\ </div>\
<div class="three columns" id="settings-block"></div>\ <div class="three columns" id="settings-block"></div>\
@@ -105,6 +105,8 @@
delete this.languages[code]; delete this.languages[code];
} }
} }
this.left = this.options.left;
this.top = this.options.top;
this.shown = false; this.shown = false;
this.initialized = false; this.initialized = false;
this.$languageFilter = this.$menu.find( 'input#languagefilter' ); this.$languageFilter = this.$menu.find( 'input#languagefilter' );
@@ -120,7 +122,9 @@
constructor: ULS, constructor: ULS,
ready: function() { ready: function() {
// Currently empty, can be overridden for anything useful. if ( this.options.onReady ) {
this.options.onReady( this );
}
}, },
/** /**
@@ -133,8 +137,8 @@
height: this.$element[0].offsetHeight height: this.$element[0].offsetHeight
} ); } );
return { return {
top: pos.top + pos.height, top: this.top || pos.top + pos.height,
left: '25%' left: this.left || '25%'
}; };
}, },
@@ -256,6 +260,7 @@
* @param langCode * @param langCode
*/ */
onSelect: function( langCode ) { onSelect: function( langCode ) {
this.hide();
if ( this.options.onSelect ) { if ( this.options.onSelect ) {
this.options.onSelect.call( this, langCode ); this.options.onSelect.call( this, langCode );
} }
@@ -292,8 +297,6 @@
e.preventDefault(); e.preventDefault();
if ( !this.shown ) { if ( !this.shown ) {
this.show(); this.show();
} else {
this.hide();
} }
} }