r54116 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54115‎ | r54116 | r54117 >
Date:18:53, 31 July 2009
Author:catrope
Status:deferred
Tags:
Comment:
UsabilityInitiative: Some performance fixes for the toolbar. About 80% of toolbar loading time is spent on special characters; reduced specialchars loading by 25%, but could probably still use improvement.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/jquery.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/jquery.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/jquery.toolbar.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/jquery.wikiOutline.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -17,10 +17,10 @@
1818 private static $scriptFiles = array(
1919 'base_sets' => array(
2020 'combined' => array(
21 - array( 'src' => 'js/jquery.combined.js', 'version' => 2 ),
 21+ array( 'src' => 'js/jquery.combined.js', 'version' => 3 ),
2222 ),
2323 'combined-min' => array(
24 - array( 'src' => 'js/jquery.combined.min.js', 'version' => 2 ),
 24+ array( 'src' => 'js/jquery.combined.min.js', 'version' => 3 ),
2525 ),
2626 'raw' => array(
2727 array( 'src' => 'js/jquery.js', 'version' => 2 ),
@@ -28,7 +28,7 @@
2929 array( 'src' => 'js/jquery.browser.js', 'version' => 2 ),
3030 array( 'src' => 'js/jquery.cookie.js', 'version' => 2 ),
3131 array( 'src' => 'js/jquery.textSelection.js', 'version' => 2 ),
32 - array( 'src' => 'js/jquery.toolbar.js', 'version' => 2 ),
 32+ array( 'src' => 'js/jquery.toolbar.js', 'version' => 3 ),
3333 array( 'src' => 'js/jquery.wikiOutline.js', 'version' => 2 ),
3434 ),
3535 ),
Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js
@@ -2,7 +2,7 @@
33
44 js2AddOnloadHook( function() {
55 $j( 'textarea#wpTextbox1' )
6 - .wrap( $j( '<div></div>' ) .attr( 'id', 'edit-ui' ) )
 6+ .wrap( $j( '<div></div>' ).attr( 'id', 'edit-ui' ) )
77 .wrap( $j( '<div></div>' ).attr( 'id', 'edit-ui-bottom' ) )
88 .wrap( $j( '<div></div>' ).attr( 'id', 'edit-ui-text' ) );
99 $j( 'div#edit-ui' ).prepend(
@@ -11,12 +11,10 @@
1212 .append(
1313 $j( '<div></div>' )
1414 .attr( 'id', 'edit-toolbar' )
15 - .toolbar(
16 - $j( 'textarea#wpTextbox1' ),
17 - editToolbarConfiguration
18 - )
1915 )
2016 );
 17+ $j( 'div#edit-toolbar' ).toolbar( $j( 'textarea#wpTextbox1' ),
 18+ editToolbarConfiguration );
2119 });
2220
2321 // Generate special chars tools from an array of characters
Index: trunk/extensions/UsabilityInitiative/js/jquery.combined.js
@@ -4910,12 +4910,9 @@
49114911 $(this).addToolbarSection( tools.main, textbox, 'main' );
49124912 }
49134913 var tabDiv = $( '<div></div>' )
4914 - .attr( 'class', 'tabs' )
4915 - .appendTo( $(this) );
 4914+ .attr( 'class', 'tabs' );
49164915 var sectionsDiv = $( '<div></div>' )
4917 - .attr( 'class', 'sections' )
4918 - .appendTo( $(this) );
4919 - $(this).append( $( '<div></div>' ).addClass( 'break' ) );
 4916+ .attr( 'class', 'sections' );
49204917 var sectionCookie = 'edittoolbar-' + $(this).attr( 'id' ) + '-section';
49214918 var sectionQueue = [];
49224919 for ( section in tools ) {
@@ -4927,14 +4924,14 @@
49284925 'class': 'section',
49294926 'id': $(this).attr( 'id' ) + '-section-' + section
49304927 } )
4931 - .appendTo( sectionsDiv )
49324928 .addClass( 'loading' )
49334929 .append(
49344930 $( '<div></div>' )
49354931 .addClass( 'progress' )
49364932 .text( gM( 'edittoolbar-loading' )
49374933 )
4938 - );
 4934+ )
 4935+ .appendTo( sectionsDiv );
