r60313 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60312‎ | r60313 | r60314 >
Date:13:39, 23 December 2009
Author:catrope
Status:deferred
Tags:
Comment:
UsabilityInitiative: Whitespace cleanup for r60299. Also add newlines at the end of .css/.js files where they were missing to make the combined files look nicer and prevent obscure combining bugs
Modified paths:
  • /trunk/extensions/UsabilityInitiative/Vector/Modules/CollapsibleLeftNav/CollapsibleLeftNav.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Modules/CollapsibleTabs/CollapsibleTabs.js (modified) (history)
  • /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/css/collapsibleLeftNav.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/combined.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/suggestions.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/wikiEditor.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/wikiEditor.dialogs.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/wikiEditor.preview.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/wikiEditor.toc.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/wikiEditor.toolbar.css (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/Vector/Modules/SimpleSearch/SimpleSearch.js
@@ -121,4 +121,4 @@
122122 },
123123 $region: $j( '#simpleSearch' )
124124 } );
125 -});
\ No newline at end of file
 125+});
Index: trunk/extensions/UsabilityInitiative/Vector/Modules/CollapsibleTabs/CollapsibleTabs.js
@@ -75,4 +75,4 @@
7676 }
7777 }
7878 } );
79 -} );
\ No newline at end of file
 79+} );
Index: trunk/extensions/UsabilityInitiative/Vector/Modules/CollapsibleLeftNav/CollapsibleLeftNav.js
@@ -5,21 +5,22 @@
66 /* $wgVectorUseCollapsibleLeftNav = true; */
77
88 mw.addOnloadHook( function() {
9 - if( !wgVectorUseCollapsibleLeftNav ) return;
10 - $j( "#panel" ).addClass( "collapsible-nav" );
11 - $j( "#panel > div.portal" ).toggleClass( "collapsed" );
12 - $j( "#panel > div.portal:first" )
13 - .toggleClass( "expanded" )
14 - .toggleClass( "collapsed" )
15 - .find( "div.body" )
16 - .slideToggle( "fast" );
 9+ if( !wgVectorUseCollapsibleLeftNav )
 10+ return;
 11+ $j( '#panel' ).addClass( 'collapsible-nav' );
 12+ $j( '#panel > div.portal' ).toggleClass( 'collapsed' );
 13+ $j( '#panel > div.portal:first' )
 14+ .toggleClass( 'expanded' )
 15+ .toggleClass( 'collapsed' )
 16+ .find( 'div.body' )
 17+ .slideToggle( 'fast' );
1718 // Toggle the selected menu's class and expand or collapse the menu
18 - $j( "#panel > div.portal > h5" ).click( function() {
 19+ $j( '#panel > div.portal > h5' ).click( function() {
1920 $j( this )
2021 .parent()
21 - .toggleClass("expanded")
22 - .toggleClass("collapsed")
23 - .find("div.body")
24 - .slideToggle("fast");
 22+ .toggleClass( 'expanded' )
 23+ .toggleClass( 'collapsed' )
 24+ .find( 'div.body' )
 25+ .slideToggle( 'fast' );
2526 } );
26 -} );
\ No newline at end of file
 27+} );
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js
@@ -5,24 +5,26 @@
66 /* $wgVectorUseCollapsibleLeftNav = true; */
77
88 mw.addOnloadHook( function() {
9 - if( !wgVectorUseCollapsibleLeftNav ) return;
10 - $j( "#panel" ).addClass( "collapsible-nav" );
11 - $j( "#panel > div.portal" ).toggleClass( "collapsed" );
12 - $j( "#panel > div.portal:first" )
13 - .toggleClass( "expanded" )
14 - .toggleClass( "collapsed" )
15 - .find( "div.body" )
16 - .slideToggle( "fast" );
 9+ if( !wgVectorUseCollapsibleLeftNav )
 10+ return;
 11+ $j( '#panel' ).addClass( 'collapsible-nav' );
 12+ $j( '#panel > div.portal' ).toggleClass( 'collapsed' );
 13+ $j( '#panel > div.portal:first' )
 14+ .toggleClass( 'expanded' )
 15+ .toggleClass( 'collapsed' )
 16+ .find( 'div.body' )
 17+ .slideToggle( 'fast' );
1718 // Toggle the selected menu's class and expand or collapse the menu
18 - $j( "#panel > div.portal > h5" ).click( function() {
 19+ $j( '#panel > div.portal > h5' ).click( function() {
1920 $j( this )
2021 .parent()
21 - .toggleClass("expanded")
22 - .toggleClass("collapsed")
23 - .find("div.body")
24 - .slideToggle("fast");
 22+ .toggleClass( 'expanded' )
 23+ .toggleClass( 'collapsed' )
 24+ .find( 'div.body' )
 25+ .slideToggle( 'fast' );
2526 } );
26 -} );mw.addOnloadHook( function() {
 27+} );
 28+mw.addOnloadHook( function() {
2729
2830 var rtl = $j( 'body' ).is( '.rtl' ) ? true : false;
2931
@@ -99,7 +101,8 @@
100102 }
101103 }
102104 } );
103 -} );/* JavaScript for EditWarning extension */
 105+} );
 106+/* JavaScript for EditWarning extension */
