From aeda023841edcf0550135cb5892787bd92506748 Mon Sep 17 00:00:00 2001 From: Krinkle Date: Thu, 23 Dec 2010 16:36:37 +0000 Subject: [PATCH] using .append() instead of innerHTML+=. The latter replaces the html and causes all bound event handlers to be list --- resources/Resources.php | 6 +++++- skins/common/wikibits.js | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) 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++ ) { -- 2.20.1