49394936 var current = false;
49404937 if ( $.cookie( sectionCookie ) == sectionDiv.attr( 'id' ) ) {
49414938 sectionDiv.attr( 'style', 'display:block' );
@@ -4991,6 +4988,9 @@
49924989 )
49934990 );
49944991 }
 4992+ $(this).append( tabDiv )
 4993+ .append( sectionsDiv )
 4994+ .append( $( '<div></div>' ).addClass( 'break' ) );
49954995 $.eachAsync( sectionQueue, {
49964996 bulk: 0,
49974997 loop: function( index, value ) {
@@ -5032,8 +5032,7 @@
50335033 }
50345034 for ( group in section.groups ) {
50355035 var groupDiv = $( '<div></div>' )
5036 - .attr( 'class', 'group' )
5037 - .appendTo( $(this) );
 5036+ .attr( 'class', 'group' );
50385037 if ( msgSet( section.groups[group], 'label' ) ) {
50395038 groupDiv.append(
50405039 $( '<div></div>' )
@@ -5103,6 +5102,7 @@
51045103 default: break;
51055104 }
51065105 }
 5106+ $(this).append( groupDiv );
51075107 }
51085108 break;
51095109 case 'booklet':
@@ -5110,8 +5110,7 @@
51115111 return;
51125112 }
51135113 var indexDiv = $( '<div></div>' )
5114 - .attr( 'class', 'index' )
5115 - .appendTo( $(this) );
 5114+ .attr( 'class', 'index' );
51165115 var bookletCookie =
51175116 'edittoolbar-' + $(this).attr( 'id' ) + '-booklet-' + id;
51185117 var selectedID = $.cookie( bookletCookie );
@@ -5151,13 +5150,11 @@
51525151 );
51535152 }
51545153 var pagesDiv = $( '<div></div>' )
5155 - .attr( 'class', 'pages' )
5156 - .appendTo( $(this) );
 5154+ .attr( 'class', 'pages' );
51575155 for ( page in section.pages ) {
51585156 var pageDiv = $( '<div></div>' )
51595157 .attr( 'class', 'page page-' + page )
5160 - .css( 'display', page === selectedID ? 'block' : 'none' )
5161 - .appendTo( pagesDiv );
 5158+ .css( 'display', page === selectedID ? 'block' : 'none' );
51625159 switch ( section.pages[page].layout ) {
51635160 case 'table':
51645161 var contentTable = $( '<table></table>' )
@@ -5166,10 +5163,8 @@
51675164 'cellspacing': '0',
51685165 'border': '0',
51695166 'width': '100%'
5170 - } )
5171 - .appendTo( pageDiv );
5172 - var headingRow = $( '<tr></tr>' )
5173 - .appendTo( contentTable );
 5167+ } );
 5168+ var headingRow = $( '<tr></tr>' );
51745169 for ( heading in section.pages[page].headings ) {
51755170 $( '<th></th>' )
51765171 .text(
@@ -5181,9 +5176,9 @@
51825177 )
51835178 .appendTo( headingRow );
51845179 }
 5180+ contentTable.append( headingRow );
51855181 for ( row in section.pages[page].rows ) {
5186 - var contentRow = $( '<tr></tr>' )
5187 - .appendTo( contentTable );
 5182+ var contentRow = $( '<tr></tr>' );
51885183 for ( cell in section.pages[page].rows[row] ) {
51895184 $( '<td></td>' )
51905185 .attr( {
@@ -5202,13 +5197,14 @@
52035198 )
52045199 .appendTo( contentRow );
52055200 }
 5201+ contentTable.append( contentRow );
52065202 }
 5203+ pageDiv.append( contentTable );
52075204 break;
52085205 case 'characters':
52095206 var charsDiv = $( '<div />' )
52105207 .attr( section.pages[page].attributes )
5211 - .css( section.pages[page].styles )
5212 - .appendTo( pageDiv );
 5208+ .css( section.pages[page].styles );
52135209 for ( character in section.pages[page].characters ) {
52145210 switch (
52155211 section.pages[page].characters[character].type
@@ -5228,17 +5224,18 @@
52295225 )
52305226 .data( 'context', context)
52315227 .click( action )
5232 - .click(
5233 - function() { return false; }
5234 - )
52355228 );
52365229 break;
52375230 }
52385231 }
 5232+ pageDiv.append( charsDiv );
52395233 break;
52405234 default: break;
52415235 }
 5236+ pagesDiv.append( pageDiv );
52425237 }
 5238+ $(this).append( indexDiv )
 5239+ .append( pagesDiv );
