r92916 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92915‎ | r92916 | r92917 >
Date:23:11, 22 July 2011
Author:werdna
Status:ok
Tags:
Comment:
Blacklist IE 7 and below from MoodBar
Modified paths:
  • /trunk/extensions/MoodBar/MoodBar.php (modified) (history)
  • /trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.init.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.init.js
@@ -14,7 +14,15 @@
1515 },
1616
1717 isDisabled: function() {
18 - return $.cookie( mb.cookiePrefix() + 'disabled' ) == '1';
 18+ var cookieDisabled = ($.cookie( mb.cookiePrefix() + 'disabled' ) == '1');
 19+ var browserDisabled = false;
 20+ var clientInfo = $.client.profile();
 21+
 22+ if ( clientInfo.name == 'msie' && clientInfo.versionNumber < 8 ) {
 23+ browserDisabled = true;
 24+ }
 25+
 26+ return cookieDisabled || browserDisabled;
1927 },
2028
2129 ui: {
Index: trunk/extensions/MoodBar/MoodBar.php
@@ -61,6 +61,7 @@
6262 'position' => 'top',
6363 'dependencies' => array(
6464 'jquery.cookie',
 65+ 'jquery.client',
6566 ),
6667 );
6768
@@ -115,7 +116,6 @@
116117 'scripts' => 'jquery.moodBar/jquery.moodBar.js',
117118 'dependencies' => array(
118119 'mediawiki.util',
119 - 'jquery.client',
120120 ),
121121 );
122122

Status & tagging log