r101615 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101614‎ | r101615 | r101616 >
Date:11:15, 2 November 2011
Author:catrope
Status:ok
Tags:
Comment:
Followup r101288: don't try to be clever and use a minifier file, ResourceLoader takes care of minification for you.
Modified paths:
  • /trunk/extensions/MoodBar/MoodBar.php (modified) (history)
  • /trunk/extensions/MoodBar/modules/jquery.NobleCount/jquery.NobleCount.min.js (deleted) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/modules/jquery.NobleCount/jquery.NobleCount.min.js
@@ -1,3 +0,0 @@
2 -/* jQuery.NobleCount v 1.0 http://tpgblog.com/noblecount/
3 -compiled by http://yui.2clics.net/ */
4 -(function(c){c.fn.NobleCount=function(i,h){var j;var g=false;if(typeof i=="string"){j=c.extend({},c.fn.NobleCount.settings,h);if(typeof h!="undefined"){g=((typeof h.max_chars=="number")?true:false)}return this.each(function(){var k=c(this);f(k,i,j,g)})}return this};c.fn.NobleCount.settings={on_negative:null,on_positive:null,on_update:null,max_chars:140,block_negative:false,cloak:false,in_dom:false};function f(g,m,n,h){var l=n.max_chars;var j=c(m);if(!h){var k=j.text();var i=(/^[1-9]\d*$/).test(k);if(i){l=k}}b(g,j,n,l,true);c(g).keydown(function(o){b(g,j,n,l,false);if(a(o,g,n,l)==false){return false}});c(g).keyup(function(o){b(g,j,n,l,false);if(a(o,g,n,l)==false){return false}})}function a(k,g,l,j){if(l.block_negative){var h=k.which;var i;if(typeof document.selection!="undefined"){i=(document.selection.createRange().text.length>0)}else{i=(g[0].selectionStart!=g[0].selectionEnd)}if((!((e(g,j)<1)&&(h>47||h==32||h==0||h==13)&&!k.ctrlKey&&!k.altKey&&!i))==false){return false}}return true}function e(g,h){return h-(c(g).val()).length}function b(g,i,l,j,h){var k=e(g,j);if(k<0){d(l.on_negative,l.on_positive,g,i,l,k)}else{d(l.on_positive,l.on_negative,g,i,l,k)}if(l.cloak){if(l.in_dom){i.attr("data-noblecount",k)}}else{i.text(k)}if(!h&&jQuery.isFunction(l.on_update)){l.on_update(g,i,l,k)}}function d(i,g,h,j,l,k){if(i!=null){if(typeof i=="string"){j.addClass(i)}else{if(jQuery.isFunction(i)){i(h,j,l,k)}}}if(g!=null){if(typeof g=="string"){j.removeClass(g)}}}})(jQuery);
\ No newline at end of file
Index: trunk/extensions/MoodBar/MoodBar.php
@@ -94,7 +94,7 @@
9595
9696
9797 $wgResourceModules['jquery.NobleCount'] = $mbResourceTemplate + array(
98 - 'scripts' => 'jquery.NobleCount/jquery.NobleCount.min.js',
 98+ 'scripts' => 'jquery.NobleCount/jquery.NobleCount.js',
9999 );
100100
101101 $wgResourceModules['ext.moodBar.core'] = $mbResourceTemplate + array(

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r101288Modified text box so that character counter actually works and is dynamic. Te...bharris21:51, 29 October 2011

Status & tagging log