Correct selectors, and formatting
Fix the issues from Ib2c8cfed And for ID based selectors removed the element name. Change-Id: I0016246c3a32b2b3696a1da1c04f507275c2267c
This commit is contained in:
@@ -247,7 +247,7 @@
|
|||||||
*/
|
*/
|
||||||
prepareContentFonts: function () {
|
prepareContentFonts: function () {
|
||||||
var fonts = this.$webfonts.list( this.contentLanguage );
|
var fonts = this.$webfonts.list( this.contentLanguage );
|
||||||
var $fontSelector = this.$template.find( 'select#content-font-selector' );
|
var $fontSelector = this.$template.find( '#content-font-selector' );
|
||||||
|
|
||||||
$fontSelector.find( 'option' ).remove();
|
$fontSelector.find( 'option' ).remove();
|
||||||
var savedFont = this.webfontPreferences.get( this.contentLanguage );
|
var savedFont = this.webfontPreferences.get( this.contentLanguage );
|
||||||
@@ -265,7 +265,7 @@
|
|||||||
var $systemFont = $( "<option>" ).val( 'system' ).text( 'System font' );
|
var $systemFont = $( "<option>" ).val( 'system' ).text( 'System font' );
|
||||||
$fontSelector.append( $systemFont );
|
$fontSelector.append( $systemFont );
|
||||||
$systemFont.attr( 'selected', savedFont === 'system' || !savedFont );
|
$systemFont.attr( 'selected', savedFont === 'system' || !savedFont );
|
||||||
var $fontLabel = this.$template.find( 'label#content-font-selector-label' );
|
var $fontLabel = this.$template.find( '#content-font-selector-label' );
|
||||||
$fontLabel.html( "<strong>Select font for " + $.uls.data.autonym( this.contentLanguage )
|
$fontLabel.html( "<strong>Select font for " + $.uls.data.autonym( this.contentLanguage )
|
||||||
+ "</strong><div>Used for content</div>" );
|
+ "</strong><div>Used for content</div>" );
|
||||||
},
|
},
|
||||||
@@ -276,11 +276,12 @@
|
|||||||
listen: function () {
|
listen: function () {
|
||||||
var that = this;
|
var that = this;
|
||||||
var $contentFontSelector = this.$template
|
var $contentFontSelector = this.$template
|
||||||
.find( "select#content-font-selector" ), $uiFontSelector = this.$template
|
.find( "#content-font-selector" );
|
||||||
|
var $uiFontSelector = this.$template
|
||||||
.find( "select#ui-font-selector" );
|
.find( "select#ui-font-selector" );
|
||||||
// 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( 'button#uls-displaysettings-apply' ).on( 'click', function () {
|
this.$template.find( '#uls-displaysettings-apply' ).on( 'click', function () {
|
||||||
that.apply();
|
that.apply();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
var that = this;
|
var that = this;
|
||||||
// Register all event listeners to the ULS language settings here.
|
// Register all event listeners to the ULS language settings here.
|
||||||
that.$element.on( "click", $.proxy( that.show, that ) );
|
that.$element.on( "click", $.proxy( that.show, that ) );
|
||||||
that.$window.find( 'languagesettings-close' )
|
that.$window.find( '#languagesettings-close' )
|
||||||
.on( "click", $.proxy( that.hide, that ) );
|
.on( "click", $.proxy( that.hide, that ) );
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user