Index: trunk/extensions/UsabilityInitiative/css/combined.css |
— | — | @@ -219,7 +219,7 @@ |
220 | 220 | margin-left: 8px; |
221 | 221 | margin-right: 5px; |
222 | 222 | } |
223 | | -.wikiEditor-ui .wikiEditor-ui-toolbar .group input.tool { |
| 223 | +.wikiEditor-ui .wikiEditor-ui-toolbar .group img.tool { |
224 | 224 | float: left; |
225 | 225 | border: 0px; |
226 | 226 | height: 22px; |
— | — | @@ -228,7 +228,7 @@ |
229 | 229 | cursor: pointer; |
230 | 230 | } |
231 | 231 | /* IGNORED BY IE6 */ |
232 | | -body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .group > input.tool { |
| 232 | +body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .group > img.tool { |
233 | 233 | float: right; |
234 | 234 | } |
235 | 235 | .wikiEditor-ui .wikiEditor-ui-toolbar .group select { |
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css |
— | — | @@ -1 +1 @@ |
2 | | -@CHARSET "UTF-8";form#editform{margin:0;padding:0;}.wikiEditor-ui textarea#wpTextbox1{border:none;margin:0;padding:0;width:100%;}.wikiEditor-ui{position:relative;border:solid silver 1px;background-color:#f3f3f3;clear:both;line-height:1em;}.wikiEditor-ui .wikiEditor-ui-bottom{position:relative;}@CHARSET "UTF-8";.wikiEditor-ui .wikiEditor-ui-toc{position:absolute;right:-1px;top:0;padding:0;border-left:solid silver 1px;overflow:auto;}body.rtl .wikiEditor-ui .wikiEditor-ui-toc{right:auto;left:-1px;border-left:none;border-right:solid silver 1px;}.wikiEditor-ui .wikiEditor-ui-toc ul{padding:0;margin:0.5em 1em;list-style:none;}.wikiEditor-ui .wikiEditor-ui-toc ul ul{padding:0;margin:0;margin-left:0.75em;margin-bottom:0 !important;margin-top:0 !important;list-style:none;}body.rtl .wikiEditor-ui .wikiEditor-ui-toc ul ul{margin-left:0;margin-right:0.75em;}.wikiEditor-ui .wikiEditor-ui-toc ul li a{display:block;font-size:0.9em;}.wikiEditor-ui .wikiEditor-ui-toc ul li a.currentSelection{font-weight:bold;}.wikiEditor-ui .wikiEditor-ui-toc ul li a.section-0{font-size:1em;border-bottom:solid 1px #DDDDDD;}@CHARSET "UTF-8";.wikiEditor-ui .wikiEditor-ui-toolbar{background-color:#F3F3F3;}.wikiEditor-ui .wikiEditor-ui-toolbar .break{border-bottom:solid silver 1px;clear:both;}.wikiEditor-ui .wikiEditor-ui-toolbar .sections{float:left;width:100%;clear:both;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .sections{float:right;}.wikiEditor-ui .wikiEditor-ui-toolbar .sections .section{display:none;float:left;width:100%;margin-left:-1px;border-left:solid silver 1px;border-right:solid silver 1px;border-top:solid 1px #DDDDDD;background-color:#F3F3F3;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .sections .section{float:right;margin-left:auto;margin-right:-1px;}.wikiEditor-ui .wikiEditor-ui-toolbar .sections .loading{padding-top:0.5em;padding-bottom:0.5em;}.wikiEditor-ui .wikiEditor-ui-toolbar .sections div .spinner{display:none;}.wikiEditor-ui .wikiEditor-ui-toolbar .sections .loading .spinner{display:block;background-image:url(../images/wikiEditor/toolbar/loading.gif);background-position:left center;background-repeat:no-repeat;padding-left:32px;margin-left:1em;float:left;color:#666666;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .sections .loading .spinner{background-position:right center;padding-left:0;padding-right:32px;margin-left:0;margin-right:1em;float:right;}.wikiEditor-ui .wikiEditor-ui-toolbar .tabs,.wikiEditor-ui .wikiEditor-ui-toolbar .group{float:left;height:26px;margin:3px;padding:0;padding-right:6px;border-right:solid 1px #DDDDDD;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .tabs,body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .group{float:right;padding-right:0;padding-left:6px;border-right:none;border-left:solid 1px #DDDDDD;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .first{border-right:none;}.wikiEditor-ui .wikiEditor-ui-toolbar .tabs{list-style:none;}.wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab{display:inline-block;float:left;line-height:26px;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .tabs > span.tab{float:right;}.wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a,.wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a:visited{display:inline-block;float:left;padding-left:18px;padding-right:12px;height:26px;cursor:pointer;color:#0645ad;background-image:url(../images/wikiEditor/toolbar/arrow-right.png);background-position:left center;background-repeat:no-repeat;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a,body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a:visited{padding-left:12px;padding-right:18px;background-image:url(../images/wikiEditor/toolbar/arrow-left.png);background-position:right center;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .tabs > span.tab > a,body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .tabs > pan.tab > a:visited{float:right;}.wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a.current,.wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a.current:visited{color:#333333;background-image:url(../images/wikiEditor/toolbar/arrow-down.png);}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a.current,body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a.current:visited{background-image:url(../images/wikiEditor/toolbar/arrow-down.png);}.wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a.current:hover{text-decoration:none;}.wikiEditor-ui .wikiEditor-ui-toolbar .group .label{float:left;border:0px;height:22px;line-height:22px;margin:2px;margin-left:5px;margin-right:8px;color:#777777;cursor:default;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .group > .label{float:right;margin-left:8px;margin-right:5px;}.wikiEditor-ui .wikiEditor-ui-toolbar .group input.tool{float:left;border:0px;height:22px;width:22px;padding:2px;cursor:pointer;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .group > input.tool{float:right;}.wikiEditor-ui .wikiEditor-ui-toolbar .group select{float:left;margin:2px;height:22px;cursor:pointer;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .group > select{float:right;font-size:0.9em;}.wikiEditor-ui .wikiEditor-ui-toolbar .booklet .index{float:left;width:20%;height:125px;overflow:auto;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .booklet .index{float:right;}.wikiEditor-ui .wikiEditor-ui-toolbar .booklet .index div{padding:4px;padding-left:6px;cursor:pointer;color:#0645ad;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .booklet .index div{padding-left:4px;padding-right:6px;}.wikiEditor-ui .wikiEditor-ui-toolbar .booklet .index .current{background-color:#FAFAFA;color:#333333;cursor:default;}.wikiEditor-ui .wikiEditor-ui-toolbar .booklet .pages{float:right;width:80%;height:125px;overflow:auto;background-color:#FAFAFA;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .booklet .pages{float:left;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table{padding-left:5px;padding-right:5px;background:none;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table th{color:#999999;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table td{color:black;border-top:solid 1px #EEEEEE;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table th,.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table td{text-align:left;padding:5px;margin:0px;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table th,body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table td{text-align:right;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table td.syntax{font-family:monospace;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table td.syntax,.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table td.result{width:40%;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table td.description{width:20%;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-characters .page-characters div a{border:solid 1px #DDDDDD;padding:5px;padding-left:8px;padding-right:8px;margin-left:5px;margin-top:5px;height:1em;float:left;display:block;color:black;text-decoration:none;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .section-characters .page-characters > div > a,.wikiEditor-ui .wikiEditor-ui-toolbar .section-characters .page-characters div.rtl a{direction:rtl;float:right;margin-left:0;margin-right:5px;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-characters .page-characters div a:hover{background-color:white;text-decoration:none;border-color:#a8d7f9;} |
| 2 | +@CHARSET "UTF-8";form#editform{margin:0;padding:0;}.wikiEditor-ui textarea#wpTextbox1{border:none;margin:0;padding:0;width:100%;}.wikiEditor-ui{position:relative;border:solid silver 1px;background-color:#f3f3f3;clear:both;line-height:1em;}.wikiEditor-ui .wikiEditor-ui-bottom{position:relative;}@CHARSET "UTF-8";.wikiEditor-ui .wikiEditor-ui-toc{position:absolute;right:-1px;top:0;padding:0;border-left:solid silver 1px;overflow:auto;}body.rtl .wikiEditor-ui .wikiEditor-ui-toc{right:auto;left:-1px;border-left:none;border-right:solid silver 1px;}.wikiEditor-ui .wikiEditor-ui-toc ul{padding:0;margin:0.5em 1em;list-style:none;}.wikiEditor-ui .wikiEditor-ui-toc ul ul{padding:0;margin:0;margin-left:0.75em;margin-bottom:0 !important;margin-top:0 !important;list-style:none;}body.rtl .wikiEditor-ui .wikiEditor-ui-toc ul ul{margin-left:0;margin-right:0.75em;}.wikiEditor-ui .wikiEditor-ui-toc ul li a{display:block;font-size:0.9em;}.wikiEditor-ui .wikiEditor-ui-toc ul li a.currentSelection{font-weight:bold;}.wikiEditor-ui .wikiEditor-ui-toc ul li a.section-0{font-size:1em;border-bottom:solid 1px #DDDDDD;}@CHARSET "UTF-8";.wikiEditor-ui .wikiEditor-ui-toolbar{background-color:#F3F3F3;}.wikiEditor-ui .wikiEditor-ui-toolbar .break{border-bottom:solid silver 1px;clear:both;}.wikiEditor-ui .wikiEditor-ui-toolbar .sections{float:left;width:100%;clear:both;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .sections{float:right;}.wikiEditor-ui .wikiEditor-ui-toolbar .sections .section{display:none;float:left;width:100%;margin-left:-1px;border-left:solid silver 1px;border-right:solid silver 1px;border-top:solid 1px #DDDDDD;background-color:#F3F3F3;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .sections .section{float:right;margin-left:auto;margin-right:-1px;}.wikiEditor-ui .wikiEditor-ui-toolbar .sections .loading{padding-top:0.5em;padding-bottom:0.5em;}.wikiEditor-ui .wikiEditor-ui-toolbar .sections div .spinner{display:none;}.wikiEditor-ui .wikiEditor-ui-toolbar .sections .loading .spinner{display:block;background-image:url(../images/wikiEditor/toolbar/loading.gif);background-position:left center;background-repeat:no-repeat;padding-left:32px;margin-left:1em;float:left;color:#666666;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .sections .loading .spinner{background-position:right center;padding-left:0;padding-right:32px;margin-left:0;margin-right:1em;float:right;}.wikiEditor-ui .wikiEditor-ui-toolbar .tabs,.wikiEditor-ui .wikiEditor-ui-toolbar .group{float:left;height:26px;margin:3px;padding:0;padding-right:6px;border-right:solid 1px #DDDDDD;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .tabs,body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .group{float:right;padding-right:0;padding-left:6px;border-right:none;border-left:solid 1px #DDDDDD;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .first{border-right:none;}.wikiEditor-ui .wikiEditor-ui-toolbar .tabs{list-style:none;}.wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab{display:inline-block;float:left;line-height:26px;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .tabs > span.tab{float:right;}.wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a,.wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a:visited{display:inline-block;float:left;padding-left:18px;padding-right:12px;height:26px;cursor:pointer;color:#0645ad;background-image:url(../images/wikiEditor/toolbar/arrow-right.png);background-position:left center;background-repeat:no-repeat;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a,body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a:visited{padding-left:12px;padding-right:18px;background-image:url(../images/wikiEditor/toolbar/arrow-left.png);background-position:right center;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .tabs > span.tab > a,body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .tabs > pan.tab > a:visited{float:right;}.wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a.current,.wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a.current:visited{color:#333333;background-image:url(../images/wikiEditor/toolbar/arrow-down.png);}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a.current,body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a.current:visited{background-image:url(../images/wikiEditor/toolbar/arrow-down.png);}.wikiEditor-ui .wikiEditor-ui-toolbar .tabs span.tab a.current:hover{text-decoration:none;}.wikiEditor-ui .wikiEditor-ui-toolbar .group .label{float:left;border:0px;height:22px;line-height:22px;margin:2px;margin-left:5px;margin-right:8px;color:#777777;cursor:default;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .group > .label{float:right;margin-left:8px;margin-right:5px;}.wikiEditor-ui .wikiEditor-ui-toolbar .group img.tool{float:left;border:0px;height:22px;width:22px;padding:2px;cursor:pointer;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .group > img.tool{float:right;}.wikiEditor-ui .wikiEditor-ui-toolbar .group select{float:left;margin:2px;height:22px;cursor:pointer;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .group > select{float:right;font-size:0.9em;}.wikiEditor-ui .wikiEditor-ui-toolbar .booklet .index{float:left;width:20%;height:125px;overflow:auto;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .booklet .index{float:right;}.wikiEditor-ui .wikiEditor-ui-toolbar .booklet .index div{padding:4px;padding-left:6px;cursor:pointer;color:#0645ad;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .booklet .index div{padding-left:4px;padding-right:6px;}.wikiEditor-ui .wikiEditor-ui-toolbar .booklet .index .current{background-color:#FAFAFA;color:#333333;cursor:default;}.wikiEditor-ui .wikiEditor-ui-toolbar .booklet .pages{float:right;width:80%;height:125px;overflow:auto;background-color:#FAFAFA;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .booklet .pages{float:left;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table{padding-left:5px;padding-right:5px;background:none;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table th{color:#999999;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table td{color:black;border-top:solid 1px #EEEEEE;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table th,.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table td{text-align:left;padding:5px;margin:0px;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table th,body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table td{text-align:right;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table td.syntax{font-family:monospace;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table td.syntax,.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table td.result{width:40%;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-help .page-table table td.description{width:20%;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-characters .page-characters div a{border:solid 1px #DDDDDD;padding:5px;padding-left:8px;padding-right:8px;margin-left:5px;margin-top:5px;height:1em;float:left;display:block;color:black;text-decoration:none;}body.rtl .wikiEditor-ui .wikiEditor-ui-toolbar .section-characters .page-characters > div > a,.wikiEditor-ui .wikiEditor-ui-toolbar .section-characters .page-characters div.rtl a{direction:rtl;float:right;margin-left:0;margin-right:5px;}.wikiEditor-ui .wikiEditor-ui-toolbar .section-characters .page-characters div a:hover{background-color:white;text-decoration:none;border-color:#a8d7f9;} |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js |
— | — | @@ -388,28 +388,42 @@ |
389 | 389 | ) |
390 | 390 | ); |
391 | 391 | } else { |
392 | | - $sections.append( |
| 392 | + sectionQueue[sectionQueue.length] = { |
| 393 | + 'context': context, |
| 394 | + '$sections': $sections, |
| 395 | + '$tabs': $tabs, |
| 396 | + 'section': section, |
| 397 | + 'config': config[section], |
| 398 | + 'selected': ( selected == section ) |
| 399 | + }; |
| 400 | + } |
| 401 | + } |
| 402 | + $.eachAsync( sectionQueue, { |
| 403 | + 'bulk': 0, |
| 404 | + 'loop': function( i, s ) { |
| 405 | + console.log( i ); |
| 406 | + s.$sections.append( |
393 | 407 | $.wikiEditor.modules.toolbar.fn.buildSection( |
394 | | - context, section, config[section] |
| 408 | + s.context, s.section, s.config |
395 | 409 | ) |
396 | | - .css( 'display', selected == section ? 'block' : 'none' ) |
| 410 | + .css( 'display', s.selected ? 'block' : 'none' ) |
397 | 411 | ); |
398 | | - $tabs.append( |
| 412 | + s.$tabs.append( |
399 | 413 | $( '<span></span>' ) |
400 | 414 | .attr( { |
401 | | - 'class': 'tab tab-' + section, |
402 | | - 'rel': section |
| 415 | + 'class': 'tab tab-' + s.section, |
| 416 | + 'rel': s.section |
403 | 417 | } ) |
404 | 418 | .append( |
405 | 419 | $( '<a></a>' ) |
406 | | - .addClass( selected == section ? 'current' : null ) |
| 420 | + .addClass( s.selected ? 'current' : null ) |
407 | 421 | .attr( 'href', '#' ) |
408 | 422 | .text( |
409 | 423 | $.wikiEditor.modules.toolbar.fn.autoMsg( |
410 | | - config[section], 'label' |
| 424 | + s.config, 'label' |
411 | 425 | ) |
412 | 426 | ) |
413 | | - .data( 'context', context ) |
| 427 | + .data( 'context', s.context ) |
414 | 428 | .click( function() { |
415 | 429 | var $section = |
416 | 430 | $(this).data( 'context' ).$ui.find( |
— | — | @@ -439,7 +453,7 @@ |
440 | 454 | ) |
441 | 455 | ); |
442 | 456 | } |
443 | | - } |
| 457 | + } ); |
444 | 458 | } |
445 | 459 | } |
446 | 460 | |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -1010,8 +1010,7 @@ |
1011 | 1011 | var label = $.wikiEditor.modules.toolbar.fn.autoMsg( tool, 'label' ); |
1012 | 1012 | switch ( tool.type ) { |
1013 | 1013 | case 'button': |
1014 | | - $button = $( '<input />' ).attr( { |
1015 | | - 'type': 'image', |
| 1014 | + $button = $( '<img />' ).attr( { |
1016 | 1015 | 'src': $.wikiEditor.modules.toolbar.imgPath + tool.icon, |
1017 | 1016 | 'alt': label, |
1018 | 1017 | 'title': label, |
— | — | @@ -1248,28 +1247,42 @@ |
1249 | 1248 | ) |
1250 | 1249 | ); |
1251 | 1250 | } else { |
1252 | | - $sections.append( |
| 1251 | + sectionQueue[sectionQueue.length] = { |
| 1252 | + 'context': context, |
| 1253 | + '$sections': $sections, |
| 1254 | + '$tabs': $tabs, |
| 1255 | + 'section': section, |
| 1256 | + 'config': config[section], |
| 1257 | + 'selected': ( selected == section ) |
| 1258 | + }; |
| 1259 | + } |
| 1260 | + } |
| 1261 | + $.eachAsync( sectionQueue, { |
| 1262 | + 'bulk': 0, |
| 1263 | + 'loop': function( i, s ) { |
| 1264 | + console.log( i ); |
| 1265 | + s.$sections.append( |
1253 | 1266 | $.wikiEditor.modules.toolbar.fn.buildSection( |
1254 | | - context, section, config[section] |
| 1267 | + s.context, s.section, s.config |
1255 | 1268 | ) |
1256 | | - .css( 'display', selected == section ? 'block' : 'none' ) |
| 1269 | + .css( 'display', s.selected ? 'block' : 'none' ) |
1257 | 1270 | ); |
1258 | | - $tabs.append( |
| 1271 | + s.$tabs.append( |
1259 | 1272 | $( '<span></span>' ) |
1260 | 1273 | .attr( { |
1261 | | - 'class': 'tab tab-' + section, |
1262 | | - 'rel': section |
| 1274 | + 'class': 'tab tab-' + s.section, |
| 1275 | + 'rel': s.section |
1263 | 1276 | } ) |
1264 | 1277 | .append( |
1265 | 1278 | $( '<a></a>' ) |
1266 | | - .addClass( selected == section ? 'current' : null ) |
| 1279 | + .addClass( s.selected ? 'current' : null ) |
1267 | 1280 | .attr( 'href', '#' ) |
1268 | 1281 | .text( |
1269 | 1282 | $.wikiEditor.modules.toolbar.fn.autoMsg( |
1270 | | - config[section], 'label' |
| 1283 | + s.config, 'label' |
1271 | 1284 | ) |
1272 | 1285 | ) |
1273 | | - .data( 'context', context ) |
| 1286 | + .data( 'context', s.context ) |
1274 | 1287 | .click( function() { |
1275 | 1288 | var $section = |
1276 | 1289 | $(this).data( 'context' ).$ui.find( |
— | — | @@ -1299,7 +1312,7 @@ |
1300 | 1313 | ) |
1301 | 1314 | ); |
1302 | 1315 | } |
1303 | | - } |
| 1316 | + } ); |
1304 | 1317 | } |
1305 | 1318 | } |
1306 | 1319 | |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -69,7 +69,7 @@ |
70 | 70 | return $toolbar;},buildGroup:function(context,id,group){var $group=$('<div></div>').attr({'class':'group group-'+id,'rel':id});var label=$.wikiEditor.modules.toolbar.fn.autoMsg(group,'label');if(label){$group.append($('<div></div>').text(label).addClass('label'))} |
71 | 71 | if('tools'in group){for(tool in group.tools){$group.append($.wikiEditor.modules.toolbar.fn.buildTool(context,tool,group.tools[tool]));}} |
72 | 72 | return $group;},buildTool:function(context,id,tool){if('filters'in tool){for(filter in tool.filters){if($(tool.filters[filter]).size()==0){return null;}}} |
73 | | -var label=$.wikiEditor.modules.toolbar.fn.autoMsg(tool,'label');switch(tool.type){case'button':$button=$('<input />').attr({'type':'image','src':$.wikiEditor.modules.toolbar.imgPath+tool.icon,'alt':label,'title':label,'rel':id,'class':'tool tool-'+id});if('action'in tool){$button.data('action',tool.action).data('context',context).click(function(){$.wikiEditor.modules.toolbar.fn.doAction($(this).data('context'),$(this).data('action'));return false;});} |
| 73 | +var label=$.wikiEditor.modules.toolbar.fn.autoMsg(tool,'label');switch(tool.type){case'button':$button=$('<img />').attr({'src':$.wikiEditor.modules.toolbar.imgPath+tool.icon,'alt':label,'title':label,'rel':id,'class':'tool tool-'+id});if('action'in tool){$button.data('action',tool.action).data('context',context).click(function(){$.wikiEditor.modules.toolbar.fn.doAction($(this).data('context'),$(this).data('action'));return false;});} |
74 | 74 | return $button;case'select':var $select=$('<select></select>').attr({'rel':id,'class':'tool tool-'+id});$select.append($('<option></option>').text(label)) |
75 | 75 | if('list'in tool){$select.data('list',tool.list).data('context',context).click(function(){var list=$(this).data('list');var val=$(this).val();if(val in list&&'action'in list[val]){$.wikiEditor.modules.toolbar.fn.doAction($(this).data('context'),list[val].action);} |
76 | 76 | $(this).find(":selected").attr('selected',false).find(":first").attr('selected',true);return false;});for(option in tool.list){var optionLabel=$.wikiEditor.modules.toolbar.fn.autoMsg(tool.list[option],'label');$select.append($('<option></option>').text(optionLabel).attr('value',option));}} |
— | — | @@ -87,7 +87,8 @@ |
88 | 88 | if('action'in tool&&'label'in tool){var $character=$('<a></a>').attr('href','#').text(tool.label).data('context',context).data('action',tool.action).click(function(){$.wikiEditor.modules.toolbar.fn.doAction($(this).data('context'),$(this).data('action'));return false;});$characters.append($character);}} |
89 | 89 | $page.append($characters);} |
90 | 90 | break;} |
91 | | -return $page;},build:function(context,config){var $tabs=$('<div></div>').addClass('tabs').appendTo(context.modules.$toolbar);var $sections=$('<div></div>').addClass('sections').appendTo(context.modules.$toolbar);context.modules.$toolbar.append($('<div></div>').addClass('break'));var selected=$.cookie('wikiEditor-'+context.instance+'-toolbar-section');var sectionQueue=[];for(section in config){if(section=='main'){context.modules.$toolbar.prepend($.wikiEditor.modules.toolbar.fn.buildSection(context,section,config[section]));}else{$sections.append($.wikiEditor.modules.toolbar.fn.buildSection(context,section,config[section]).css('display',selected==section?'block':'none'));$tabs.append($('<span></span>').attr({'class':'tab tab-'+section,'rel':section}).append($('<a></a>').addClass(selected==section?'current':null).attr('href','#').text($.wikiEditor.modules.toolbar.fn.autoMsg(config[section],'label')).data('context',context).click(function(){var $section=$(this).data('context').$ui.find('.section-'+ |
| 91 | +return $page;},build:function(context,config){var $tabs=$('<div></div>').addClass('tabs').appendTo(context.modules.$toolbar);var $sections=$('<div></div>').addClass('sections').appendTo(context.modules.$toolbar);context.modules.$toolbar.append($('<div></div>').addClass('break'));var selected=$.cookie('wikiEditor-'+context.instance+'-toolbar-section');var sectionQueue=[];for(section in config){if(section=='main'){context.modules.$toolbar.prepend($.wikiEditor.modules.toolbar.fn.buildSection(context,section,config[section]));}else{sectionQueue[sectionQueue.length]={'context':context,'$sections':$sections,'$tabs':$tabs,'section':section,'config':config[section],'selected':(selected==section)};}} |
| 92 | +$.eachAsync(sectionQueue,{'bulk':0,'loop':function(i,s){console.log(i);s.$sections.append($.wikiEditor.modules.toolbar.fn.buildSection(s.context,s.section,s.config).css('display',s.selected?'block':'none'));s.$tabs.append($('<span></span>').attr({'class':'tab tab-'+s.section,'rel':s.section}).append($('<a></a>').addClass(s.selected?'current':null).attr('href','#').text($.wikiEditor.modules.toolbar.fn.autoMsg(s.config,'label')).data('context',s.context).click(function(){var $section=$(this).data('context').$ui.find('.section-'+ |
92 | 93 | $(this).parent().attr('rel'));$(this).blur();var show=$section.css('display')=='none';$section.parent().children().hide();$(this).parent().parent().find('a').removeClass('current');if(show){$section.show();$(this).addClass('current');} |
93 | 94 | $.cookie('wikiEditor-'+ |
94 | | -$(this).data('context').instance+'-toolbar-section',show?$section.attr('rel'):null);return false;})));}}}}};})(jQuery); |
\ No newline at end of file |
| 95 | +$(this).data('context').instance+'-toolbar-section',show?$section.attr('rel'):null);return false;})));}});}}};})(jQuery); |
\ No newline at end of file |