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:
Santhosh Thottingal
2012-09-07 18:55:02 +05:30
parent 805482d9cd
commit 0b2b993b19
2 changed files with 6 additions and 5 deletions

View File

@@ -247,7 +247,7 @@
*/
prepareContentFonts: function () {
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();
var savedFont = this.webfontPreferences.get( this.contentLanguage );
@@ -265,7 +265,7 @@
var $systemFont = $( "<option>" ).val( 'system' ).text( 'System font' );
$fontSelector.append( $systemFont );
$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 )
+ "</strong><div>Used for content</div>" );
},
@@ -276,11 +276,12 @@
listen: function () {
var that = this;
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" );
// 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();
} );

View File

@@ -64,7 +64,7 @@
var that = this;
// Register all event listeners to the ULS language settings here.
that.$element.on( "click", $.proxy( that.show, that ) );
that.$window.find( 'languagesettings-close' )
that.$window.find( '#languagesettings-close' )
.on( "click", $.proxy( that.hide, that ) );
},