52435240 break;
52445241 default: break;
52455242 }
Index: trunk/extensions/UsabilityInitiative/js/jquery.combined.min.js
@@ -471,28 +471,31 @@
472472 return this.each(function(){$(this).focus();if(this.selectionStart||this.selectionStart=='0'){this.selectionStart=pos;this.selectionEnd=pos;$(this).scrollTop(getCaretScrollPosition(this));}else if(document.selection&&document.selection.createRange){range=document.selection.createRange();oldPos=$(this).bytePos();goBack=false;if(oldPos==pos){pos++;goBack=true;}
473473 range.moveToElementText(this);range.collapse();range.move('character',pos);range.select();this.scrollTop+=range.offsetTop;if(goBack){range.move('character',-1);range.select();}}
474474 $(this).trigger('scrollToPosition');});}});})(jQuery);(function($){$.fn.extend({toolbar:function(textbox,tools){return this.each(function(){if('main'in tools){$(this).addToolbarSection(tools.main,textbox,'main');}
475 -var tabDiv=$('<div></div>').attr('class','tabs').appendTo($(this));var sectionsDiv=$('<div></div>').attr('class','sections').appendTo($(this));$(this).append($('<div></div>').addClass('break'));var sectionCookie='edittoolbar-'+$(this).attr('id')+'-section';var sectionQueue=[];for(section in tools){if(section=='main'){continue;}
476 -var sectionDiv=$('<div></div>').attr({'class':'section','id':$(this).attr('id')+'-section-'+section}).appendTo(sectionsDiv).addClass('loading').append($('<div></div>').addClass('progress').text(gM('edittoolbar-loading')));var current=false;if($.cookie(sectionCookie)==sectionDiv.attr('id')){sectionDiv.attr('style','display:block');current=true;}
 475+var tabDiv=$('<div></div>').attr('class','tabs');var sectionsDiv=$('<div></div>').attr('class','sections');var sectionCookie='edittoolbar-'+$(this).attr('id')+'-section';var sectionQueue=[];for(section in tools){if(section=='main'){continue;}
 476+var sectionDiv=$('<div></div>').attr({'class':'section','id':$(this).attr('id')+'-section-'+section}).addClass('loading').append($('<div></div>').addClass('progress').text(gM('edittoolbar-loading'))).appendTo(sectionsDiv);var current=false;if($.cookie(sectionCookie)==sectionDiv.attr('id')){sectionDiv.attr('style','display:block');current=true;}
477477 sectionQueue[sectionQueue.length]={'sectionDiv':sectionDiv,'tools':tools[section],'textbox':textbox};tabDiv.append($('<span></span>').attr('class','tab').append($('<a></a>').text(tools[section].label||gM(tools[section].labelMsg)).attr({'href':'#','rel':section,'class':current?'current':null}).data('sectionDiv',sectionDiv).data('sectionCookie',sectionCookie).data('textbox',textbox).click(function(){$(this).blur();var show=($(this).data('sectionDiv').css('display')=='none');$(this).data('sectionDiv').parent().children().hide();$(this).parent().parent().find('a').removeClass('current');if(show){$(this).data('sectionDiv').show();$(this).addClass('current');}
478478 $.cookie($(this).data('sectionCookie'),show?$(this).data('sectionDiv').attr('id'):null);return false;})));}
479 -$.eachAsync(sectionQueue,{bulk:0,loop:function(index,value){value.sectionDiv.addToolbarSection(value.tools,value.textbox,index);value.sectionDiv.removeClass('loading')}})});},addToolbarSection:function(section,textbox,id){var imagePath=wgScriptPath+'/extensions/UsabilityInitiative/EditToolbar/images/';function msgSet(object,property){return property in object||property+'Msg'in object;}
 479+$(this).append(tabDiv).append(sectionsDiv).append($('<div></div>').addClass('break'));$.eachAsync(sectionQueue,{bulk:0,loop:function(index,value){value.sectionDiv.addToolbarSection(value.tools,value.textbox,index);value.sectionDiv.removeClass('loading')}})});},addToolbarSection:function(section,textbox,id){var imagePath=wgScriptPath+'/extensions/UsabilityInitiative/EditToolbar/images/';function msgSet(object,property){return property in object||property+'Msg'in object;}
480480 function msg(object,property){return object[property]||gM(object[property+'Msg']);}
481481 var action=function(event){$(this).useTool($(this).data('context').tool,$(this).data('context').textbox);event.preventDefault();};switch(section.type){case'toolbar':if(!('groups'in section)){return;}
482 -for(group in section.groups){var groupDiv=$('<div></div>').attr('class','group').appendTo($(this));if(msgSet(section.groups[group],'label')){groupDiv.append($('<div></div>').attr('class','label').text(msg(section.groups[group],'label')))}
 482+for(group in section.groups){var groupDiv=$('<div></div>').attr('class','group');if(msgSet(section.groups[group],'label')){groupDiv.append($('<div></div>').attr('class','label').text(msg(section.groups[group],'label')))}
483483 for(tool in section.groups[group].tools){if('filters'in section.groups[group].tools[tool]){var filters=section.groups[group].tools[tool].filters;var skip=false;for(filter in filters){if($(filters[filter]).size()==0){skip=true;}}
484484 if(skip){continue;}}
485485 var context={'tool':section.groups[group].tools[tool],'textbox':textbox};var label=msg(section.groups[group].tools[tool],'label');switch(section.groups[group].tools[tool].type){case'button':groupDiv.append($('<input />').attr({src:imagePath+
486486 section.groups[group].tools[tool].icon,alt:label,title:label,'class':'tool','type':'image'}).data('context',context).click(action));break;case'select':var selectDiv=$('<select></select>').data('context',context).change(action).append($('<option></option>').text(label)).appendTo(groupDiv);for(option in section.groups[group].tools[tool].list){selectDiv.append($('<option></option>').text(msg(section.groups[group].tools[tool].list[option],'label')).attr('value',option));}
487 -break;default:break;}}}
 487+break;default:break;}}
 488+$(this).append(groupDiv);}
488489 break;case'booklet':if(!('pages'in section)){return;}
489 -var indexDiv=$('<div></div>').attr('class','index').appendTo($(this));var bookletCookie='edittoolbar-'+$(this).attr('id')+'-booklet-'+id;var selectedID=$.cookie(bookletCookie);for(page in section.pages){if(selectedID===null){selectedID=page;}
 490+var indexDiv=$('<div></div>').attr('class','index');var bookletCookie='edittoolbar-'+$(this).attr('id')+'-booklet-'+id;var selectedID=$.cookie(bookletCookie);for(page in section.pages){if(selectedID===null){selectedID=page;}
490491 indexDiv.append($('<div></div>').attr('class',page===selectedID?'current':null).text(msg(section.pages[page],'label')).data('page',page).data('cookie',bookletCookie).click(function(){$(this).parent().parent().find('div.pages > div.page').hide().end().parent().find('div').removeClass('current').end().parent().parent().find('div.pages > div.page-'+
491492 $(this).data('page')).show();$(this).addClass('current');$.cookie($(this).data('cookie'),$(this).data('page'));}));}
492 -var pagesDiv=$('<div></div>').attr('class','pages').appendTo($(this));for(page in section.pages){var pageDiv=$('<div></div>').attr('class','page page-'+page).css('display',page===selectedID?'block':'none').appendTo(pagesDiv);switch(section.pages[page].layout){case'table':var contentTable=$('<table></table>').attr({'cellpadding':'0','cellspacing':'0','border':'0','width':'100%'}).appendTo(pageDiv);var headingRow=$('<tr></tr>').appendTo(contentTable);for(heading in section.pages[page].headings){$('<th></th>').text(msg(section.pages[page].headings[heading],'content')).appendTo(headingRow);}
493 -for(row in section.pages[page].rows){var contentRow=$('<tr></tr>').appendTo(contentTable);for(cell in section.pages[page].rows[row]){$('<td></td>').attr({'class':cell,'valign':'top'}).append($('<span></span>').text(msg(section.pages[page].rows[row][cell],'content'))).appendTo(contentRow);}}
494 -break;case'characters':var charsDiv=$('<div />').attr(section.pages[page].attributes).css(section.pages[page].styles).appendTo(pageDiv);for(character in section.pages[page].characters){switch(section.pages[page].characters[character].type){case'link':var context={'tool':section.pages[page].characters[character],'textbox':textbox};charsDiv.append($('<a />').attr('href','#').text(section.pages[page].characters[character].label).data('context',context).click(action).click(function(){return false;}));break;}}
495 -break;default:break;}}
496 -break;default:break;}},useTool:function(tool,textbox){function performAction(action,textbox){switch(action.type){case'encapsulate':var parts={'pre':'','peri':'','post':''};for(part in parts){if(part+'Msg'in action.options){parts[part]=gM(action.options[part+'Msg'],(action.options[part]||null));}else{parts[part]=(action.options[part]||'')}}
 493+var pagesDiv=$('<div></div>').attr('class','pages');for(page in section.pages){var pageDiv=$('<div></div>').attr('class','page page-'+page).css('display',page===selectedID?'block':'none');switch(section.pages[page].layout){case'table':var contentTable=$('<table></table>').attr({'cellpadding':'0','cellspacing':'0','border':'0','width':'100%'});var headingRow=$('<tr></tr>');for(heading in section.pages[page].headings){$('<th></th>').text(msg(section.pages[page].headings[heading],'content')).appendTo(headingRow);}
 494+contentTable.append(headingRow);for(row in section.pages[page].rows){var contentRow=$('<tr></tr>');for(cell in section.pages[page].rows[row]){$('<td></td>').attr({'class':cell,'valign':'top'}).append($('<span></span>').text(msg(section.pages[page].rows[row][cell],'content'))).appendTo(contentRow);}
 495+contentTable.append(contentRow);}
 496+pageDiv.append(contentTable);break;case'characters':var charsDiv=$('<div />').attr(section.pages[page].attributes).css(section.pages[page].styles);for(character in section.pages[page].characters){switch(section.pages[page].characters[character].type){case'link':var context={'tool':section.pages[page].characters[character],'textbox':textbox};charsDiv.append($('<a />').attr('href','#').text(section.pages[page].characters[character].label).data('context',context).click(action));break;}}
 497+pageDiv.append(charsDiv);break;default:break;}
 498+pagesDiv.append(pageDiv);}
 499+$(this).append(indexDiv).append(pagesDiv);break;default:break;}},useTool:function(tool,textbox){function performAction(action,textbox){switch(action.type){case'encapsulate':var parts={'pre':'','peri':'','post':''};for(part in parts){if(part+'Msg'in action.options){parts[part]=gM(action.options[part+'Msg'],(action.options[part]||null));}else{parts[part]=(action.options[part]||'')}}
497500 textbox.encapsulateSelection(parts.pre,parts.peri,parts.post);break;default:break;}}
498501 switch(tool.type){case'button':case'link':performAction(tool.action,textbox);break;case'select':if($(this).val()in tool.list){performAction(tool.list[$(this).val()].action,textbox);}
499502 $(this).find(":selected").attr('selected',false);$(this).find(":first").attr('selected',true);break;default:break;}},parseCharinsert:function(charinsert){var retval={};for(page in charinsert){var pageKey=page.replace(/[^A-Za-z]/g,'-');var characters=[],attributes={},styles={};var i=0;for(line in charinsert[page]){if(!(charinsert[page][line]instanceof Array)){for(attr in charinsert[page][line]){switch(attr){case'class':case'lang':attributes[attr]=charinsert[page][line][attr];break;default:styles[attr]=charinsert[page][line][attr];}}
Index: trunk/extensions/UsabilityInitiative/js/jquery.toolbar.js
@@ -16,12 +16,9 @@
1717 $(this).addToolbarSection( tools.main, textbox, 'main' );
1818 }
1919 var tabDiv = $( '<div></div>' )
20 - .attr( 'class', 'tabs' )
21 - .appendTo( $(this) );
 20+ .attr( 'class', 'tabs' );
2221 var sectionsDiv = $( '<div></div>' )
23 - .attr( 'class', 'sections' )
24 - .appendTo( $(this) );
25 - $(this).append( $( '<div></div>' ).addClass( 'break' ) );
 22+ .attr( 'class', 'sections' );
2623 var sectionCookie = 'edittoolbar-' + $(this).attr( 'id' ) + '-section';
2724 var sectionQueue = [];
2825 for ( section in tools ) {
@@ -33,14 +30,14 @@
3431 'class': 'section',
3532 'id': $(this).attr( 'id' ) + '-section-' + section
3633 } )
37 - .appendTo( sectionsDiv )
3834 .addClass( 'loading' )
3935 .append(
4036 $( '<div></div>' )
4137 .addClass( 'progress' )
4238 .text( gM( 'edittoolbar-loading' )
4339 )
44 - );
 40+ )
 41+ .appendTo( sectionsDiv );
4542 var current = false;
4643 if ( $.cookie( sectionCookie ) == sectionDiv.attr( 'id' ) ) {
4744 sectionDiv.attr( 'style', 'display:block' );
@@ -97,6 +94,9 @@
9895 )
9996 );
10097 }
 98+ $(this).append( tabDiv )
 99+ .append( sectionsDiv )
 100+ .append( $( '<div></div>' ).addClass( 'break' ) );
101101 $.eachAsync( sectionQueue, {
102102 bulk: 0,
103103 loop: function( index, value ) {
@@ -138,8 +138,7 @@
139139 }
140140 for ( group in section.groups ) {
141141 var groupDiv = $( '<div></div>' )
142 - .attr( 'class', 'group' )
143 - .appendTo( $(this) );
 142+ .attr( 'class', 'group' );
144143 if ( msgSet( section.groups[group], 'label' ) ) {
145144 groupDiv.append(
146145 $( '<div></div>' )
@@ -209,6 +208,7 @@
210209 default: break;
211210 }
212211 }
 212+ $(this).append( groupDiv );
213213 }
214214 break;
215215 case 'booklet':
@@ -216,8 +216,7 @@
217217 return;
218218 }
219219 var indexDiv = $( '<div></div>' )
220 - .attr( 'class', 'index' )
221 - .appendTo( $(this) );
 220+ .attr( 'class', 'index' );
222221 var bookletCookie =
223222 'edittoolbar-' + $(this).attr( 'id' ) + '-booklet-' + id;
224223 var selectedID = $.cookie( bookletCookie );
@@ -257,13 +256,11 @@
258257 );
259258 }
260259 var pagesDiv = $( '<div></div>' )
261 - .attr( 'class', 'pages' )
262 - .appendTo( $(this) );
 260+ .attr( 'class', 'pages' );
263261 for ( page in section.pages ) {
264262 var pageDiv = $( '<div></div>' )
265263 .attr( 'class', 'page page-' + page )
266 - .css( 'display', page === selectedID ? 'block' : 'none' )
267 - .appendTo( pagesDiv );
 264+ .css( 'display', page === selectedID ? 'block' : 'none' );
268265 switch ( section.pages[page].layout ) {
269266 case 'table':
270267 var contentTable = $( '<table></table>' )
@@ -272,10 +269,8 @@
273270 'cellspacing': '0',
274271 'border': '0',
275272 'width': '100%'
276 - } )
277 - .appendTo( pageDiv );
278 - var headingRow = $( '<tr></tr>' )
279 - .appendTo( contentTable );
 273+ } );
 274+ var headingRow = $( '<tr></tr>' );
