Index: trunk/extensions/UsabilityInitiative/js/jquery.combined.js |
— | — | @@ -5144,13 +5144,11 @@ |
5145 | 5145 | ) { |
5146 | 5146 | var $headings = $( '<tr></tr>' ).appendTo( $table ); |
5147 | 5147 | for ( heading in pages[page].headings ) { |
| 5148 | + var content = msg( |
| 5149 | + pages[page].headings[heading], 'content' |
| 5150 | + ); |
5148 | 5151 | $( '<th></th>' ) |
5149 | | - .text( |
5150 | | - msg( |
5151 | | - pages[page].headings[heading], |
5152 | | - 'content' |
5153 | | - ) |
5154 | | - ) |
| 5152 | + .text( content ) |
5155 | 5153 | .appendTo( $headings ); |
5156 | 5154 | } |
5157 | 5155 | } |
— | — | @@ -5161,18 +5159,14 @@ |
5162 | 5160 | for ( row in pages[page].rows ) { |
5163 | 5161 | var $row = $( '<tr></tr>' ).appendTo( $table ); |
5164 | 5162 | for ( cell in pages[page].rows[row] ) { |
| 5163 | + var content = msg( |
| 5164 | + pages[page].rows[row][cell], 'content' |
| 5165 | + ); |
5165 | 5166 | $( '<td></td>' ) |
5166 | 5167 | .addClass( cell ) |
5167 | 5168 | .attr( 'valign', 'top' ) |
5168 | 5169 | .append( |
5169 | | - $( '<span></span>' ) |
5170 | | - .text( |
5171 | | - msg( |
5172 | | - pages[page] |
5173 | | - .rows[row][cell], |
5174 | | - 'content' |
5175 | | - ) |
5176 | | - ) |
| 5170 | + $( '<span></span>' ).html( content ) |
5177 | 5171 | ) |
5178 | 5172 | .appendTo( $row ); |
5179 | 5173 | } |
Index: trunk/extensions/UsabilityInitiative/js/jquery.combined.min.js |
— | — | @@ -484,8 +484,8 @@ |
485 | 485 | function addPages($index,$pages,pages,sectionId){var selected=$.cookie(sectionId);if(!(selected in pages)){selected=null;} |
486 | 486 | for(page in pages){if(!('layout'in pages[page])){continue;} |
487 | 487 | if(selected==null){selected=page;} |
488 | | -$index.append($('<div></div>').attr('class',page===selected?'current':null).text(msg(pages[page],'label')).data('page',page).data('sectionId',sectionId).click(function(){$(this).parent().parent().find('.page').hide().end().parent().find('div').removeClass('current').end().parent().parent().find('.page-'+$(this).data('page')).show();$(this).addClass('current');$.cookie($(this).data('sectionId'),$(this).data('page'));}));var $page=$('<div></div>').addClass('page').addClass('page-'+page).css('display',page==selected?'block':'none').appendTo($pages);switch(pages[page].layout){case'table':var $table=$('<table></table>').attr({'cellpadding':'0','cellspacing':'0','border':'0','width':'100%'}).appendTo($page);if('headings'in pages[page]&&typeof pages[page].headings=='object'){var $headings=$('<tr></tr>').appendTo($table);for(heading in pages[page].headings){$('<th></th>').text(msg(pages[page].headings[heading],'content')).appendTo($headings);}} |
489 | | -if('rows'in pages[page]&&typeof pages[page].rows=='object'){for(row in pages[page].rows){var $row=$('<tr></tr>').appendTo($table);for(cell in pages[page].rows[row]){$('<td></td>').addClass(cell).attr('valign','top').append($('<span></span>').text(msg(pages[page].rows[row][cell],'content'))).appendTo($row);}}} |
| 488 | +$index.append($('<div></div>').attr('class',page===selected?'current':null).text(msg(pages[page],'label')).data('page',page).data('sectionId',sectionId).click(function(){$(this).parent().parent().find('.page').hide().end().parent().find('div').removeClass('current').end().parent().parent().find('.page-'+$(this).data('page')).show();$(this).addClass('current');$.cookie($(this).data('sectionId'),$(this).data('page'));}));var $page=$('<div></div>').addClass('page').addClass('page-'+page).css('display',page==selected?'block':'none').appendTo($pages);switch(pages[page].layout){case'table':var $table=$('<table></table>').attr({'cellpadding':'0','cellspacing':'0','border':'0','width':'100%'}).appendTo($page);if('headings'in pages[page]&&typeof pages[page].headings=='object'){var $headings=$('<tr></tr>').appendTo($table);for(heading in pages[page].headings){var content=msg(pages[page].headings[heading],'content');$('<th></th>').text(content).appendTo($headings);}} |
| 489 | +if('rows'in pages[page]&&typeof pages[page].rows=='object'){for(row in pages[page].rows){var $row=$('<tr></tr>').appendTo($table);for(cell in pages[page].rows[row]){var content=msg(pages[page].rows[row][cell],'content');$('<td></td>').addClass(cell).attr('valign','top').append($('<span></span>').html(content)).appendTo($row);}}} |
490 | 490 | break;case'characters':var $characters=$('<div></div>').attr(pages[page].attributes).css(pages[page].styles).appendTo($page);if('characters'in pages[page]&&typeof pages[page].characters=='object'){for(character in pages[page].characters){var char=pages[page].characters[character];var tool={};if(typeof char=='string'){tool={'type':'link','label':char,'action':{'type':'encapsulate','options':{'pre':char}}};}else if(typeof char=='object'){tool=char;}else{continue;} |
491 | 491 | if(!('label'in tool)){continue;} |
492 | 492 | $characters.append($('<a></a>').attr('href','#').text(tool.label).data('tool',tool).click(useTool));}} |
Index: trunk/extensions/UsabilityInitiative/js/jquery.wikiEditor.js |
— | — | @@ -250,13 +250,11 @@ |
251 | 251 | ) { |
252 | 252 | var $headings = $( '<tr></tr>' ).appendTo( $table ); |
253 | 253 | for ( heading in pages[page].headings ) { |
| 254 | + var content = msg( |
| 255 | + pages[page].headings[heading], 'content' |
| 256 | + ); |
254 | 257 | $( '<th></th>' ) |
255 | | - .text( |
256 | | - msg( |
257 | | - pages[page].headings[heading], |
258 | | - 'content' |
259 | | - ) |
260 | | - ) |
| 258 | + .text( content ) |
261 | 259 | .appendTo( $headings ); |
262 | 260 | } |
263 | 261 | } |
— | — | @@ -267,18 +265,14 @@ |
268 | 266 | for ( row in pages[page].rows ) { |
269 | 267 | var $row = $( '<tr></tr>' ).appendTo( $table ); |
270 | 268 | for ( cell in pages[page].rows[row] ) { |
| 269 | + var content = msg( |
| 270 | + pages[page].rows[row][cell], 'content' |
| 271 | + ); |
271 | 272 | $( '<td></td>' ) |
272 | 273 | .addClass( cell ) |
273 | 274 | .attr( 'valign', 'top' ) |
274 | 275 | .append( |
275 | | - $( '<span></span>' ) |
276 | | - .text( |
277 | | - msg( |
278 | | - pages[page] |
279 | | - .rows[row][cell], |
280 | | - 'content' |
281 | | - ) |
282 | | - ) |
| 276 | + $( '<span></span>' ).html( content ) |
283 | 277 | ) |
284 | 278 | .appendTo( $row ); |
285 | 279 | } |