r78891 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78890‎ | r78891 | r78892 >
Date:16:21, 23 December 2010
Author:happy-melon
Status:deferred
Tags:
Comment:
Follow-up r78865 CR
Modified paths:
  • /trunk/phase3/resources/skins.common/skins.common.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/skins.common/skins.common.js
@@ -40,7 +40,7 @@
4141 return false;
4242 });
4343 } else {
44 - $expander = $j('<div class="collapsible-expander">')
 44+ var $expander = $j('<div class="collapsible-expander">')
4545 .text( '[' + mediaWiki.msg( 'hide' ) + ']' )
4646 .click(function(e, rmClass){
4747 rmClass = !(rmClass == false);
@@ -55,9 +55,8 @@
5656 : mediaWiki.msg( 'hide' )) +
5757 ']'
5858 );
59 - return true;
60 - })
61 - .before('[').after(']');
 59+ return false;
 60+ });
6261 if( $x.is('div.collapsible')){
6362 $x.prepend($expander);
6463 } else {
@@ -82,7 +81,7 @@
8382 if( rmClass ){
8483 $('table.collapsible',$(this)).andSelf().toggleClass('collapsed');
8584 }
86 - return true;
 85+ return false;
8786 });
8887
8988 $('div.collapsible').live( 'mw-toggle-collapse', function(e, rmClass){
@@ -93,7 +92,16 @@
9493 if( rmClass ){
9594 $('div.collapsible',$(this)).andSelf().toggleClass('collapsed');
9695 }
97 - return true;
 96+ return false;
9897 });
9998
100 -$('.collapsible.collapsed .collapsible-expander').trigger( 'click', [false] );
\ No newline at end of file
 99+/**
 100+ * Here we want to collapse .collapsible-expander buttons whose closest
 101+ * div.collapsible parent wants to be collapsed on first view
 102+ */
 103+$('.collapsible-expander').filter(function(){
 104+ return $(this).closest('.collapsible').is('.collapsible.collapsed')
 105+}).trigger( 'click', [false] );
 106+
 107+
 108+

Follow-up revisions

RevisionCommit summaryAuthorDate
r78987Reverting r78889 and r78865. Breaks changeslist on translatewiki (unpatrolled...krinkle00:29, 25 December 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78865(bug 17456) implement CollapsibleTables in core javascript. Using ResourceLo...happy-melon00:06, 23 December 2010

Status & tagging log