280275 for ( heading in section.pages[page].headings ) {
281276 $( '<th></th>' )
282277 .text(
@@ -287,9 +282,9 @@
288283 )
289284 .appendTo( headingRow );
290285 }
 286+ contentTable.append( headingRow );
291287 for ( row in section.pages[page].rows ) {
292 - var contentRow = $( '<tr></tr>' )
293 - .appendTo( contentTable );
 288+ var contentRow = $( '<tr></tr>' );
294289 for ( cell in section.pages[page].rows[row] ) {
295290 $( '<td></td>' )
296291 .attr( {
@@ -308,13 +303,14 @@
309304 )
310305 .appendTo( contentRow );
311306 }
 307+ contentTable.append( contentRow );
312308 }
 309+ pageDiv.append( contentTable );
313310 break;
314311 case 'characters':
315312 var charsDiv = $( '<div />' )
316313 .attr( section.pages[page].attributes )
317 - .css( section.pages[page].styles )
318 - .appendTo( pageDiv );
 314+ .css( section.pages[page].styles );
319315 for ( character in section.pages[page].characters ) {
320316 switch (
321317 section.pages[page].characters[character].type
@@ -334,17 +330,18 @@
335331 )
336332 .data( 'context', context)
337333 .click( action )
338 - .click(
339 - function() { return false; }
340 - )
341334 );
342335 break;
343336 }
344337 }
 338+ pageDiv.append( charsDiv );
345339 break;
346340 default: break;
347341 }
 342+ pagesDiv.append( pageDiv );
348343 }
 344+ $(this).append( indexDiv )
 345+ .append( pagesDiv );
349346 break;
350347 default: break;
351348 }
Property changes on: trunk/extensions/UsabilityInitiative/js/jquery.toolbar.js
___________________________________________________________________
Name: svn:eol-style
352349 + native
Property changes on: trunk/extensions/UsabilityInitiative/js/jquery.wikiOutline.js
___________________________________________________________________
Name: svn:eol-style
353350 + native

Status & tagging log