[MediaWiki-commits] [Gerrit] Avoid setting inline style for the element when reset applied - change (mediawiki...UniversalLanguageSelector)

2013-06-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Avoid setting inline style for the element when reset applied
..


Avoid setting inline style for the element when reset applied

Followup: Ic3baa18b01a972f08e51e84217e82d0939e674c0 and
Iff522e0016d8284dc785580e6eb3dd2967c58289
Bug: 39992

Change-Id: Ifd8c4629f5512f6d54fc0a19d3b8d2bec4db23c0
---
M lib/jquery.webfonts.js
1 file changed, 6 insertions(+), 10 deletions(-)

Approvals:
  Nikerabbit: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/jquery.webfonts.js b/lib/jquery.webfonts.js
index 74dab69..58f3cdb 100644
--- a/lib/jquery.webfonts.js
+++ b/lib/jquery.webfonts.js
@@ -95,21 +95,17 @@
fontStack.unshift( fontFamily );
}
 
+   if ( !fontFamily || fontFamily === 
this.originalFontFamily ) {
+   // We are resetting the font to original font.
+   fontStack = [];
+   // This will cause removing inline fontFamily 
style.
+   }
+
// Set the font of this element if it's not excluded
if ( !$element.is( this.options.exclude ) ) {
$element.css( 'font-family', fontStack.join() );
}
 
-   if ( !fontFamily || fontFamily === 
this.originalFontFamily ) {
-   // We are resetting the font to original font.
-   // Do not explicitly set fontFamily for child 
nodes. Just remove
-   // the previous setting.
-   $element.find( 'textarea, input, button' )
-   .not( this.options.exclude )
-   .css( 'font-family', '' );
-
-   return;
-   }
// Set the font of this element's children if they are 
not excluded.
// font-family of input, textarea and button must 
be changed explicitly.
$element.find( 'textarea, input, button' )

-- 
To view, visit https://gerrit.wikimedia.org/r/66084
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd8c4629f5512f6d54fc0a19d3b8d2bec4db23c0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Avoid setting inline style for the element when reset applied - change (mediawiki...UniversalLanguageSelector)

2013-05-30 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/66084


Change subject: Avoid setting inline style for the element when reset applied
..

Avoid setting inline style for the element when reset applied

Followup: Ic3baa18b01a972f08e51e84217e82d0939e674c0 and
Iff522e0016d8284dc785580e6eb3dd2967c58289
Bug: 39992

Change-Id: Ifd8c4629f5512f6d54fc0a19d3b8d2bec4db23c0
---
M lib/jquery.webfonts.js
1 file changed, 6 insertions(+), 10 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/84/66084/1

diff --git a/lib/jquery.webfonts.js b/lib/jquery.webfonts.js
index 74dab69..58f3cdb 100644
--- a/lib/jquery.webfonts.js
+++ b/lib/jquery.webfonts.js
@@ -95,21 +95,17 @@
fontStack.unshift( fontFamily );
}
 
+   if ( !fontFamily || fontFamily === 
this.originalFontFamily ) {
+   // We are resetting the font to original font.
+   fontStack = [];
+   // This will cause removing inline fontFamily 
style.
+   }
+
// Set the font of this element if it's not excluded
if ( !$element.is( this.options.exclude ) ) {
$element.css( 'font-family', fontStack.join() );
}
 
-   if ( !fontFamily || fontFamily === 
this.originalFontFamily ) {
-   // We are resetting the font to original font.
-   // Do not explicitly set fontFamily for child 
nodes. Just remove
-   // the previous setting.
-   $element.find( 'textarea, input, button' )
-   .not( this.options.exclude )
-   .css( 'font-family', '' );
-
-   return;
-   }
// Set the font of this element's children if they are 
not excluded.
// font-family of input, textarea and button must 
be changed explicitly.
$element.find( 'textarea, input, button' )

-- 
To view, visit https://gerrit.wikimedia.org/r/66084
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd8c4629f5512f6d54fc0a19d3b8d2bec4db23c0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits