Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | array( 'src' => 'css/suggestions.css', 'version' => 6 ), |
23 | 23 | array( 'src' => 'css/vector.collapsibleNav.css', 'version' => 7 ), |
24 | 24 | array( 'src' => 'css/vector.footerCleanup.css', 'version' => 1 ), |
25 | | - array( 'src' => 'css/wikiEditor.css', 'version' => 9 ), |
| 25 | + array( 'src' => 'css/wikiEditor.css', 'version' => 10 ), |
26 | 26 | array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 19 ), |
27 | 27 | array( 'src' => 'css/wikiEditor.preview.css', 'version' => 1 ), |
28 | 28 | array( 'src' => 'css/wikiEditor.toc.css', 'version' => 28 ), |
— | — | @@ -29,11 +29,11 @@ |
30 | 30 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
31 | 31 | ), |
32 | 32 | 'combined' => array( |
33 | | - array( 'src' => 'css/combined.css', 'version' => 63 ), |
| 33 | + array( 'src' => 'css/combined.css', 'version' => 64 ), |
34 | 34 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
35 | 35 | ), |
36 | 36 | 'minified' => array( |
37 | | - array( 'src' => 'css/combined.min.css', 'version' => 63 ), |
| 37 | + array( 'src' => 'css/combined.min.css', 'version' => 64 ), |
38 | 38 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
39 | 39 | ), |
40 | 40 | ) |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | array( 'src' => 'js/plugins/jquery.namespaceSelect.js', 'version' => 1 ), |
74 | 74 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 7 ), |
75 | 75 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 27 ), |
76 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 113 ), |
| 76 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 114 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 29 ), |
78 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 47 ), |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 12 ), |
— | — | @@ -82,10 +82,10 @@ |
83 | 83 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 2 ), |
84 | 84 | ), |
85 | 85 | 'combined' => array( |
86 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 231 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 232 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 231 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 232 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.css |
— | — | @@ -112,3 +112,26 @@ |
113 | 113 | .wikiEditor-view-wikitext { |
114 | 114 | line-height: 1em; |
115 | 115 | } |
| 116 | +.wikiEditor-ui-loading { |
| 117 | + background: #f3f3f3; |
| 118 | + z-index: 10; |
| 119 | + position: absolute; |
| 120 | + top: 0; |
| 121 | + left: 0; |
| 122 | + text-align: center; |
| 123 | + height: 100%; |
| 124 | + width: 100%; |
| 125 | + border: 1px solid silver; |
| 126 | + margin: -1px; |
| 127 | + opacity: 0.9; |
| 128 | + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=90)"; |
| 129 | + filter: alpha(opacity=90); |
| 130 | +} |
| 131 | +.wikiEditor-ui-loading span { |
| 132 | + display: block; |
| 133 | + height: 24px; |
| 134 | + width: 24px; |
| 135 | + background: url( ../images/wikiEditor/toolbar/loading.gif ) 0 0 no-repeat; |
| 136 | + text-indent: -9999px; |
| 137 | + margin: 0 auto; |
| 138 | +} |
\ No newline at end of file |
Index: trunk/extensions/UsabilityInitiative/css/combined.css |
— | — | @@ -225,7 +225,29 @@ |
226 | 226 | .wikiEditor-view-wikitext { |
227 | 227 | line-height: 1em; |
228 | 228 | } |
229 | | -/* wikiEditor dialogs module */ |
| 229 | +.wikiEditor-ui-loading { |
| 230 | + background: #f3f3f3; |
| 231 | + z-index: 10; |
| 232 | + position: absolute; |
| 233 | + top: 0; |
| 234 | + left: 0; |
| 235 | + text-align: center; |
| 236 | + height: 100%; |
| 237 | + width: 100%; |
| 238 | + border: 1px solid silver; |
| 239 | + margin: -1px; |
| 240 | + opacity: 0.9; |
| 241 | + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=90)"; |
| 242 | + filter: alpha(opacity=90); |
| 243 | +} |
| 244 | +.wikiEditor-ui-loading span { |
| 245 | + display: block; |
| 246 | + height: 24px; |
| 247 | + width: 24px; |
| 248 | + background: url( ../images/wikiEditor/toolbar/loading.gif ) 0 0 no-repeat; |
| 249 | + text-indent: -9999px; |
| 250 | + margin: 0 auto; |
| 251 | +}/* wikiEditor dialogs module */ |
230 | 252 | |
231 | 253 | .wikiEditor-toolbar-dialog table { |
232 | 254 | margin-top: 0.75em; |
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css |
— | — | @@ -215,6 +215,29 @@ |
216 | 216 | .wikiEditor-view-wikitext{ |
217 | 217 | line-height:1em; |
218 | 218 | } |
| 219 | +.wikiEditor-ui-loading{ |
| 220 | +background:#f3f3f3; |
| 221 | +z-index:10; |
| 222 | +position:absolute; |
| 223 | +top:0; |
| 224 | +left:0; |
| 225 | +text-align:center; |
| 226 | +height:100%; |
| 227 | +width:100%; |
| 228 | +border:1px solid silver; |
| 229 | +margin:-1px; |
| 230 | +opacity:0.9; |
| 231 | +-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=90)"; |
| 232 | +filter:alpha(opacity=90); |
| 233 | +} |
| 234 | +.wikiEditor-ui-loading span{ |
| 235 | +display:block; |
| 236 | +height:24px; |
| 237 | +width:24px; |
| 238 | +background:url( ../images/wikiEditor/toolbar/loading.gif ) 0 0 no-repeat; |
| 239 | +text-indent:-9999px; |
| 240 | +margin:0 auto; |
| 241 | +} |
219 | 242 | .wikiEditor-toolbar-dialog table{ |
220 | 243 | margin-top:0.75em; |
221 | 244 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -1174,7 +1174,12 @@ |
1175 | 1175 | .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-view wikiEditor-ui-view-wikitext' ) ) |
1176 | 1176 | .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-left' ) ) |
1177 | 1177 | .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-bottom' ) ) |
1178 | | - .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-text' ) ); |
| 1178 | + .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-text' ) ) |
| 1179 | + .after( |
| 1180 | + $( '<div></div>' ) |
| 1181 | + .addClass( 'wikiEditor-ui-loading' ) |
| 1182 | + .append( $( '<span>Loading</span>' ) |
| 1183 | + .css( 'marginTop', context.$textarea.height() / 2 ) ) ); |
1179 | 1184 | // Get references to some of the newly created containers |
1180 | 1185 | context.$ui = context.$textarea.parent().parent().parent().parent().parent(); |
1181 | 1186 | context.$wikitext = context.$textarea.parent().parent().parent().parent(); |
— | — | @@ -1288,6 +1293,10 @@ |
1289 | 1294 | context.$iframe.show(); |
1290 | 1295 | // Let modules know we're ready to start working with the content |
1291 | 1296 | context.fn.trigger( 'ready' ); |
| 1297 | + //remove our temporary loading |
| 1298 | + $( '.wikiEditor-ui-loading' ).fadeOut( 'fast', function() { |
| 1299 | + $( this ).remove(); |
| 1300 | + } ); |
1292 | 1301 | // Setup event handling on the iframe |
1293 | 1302 | $( context.$iframe[0].contentWindow.document ) |
1294 | 1303 | .bind( 'keydown', function( event ) { |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -6737,7 +6737,7 @@ |
6738 | 6738 | break; |
6739 | 6739 | // Intercept all tab events to provide consisten behavior across browsers |
6740 | 6740 | // Webkit browsers insert tab characters by default into the iframe rather than changing input focus |
6741 | | - case 9: |
| 6741 | + case 9: //tab |
6742 | 6742 | // if any modifier keys are pressed, allow the browser to do it's thing |
6743 | 6743 | if ( event.ctrlKey || event.altKey || event.shiftKey ) { |
6744 | 6744 | return true; |
— | — | @@ -6754,6 +6754,12 @@ |
6755 | 6755 | return false; |
6756 | 6756 | } |
6757 | 6757 | break; |
| 6758 | + case 86: //v |
| 6759 | + if ( event.ctrlKey ){ |
| 6760 | + //paste, intercepted for IE |
| 6761 | + context.evt.paste( event ); |
| 6762 | + } |
| 6763 | + break; |
6758 | 6764 | } |
6759 | 6765 | return true; |
6760 | 6766 | }, |
— | — | @@ -7601,7 +7607,12 @@ |
7602 | 7608 | .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-view wikiEditor-ui-view-wikitext' ) ) |
7603 | 7609 | .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-left' ) ) |
7604 | 7610 | .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-bottom' ) ) |
7605 | | - .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-text' ) ); |
| 7611 | + .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-text' ) ) |
| 7612 | + .after( |
| 7613 | + $( '<div></div>' ) |
| 7614 | + .addClass( 'wikiEditor-ui-loading' ) |
| 7615 | + .append( $( '<span>Loading</span>' ) |
| 7616 | + .css( 'marginTop', context.$textarea.height() / 2 ) ) ); |
7606 | 7617 | // Get references to some of the newly created containers |
7607 | 7618 | context.$ui = context.$textarea.parent().parent().parent().parent().parent(); |
7608 | 7619 | context.$wikitext = context.$textarea.parent().parent().parent().parent(); |
— | — | @@ -7715,6 +7726,10 @@ |
7716 | 7727 | context.$iframe.show(); |
7717 | 7728 | // Let modules know we're ready to start working with the content |
7718 | 7729 | context.fn.trigger( 'ready' ); |
| 7730 | + //remove our temporary loading |
| 7731 | + $( '.wikiEditor-ui-loading' ).fadeOut( 'fast', function() { |
| 7732 | + $( this ).remove(); |
| 7733 | + } ); |
7719 | 7734 | // Setup event handling on the iframe |
7720 | 7735 | $( context.$iframe[0].contentWindow.document ) |
7721 | 7736 | .bind( 'keydown', function( event ) { |
— | — | @@ -7723,10 +7738,10 @@ |
7724 | 7739 | .bind( 'paste', function( event ) { |
7725 | 7740 | return context.fn.trigger( 'paste', event ); |
7726 | 7741 | } ) |
7727 | | - .bind( 'keyup mouseup paste cut encapsulateSelection', function( event ) { |
| 7742 | + .bind( 'keyup paste mouseup cut encapsulateSelection', function( event ) { |
7728 | 7743 | return context.fn.trigger( 'change', event ); |
7729 | 7744 | } ) |
7730 | | - .delayedBind( 250, 'keyup mouseup paste cut encapsulateSelection', function( event ) { |
| 7745 | + .delayedBind( 250, 'keyup paste mouseup cut encapsulateSelection', function( event ) { |
7731 | 7746 | context.fn.trigger( 'delayedChange', event ); |
7732 | 7747 | } ); |
7733 | 7748 | } ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -449,6 +449,7 @@ |
450 | 450 | return false;} |
451 | 451 | break;case 9:if(event.ctrlKey||event.altKey||event.shiftKey){return true;}else{var $tabindexList=$j('[tabindex]:visible').sort(function(a,b){return a.tabIndex>b.tabIndex?1:-1;});for(var i=0;i<$tabindexList.length;i++){if($tabindexList.eq(i).attr('id')==context.$iframe.attr('id')){$tabindexList.get(i+1).focus();break;}} |
452 | 452 | return false;} |
| 453 | +break;case 86:if(event.ctrlKey){context.evt.paste(event);} |
453 | 454 | break;} |
454 | 455 | return true;},'change':function(event){event.data.scope='division';var newHTML=context.$content.html();if(context.oldHTML!=newHTML){context.fn.purgeOffsets();context.oldHTML=newHTML;event.data.scope='realchange';} |
455 | 456 | switch(event.which){case 8:break;} |
— | — | @@ -527,10 +528,10 @@ |
528 | 529 | pos=nextPos+(leavingP?1:0);if(t.node.nodeName=='#text'){lastTextNode=t.node;lastTextNodeDepth=t.depth;} |
529 | 530 | t=nextT;}},'saveSelection':function(){if(!$.browser.msie){return;} |
530 | 531 | context.$iframe[0].contentWindow.focus();context.savedSelection=context.$iframe[0].contentWindow.document.selection.createRange();},'restoreSelection':function(){if(!$.browser.msie||context.savedSelection===null){return;} |
531 | | -context.$iframe[0].contentWindow.focus();context.savedSelection.select();context.savedSelection=null;}};context.$textarea.wrap($('<div></div>').addClass('wikiEditor-ui')).wrap($('<div></div>').addClass('wikiEditor-ui-view wikiEditor-ui-view-wikitext')).wrap($('<div></div>').addClass('wikiEditor-ui-left')).wrap($('<div></div>').addClass('wikiEditor-ui-bottom')).wrap($('<div></div>').addClass('wikiEditor-ui-text'));context.$ui=context.$textarea.parent().parent().parent().parent().parent();context.$wikitext=context.$textarea.parent().parent().parent().parent();context.$wikitext.before($('<div></div>').addClass('wikiEditor-ui-controls').append($('<div></div>').addClass('wikiEditor-ui-tabs').hide()).append($('<div></div>').addClass('wikiEditor-ui-buttons'))).before($('<div style="clear:both;"></div>'));context.$controls=context.$ui.find('.wikiEditor-ui-buttons').hide();context.$buttons=context.$ui.find('.wikiEditor-ui-buttons');context.$tabs=context.$ui.find('.wikiEditor-ui-tabs');context.$ui.after($('<div style="clear:both;"></div>'));context.$wikitext.append($('<div></div>').addClass('wikiEditor-ui-right'));context.$wikitext.find('.wikiEditor-ui-left').prepend($('<div></div>').addClass('wikiEditor-ui-top'));context.view='wikitext';$(window).resize(function(event){context.fn.trigger('resize',event);});context.$iframe=$('<iframe></iframe>').attr({'frameBorder':0,'border':0,'tabindex':1,'src':wgScriptPath+'/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.html?'+'instance='+context.instance+'&ts='+(new Date()).getTime(),'id':'wikiEditor-iframe-'+context.instance}).css({'backgroundColor':'white','width':'100%','height':context.$textarea.height(),'display':'none','overflow-y':'scroll','overflow-x':'hidden'}).insertAfter(context.$textarea).load(function(){if(!this.isSecondRun){context.$iframe[0].contentWindow.document.designMode='on';if($.browser.msie){this.isSecondRun=true;return;}} |
| 532 | +context.$iframe[0].contentWindow.focus();context.savedSelection.select();context.savedSelection=null;}};context.$textarea.wrap($('<div></div>').addClass('wikiEditor-ui')).wrap($('<div></div>').addClass('wikiEditor-ui-view wikiEditor-ui-view-wikitext')).wrap($('<div></div>').addClass('wikiEditor-ui-left')).wrap($('<div></div>').addClass('wikiEditor-ui-bottom')).wrap($('<div></div>').addClass('wikiEditor-ui-text')).after($('<div></div>').addClass('wikiEditor-ui-loading').append($('<span>Loading</span>').css('marginTop',context.$textarea.height()/2)));context.$ui=context.$textarea.parent().parent().parent().parent().parent();context.$wikitext=context.$textarea.parent().parent().parent().parent();context.$wikitext.before($('<div></div>').addClass('wikiEditor-ui-controls').append($('<div></div>').addClass('wikiEditor-ui-tabs').hide()).append($('<div></div>').addClass('wikiEditor-ui-buttons'))).before($('<div style="clear:both;"></div>'));context.$controls=context.$ui.find('.wikiEditor-ui-buttons').hide();context.$buttons=context.$ui.find('.wikiEditor-ui-buttons');context.$tabs=context.$ui.find('.wikiEditor-ui-tabs');context.$ui.after($('<div style="clear:both;"></div>'));context.$wikitext.append($('<div></div>').addClass('wikiEditor-ui-right'));context.$wikitext.find('.wikiEditor-ui-left').prepend($('<div></div>').addClass('wikiEditor-ui-top'));context.view='wikitext';$(window).resize(function(event){context.fn.trigger('resize',event);});context.$iframe=$('<iframe></iframe>').attr({'frameBorder':0,'border':0,'tabindex':1,'src':wgScriptPath+'/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.html?'+'instance='+context.instance+'&ts='+(new Date()).getTime(),'id':'wikiEditor-iframe-'+context.instance}).css({'backgroundColor':'white','width':'100%','height':context.$textarea.height(),'display':'none','overflow-y':'scroll','overflow-x':'hidden'}).insertAfter(context.$textarea).load(function(){if(!this.isSecondRun){context.$iframe[0].contentWindow.document.designMode='on';if($.browser.msie){this.isSecondRun=true;return;}} |
532 | 533 | context.$content=$(context.$iframe[0].contentWindow.document.body);var html=context.$textarea.val().replace(/&esc;/g,'&esc;esc;').replace(/\<p\>/g,'&esc;<p>').replace(/\<\/p\>/g,'&esc;</p>').replace(/\<span class="wikiEditor-tab"\>\<\/span\>/g,'&esc;<span class="wikiEditor-tab"></span>').replace(/ /g,'&esc;&nbsp;');if($.browser.msie){html=html.replace(/\t/g,'<span class="wikiEditor-tab"></span>');if($.browser.versionNumber<=7){html=html.replace(/ /g," ");}else{html=html.replace(/(^|\n) /g,"$1 ");}} |
533 | 534 | html=$('<div />').text('<p>'+html.replace(/\r?\n/g,'</p><p>')+'</p>').html().replace(/&nbsp;/g,' ').replace(/<p>/g,'<p>').replace(/<\/p>/g,'</p>').replace(/<p><\/p>/g,'<br>').replace(/&esc;&amp;nbsp;/g,'&nbsp;').replace(/&esc;&lt;p&gt;/g,'<p>').replace(/&esc;&lt;\/p&gt;/g,'</p>').replace(/&esc;&lt;span&nbsp;class=&quot;wikiEditor-tab&quot;&gt;&lt;\/span&gt;/g,'<span class="wikiEditor-tab"><\/span>').replace(/&esc;esc;/g,'&esc;');context.$content.html(html);context.oldHTML=html;context.history.push({'html':html});if($('body').is('.rtl')){context.$content.addClass('rtl').attr('dir','rtl');} |
534 | | -context.$textarea.attr('disabled',true);context.$textarea.hide();context.$iframe.show();context.fn.trigger('ready');$(context.$iframe[0].contentWindow.document).bind('keydown',function(event){return context.fn.trigger('keydown',event);}).bind('paste',function(event){return context.fn.trigger('paste',event);}).bind('keyup mouseup paste cut encapsulateSelection',function(event){return context.fn.trigger('change',event);}).delayedBind(250,'keyup mouseup paste cut encapsulateSelection',function(event){context.fn.trigger('delayedChange',event);});});context.$textarea.closest('form').submit(function(){context.$textarea.attr('disabled',false);context.$textarea.val(context.$textarea.textSelection('getContents'));});context.fallbackWindowOnBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){context.$textarea.val(context.$textarea.textSelection('getContents'));if(context.fallbackWindowOnBeforeUnload){return context.fallbackWindowOnBeforeUnload();}};} |
| 535 | +context.$textarea.attr('disabled',true);context.$textarea.hide();context.$iframe.show();context.fn.trigger('ready');$('.wikiEditor-ui-loading').fadeOut('fast',function(){$(this).remove();});$(context.$iframe[0].contentWindow.document).bind('keydown',function(event){return context.fn.trigger('keydown',event);}).bind('paste',function(event){return context.fn.trigger('paste',event);}).bind('keyup paste mouseup cut encapsulateSelection',function(event){return context.fn.trigger('change',event);}).delayedBind(250,'keyup paste mouseup cut encapsulateSelection',function(event){context.fn.trigger('delayedChange',event);});});context.$textarea.closest('form').submit(function(){context.$textarea.attr('disabled',false);context.$textarea.val(context.$textarea.textSelection('getContents'));});context.fallbackWindowOnBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){context.$textarea.val(context.$textarea.textSelection('getContents'));if(context.fallbackWindowOnBeforeUnload){return context.fallbackWindowOnBeforeUnload();}};} |
535 | 536 | var args=$.makeArray(arguments);if(args.length>0){var call=args.shift();if(call in context.api){context.api[call](context,typeof args[0]=='undefined'?{}:args[0]);}} |
536 | 537 | return $(this).data('wikiEditor-context',context);};})(jQuery);RegExp.escape=function(s){return s.replace(/([.*+?^${}()|\/\\[\]])/g,'\\$1');};(function($){$.wikiEditor.modules.dialogs={api:{addDialog:function(context,data){$.wikiEditor.modules.dialogs.fn.create(context,data)},openDialog:function(context,module){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('open');}},closeDialog:function(context,data){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('close');}}},fn:{create:function(context,config){for(module in config){$.wikiEditor.modules.dialogs.modules[module]=config[module];} |
537 | 538 | mw.usability.load(['$j.ui','$j.ui.dialog','$j.ui.draggable','$j.ui.resizable'],function(){for(module in $.wikiEditor.modules.dialogs.modules){var module=$.wikiEditor.modules.dialogs.modules[module];if($('#'+module.id).size()==0){var configuration=module.dialog;configuration.bgiframe=true;configuration.autoOpen=false;configuration.modal=true;configuration.title=$.wikiEditor.autoMsg(module,'title');configuration.newButtons={};for(msg in configuration.buttons) |