104107
105108 mw.addOnloadHook( function() {
106109 // Check preferences for editwarning
@@ -266,4 +269,4 @@
267270 },
268271 $region: $j( '#simpleSearch' )
269272 } );
270 -});
\ No newline at end of file
 273+});
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js
@@ -1,5 +1,6 @@
22
3 -mw.addOnloadHook(function(){if(!wgVectorUseCollapsibleLeftNav)return;$j("#panel").addClass("collapsible-nav");$j("#panel > div.portal").toggleClass("collapsed");$j("#panel > div.portal:first").toggleClass("expanded").toggleClass("collapsed").find("div.body").slideToggle("fast");$j("#panel > div.portal > h5").click(function(){$j(this).parent().toggleClass("expanded").toggleClass("collapsed").find("div.body").slideToggle("fast");});});mw.addOnloadHook(function(){var rtl=$j('body').is('.rtl')?true:false;$j.collapsibleTabs.moveToCollapsed=function(ele){var $moving=$j(ele);$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=true;var data=$moving.data('collapsibleTabsSettings');var target=$moving.data('collapsibleTabsSettings').collapsedContainer;$moving.css("position","relative").css((rtl?'left':'right'),0).animate({width:'1px'},"normal",function(){$j(this).hide();$j('<span class="placeholder" style="display:none;"></span>').insertAfter(this);$j(this).remove().prependTo(target).data('collapsibleTabsSettings',data);$j(this).attr('style','display:list-item;');$j($j(ele).data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=false;$j.collapsibleTabs.handleResize();});};$j.collapsibleTabs.moveToExpanded=function(ele){var $moving=$j(ele);$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=true;var data=$moving.data('collapsibleTabsSettings');var $target=$j($moving.data('collapsibleTabsSettings').expandedContainer).find('span.placeholder:first');var expandedWidth=$moving.data('collapsibleTabsSettings').expandedWidth;$moving.css("position","relative").css((rtl?'right':'left'),0).css('width','1px');$target.replaceWith($moving.remove().css('width','1px').data('collapsibleTabsSettings',data).animate({width:expandedWidth+"px"},"normal",function(){$j(this).attr('style','display:block;');$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=false;$j.collapsibleTabs.handleResize();}));};$j('#p-views ul').bind("beforeTabCollapse",function(){if($j('#p-cactions').css('display')=='none')
 3+mw.addOnloadHook(function(){if(!wgVectorUseCollapsibleLeftNav)
 4+return;$j('#panel').addClass('collapsible-nav');$j('#panel > div.portal').toggleClass('collapsed');$j('#panel > div.portal:first').toggleClass('expanded').toggleClass('collapsed').find('div.body').slideToggle('fast');$j('#panel > div.portal > h5').click(function(){$j(this).parent().toggleClass('expanded').toggleClass('collapsed').find('div.body').slideToggle('fast');});});mw.addOnloadHook(function(){var rtl=$j('body').is('.rtl')?true:false;$j.collapsibleTabs.moveToCollapsed=function(ele){var $moving=$j(ele);$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=true;var data=$moving.data('collapsibleTabsSettings');var target=$moving.data('collapsibleTabsSettings').collapsedContainer;$moving.css("position","relative").css((rtl?'left':'right'),0).animate({width:'1px'},"normal",function(){$j(this).hide();$j('<span class="placeholder" style="display:none;"></span>').insertAfter(this);$j(this).remove().prependTo(target).data('collapsibleTabsSettings',data);$j(this).attr('style','display:list-item;');$j($j(ele).data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=false;$j.collapsibleTabs.handleResize();});};$j.collapsibleTabs.moveToExpanded=function(ele){var $moving=$j(ele);$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=true;var data=$moving.data('collapsibleTabsSettings');var $target=$j($moving.data('collapsibleTabsSettings').expandedContainer).find('span.placeholder:first');var expandedWidth=$moving.data('collapsibleTabsSettings').expandedWidth;$moving.css("position","relative").css((rtl?'right':'left'),0).css('width','1px');$target.replaceWith($moving.remove().css('width','1px').data('collapsibleTabsSettings',data).animate({width:expandedWidth+"px"},"normal",function(){$j(this).attr('style','display:block;');$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=false;$j.collapsibleTabs.handleResize();}));};$j('#p-views ul').bind("beforeTabCollapse",function(){if($j('#p-cactions').css('display')=='none')
45 $j("#p-cactions").addClass("filledPortlet").removeClass("emptyPortlet").find('h5').css('width','1px').animate({'width':'26px'},390);}).bind("beforeTabExpand",function(){if($j('#p-cactions li').length==1)
56 $j("#p-cactions h5").animate({'width':'1px'},370,function(){$j(this).attr('style','').parent().addClass("emptyPortlet").removeClass("filledPortlet");});}).collapsibleTabs({expandCondition:function(eleWidth){if(rtl){return($j('#right-navigation').position().left+$j('#right-navigation').width()+1)<($j('#left-navigation').position().left-eleWidth);}else{return($j('#left-navigation').position().left+$j('#left-navigation').width()+1)<($j('#right-navigation').position().left-eleWidth);}},collapseCondition:function(){if(rtl){return($j('#right-navigation').position().left+$j('#right-navigation').width())>$j('#left-navigation').position().left;}else{return($j('#left-navigation').position().left+$j('#left-navigation').width())>$j('#right-navigation').position().left;}}});});mw.addOnloadHook(function(){if(!wgVectorPreferences||!(wgVectorPreferences.editwarning&&wgVectorPreferences.editwarning.enable)){return true;}
67 $j('#wpTextbox1, #wpSummary').each(function(){$j(this).data('origtext',$j(this).val());});fallbackWindowOnBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){var fallbackResult=null;if(fallbackWindowOnBeforeUnload){fallbackResult=fallbackWindowOnBeforeUnload();}
Index: trunk/extensions/UsabilityInitiative/css/collapsibleLeftNav.css
@@ -27,4 +27,4 @@
2828 }
2929 #panel.collapsible-nav div.portal div.body {
3030 background: none !important;
31 -}
\ No newline at end of file
 31+}
Index: trunk/extensions/UsabilityInitiative/css/suggestions.css
@@ -48,4 +48,4 @@
4949 background-color: Highlight;
5050 color: white;
5151 color: HighlightText;
52 -}
\ No newline at end of file
 52+}
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.css
@@ -108,4 +108,4 @@
109109 }
110110 .wikiEditor-ui-tabs div.current a:hover {
111111 text-decoration: none;
112 -}
\ No newline at end of file
 112+}
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.preview.css
@@ -13,4 +13,4 @@
1414 .wikiEditor-preview-contents {
1515 padding: 1em;
1616 background-color: white;
17 -}
\ No newline at end of file
 17+}
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.dialogs.css
@@ -47,4 +47,4 @@
4848 }
4949 body.rtl .ui-dialog .ui-dialog-title {
5050 float:right;
51 -}
\ No newline at end of file
 51+}
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.toolbar.css
@@ -367,4 +367,4 @@
368368 .ui-widget table td.wikieditor-toolbar-table-preview-wrapper {
369369 background: #e5e5e5;
370370 padding: 10px;
371 -}
\ No newline at end of file
 371+}
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.toc.css
@@ -202,4 +202,3 @@
203203 .wikiEditor-ui-text textarea:focus {
204204 outline: none;
205205 }
206 -
Index: trunk/extensions/UsabilityInitiative/css/combined.css
@@ -27,7 +27,8 @@
2828 }
2929 #panel.collapsible-nav div.portal div.body {
3030 background: none !important;
31 -}/* suggestions plugin */
 31+}
 32+/* suggestions plugin */
