Index: trunk/extensions/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -79,7 +79,11 @@ |
80 | 80 | 'scripts' => 'extensions/WikiEditor/modules/jquery.wikiEditor.toc.js', |
81 | 81 | 'styles' => 'extensions/WikiEditor/modules/jquery.wikiEditor.toc.css', |
82 | 82 | 'dependencies' => array( |
83 | | - 'jquery.wikiEditor', 'jquery.ui.draggable', 'jquery.ui.resizable' |
| 83 | + 'jquery.wikiEditor', |
| 84 | + 'jquery.ui.draggable', |
| 85 | + 'jquery.ui.resizable', |
| 86 | + 'jquery.autoEllipsis', |
| 87 | + 'jquery.color', |
84 | 88 | ), |
85 | 89 | ), |
86 | 90 | 'jquery.wikiEditor.toolbar' => array( |
— | — | @@ -548,11 +552,6 @@ |
549 | 553 | 'modules' => array( |
550 | 554 | 'wikiEditor.toc', |
551 | 555 | ), |
552 | | - 'configurations' => array( |
553 | | - // These are probably only for testing purposes? |
554 | | - 'wgNavigableTOCCollapseEnable', |
555 | | - 'wgNavigableTOCResizable' |
556 | | - ), |
557 | 556 | ), |
558 | 557 | ); |
559 | 558 | |
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.toc.js |
— | — | @@ -446,7 +446,7 @@ |
447 | 447 | */ |
448 | 448 | function buildList( structure ) { |
449 | 449 | var list = $( '<ul />' ); |
450 | | - for ( i in structure ) { |
| 450 | + for ( var i = 0; i < structure.length; i++ ) { |
451 | 451 | var div = $( '<div />' ) |
452 | 452 | .addClass( 'section-' + structure[i].index ) |
453 | 453 | .data( 'index', structure[i].index ) |
— | — | @@ -641,7 +641,7 @@ |
642 | 642 | } |
643 | 643 | context.modules.toc.$toc.html( buildList( structure ) ); |
644 | 644 | |
645 | | - if ( wgNavigableTOCResizable && !context.$ui.data( 'resizableDone' ) ) { |
| 645 | + if ( !context.$ui.data( 'resizableDone' ) ) { |
646 | 646 | buildResizeControls(); |
647 | 647 | buildCollapseControls(); |
648 | 648 | } |
Index: trunk/extensions/WikiEditor/modules/wikiEditor.toc.js |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | $( document ).ready( function() { |
7 | 7 | // Add table of contents module |
8 | 8 | $( '#wpTextbox1' ) |
9 | | - .wikiEditor( 'addModule', 'toc' ) |
| 9 | + .wikiEditor( 'addModule', 'toc' ); |
10 | 10 | // FIXME - should move the ready handler code to the create function so this isn't necissary |
11 | | - .data( 'wikiEditor-context' ).fn.trigger( 'ready' ); |
| 11 | + //.data( 'wikiEditor-context' ).fn.trigger( 'ready' ); |
12 | 12 | } ); |