Reformat code.
Change-Id: Ic0a5b37fa01b4a13023e66af0518ea94919ee880
This commit is contained in:
@@ -130,62 +130,49 @@ button.button.green {
|
|||||||
background-image: -ms-linear-gradient(top, #00974b, #008740);
|
background-image: -ms-linear-gradient(top, #00974b, #008740);
|
||||||
background-image: -moz-linear-gradient(top, #00974b, #008740);
|
background-image: -moz-linear-gradient(top, #00974b, #008740);
|
||||||
background-image: linear-gradient(#00974b, #008740);
|
background-image: linear-gradient(#00974b, #008740);
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #00974b),
|
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #00974b), color-stop(100%, #008740));
|
||||||
color-stop(100%, #008740) );
|
|
||||||
background-image: -webkit-linear-gradient(top, #00974b, #008740);
|
background-image: -webkit-linear-gradient(top, #00974b, #008740);
|
||||||
border: 1px #0f9b3b solid;
|
border: 1px #0f9b3b solid;
|
||||||
-ms-filter:
|
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#00974b', endColorstr='#008740', GradientType=0)";
|
||||||
"progid:DXImageTransform.Microsoft.gradient(startColorstr='#00974b', endColorstr='#008740', GradientType=0)";
|
filter: progid:dximagetransform.microsoft.gradient(startColorstr = '#00974b', endColorstr = '#008740', GradientType = 0);
|
||||||
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#00974b',
|
|
||||||
endColorstr='#008740', GradientType=0 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button.button.green:hover {
|
button.button.green:hover {
|
||||||
background-color: #119750;
|
background-color: #119750;
|
||||||
background-image: -moz-linear-gradient(top, #10a65b, #119750);
|
background-image: -moz-linear-gradient(top, #10a65b, #119750);
|
||||||
background-image: -ms-linear-gradient(top, #10a65b, #119750);
|
background-image: -ms-linear-gradient(top, #10a65b, #119750);
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #10a65b),
|
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #10a65b), color-stop(100%, #119750));
|
||||||
color-stop(100%, #119750) );
|
|
||||||
background-image: -webkit-linear-gradient(top, #10a65b, #119750);
|
background-image: -webkit-linear-gradient(top, #10a65b, #119750);
|
||||||
background-image: linear-gradient(#10a65b, #119750);
|
background-image: linear-gradient(#10a65b, #119750);
|
||||||
-ms-filter:
|
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#10a65b', endColorstr='#119750', GradientType=0)";
|
||||||
"progid:DXImageTransform.Microsoft.gradient(startColorstr='#10a65b', endColorstr='#119750', GradientType=0)";
|
filter: progid:dximagetransform.microsoft.gradient(startColorstr = '#10a65b', endColorstr = '#119750', GradientType = 0);
|
||||||
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#10a65b',
|
|
||||||
endColorstr='#119750', GradientType=0 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button.button.green:active {
|
button.button.green:active {
|
||||||
background-color: #007236;
|
background-color: #007236;
|
||||||
background-image: -moz-linear-gradient(top, #007236, #007236);
|
background-image: -moz-linear-gradient(top, #007236, #007236);
|
||||||
background-image: -ms-linear-gradient(top, #007236, #007236);
|
background-image: -ms-linear-gradient(top, #007236, #007236);
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #007236),
|
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #007236), color-stop(100%, #007236));
|
||||||
color-stop(100%, #007236) );
|
|
||||||
background-image: -webkit-linear-gradient(top, #007236, #007236);
|
background-image: -webkit-linear-gradient(top, #007236, #007236);
|
||||||
background-image: linear-gradient(#007236, #007236);
|
background-image: linear-gradient(#007236, #007236);
|
||||||
-ms-filter:
|
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#007236', endColorstr='#007236', GradientType=0)";
|
||||||
"progid:DXImageTransform.Microsoft.gradient(startColorstr='#007236', endColorstr='#007236', GradientType=0)";
|
filter: progid:dximagetransform.microsoft.gradient(startColorstr = '#007236', endColorstr = '#007236', GradientType = 0);
|
||||||
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#007236',
|
|
||||||
endColorstr='#007236', GradientType=0 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button.button.green:disabled,
|
button.button.green:disabled,
|
||||||
button.button.green:disabled.hover,
|
button.button.green:disabled.hover,
|
||||||
button.button.green.disabled,
|
button.button.green.disabled,
|
||||||
button.button.green.disabled:hover
|
button.button.green.disabled:hover {
|
||||||
{
|
|
||||||
color: white;
|
color: white;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
background-color: #2ca368;
|
background-color: #2ca368;
|
||||||
background-image: -moz-linear-gradient(top, #2ca368, #2ca368);
|
background-image: -moz-linear-gradient(top, #2ca368, #2ca368);
|
||||||
background-image: -ms-linear-gradient(top, #2ca368, #2ca368);
|
background-image: -ms-linear-gradient(top, #2ca368, #2ca368);
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2ca368),
|
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2ca368), color-stop(100%, #2ca368));
|
||||||
color-stop(100%, #2ca368) );
|
|
||||||
background-image: -webkit-linear-gradient(top, #2ca368, #2ca368);
|
background-image: -webkit-linear-gradient(top, #2ca368, #2ca368);
|
||||||
background-image: linear-gradient(#2ca368, #2ca368);
|
background-image: linear-gradient(#2ca368, #2ca368);
|
||||||
border-color: #278f5b;
|
border-color: #278f5b;
|
||||||
-ms-filter:
|
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#2ca368', endColorstr='#2ca368', GradientType=0)";
|
||||||
"progid:DXImageTransform.Microsoft.gradient(startColorstr='#2ca368', endColorstr='#2ca368', GradientType=0)";
|
filter: progid:dximagetransform.microsoft.gradient(startColorstr = '#2ca368', endColorstr = '#2ca368', GradientType = 0);
|
||||||
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#2ca368',
|
}
|
||||||
endColorstr='#2ca368', GradientType=0 );
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
div.display-settings-block {
|
div.display-settings-block {
|
||||||
/* @embed */
|
/* @embed */
|
||||||
background: transparent url('../images/display.png') no-repeat;
|
background: transparent url('../images/display.png') no-repeat;
|
||||||
@@ -48,4 +47,4 @@ div.display-settings-block {
|
|||||||
.uls-font-label {
|
.uls-font-label {
|
||||||
color: #555555;
|
color: #555555;
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -186,10 +186,10 @@
|
|||||||
$button = $( '<button>' )
|
$button = $( '<button>' )
|
||||||
.addClass( 'button uls-language-button' )
|
.addClass( 'button uls-language-button' )
|
||||||
.text( $.uls.data.getAutonym( language ) )
|
.text( $.uls.data.getAutonym( language ) )
|
||||||
.prop({
|
.prop( {
|
||||||
lang: language,
|
lang: language,
|
||||||
dir: $.uls.data.getDir( language )
|
dir: $.uls.data.getDir( language )
|
||||||
});
|
} );
|
||||||
|
|
||||||
if ( language === this.uiLanguage ) {
|
if ( language === this.uiLanguage ) {
|
||||||
$button.addClass( 'down' );
|
$button.addClass( 'down' );
|
||||||
@@ -220,11 +220,11 @@
|
|||||||
$moreLanguagesButton.uls( {
|
$moreLanguagesButton.uls( {
|
||||||
left: that.$parent.left,
|
left: that.$parent.left,
|
||||||
top: that.$parent.top,
|
top: that.$parent.top,
|
||||||
onReady: function ( ) {
|
onReady: function () {
|
||||||
var uls = this,
|
var uls = this,
|
||||||
$back = $( '<a>' ).prop( 'href', '#' )
|
$back = $( '<a>' ).prop( 'href', '#' )
|
||||||
.data( 'i18n','ext-uls-back-to-display-settings' )
|
.data( 'i18n', 'ext-uls-back-to-display-settings' )
|
||||||
.i18n();
|
.i18n();
|
||||||
|
|
||||||
$back.click( function () {
|
$back.click( function () {
|
||||||
uls.hide();
|
uls.hide();
|
||||||
@@ -233,7 +233,7 @@
|
|||||||
|
|
||||||
uls.$menu.find( 'div.uls-title' ).append( $back );
|
uls.$menu.find( 'div.uls-title' ).append( $back );
|
||||||
uls.$menu.find( 'div.uls-title h1' )
|
uls.$menu.find( 'div.uls-title h1' )
|
||||||
.data( 'i18n','ext-uls-display-settings-ui-language' )
|
.data( 'i18n', 'ext-uls-display-settings-ui-language' )
|
||||||
.i18n();
|
.i18n();
|
||||||
},
|
},
|
||||||
onSelect: function ( langCode ) {
|
onSelect: function ( langCode ) {
|
||||||
@@ -362,7 +362,6 @@
|
|||||||
*/
|
*/
|
||||||
listen: function () {
|
listen: function () {
|
||||||
var that = this, $contentFontSelector, $uiFontSelector, oldFont;
|
var that = this, $contentFontSelector, $uiFontSelector, oldFont;
|
||||||
|
|
||||||
|
|
||||||
$contentFontSelector = this.$template
|
$contentFontSelector = this.$template
|
||||||
.find( '#content-font-selector' );
|
.find( '#content-font-selector' );
|
||||||
@@ -370,7 +369,7 @@
|
|||||||
.find( 'select#ui-font-selector' );
|
.find( 'select#ui-font-selector' );
|
||||||
|
|
||||||
oldFont = $uiFontSelector.find( 'option:selected' ).val();
|
oldFont = $uiFontSelector.find( 'option:selected' ).val();
|
||||||
|
|
||||||
// TODO all these repeated selectors can be placed in object constructor.
|
// TODO all these repeated selectors can be placed in object constructor.
|
||||||
|
|
||||||
this.$template.find( '#uls-displaysettings-apply' ).on( 'click', function () {
|
this.$template.find( '#uls-displaysettings-apply' ).on( 'click', function () {
|
||||||
@@ -462,5 +461,5 @@
|
|||||||
$.fn.languagesettings.modules = $.extend( $.fn.languagesettings.modules, {
|
$.fn.languagesettings.modules = $.extend( $.fn.languagesettings.modules, {
|
||||||
display: DisplaySettings
|
display: DisplaySettings
|
||||||
} );
|
} );
|
||||||
} ) ( jQuery, mediaWiki );
|
})( jQuery, mediaWiki );
|
||||||
|
|
||||||
|
|||||||
@@ -36,9 +36,9 @@
|
|||||||
// protocol is https, only if the service is not configured
|
// protocol is https, only if the service is not configured
|
||||||
// with http:// as the protocol
|
// with http:// as the protocol
|
||||||
if ( service ) {
|
if ( service ) {
|
||||||
httpOnly = service.substring(0, 7) === 'http://';
|
httpOnly = service.substring( 0, 7 ) === 'http://';
|
||||||
currentProto = document.location.protocol;
|
currentProto = document.location.protocol;
|
||||||
if ( !httpOnly || currentProto === 'http:' ) {
|
if ( !httpOnly || currentProto === 'http:' ) {
|
||||||
var settings = {
|
var settings = {
|
||||||
cache: true,
|
cache: true,
|
||||||
dataType: 'jsonp',
|
dataType: 'jsonp',
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
var extensionPath, locales, i18n;
|
var extensionPath, locales, i18n;
|
||||||
|
|
||||||
extensionPath = mw.config.get( 'wgExtensionAssetsPath' )
|
extensionPath = mw.config.get( 'wgExtensionAssetsPath' )
|
||||||
+ '/UniversalLanguageSelector/';
|
+ '/UniversalLanguageSelector/';
|
||||||
|
|
||||||
locales = mw.config.get( 'wgULSi18nLocales' );
|
locales = mw.config.get( 'wgULSi18nLocales' );
|
||||||
i18n = $.i18n( {
|
i18n = $.i18n( {
|
||||||
|
|||||||
@@ -121,8 +121,8 @@
|
|||||||
imeId = imes.inputmethods[index];
|
imeId = imes.inputmethods[index];
|
||||||
selected = defaultInputmethod === imeId;
|
selected = defaultInputmethod === imeId;
|
||||||
//$.ime.load( imeId, function () {
|
//$.ime.load( imeId, function () {
|
||||||
$imeListContainer.append( inputsettings.renderInputmethodOption( imeId,
|
$imeListContainer.append( inputsettings.renderInputmethodOption( imeId,
|
||||||
selected ) );
|
selected ) );
|
||||||
//} );
|
//} );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,10 +226,10 @@
|
|||||||
$button = $( '<button>' )
|
$button = $( '<button>' )
|
||||||
.addClass( 'button uls-language-button' )
|
.addClass( 'button uls-language-button' )
|
||||||
.text( $.uls.data.getAutonym( language ) )
|
.text( $.uls.data.getAutonym( language ) )
|
||||||
.prop({
|
.prop( {
|
||||||
lang: language,
|
lang: language,
|
||||||
dir: $.uls.data.getDir( language )
|
dir: $.uls.data.getDir( language )
|
||||||
});
|
} );
|
||||||
|
|
||||||
if ( language === this.imeLanguage ) {
|
if ( language === this.imeLanguage ) {
|
||||||
$button.addClass( 'down' );
|
$button.addClass( 'down' );
|
||||||
@@ -263,7 +263,7 @@
|
|||||||
onReady: function () {
|
onReady: function () {
|
||||||
var uls = this,
|
var uls = this,
|
||||||
$back = $( '<a>' ).prop( 'href', '#' )
|
$back = $( '<a>' ).prop( 'href', '#' )
|
||||||
.text( $.i18n( 'ext-uls-back-to-input-settings' ) );
|
.text( $.i18n( 'ext-uls-back-to-input-settings' ) );
|
||||||
|
|
||||||
$back.click( function () {
|
$back.click( function () {
|
||||||
uls.hide();
|
uls.hide();
|
||||||
@@ -288,7 +288,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
prepareToggleButton: function () {
|
prepareToggleButton: function () {
|
||||||
var inputsettings, $toggleButton, $toggleButtonDesc ;
|
var inputsettings, $toggleButton, $toggleButtonDesc;
|
||||||
|
|
||||||
inputsettings = this;
|
inputsettings = this;
|
||||||
|
|
||||||
@@ -376,7 +376,7 @@
|
|||||||
var inputSettings = this;
|
var inputSettings = this;
|
||||||
|
|
||||||
$.ime.preferences.disable();
|
$.ime.preferences.disable();
|
||||||
$.ime.preferences.save( function() {
|
$.ime.preferences.save( function () {
|
||||||
// Update the toggle button
|
// Update the toggle button
|
||||||
inputSettings.prepareToggleButton();
|
inputSettings.prepareToggleButton();
|
||||||
mw.ime.disable();
|
mw.ime.disable();
|
||||||
@@ -390,7 +390,7 @@
|
|||||||
var inputSettings = this;
|
var inputSettings = this;
|
||||||
|
|
||||||
$.ime.preferences.enable();
|
$.ime.preferences.enable();
|
||||||
$.ime.preferences.save( function() {
|
$.ime.preferences.save( function () {
|
||||||
// Update the toggle button
|
// Update the toggle button
|
||||||
inputSettings.prepareToggleButton();
|
inputSettings.prepareToggleButton();
|
||||||
mw.ime.setup();
|
mw.ime.setup();
|
||||||
|
|||||||
@@ -30,21 +30,20 @@ class LanguageSearchTest extends PHPUnit_Framework_TestCase {
|
|||||||
public function searchDataProvider() {
|
public function searchDataProvider() {
|
||||||
return array(
|
return array(
|
||||||
array( "ഹിന്ദി", array(
|
array( "ഹിന്ദി", array(
|
||||||
'hi' => 'ഹിന്ദി'
|
'hi' => 'ഹിന്ദി'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
array( "മല", array(
|
array( "മല", array(
|
||||||
'ml' => "മലയാളം",
|
'ml' => "മലയാളം",
|
||||||
'mg' => 'മലഗാസി',
|
'mg' => 'മലഗാസി',
|
||||||
'ms' => 'മലയ',
|
'ms' => 'മലയ',
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
array( "Φινλαν", array(
|
array( "Φινλαν", array(
|
||||||
'fi' => 'Φινλανδικά',
|
'fi' => 'Φινλανδικά',
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
array( "blah", array(
|
array( 'blah', array()
|
||||||
)
|
|
||||||
),
|
),
|
||||||
array( "الفرنسية", array(
|
array( "الفرنسية", array(
|
||||||
'fr' => 'الفرنسية',
|
'fr' => 'الفرنسية',
|
||||||
@@ -52,15 +51,15 @@ class LanguageSearchTest extends PHPUnit_Framework_TestCase {
|
|||||||
'fr-ch' => 'الفرنسية السويسرية',
|
'fr-ch' => 'الفرنسية السويسرية',
|
||||||
'frm' => 'الفرنسية الوسطى',
|
'frm' => 'الفرنسية الوسطى',
|
||||||
'fro' => 'الفرنسية القديمة',
|
'fro' => 'الفرنسية القديمة',
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
array( "മലയളം", array(
|
array( "മലയളം", array(
|
||||||
'ml' => "മലയാളം",
|
'ml' => "മലയാളം",
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
array( "finish", array(
|
array( "finish", array(
|
||||||
'fi' => 'finnish'
|
'fi' => 'finnish'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user