3233
3334 .suggestions {
3435 overflow: hidden;
@@ -77,7 +78,8 @@
7879 background-color: Highlight;
7980 color: white;
8081 color: HighlightText;
81 -}/* wikiEditor plugin */
 82+}
 83+/* wikiEditor plugin */
8284
8385 /* This ID (#editform) could change in MediaWiki */
8486 form#editform {
@@ -187,7 +189,8 @@
188190 }
189191 .wikiEditor-ui-tabs div.current a:hover {
190192 text-decoration: none;
191 -}/* wikiEditor dialogs module */
 193+}
 194+/* wikiEditor dialogs module */
192195
193196 .ui-widget table {
194197 margin-top: 0.75em;
@@ -236,7 +239,8 @@
237240 }
238241 body.rtl .ui-dialog .ui-dialog-title {
239242 float:right;
240 -}/* wikiEditor toc module */
 243+}
 244+/* wikiEditor toc module */
241245 .wikiEditor-ui-toc {
242246 /* height and width are set dynamically */
243247 /*float: right;*/
@@ -440,7 +444,6 @@
441445 .wikiEditor-ui-text textarea:focus {
442446 outline: none;
443447 }
444 -
445448 /* wikiEditor toolbar module */
446449
447450 .wikiEditor-ui-toolbar {
@@ -810,7 +813,8 @@
811814 .ui-widget table td.wikieditor-toolbar-table-preview-wrapper {
812815 background: #e5e5e5;
813816 padding: 10px;
814 -}/* CSS for wikiEditor preview plugin */
 817+}
 818+/* CSS for wikiEditor preview plugin */
815819
816820 .wikiEditor-preview-loading {
817821 padding: 1em;
@@ -825,4 +829,4 @@
826830 .wikiEditor-preview-contents {
827831 padding: 1em;
828832 background-color: white;
829 -}
\ No newline at end of file
 833+}

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r60299Follow change to r60290 to remove unnecssiary code. Introducing left navigati...adam23:25, 22 December 2009

Status & tagging log