From: Krinkle Date: Thu, 23 Dec 2010 16:36:37 +0000 (+0000) Subject: using .append() instead of innerHTML+=. The latter replaces the html and causes all... X-Git-Tag: 1.31.0-rc.0~33148 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=aeda023841edcf0550135cb5892787bd92506748;p=lhc%2Fweb%2Fwiklou.git using .append() instead of innerHTML+=. The latter replaces the html and causes all bound event handlers to be list --- diff --git a/resources/Resources.php b/resources/Resources.php index 6c205ab342..d4f0a08236 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -78,6 +78,10 @@ return array( 'jquery.localize' => array( 'scripts' => 'resources/jquery/jquery.localize.js' ), + 'jquery.makeCollapsible' => array( + 'scripts' => 'resources/jquery/jquery.makeCollapsible.js', + 'styles' => 'resources/jquery/jquery.makeCollapsible.css', + ), 'jquery.suggestions' => array( 'scripts' => 'resources/jquery/jquery.suggestions.js', 'styles' => 'resources/jquery/jquery.suggestions.css', @@ -345,7 +349,7 @@ return array( ), 'mediawiki.util' => array( 'scripts' => 'resources/mediawiki.util/mediawiki.util.js', - 'dependencies' => array( 'jquery.checkboxShiftClick', 'jquery.client', 'jquery.placeholder' ), + 'dependencies' => array( 'jquery.checkboxShiftClick', 'jquery.client', 'jquery.placeholder', 'jquery.makeCollapsible' ), 'debugScripts' => 'resources/mediawiki.util/mediawiki.util.test.js', ), 'mediawiki.action.history' => array( diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 01103bc899..91d647fd70 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -620,13 +620,13 @@ window.ts_makeSortable = function( table ) { for ( var i = 0; i < firstRow.cells.length; i++ ) { var cell = firstRow.cells[i]; if ( (' ' + cell.className + ' ').indexOf(' unsortable ') == -1 ) { - cell.innerHTML += '' + '' + '↓'; + + '" alt="↓"/>'); } } if ( ts_alternate_row_colors ) { @@ -1041,7 +1041,8 @@ window.runOnloadHook = function() { updateTooltipAccessKeys( null ); setupCheckboxShiftClick(); - sortables_init(); + + jQuery( document ).ready( sortables_init ); // Run any added-on functions for ( var i = 0; i < onloadFuncts.length; i++ ) {