r65911 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65910‎ | r65911 | r65912 >
Date:19:05, 4 May 2010
Author:tparscal
Status:ok
Tags:
Comment:
Added 100ms fadeIn and fadeOut to SimpleSearch label.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/Vector/Modules/SimpleSearch/SimpleSearch.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/Vector/Modules/SimpleSearch/SimpleSearch.js
@@ -31,15 +31,15 @@
3232 })
3333 .appendTo( $j(this).parent() );
3434 if ( $j(this).val() == '' ) {
35 - $j(this).parent().find( 'label' ).show();
 35+ $j(this).parent().find( 'label' ).fadeIn( 100 );
3636 }
3737 })
3838 .focus( function() {
39 - $j(this).parent().find( 'label' ).hide();
 39+ $j(this).parent().find( 'label' ).fadeOut( 100 );
4040 })
4141 .blur( function() {
4242 if ( $j(this).val() == '' ) {
43 - $j(this).parent().find( 'label' ).show();
 43+ $j(this).parent().find( 'label' ).fadeIn( 100 );
4444 }
4545 });
4646 $j( '#searchInput, #searchInput2, #powerSearchText, #searchText' ).suggestions( {
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php
@@ -16,13 +16,13 @@
1717 array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 8 ),
1818 array( 'src' => 'Modules/EditWarning/EditWarning.js', 'version' => 8 ),
1919 array( 'src' => 'Modules/FooterCleanup/FooterCleanup.js', 'version' => 5 ),
20 - array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 8 ),
 20+ array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 9 ),
2121 ),
2222 'combined' => array(
23 - array( 'src' => 'Vector.combined.js', 'version' => 25 ),
 23+ array( 'src' => 'Vector.combined.js', 'version' => 26 ),
2424 ),
2525 'minified' => array(
26 - array( 'src' => 'Vector.combined.min.js', 'version' => 25 ),
 26+ array( 'src' => 'Vector.combined.min.js', 'version' => 26 ),
2727 ),
2828 );
2929 static $modules = array(
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js
@@ -263,15 +263,15 @@
264264 })
265265 .appendTo( $j(this).parent() );
266266 if ( $j(this).val() == '' ) {
267 - $j(this).parent().find( 'label' ).show();
 267+ $j(this).parent().find( 'label' ).fadeIn( 100 );
268268 }
269269 })
270270 .focus( function() {
271 - $j(this).parent().find( 'label' ).hide();
 271+ $j(this).parent().find( 'label' ).fadeOut( 100 );
272272 })
273273 .blur( function() {
274274 if ( $j(this).val() == '' ) {
275 - $j(this).parent().find( 'label' ).show();
 275+ $j(this).parent().find( 'label' ).fadeIn( 100 );
276276 }
277277 });
278278 $j( '#searchInput, #searchInput2, #powerSearchText, #searchText' ).suggestions( {
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js
@@ -12,5 +12,5 @@
1313 +transclusionCount
1414 +'</strong> other pages.</label>');$j('.mw-templatesUsedExplanation').remove();$j('.collapsible-list label').click(function(){$j(this).parent().toggleClass('expanded').toggleClass('collapsed').find('ul').slideToggle('fast');return false;}).trigger('click');$j('#wpPreview, #wpDiff, .editHelp, #editpage-specialchars').remove();$j('#mw-editform-cancel').remove().appendTo('.editButtons');});if(wgVectorEnabledModules.simplesearch&&skin=='vector'&&typeof os_autoload_inputs!=='undefined'&&os_autoload_forms!=='undefined'){os_autoload_inputs=[];os_autoload_forms=[];}
1515 $j(document).ready(function(){if(!wgVectorEnabledModules.simplesearch||skin!='vector'){return true;}
16 -$j('div#simpleSearch > input#searchInput').each(function(){$j('<label />').text(mw.usability.getMsg('vector-simplesearch-search')).css({'display':'none','position':'absolute','bottom':0,'padding':'0.25em','color':'#999999','cursor':'text'}).css(($j('body').is('.rtl')?'right':'left'),0).click(function(){$j(this).parent().find('input#searchInput').focus();}).appendTo($j(this).parent());if($j(this).val()==''){$j(this).parent().find('label').show();}}).focus(function(){$j(this).parent().find('label').hide();}).blur(function(){if($j(this).val()==''){$j(this).parent().find('label').show();}});$j('#searchInput, #searchInput2, #powerSearchText, #searchText').suggestions({fetch:function(query){var $this=$j(this);var request=$j.ajax({url:wgScriptPath+'/api.php',data:{'action':'opensearch','search':query,'namespace':0,'suggest':''},dataType:'json',success:function(data){$this.suggestions('suggestions',data[1]);}});$j(this).data('request',request);},cancel:function(){var request=$j(this).data('request');if(request&&typeof request.abort=='function'){request.abort();$j(this).removeData('request');}},result:{select:function($textbox){$textbox.closest('form').submit();}},delay:120});$j('#searchInput').suggestions({result:{select:function($textbox){$textbox.closest('form').submit();}},special:{render:function(query){if($j(this).children().size()==0){$j(this).show()
 16+$j('div#simpleSearch > input#searchInput').each(function(){$j('<label />').text(mw.usability.getMsg('vector-simplesearch-search')).css({'display':'none','position':'absolute','bottom':0,'padding':'0.25em','color':'#999999','cursor':'text'}).css(($j('body').is('.rtl')?'right':'left'),0).click(function(){$j(this).parent().find('input#searchInput').focus();}).appendTo($j(this).parent());if($j(this).val()==''){$j(this).parent().find('label').fadeIn(100);}}).focus(function(){$j(this).parent().find('label').fadeOut(100);}).blur(function(){if($j(this).val()==''){$j(this).parent().find('label').fadeIn(100);}});$j('#searchInput, #searchInput2, #powerSearchText, #searchText').suggestions({fetch:function(query){var $this=$j(this);var request=$j.ajax({url:wgScriptPath+'/api.php',data:{'action':'opensearch','search':query,'namespace':0,'suggest':''},dataType:'json',success:function(data){$this.suggestions('suggestions',data[1]);}});$j(this).data('request',request);},cancel:function(){var request=$j(this).data('request');if(request&&typeof request.abort=='function'){request.abort();$j(this).removeData('request');}},result:{select:function($textbox){$textbox.closest('form').submit();}},delay:120});$j('#searchInput').suggestions({result:{select:function($textbox){$textbox.closest('form').submit();}},special:{render:function(query){if($j(this).children().size()==0){$j(this).show()
1717 $label=$j('<div />').addClass('special-label').text(mw.usability.getMsg('vector-simplesearch-containing')).appendTo($j(this));$query=$j('<div />').addClass('special-query').text(query).appendTo($j(this));$query.autoEllipsis();}else{$j(this).find('.special-query').empty().text(query).autoEllipsis();}},select:function($textbox){$textbox.closest('form').append($j('<input />').attr({'type':'hidden','name':'fulltext','value':1}));$textbox.closest('form').submit();}},$region:$j('#simpleSearch')});});
\ No newline at end of file

Status & tagging log