Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -64,7 +64,7 @@ |
65 | 65 | array( 'src' => 'js/plugins/jquery.cookie.js', 'version' => 4 ), |
66 | 66 | array( 'src' => 'js/plugins/jquery.delayedBind.js', 'version' => 1 ), |
67 | 67 | array( 'src' => 'js/plugins/jquery.expandableField.js', 'version' => 17 ), |
68 | | - array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 24 ), |
| 68 | + array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 25 ), |
69 | 69 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 36 ), |
70 | 70 | array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 195 ), |
71 | 71 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 53 ), |
— | — | @@ -80,10 +80,10 @@ |
81 | 81 | array( 'src' => 'js/thirdparty/contentCollector.js', 'version' => 2 ), |
82 | 82 | ), |
83 | 83 | 'combined' => array( |
84 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 431 ), |
| 84 | + array( 'src' => 'js/plugins.combined.js', 'version' => 432 ), |
85 | 85 | ), |
86 | 86 | 'minified' => array( |
87 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 432 ), |
| 87 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 433 ), |
88 | 88 | ), |
89 | 89 | ), |
90 | 90 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -1184,7 +1184,10 @@ |
1185 | 1185 | */ |
1186 | 1186 | highlight: function( context, result, updateTextbox ) { |
1187 | 1187 | var selected = context.data.$container.find( '.suggestions-result-current' ); |
1188 | | - if ( !result.get || selected.get( 0 ) != result.get( 0 ) ) { |
| 1188 | + if ( result.get && selected.get( 0 ) == result.get( 0 ) ) { |
| 1189 | + // if the currently selected item is equal to the result, exit please |
| 1190 | + return true; |
| 1191 | + } else if ( !result.get || selected.get( 0 ) != result.get( 0 ) ) { |
1189 | 1192 | if ( result == 'prev' ) { |
1190 | 1193 | if( selected.is( '.suggestions-special' ) ) { |
1191 | 1194 | result = context.data.$container.find( '.suggestions-result:last' ) |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | $autoEllipseMe=$autoEllipseMe.add($result);}} |
69 | 69 | if(expWidth>context.data.$container.width()){var maxWidth=context.config.maxExpandFactor*context.data.$textbox.width();context.data.$container.width(Math.min(expWidth,maxWidth));} |
70 | 70 | $autoEllipseMe.autoEllipsis({hasSpan:true,tooltip:true,matchText:matchedText});}} |
71 | | -break;case'maxRows':context.config[property]=Math.max(1,Math.min(100,value));break;case'delay':context.config[property]=Math.max(0,Math.min(1200,value));break;case'maxExpandFactor':context.config[property]=Math.max(1,value);break;case'submitOnClick':case'positionFromLeft':case'highlightInput':context.config[property]=value?true:false;break;}},highlight:function(context,result,updateTextbox){var selected=context.data.$container.find('.suggestions-result-current');if(!result.get||selected.get(0)!=result.get(0)){if(result=='prev'){if(selected.is('.suggestions-special')){result=context.data.$container.find('.suggestions-result:last')}else{result=selected.prev();if(selected.length==0){if(context.data.$container.find('.suggestions-special').html()!=""){result=context.data.$container.find('.suggestions-special');}else{result=context.data.$container.find('.suggestions-results div:last');}}}}else if(result=='next'){if(selected.length==0){result=context.data.$container.find('.suggestions-results div:first');if(result.length==0&&context.data.$container.find('.suggestions-special').html()!=""){result=context.data.$container.find('.suggestions-special');}}else{result=selected.next();if(selected.is('.suggestions-special')){result=$([]);}else if(result.length==0&&context.data.$container.find('.suggestions-special').html()!=""){result=context.data.$container.find('.suggestions-special');}}} |
| 71 | +break;case'maxRows':context.config[property]=Math.max(1,Math.min(100,value));break;case'delay':context.config[property]=Math.max(0,Math.min(1200,value));break;case'maxExpandFactor':context.config[property]=Math.max(1,value);break;case'submitOnClick':case'positionFromLeft':case'highlightInput':context.config[property]=value?true:false;break;}},highlight:function(context,result,updateTextbox){var selected=context.data.$container.find('.suggestions-result-current');if(result.get&&selected.get(0)==result.get(0)){return true;}else if(!result.get||selected.get(0)!=result.get(0)){if(result=='prev'){if(selected.is('.suggestions-special')){result=context.data.$container.find('.suggestions-result:last')}else{result=selected.prev();if(selected.length==0){if(context.data.$container.find('.suggestions-special').html()!=""){result=context.data.$container.find('.suggestions-special');}else{result=context.data.$container.find('.suggestions-results div:last');}}}}else if(result=='next'){if(selected.length==0){result=context.data.$container.find('.suggestions-results div:first');if(result.length==0&&context.data.$container.find('.suggestions-special').html()!=""){result=context.data.$container.find('.suggestions-special');}}else{result=selected.next();if(selected.is('.suggestions-special')){result=$([]);}else if(result.length==0&&context.data.$container.find('.suggestions-special').html()!=""){result=context.data.$container.find('.suggestions-special');}}} |
72 | 72 | selected.removeClass('suggestions-result-current');result.addClass('suggestions-result-current');} |
73 | 73 | if(updateTextbox){if(result.length==0){$.suggestions.restore(context);}else{context.data.$textbox.val(result.data('text'));context.data.$textbox.change();} |
74 | 74 | context.data.$textbox.trigger('change');} |