Reformat code.

Change-Id: Ic0a5b37fa01b4a13023e66af0518ea94919ee880
This commit is contained in:
Siebrand Mazeland
2012-11-11 10:34:10 +01:00
parent 743665d9f6
commit 98d7a8d9f9
7 changed files with 42 additions and 58 deletions

View File

@@ -186,10 +186,10 @@
$button = $( '<button>' )
.addClass( 'button uls-language-button' )
.text( $.uls.data.getAutonym( language ) )
.prop({
.prop( {
lang: language,
dir: $.uls.data.getDir( language )
});
} );
if ( language === this.uiLanguage ) {
$button.addClass( 'down' );
@@ -220,11 +220,11 @@
$moreLanguagesButton.uls( {
left: that.$parent.left,
top: that.$parent.top,
onReady: function ( ) {
onReady: function () {
var uls = this,
$back = $( '<a>' ).prop( 'href', '#' )
.data( 'i18n','ext-uls-back-to-display-settings' )
.i18n();
.data( 'i18n', 'ext-uls-back-to-display-settings' )
.i18n();
$back.click( function () {
uls.hide();
@@ -233,7 +233,7 @@
uls.$menu.find( 'div.uls-title' ).append( $back );
uls.$menu.find( 'div.uls-title h1' )
.data( 'i18n','ext-uls-display-settings-ui-language' )
.data( 'i18n', 'ext-uls-display-settings-ui-language' )
.i18n();
},
onSelect: function ( langCode ) {
@@ -362,7 +362,6 @@
*/
listen: function () {
var that = this, $contentFontSelector, $uiFontSelector, oldFont;
$contentFontSelector = this.$template
.find( '#content-font-selector' );
@@ -370,7 +369,7 @@
.find( 'select#ui-font-selector' );
oldFont = $uiFontSelector.find( 'option:selected' ).val();
// TODO all these repeated selectors can be placed in object constructor.
this.$template.find( '#uls-displaysettings-apply' ).on( 'click', function () {
@@ -462,5 +461,5 @@
$.fn.languagesettings.modules = $.extend( $.fn.languagesettings.modules, {
display: DisplaySettings
} );
} ) ( jQuery, mediaWiki );
})( jQuery, mediaWiki );

View File

@@ -36,9 +36,9 @@
// protocol is https, only if the service is not configured
// with http:// as the protocol
if ( service ) {
httpOnly = service.substring(0, 7) === 'http://';
httpOnly = service.substring( 0, 7 ) === 'http://';
currentProto = document.location.protocol;
if ( !httpOnly || currentProto === 'http:' ) {
if ( !httpOnly || currentProto === 'http:' ) {
var settings = {
cache: true,
dataType: 'jsonp',

View File

@@ -99,7 +99,7 @@
var extensionPath, locales, i18n;
extensionPath = mw.config.get( 'wgExtensionAssetsPath' )
+ '/UniversalLanguageSelector/';
+ '/UniversalLanguageSelector/';
locales = mw.config.get( 'wgULSi18nLocales' );
i18n = $.i18n( {

View File

@@ -121,8 +121,8 @@
imeId = imes.inputmethods[index];
selected = defaultInputmethod === imeId;
//$.ime.load( imeId, function () {
$imeListContainer.append( inputsettings.renderInputmethodOption( imeId,
selected ) );
$imeListContainer.append( inputsettings.renderInputmethodOption( imeId,
selected ) );
//} );
}
@@ -226,10 +226,10 @@
$button = $( '<button>' )
.addClass( 'button uls-language-button' )
.text( $.uls.data.getAutonym( language ) )
.prop({
.prop( {
lang: language,
dir: $.uls.data.getDir( language )
});
} );
if ( language === this.imeLanguage ) {
$button.addClass( 'down' );
@@ -263,7 +263,7 @@
onReady: function () {
var uls = this,
$back = $( '<a>' ).prop( 'href', '#' )
.text( $.i18n( 'ext-uls-back-to-input-settings' ) );
.text( $.i18n( 'ext-uls-back-to-input-settings' ) );
$back.click( function () {
uls.hide();
@@ -288,7 +288,7 @@
},
prepareToggleButton: function () {
var inputsettings, $toggleButton, $toggleButtonDesc ;
var inputsettings, $toggleButton, $toggleButtonDesc;
inputsettings = this;
@@ -376,7 +376,7 @@
var inputSettings = this;
$.ime.preferences.disable();
$.ime.preferences.save( function() {
$.ime.preferences.save( function () {
// Update the toggle button
inputSettings.prepareToggleButton();
mw.ime.disable();
@@ -390,7 +390,7 @@
var inputSettings = this;
$.ime.preferences.enable();
$.ime.preferences.save( function() {
$.ime.preferences.save( function () {
// Update the toggle button
inputSettings.prepareToggleButton();
mw.ime.setup();