using .append() instead of innerHTML+=. The latter replaces the html and causes all...
authorKrinkle <krinkle@users.mediawiki.org>
Thu, 23 Dec 2010 16:36:37 +0000 (16:36 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Thu, 23 Dec 2010 16:36:37 +0000 (16:36 +0000)
resources/Resources.php
skins/common/wikibits.js

index 6c205ab..d4f0a08 100644 (file)
@@ -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(
index 01103bc..91d647f 100644 (file)
@@ -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 += '<a href="#" class="sortheader" '
+                       $(cell).append ( '<a href="#" class="sortheader" '
                                + 'onclick="ts_resortTable(this);return false;">'
                                + '<span class="sortarrow">'
                                + '<img src="'
                                + ts_image_path
                                + ts_image_none
-                               + '" alt="&darr;"/></span></a>';
+                               + '" alt="&darr;"/></span></a>');
                }
        }
        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++ ) {