r65064 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65063‎ | r65064 | r65065 >
Date:13:49, 15 April 2010
Author:catrope
Status:deferred
Tags:
Comment:
UsabilityInitiative: Fix bug causing Modern toolbar to jump: restore <body> to the original position: value rather than forcing position:relative
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.wikiEditor.toolbar.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -74,7 +74,7 @@
7575 array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 30 ),
7676 array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 181 ),
7777 array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 52 ),
78 - array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 57 ),
 78+ array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 58 ),
7979 array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 23 ),
8080 array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 98 ),
8181 array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 11 ),
@@ -82,10 +82,10 @@
8383 array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 5 ),
8484 ),
8585 'combined' => array(
86 - array( 'src' => 'js/plugins.combined.js', 'version' => 383 ),
 86+ array( 'src' => 'js/plugins.combined.js', 'version' => 384 ),
8787 ),
8888 'minified' => array(
89 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 383 ),
 89+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 384 ),
9090 ),
9191 ),
9292 );
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js
@@ -690,8 +690,9 @@
691691 'end' : function() {
692692 // HACK: Opera doesn't seem to want to redraw after these bits
693693 // are added to the DOM, so we can just FORCE it!
 694+ var oldValue = $( 'body' ).css( 'position' );
694695 $( 'body' ).css( 'position', 'static' );
695 - $( 'body' ).css( 'position', 'relative' );
 696+ $( 'body' ).css( 'position', oldValue );
696697 },
697698 'loop' : function( i, s ) {
698699 s.$sections.append( $.wikiEditor.modules.toolbar.fn.buildSection( s.context, s.id, s.config ) );
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -11558,8 +11558,9 @@
1155911559 'end' : function() {
1156011560 // HACK: Opera doesn't seem to want to redraw after these bits
1156111561 // are added to the DOM, so we can just FORCE it!
 11562+ var oldValue = $( 'body' ).css( 'position' );
1156211563 $( 'body' ).css( 'position', 'static' );
11563 - $( 'body' ).css( 'position', 'relative' );
 11564+ $( 'body' ).css( 'position', oldValue );
1156411565 },
1156511566 'loop' : function( i, s ) {
1156611567 s.$sections.append( $.wikiEditor.modules.toolbar.fn.buildSection( s.context, s.id, s.config ) );
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -788,4 +788,4 @@
789789 if($section!==null&&id!=='main'){var show=selected==id;$section.css('display',show?'block':'none');if(show)$section.addClass('section-visible');}
790790 return $section;},updateBookletSelection:function(context,id,$pages,$index){var cookie='wikiEditor-'+context.instance+'-booklet-'+id+'-page';var selected=$.cookie(cookie);var $selectedIndex=$index.find('*[rel='+selected+']');if($selectedIndex.size()==0){selected=$index.children().eq(0).attr('rel');$.cookie(cookie,selected);}
791791 $pages.children().hide();$pages.find('*[rel='+selected+']').show();$index.children().removeClass('current');$selectedIndex.addClass('current');},build:function(context,config){var $tabs=$('<div />').addClass('tabs').appendTo(context.modules.toolbar.$toolbar);var $sections=$('<div />').addClass('sections').appendTo(context.modules.toolbar.$toolbar);context.modules.toolbar.$toolbar.append($('<div />').css('clear','both'));var sectionQueue=[];for(section in config){if(section=='main'){context.modules.toolbar.$toolbar.prepend($.wikiEditor.modules.toolbar.fn.buildSection(context,section,config[section]));}else{sectionQueue.push({'$sections':$sections,'context':context,'id':section,'config':config[section]});$tabs.append($.wikiEditor.modules.toolbar.fn.buildTab(context,section,config[section]));}}
792 -$.eachAsync(sectionQueue,{'bulk':0,'end':function(){$('body').css('position','static');$('body').css('position','relative');},'loop':function(i,s){s.$sections.append($.wikiEditor.modules.toolbar.fn.buildSection(s.context,s.id,s.config));var $section=s.$sections.find('.section:visible');if($section.size()){$sections.animate({'height':$section.outerHeight()},$section.outerHeight()*2,function(){context.fn.trigger('resize');});}}});}}};})(jQuery);
\ No newline at end of file
 792+$.eachAsync(sectionQueue,{'bulk':0,'end':function(){var oldValue=$('body').css('position');$('body').css('position','static');$('body').css('position',oldValue);},'loop':function(i,s){s.$sections.append($.wikiEditor.modules.toolbar.fn.buildSection(s.context,s.id,s.config));var $section=s.$sections.find('.section:visible');if($section.size()){$sections.animate({'height':$section.outerHeight()},$section.outerHeight()*2,function(){context.fn.trigger('resize');});}}});}}};})(jQuery);
\ No newline at end of file

Follow-up revisions

RevisionCommit summaryAuthorDate
r65959Merge Vector and UsabilityInitiative fixes from trunk: r64724, r65064, r65379...catrope19:03, 5 May 2010

Status & tagging log