Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -25,16 +25,16 @@ |
26 | 26 | array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 10 ), |
27 | 27 | array( 'src' => 'css/wikiEditor.preview.css', 'version' => 1 ), |
28 | 28 | array( 'src' => 'css/wikiEditor.templateEditor.css', 'version' => 1 ), |
29 | | - array( 'src' => 'css/wikiEditor.toc.css', 'version' => 25 ), |
| 29 | + array( 'src' => 'css/wikiEditor.toc.css', 'version' => 26 ), |
30 | 30 | array( 'src' => 'css/wikiEditor.toolbar.css', 'version' => 8 ), |
31 | 31 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
32 | 32 | ), |
33 | 33 | 'combined' => array( |
34 | | - array( 'src' => 'css/combined.css', 'version' => 47 ), |
| 34 | + array( 'src' => 'css/combined.css', 'version' => 48 ), |
35 | 35 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
36 | 36 | ), |
37 | 37 | 'minified' => array( |
38 | | - array( 'src' => 'css/combined.min.css', 'version' => 47 ), |
| 38 | + array( 'src' => 'css/combined.min.css', 'version' => 48 ), |
39 | 39 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
40 | 40 | ), |
41 | 41 | ) |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | |
77 | 77 | // Core functionality of extension scripts |
78 | 78 | array( 'src' => 'js/plugins/jquery.async.js', 'version' => 3 ), |
79 | | - array( 'src' => 'js/plugins/jquery.autoEllipsis.js', 'version' => 5 ), |
| 79 | + array( 'src' => 'js/plugins/jquery.autoEllipsis.js', 'version' => 6 ), |
80 | 80 | array( 'src' => 'js/plugins/jquery.browser.js', 'version' => 3 ), |
81 | 81 | array( 'src' => 'js/plugins/jquery.collapsibleTabs.js', 'version' => 5 ), |
82 | 82 | array( 'src' => 'js/plugins/jquery.cookie.js', 'version' => 3 ), |
— | — | @@ -88,16 +88,16 @@ |
89 | 89 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 12 ), |
90 | 90 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 40 ), |
91 | 91 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 10 ), |
92 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 59 ), |
| 92 | + array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 60 ), |
93 | 93 | array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 9 ), |
94 | 94 | array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 14 ), |
95 | 95 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 1 ), |
96 | 96 | ), |
97 | 97 | 'combined' => array( |
98 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 138 ), |
| 98 | + array( 'src' => 'js/plugins.combined.js', 'version' => 139 ), |
99 | 99 | ), |
100 | 100 | 'minified' => array( |
101 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 138 ), |
| 101 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 139 ), |
102 | 102 | ), |
103 | 103 | ), |
104 | 104 | ); |
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.toc.css |
— | — | @@ -61,41 +61,41 @@ |
62 | 62 | cursor: pointer; |
63 | 63 | color: #0645ad; |
64 | 64 | } |
65 | | -.wikiEditor-ui-toc ul li div span { |
| 65 | +.wikiEditor-ui-toc ul li div { |
66 | 66 | padding: 0.125em; |
67 | 67 | padding-left: 1em; |
68 | 68 | } |
69 | | -body.rtl .wikiEditor-ui-toc ul li div span { |
| 69 | +body.rtl .wikiEditor-ui-toc ul li div { |
70 | 70 | padding-right: 1em; |
71 | 71 | } |
72 | | -.wikiEditor-ui-toc ul ul li div span { |
| 72 | +.wikiEditor-ui-toc ul ul li div { |
73 | 73 | padding-left: 2em; |
74 | 74 | } |
75 | | -body.rtl .wikiEditor-ui-toc ul ul li div span { |
| 75 | +body.rtl .wikiEditor-ui-toc ul ul li div { |
76 | 76 | padding-right: 2em; |
77 | 77 | } |
78 | | -.wikiEditor-ui-toc ul ul ul li div span { |
| 78 | +.wikiEditor-ui-toc ul ul ul li div { |
79 | 79 | padding-left: 3em; |
80 | 80 | } |
81 | | -body.rtl .wikiEditor-ui-toc ul ul ul li div span { |
| 81 | +body.rtl .wikiEditor-ui-toc ul ul ul li div { |
82 | 82 | padding-right: 3em; |
83 | 83 | } |
84 | | -.wikiEditor-ui-toc ul ul ul ul li div span { |
| 84 | +.wikiEditor-ui-toc ul ul ul ul li div { |
85 | 85 | padding-left: 4em; |
86 | 86 | } |
87 | | -body.rtl .wikiEditor-ui-toc ul ul ul ul li div span { |
| 87 | +body.rtl .wikiEditor-ui-toc ul ul ul ul li div { |
88 | 88 | padding-right: 4em; |
89 | 89 | } |
90 | | -.wikiEditor-ui-toc ul ul ul ul ul li div span { |
| 90 | +.wikiEditor-ui-toc ul ul ul ul ul li div { |
91 | 91 | padding-left: 5em; |
92 | 92 | } |
93 | | -body.rtl .wikiEditor-ui-toc ul ul ul ul ul li div span { |
| 93 | +body.rtl .wikiEditor-ui-toc ul ul ul ul ul li div { |
94 | 94 | padding-right: 5em; |
95 | 95 | } |
96 | | -.wikiEditor-ui-toc ul ul ul ul ul ul li div span { |
| 96 | +.wikiEditor-ui-toc ul ul ul ul ul ul li div { |
97 | 97 | padding-left: 6em; |
98 | 98 | } |
99 | | -body.rtl wikiEditor-ui-toc ul ul ul ul ul ul li div span { |
| 99 | +body.rtl wikiEditor-ui-toc ul ul ul ul ul ul li div { |
100 | 100 | padding-right: 6em; |
101 | 101 | } |
102 | 102 | .wikiEditor-ui-toc ul li div.current { |
Index: trunk/extensions/UsabilityInitiative/css/combined.css |
— | — | @@ -327,41 +327,41 @@ |
328 | 328 | cursor: pointer; |
329 | 329 | color: #0645ad; |
330 | 330 | } |
331 | | -.wikiEditor-ui-toc ul li div span { |
| 331 | +.wikiEditor-ui-toc ul li div { |
332 | 332 | padding: 0.125em; |
333 | 333 | padding-left: 1em; |
334 | 334 | } |
335 | | -body.rtl .wikiEditor-ui-toc ul li div span { |
| 335 | +body.rtl .wikiEditor-ui-toc ul li div { |
336 | 336 | padding-right: 1em; |
337 | 337 | } |
338 | | -.wikiEditor-ui-toc ul ul li div span { |
| 338 | +.wikiEditor-ui-toc ul ul li div { |
339 | 339 | padding-left: 2em; |
340 | 340 | } |
341 | | -body.rtl .wikiEditor-ui-toc ul ul li div span { |
| 341 | +body.rtl .wikiEditor-ui-toc ul ul li div { |
342 | 342 | padding-right: 2em; |
343 | 343 | } |
344 | | -.wikiEditor-ui-toc ul ul ul li div span { |
| 344 | +.wikiEditor-ui-toc ul ul ul li div { |
345 | 345 | padding-left: 3em; |
346 | 346 | } |
347 | | -body.rtl .wikiEditor-ui-toc ul ul ul li div span { |
| 347 | +body.rtl .wikiEditor-ui-toc ul ul ul li div { |
348 | 348 | padding-right: 3em; |
349 | 349 | } |
350 | | -.wikiEditor-ui-toc ul ul ul ul li div span { |
| 350 | +.wikiEditor-ui-toc ul ul ul ul li div { |
351 | 351 | padding-left: 4em; |
352 | 352 | } |
353 | | -body.rtl .wikiEditor-ui-toc ul ul ul ul li div span { |
| 353 | +body.rtl .wikiEditor-ui-toc ul ul ul ul li div { |
354 | 354 | padding-right: 4em; |
355 | 355 | } |
356 | | -.wikiEditor-ui-toc ul ul ul ul ul li div span { |
| 356 | +.wikiEditor-ui-toc ul ul ul ul ul li div { |
357 | 357 | padding-left: 5em; |
358 | 358 | } |
359 | | -body.rtl .wikiEditor-ui-toc ul ul ul ul ul li div span { |
| 359 | +body.rtl .wikiEditor-ui-toc ul ul ul ul ul li div { |
360 | 360 | padding-right: 5em; |
361 | 361 | } |
362 | | -.wikiEditor-ui-toc ul ul ul ul ul ul li div span { |
| 362 | +.wikiEditor-ui-toc ul ul ul ul ul ul li div { |
363 | 363 | padding-left: 6em; |
364 | 364 | } |
365 | | -body.rtl wikiEditor-ui-toc ul ul ul ul ul ul li div span { |
| 365 | +body.rtl wikiEditor-ui-toc ul ul ul ul ul ul li div { |
366 | 366 | padding-right: 6em; |
367 | 367 | } |
368 | 368 | .wikiEditor-ui-toc ul li div.current { |
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css |
— | — | @@ -306,41 +306,41 @@ |
307 | 307 | cursor:pointer; |
308 | 308 | color:#0645ad; |
309 | 309 | } |
310 | | -.wikiEditor-ui-toc ul li div span{ |
| 310 | +.wikiEditor-ui-toc ul li div{ |
311 | 311 | padding:0.125em; |
312 | 312 | padding-left:1em; |
313 | 313 | } |
314 | | -body.rtl .wikiEditor-ui-toc ul li div span{ |
| 314 | +body.rtl .wikiEditor-ui-toc ul li div{ |
315 | 315 | padding-right:1em; |
316 | 316 | } |
317 | | -.wikiEditor-ui-toc ul ul li div span{ |
| 317 | +.wikiEditor-ui-toc ul ul li div{ |
318 | 318 | padding-left:2em; |
319 | 319 | } |
320 | | -body.rtl .wikiEditor-ui-toc ul ul li div span{ |
| 320 | +body.rtl .wikiEditor-ui-toc ul ul li div{ |
321 | 321 | padding-right:2em; |
322 | 322 | } |
323 | | -.wikiEditor-ui-toc ul ul ul li div span{ |
| 323 | +.wikiEditor-ui-toc ul ul ul li div{ |
324 | 324 | padding-left:3em; |
325 | 325 | } |
326 | | -body.rtl .wikiEditor-ui-toc ul ul ul li div span{ |
| 326 | +body.rtl .wikiEditor-ui-toc ul ul ul li div{ |
327 | 327 | padding-right:3em; |
328 | 328 | } |
329 | | -.wikiEditor-ui-toc ul ul ul ul li div span{ |
| 329 | +.wikiEditor-ui-toc ul ul ul ul li div{ |
330 | 330 | padding-left:4em; |
331 | 331 | } |
332 | | -body.rtl .wikiEditor-ui-toc ul ul ul ul li div span{ |
| 332 | +body.rtl .wikiEditor-ui-toc ul ul ul ul li div{ |
333 | 333 | padding-right:4em; |
334 | 334 | } |
335 | | -.wikiEditor-ui-toc ul ul ul ul ul li div span{ |
| 335 | +.wikiEditor-ui-toc ul ul ul ul ul li div{ |
336 | 336 | padding-left:5em; |
337 | 337 | } |
338 | | -body.rtl .wikiEditor-ui-toc ul ul ul ul ul li div span{ |
| 338 | +body.rtl .wikiEditor-ui-toc ul ul ul ul ul li div{ |
339 | 339 | padding-right:5em; |
340 | 340 | } |
341 | | -.wikiEditor-ui-toc ul ul ul ul ul ul li div span{ |
| 341 | +.wikiEditor-ui-toc ul ul ul ul ul ul li div{ |
342 | 342 | padding-left:6em; |
343 | 343 | } |
344 | | -body.rtl wikiEditor-ui-toc ul ul ul ul ul ul li div span{ |
| 344 | +body.rtl wikiEditor-ui-toc ul ul ul ul ul ul li div{ |
345 | 345 | padding-right:6em; |
346 | 346 | } |
347 | 347 | .wikiEditor-ui-toc ul li div.current{ |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toc.js |
— | — | @@ -346,6 +346,7 @@ |
347 | 347 | if( ui.size.width < parseFloat( $.wikiEditor.modules.toc.cfg.minimumWidth ) ) { |
348 | 348 | context.modules.toc.$toc.trigger( 'collapse' ); |
349 | 349 | } else { |
| 350 | + context.modules.toc.$toc.find( 'div' ).autoEllipsis( { 'position': 'right', 'tooltip': true, 'restoreText': true } ); |
350 | 351 | context.modules.toc.$toc.data( 'openWidth', ui.size.width ); |
351 | 352 | $.cookie( 'wikiEditor-' + context.instance + '-toc-width', ui.size.width ); |
352 | 353 | } |
— | — | @@ -414,7 +415,7 @@ |
415 | 416 | buildResizeControls(); |
416 | 417 | buildCollapseControls(); |
417 | 418 | } |
418 | | - context.modules.toc.$toc.find( 'div' ).autoEllipsis( { 'position': 'right', 'tooltip': true } ); |
| 419 | + context.modules.toc.$toc.find( 'div' ).autoEllipsis( { 'position': 'right', 'tooltip': true, 'restoreText': true } ); |
419 | 420 | } |
420 | 421 | } |
421 | 422 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.autoEllipsis.js |
— | — | @@ -7,8 +7,16 @@ |
8 | 8 | $(this).each( function() { |
9 | 9 | options = $.extend( { |
10 | 10 | 'position': 'center', |
11 | | - 'tooltip': false |
| 11 | + 'tooltip': false, |
| 12 | + 'restoreText': false |
12 | 13 | }, options ); |
| 14 | + if ( options.restoreText ) { |
| 15 | + if ( ! $( this ).data( 'autoEllipsis.originalText' ) ) { |
| 16 | + $( this ).data( 'autoEllipsis.originalText', $( this ).text() ); |
| 17 | + } else { |
| 18 | + $( this ).text( $( this ).data( 'autoEllipsis.originalText' ) ); |
| 19 | + } |
| 20 | + } |
13 | 21 | var text = $(this).text(); |
14 | 22 | var $text = $( '<span />' ).text( text ).css( 'whiteSpace', 'nowrap' ); |
15 | 23 | $(this).empty().append( $text ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -5134,8 +5134,16 @@ |
5135 | 5135 | $(this).each( function() { |
5136 | 5136 | options = $.extend( { |
5137 | 5137 | 'position': 'center', |
5138 | | - 'tooltip': false |
| 5138 | + 'tooltip': false, |
| 5139 | + 'restoreText': false |
5139 | 5140 | }, options ); |
| 5141 | + if ( options.restoreText ) { |
| 5142 | + if ( ! $( this ).data( 'autoEllipsis.originalText' ) ) { |
| 5143 | + $( this ).data( 'autoEllipsis.originalText', $( this ).text() ); |
| 5144 | + } else { |
| 5145 | + $( this ).text( $( this ).data( 'autoEllipsis.originalText' ) ); |
| 5146 | + } |
| 5147 | + } |
5140 | 5148 | var text = $(this).text(); |
5141 | 5149 | var $text = $( '<span />' ).text( text ).css( 'whiteSpace', 'nowrap' ); |
5142 | 5150 | $(this).empty().append( $text ); |
— | — | @@ -8676,6 +8684,7 @@ |
8677 | 8685 | if( ui.size.width < parseFloat( $.wikiEditor.modules.toc.cfg.minimumWidth ) ) { |
8678 | 8686 | context.modules.toc.$toc.trigger( 'collapse' ); |
8679 | 8687 | } else { |
| 8688 | + context.modules.toc.$toc.find( 'div' ).autoEllipsis( { 'position': 'right', 'tooltip': true, 'restoreText': true } ); |
8680 | 8689 | context.modules.toc.$toc.data( 'openWidth', ui.size.width ); |
8681 | 8690 | $.cookie( 'wikiEditor-' + context.instance + '-toc-width', ui.size.width ); |
8682 | 8691 | } |
— | — | @@ -8744,7 +8753,7 @@ |
8745 | 8754 | buildResizeControls(); |
8746 | 8755 | buildCollapseControls(); |
8747 | 8756 | } |
8748 | | - context.modules.toc.$toc.find( 'div' ).autoEllipsis( { 'position': 'right', 'tooltip': true } ); |
| 8757 | + context.modules.toc.$toc.find( 'div' ).autoEllipsis( { 'position': 'right', 'tooltip': true, 'restoreText': true } ); |
8749 | 8758 | } |
8750 | 8759 | } |
8751 | 8760 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -354,7 +354,8 @@ |
355 | 355 | {var i=0,l=array.length,loop=opts.loop||function(){};$.whileAsync($.extend(opts,{test:function(){return i<l;},loop:function() |
356 | 356 | {var val=array[i];return loop.call(val,i++,val);}}));} |
357 | 357 | $.fn.eachAsync=function(opts) |
358 | | -{$.eachAsync(this,opts);return this;}})(jQuery);(function($){$.fn.autoEllipsis=function(options){$(this).each(function(){options=$.extend({'position':'center','tooltip':false},options);var text=$(this).text();var $text=$('<span />').text(text).css('whiteSpace','nowrap');$(this).empty().append($text);if($text.width()>$(this).width()){switch(options.position){case'right':var l=0,r=text.length;do{var m=Math.ceil((l+r)/2);$text.text(text.substr(0,m)+'...');if($text.width()>$(this).width()){r=m-1;}else{l=m;}}while(l<r);$text.text(text.substr(0,l)+'...');break;case'center':var i=[Math.round(text.length/2),Math.round(text.length/2)];var side=1;while($text.outerWidth()>($(this).width())&&i[0]>0){$text.text(text.substr(0,i[0])+'...'+text.substr(i[1]));if(side==0){i[0]--;side=1;}else{i[1]++;side=0;}} |
| 358 | +{$.eachAsync(this,opts);return this;}})(jQuery);(function($){$.fn.autoEllipsis=function(options){$(this).each(function(){options=$.extend({'position':'center','tooltip':false,'restoreText':false},options);if(options.restoreText){if(!$(this).data('autoEllipsis.originalText')){$(this).data('autoEllipsis.originalText',$(this).text());}else{$(this).text($(this).data('autoEllipsis.originalText'));}} |
| 359 | +var text=$(this).text();var $text=$('<span />').text(text).css('whiteSpace','nowrap');$(this).empty().append($text);if($text.width()>$(this).width()){switch(options.position){case'right':var l=0,r=text.length;do{var m=Math.ceil((l+r)/2);$text.text(text.substr(0,m)+'...');if($text.width()>$(this).width()){r=m-1;}else{l=m;}}while(l<r);$text.text(text.substr(0,l)+'...');break;case'center':var i=[Math.round(text.length/2),Math.round(text.length/2)];var side=1;while($text.outerWidth()>($(this).width())&&i[0]>0){$text.text(text.substr(0,i[0])+'...'+text.substr(i[1]));if(side==0){i[0]--;side=1;}else{i[1]++;side=0;}} |
359 | 360 | break;case'left':var r=0;while($text.outerWidth()>$(this).width()&&r<text.length){$text.text('...'+text.substr(r));r++;} |
360 | 361 | break;} |
361 | 362 | if(options.tooltip) |
— | — | @@ -569,7 +570,7 @@ |
570 | 571 | list.append(item);} |
571 | 572 | return list;} |
572 | 573 | function buildCollapseControls(){var $collapseControl=$('<div />'),$expandControl=$('<div />');$collapseControl.addClass('tab').addClass('tab-toc').append('<a href="#" />').bind('click.wikiEditor-toc',function(){context.modules.toc.$toc.trigger('collapse.wikiEditor-toc');return false;}).find('a').text(gM('wikieditor-toc-hide'));$expandControl.addClass('wikiEditor-ui-toc-expandControl').append('<a href="#" />').bind('click.wikiEditor-toc',function(){context.modules.toc.$toc.trigger('expand.wikiEditor-toc');return false;}).hide().find('a').text(gM('wikieditor-toc-show'));$collapseControl.insertBefore(context.modules.toc.$toc);context.$ui.find('.wikiEditor-ui-left .wikiEditor-ui-top').append($expandControl);context.fn.trigger('resize');} |
573 | | -function buildResizeControls(){context.$ui.data('resizableDone',true).find('.wikiEditor-ui-right').data('wikiEditor-ui-left',context.$ui.find('.wikiEditor-ui-left')).resizable({handles:'w,e',preventPositionLeftChange:true,minWidth:50,start:function(e,ui){var $this=$(this);$('<div />').addClass('wikiEditor-ui-resize-mask').css({'position':'absolute','z-index':2,'left':0,'top':0,'bottom':0,'right':0}).appendTo(context.$ui.find('.wikiEditor-ui-left'));$this.resizable('option','maxWidth',$this.parent().width()-450);},resize:function(e,ui){$(this).css({'width':ui.size.width,'top':'auto','height':'auto'}).data('wikiEditor-ui-left').css('marginRight',(-1*ui.size.width)).children().css('marginRight',ui.size.width);context.fn.trigger('resize');},stop:function(e,ui){context.$ui.find('.wikiEditor-ui-resize-mask').remove();context.$content.trigger('mouseup');if(ui.size.width<parseFloat($.wikiEditor.modules.toc.cfg.minimumWidth)){context.modules.toc.$toc.trigger('collapse');}else{context.modules.toc.$toc.data('openWidth',ui.size.width);$.cookie('wikiEditor-'+context.instance+'-toc-width',ui.size.width);} |
| 574 | +function buildResizeControls(){context.$ui.data('resizableDone',true).find('.wikiEditor-ui-right').data('wikiEditor-ui-left',context.$ui.find('.wikiEditor-ui-left')).resizable({handles:'w,e',preventPositionLeftChange:true,minWidth:50,start:function(e,ui){var $this=$(this);$('<div />').addClass('wikiEditor-ui-resize-mask').css({'position':'absolute','z-index':2,'left':0,'top':0,'bottom':0,'right':0}).appendTo(context.$ui.find('.wikiEditor-ui-left'));$this.resizable('option','maxWidth',$this.parent().width()-450);},resize:function(e,ui){$(this).css({'width':ui.size.width,'top':'auto','height':'auto'}).data('wikiEditor-ui-left').css('marginRight',(-1*ui.size.width)).children().css('marginRight',ui.size.width);context.fn.trigger('resize');},stop:function(e,ui){context.$ui.find('.wikiEditor-ui-resize-mask').remove();context.$content.trigger('mouseup');if(ui.size.width<parseFloat($.wikiEditor.modules.toc.cfg.minimumWidth)){context.modules.toc.$toc.trigger('collapse');}else{context.modules.toc.$toc.find('div').autoEllipsis({'position':'right','tooltip':true,'restoreText':true});context.modules.toc.$toc.data('openWidth',ui.size.width);$.cookie('wikiEditor-'+context.instance+'-toc-width',ui.size.width);} |
574 | 575 | context.fn.trigger('resize');}});var handle=$.wikiEditor.modules.toc.cfg.rtl?'w':'e';context.$ui.find('.ui-resizable-'+handle).removeClass('ui-resizable-'+handle).addClass('ui-resizable-'+(handle=='w'?'e':'w')).addClass('wikiEditor-ui-toc-resize-grip');context.modules.toc.$toc.bind('collapse.wikiEditor-toc',$.wikiEditor.modules.toc.fn.collapse).bind('expand.wikiEditor-toc',$.wikiEditor.modules.toc.fn.expand);context.modules.toc.$toc.data('openWidth',$.wikiEditor.modules.toc.cfg.defaultWidth);if($.cookie('wikiEditor-'+context.instance+'-toc-width')==0){context.modules.toc.$toc.trigger('collapse.wikiEditor-toc',{data:context});}else if($.cookie('wikiEditor-'+context.instance+'-toc-width')>0){var initialWidth=$.cookie('wikiEditor-'+context.instance+'-toc-width');if(initialWidth<parseFloat($.wikiEditor.modules.toc.cfg.minimumWidth)) |
575 | 576 | initialWidth=parseFloat($.wikiEditor.modules.toc.cfg.minimumWidth)+1;context.modules.toc.$toc.data('openWidth',initialWidth+'px');context.$ui.find('.wikiEditor-ui-right').css('width',initialWidth+'px');context.$ui.find('.wikiEditor-ui-left').css('marginRight',(parseFloat(initialWidth)*-1)+'px').children().css('marginRight',initialWidth+'px');}} |
576 | 577 | if(context.data.outline){var outline=context.data.outline;var lastLevel=0;var nLevel=0;for(var i=0;i<outline.length;i++){if(outline[i].level>lastLevel){nLevel++;} |
— | — | @@ -578,7 +579,7 @@ |
579 | 580 | outline[i].nLevel=nLevel;lastLevel=outline[i].level;} |
580 | 581 | var structure=buildStructure(outline);if($('input[name=wpSection]').val()==''){structure.unshift({'text':wgPageName.replace(/_/g,' '),'level':1,'index':0});} |
581 | 582 | context.modules.toc.$toc.html(buildList(structure));if(wgNavigableTOCResizable&&!context.$ui.data('resizableDone')){buildResizeControls();buildCollapseControls();} |
582 | | -context.modules.toc.$toc.find('div').autoEllipsis({'position':'right','tooltip':true});}}}};$.ui.plugin.add("resizable","preventPositionLeftChange",{resize:function(event,ui){$(this).data("resizable").position.left=0;}});})(jQuery);(function($){$.wikiEditor.modules.toolbar={api:{addToToolbar:function(context,data){for(type in data){switch(type){case'sections':var $sections=context.modules.toolbar.$toolbar.find('div.sections');var $tabs=context.modules.toolbar.$toolbar.find('div.tabs');for(section in data[type]){if(section=='main'){context.modules.toolbar.$toolbar.prepend($.wikiEditor.modules.toolbar.fn.buildSection(context,section,data[type][section]));continue;} |
| 583 | +context.modules.toc.$toc.find('div').autoEllipsis({'position':'right','tooltip':true,'restoreText':true});}}}};$.ui.plugin.add("resizable","preventPositionLeftChange",{resize:function(event,ui){$(this).data("resizable").position.left=0;}});})(jQuery);(function($){$.wikiEditor.modules.toolbar={api:{addToToolbar:function(context,data){for(type in data){switch(type){case'sections':var $sections=context.modules.toolbar.$toolbar.find('div.sections');var $tabs=context.modules.toolbar.$toolbar.find('div.tabs');for(section in data[type]){if(section=='main'){context.modules.toolbar.$toolbar.prepend($.wikiEditor.modules.toolbar.fn.buildSection(context,section,data[type][section]));continue;} |
583 | 584 | $sections.append($.wikiEditor.modules.toolbar.fn.buildSection(context,section,data[type][section]));$tabs.append($.wikiEditor.modules.toolbar.fn.buildTab(context,section,data[type][section]));$section=$sections.find('.section:visible');if($section.size()){$sections.animate({'height':$section.outerHeight()},'fast');}} |
584 | 585 | break;case'groups':if(!('section'in data)){continue;} |
585 | 586 | var $section=context.modules.toolbar.$toolbar.find('div[rel='+data.section+'].section');for(group in data[type]){$section.append($.wikiEditor.modules.toolbar.fn.buildGroup(context,group,data[type][group]));} |