r63133 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63132‎ | r63133 | r63134 >
Date:20:52, 1 March 2010
Author:catrope
Status:deferred
Tags:
Comment:
UsabilityInitiative: Remove unused namespaceSelect plugin, add trailing newline to some JS files that were lacking it to make them combine nicely. Also change OK to Update in template dialog
Modified paths:
  • /trunk/extensions/UsabilityInitiative/Makefile (modified) (history)
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/WikiEditor/Modules/TemplateEditor/TemplateEditor.i18n.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.autoEllipsis.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.collapsibleTabs.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.namespaceSelect.js (deleted) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -70,7 +70,6 @@
7171 array( 'src' => 'js/plugins/jquery.color.js', 'version' => 1 ),
7272 array( 'src' => 'js/plugins/jquery.cookie.js', 'version' => 4 ),
7373 array( 'src' => 'js/plugins/jquery.delayedBind.js', 'version' => 1 ),
74 - array( 'src' => 'js/plugins/jquery.namespaceSelect.js', 'version' => 1 ),
7574 array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 7 ),
7675 array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 27 ),
7776 array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 157 ),
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/TemplateEditor/TemplateEditor.i18n.php
@@ -14,7 +14,7 @@
1515 $messages['en'] = array(
1616 'wikieditor-template-editor-preference' => 'Enable form-based editing of wiki templates',
1717 'wikieditor-template-editor-dialog-title' => 'Edit template',
18 - 'wikieditor-template-editor-dialog-submit' => 'OK',
 18+ 'wikieditor-template-editor-dialog-submit' => 'Update',
1919 );
2020
2121 /** Afrikaans (Afrikaans)
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.namespaceSelect.js
@@ -1,20 +0,0 @@
2 -/**
3 - * Plugin that fills a <select> with namespaces
4 - */
5 -
6 -(function ($) {
7 -$.fn.namespaceSelector = function( defaultNS ) {
8 - if ( typeof defaultNS == 'undefined' )
9 - defaultNS = 0;
10 - return this.each( function() {
11 - for ( var id in wgFormattedNamespaces ) {
12 - var opt = $( '<option />' )
13 - .attr( 'value', id )
14 - .text( wgFormattedNamespaces[id] );
15 - if ( id == defaultNS )
16 - opt.attr( 'selected', 'selected' );
17 - opt.appendTo( $(this) );
18 - }
19 - });
20 -};})(jQuery);
21 -
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js
@@ -382,4 +382,4 @@
383383 return retval;
384384 };
385385
386 -} )( jQuery );
\ No newline at end of file
 386+} )( jQuery );
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.collapsibleTabs.js
@@ -99,4 +99,4 @@
100100 }
101101 };
102102
103 -} )( jQuery );
\ No newline at end of file
 103+} )( jQuery );
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.autoEllipsis.js
@@ -87,4 +87,4 @@
8888 } );
8989 };
9090
91 -} )( jQuery );
\ No newline at end of file
 91+} )( jQuery );
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -5259,7 +5259,8 @@
52605260 } );
52615261 };
52625262
5263 -} )( jQuery );/*
 5263+} )( jQuery );
 5264+/*
52645265
52655266 jQuery Browser Plugin
52665267 * Version 2.3
@@ -5446,7 +5447,8 @@
54475448 }
54485449 };
54495450
5450 -} )( jQuery );/*
 5451+} )( jQuery );
 5452+/*
54515453 * jQuery Color Animations
54525454 * Copyright 2007 John Resig
54535455 * Released under the MIT and GPL licenses.
@@ -5735,26 +5737,6 @@
57365738 } );
57375739 } )( jQuery );
57385740 /**
5739 - * Plugin that fills a <select> with namespaces
5740 - */
5741 -
5742 -(function ($) {
5743 -$.fn.namespaceSelector = function( defaultNS ) {
5744 - if ( typeof defaultNS == 'undefined' )
5745 - defaultNS = 0;
5746 - return this.each( function() {
5747 - for ( var id in wgFormattedNamespaces ) {
5748 - var opt = $( '<option />' )
5749 - .attr( 'value', id )
5750 - .text( wgFormattedNamespaces[id] );
5751 - if ( id == defaultNS )
5752 - opt.attr( 'selected', 'selected' );
5753 - opt.appendTo( $(this) );
5754 - }
5755 - });
5756 -};})(jQuery);
5757 -
5758 -/**
57595741 * This plugin provides a generic way to add suggestions to a text box.
57605742 *
57615743 * Usage:
@@ -6558,7 +6540,8 @@
65596541 return retval;
65606542 };
65616543
6562 -} )( jQuery );/**
 6544+} )( jQuery );
 6545+/**
65636546 * This plugin provides a way to build a wiki-text editing user interface around a textarea.
65646547 *
65656548 * @example To intialize without any modules:
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -389,9 +389,7 @@
390390 $.fn.extend({delayedBind:function(timeout,event,data,callback){var encEvent=encodeEvent(event);return this.each(function(){var that=this;if(!($(this).data('_delayedBindBound-'+encEvent+'-'+timeout))){$(this).data('_delayedBindBound-'+encEvent+'-'+timeout,true);$(this).bind(event,function(){var timerID=$(this).data('_delayedBindTimerID-'+encEvent+'-'+timeout);if(typeof timerID!='undefined')
391391 clearTimeout(timerID);timerID=setTimeout(function(){$(that).trigger('_delayedBind-'+encEvent+'-'+timeout);},timeout);$(this).data('_delayedBindTimerID-'+encEvent+'-'+timeout,timerID);});}
392392 $(this).bind('_delayedBind-'+encEvent+'-'+timeout,data,callback);});},delayedBindCancel:function(timeout,event){var encEvent=encodeEvent(event);return this.each(function(){var timerID=$(this).data('_delayedBindTimerID-'+encEvent+'-'+timeout);if(typeof timerID!='undefined')
393 -clearTimeout(timerID);});},delayedBindUnbind:function(timeout,event,callback){var encEvent=encodeEvent(event);return this.each(function(){$(this).unbind('_delayedBind-'+encEvent+'-'+timeout,callback);});}});})(jQuery);(function($){$.fn.namespaceSelector=function(defaultNS){if(typeof defaultNS=='undefined')
394 -defaultNS=0;return this.each(function(){for(var id in wgFormattedNamespaces){var opt=$('<option />').attr('value',id).text(wgFormattedNamespaces[id]);if(id==defaultNS)
395 -opt.attr('selected','selected');opt.appendTo($(this));}});};})(jQuery);(function($){$.suggestions={cancel:function(context){if(context.data.timerID!=null){clearTimeout(context.data.timerID);}
 393+clearTimeout(timerID);});},delayedBindUnbind:function(timeout,event,callback){var encEvent=encodeEvent(event);return this.each(function(){$(this).unbind('_delayedBind-'+encEvent+'-'+timeout,callback);});}});})(jQuery);(function($){$.suggestions={cancel:function(context){if(context.data.timerID!=null){clearTimeout(context.data.timerID);}
396394 if(typeof context.config.cancel=='function'){context.config.cancel.call(context.data.$textbox);}},restore:function(context){context.data.$textbox.val(context.data.prevText);},update:function(context,delayed){function maybeFetch(){if(context.data.$textbox.val()!==context.data.prevText){context.data.prevText=context.data.$textbox.val();if(typeof context.config.fetch=='function'){context.config.fetch.call(context.data.$textbox,context.data.$textbox.val());}}}
397395 if(context.data.timerID!=null){clearTimeout(context.data.timerID);}
398396 if(delayed){context.data.timerID=setTimeout(maybeFetch,context.config.delay);}else{maybeFetch();}
Index: trunk/extensions/UsabilityInitiative/Makefile
@@ -26,7 +26,6 @@
2727 js/plugins/jquery.color.js\
2828 js/plugins/jquery.cookie.js\
2929 js/plugins/jquery.delayedBind.js\
30 - js/plugins/jquery.namespaceSelect.js\
3130 js/plugins/jquery.suggestions.js\
3231 js/plugins/jquery.textSelection.js\
3332 js/plugins/jquery.wikiEditor.js\

Status & tagging log