r68051 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68050‎ | r68051 | r68052 >
Date:02:25, 15 June 2010
Author:adam
Status:ok
Tags:
Comment:
SimpleSearch - re-disabling the re-enabled textinput changing with suggestion navigating as per Trevors comment on the revision where I disabled it for the first time, r68011. WOOOORRRDDDD.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.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.suggestions.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -64,7 +64,7 @@
6565 array( 'src' => 'js/plugins/jquery.cookie.js', 'version' => 4 ),
6666 array( 'src' => 'js/plugins/jquery.delayedBind.js', 'version' => 1 ),
6767 array( 'src' => 'js/plugins/jquery.expandableField.js', 'version' => 17 ),
68 - array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 23 ),
 68+ array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 24 ),
6969 array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 36 ),
7070 array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 195 ),
7171 array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 53 ),
@@ -80,10 +80,10 @@
8181 array( 'src' => 'js/thirdparty/contentCollector.js', 'version' => 2 ),
8282 ),
8383 'combined' => array(
84 - array( 'src' => 'js/plugins.combined.js', 'version' => 430 ),
 84+ array( 'src' => 'js/plugins.combined.js', 'version' => 431 ),
8585 ),
8686 'minified' => array(
87 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 431 ),
 87+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 432 ),
8888 ),
8989 ),
9090 );
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.suggestions.js
@@ -278,7 +278,7 @@
279279 // Arrow down
280280 case 40:
281281 if ( wasVisible ) {
282 - $.suggestions.highlight( context, 'next', true );
 282+ $.suggestions.highlight( context, 'next', false );
283283 } else {
284284 $.suggestions.update( context, false );
285285 }
@@ -287,7 +287,7 @@
288288 // Arrow up
289289 case 38:
290290 if ( wasVisible ) {
291 - $.suggestions.highlight( context, 'prev', true );
 291+ $.suggestions.highlight( context, 'prev', false );
292292 }
293293 preventDefault = wasVisible;
294294 break;
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -1247,7 +1247,7 @@
12481248 // Arrow down
12491249 case 40:
12501250 if ( wasVisible ) {
1251 - $.suggestions.highlight( context, 'next', true );
 1251+ $.suggestions.highlight( context, 'next', false );
12521252 } else {
12531253 $.suggestions.update( context, false );
12541254 }
@@ -1256,7 +1256,7 @@
12571257 // Arrow up
12581258 case 38:
12591259 if ( wasVisible ) {
1260 - $.suggestions.highlight( context, 'prev', true );
 1260+ $.suggestions.highlight( context, 'prev', false );
12611261 }
12621262 preventDefault = wasVisible;
12631263 break;
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -71,8 +71,8 @@
7272 selected.removeClass('suggestions-result-current');result.addClass('suggestions-result-current');}
7373 if(updateTextbox){if(result.length==0){$.suggestions.restore(context);}else{context.data.$textbox.val(result.data('text'));context.data.$textbox.change();}
7474 context.data.$textbox.trigger('change');}
75 -$.suggestions.special(context);},keypress:function(e,context,key){var wasVisible=context.data.$container.is(':visible');var preventDefault=false;switch(key){case 40:if(wasVisible){$.suggestions.highlight(context,'next',true);}else{$.suggestions.update(context,false);}
76 -preventDefault=true;break;case 38:if(wasVisible){$.suggestions.highlight(context,'prev',true);}
 75+$.suggestions.special(context);},keypress:function(e,context,key){var wasVisible=context.data.$container.is(':visible');var preventDefault=false;switch(key){case 40:if(wasVisible){$.suggestions.highlight(context,'next',false);}else{$.suggestions.update(context,false);}
 76+preventDefault=true;break;case 38:if(wasVisible){$.suggestions.highlight(context,'prev',false);}
7777 preventDefault=wasVisible;break;case 27:context.data.$container.hide();$.suggestions.restore(context);$.suggestions.cancel(context);context.data.$textbox.trigger('change');preventDefault=wasVisible;break;case 13:context.data.$container.hide();preventDefault=wasVisible;selected=context.data.$container.find('.suggestions-result-current');if(selected.size()==0){$.suggestions.cancel(context);context.config.$region.closest('form').submit();}else if(selected.is('.suggestions-special')){if(typeof context.config.special.select=='function'){context.config.special.select.call(selected,context.data.$textbox);}}else{if(typeof context.config.result.select=='function'){$.suggestions.highlight(context,selected,true);context.config.result.select.call(selected,context.data.$textbox);}else{$.suggestions.highlight(context,selected,true);}}
7878 break;default:$.suggestions.update(context,true);break;}
7979 if(preventDefault){e.preventDefault();e.stopImmediatePropagation();}}};$.fn.suggestions=function(){var returnValue=null;var args=arguments;$(this).each(function(){var context=$(this).data('suggestions-context');if(typeof context=='undefined'||context==null){context={config:{'fetch':function(){},'cancel':function(){},'special':{},'result':{},'$region':$(this),'suggestions':[],'maxRows':7,'delay':120,'submitOnClick':false,'maxExpandFactor':3,'positionFromLeft':true,'highlightInput':false}};}

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r68011Added some comments to some CSS rules added in r67871 which are suspect on fi...tparscal18:05, 14 June 2010

Status & tagging log