Index: trunk/extensions/UsabilityInitiative/css/combined.min.css |
— | — | @@ -446,4 +446,4 @@ |
447 | 447 | background-color:white; |
448 | 448 | text-decoration:none; |
449 | 449 | border-color:#a8d7f9; |
450 | | -} |
| 450 | +} |
\ No newline at end of file |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.dialogs.js |
— | — | @@ -56,10 +56,10 @@ |
57 | 57 | // Transform messages in keys |
58 | 58 | // Stupid JS won't let us do stuff like |
59 | 59 | // foo = { gM ('bar'): baz } |
60 | | - for ( msg in configuration.buttons ) { |
61 | | - configuration.buttons[gM( msg )] = configuration.buttons[msg]; |
62 | | - delete configuration.buttons[msg]; |
63 | | - } |
| 60 | + configuration.newButtons = {}; |
| 61 | + for ( msg in configuration.buttons ) |
| 62 | + configuration.newButtons[gM( msg )] = configuration.buttons[msg]; |
| 63 | + configuration.buttons = configuration.newButtons; |
64 | 64 | // Create the dialog <div> |
65 | 65 | $( '<div /> ' ) |
66 | 66 | .attr( 'id', module.id ) |
— | — | @@ -132,4 +132,4 @@ |
133 | 133 | }, |
134 | 134 | 'modules': {} |
135 | 135 | |
136 | | -}; } ) ( jQuery ); |
\ No newline at end of file |
| 136 | +}; } ) ( jQuery ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -1229,10 +1229,10 @@ |
1230 | 1230 | // Transform messages in keys |
1231 | 1231 | // Stupid JS won't let us do stuff like |
1232 | 1232 | // foo = { gM ('bar'): baz } |
1233 | | - for ( msg in configuration.buttons ) { |
1234 | | - configuration.buttons[gM( msg )] = configuration.buttons[msg]; |
1235 | | - delete configuration.buttons[msg]; |
1236 | | - } |
| 1233 | + configuration.newButtons = {}; |
| 1234 | + for ( msg in configuration.buttons ) |
| 1235 | + configuration.newButtons[gM( msg )] = configuration.buttons[msg]; |
| 1236 | + configuration.buttons = configuration.newButtons; |
1237 | 1237 | // Create the dialog <div> |
1238 | 1238 | $( '<div /> ' ) |
1239 | 1239 | .attr( 'id', module.id ) |
— | — | @@ -1305,7 +1305,8 @@ |
1306 | 1306 | }, |
1307 | 1307 | 'modules': {} |
1308 | 1308 | |
1309 | | -}; } ) ( jQuery );/** |
| 1309 | +}; } ) ( jQuery ); |
| 1310 | +/** |
1310 | 1311 | * Toolbar module for wikiEditor |
1311 | 1312 | */ |
1312 | 1313 | ( function( $ ) { $.wikiEditor.modules.toolbar = { |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -75,8 +75,8 @@ |
76 | 76 | context.$textarea.scrollToCaretPosition(0);} |
77 | 77 | if(arguments.length>0&&typeof arguments[0]=='object'){context.api.addModule(context,arguments[0]);}else{arguments=$.makeArray(arguments);if(arguments.length>0){var call=arguments.shift();if(call in context.api){context.api[call](context,arguments[0]==undefined?{}:arguments[0]);}}} |
78 | 78 | 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,{'modules':data})},openDialog:function(context,data){if(data.dialog in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[data.dialog].id).dialog('open');}},closeDialog:function(context,data){if(data.dialog in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[data.dialog].id).dialog('close');}}},fn:{create:function(context,config){for(module in config){$.wikiEditor.modules.dialogs.modules[module]=config[module];} |
79 | | -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');for(msg in configuration.buttons){configuration.buttons[gM(msg)]=configuration.buttons[msg];delete configuration.buttons[msg];} |
80 | | -$('<div /> ').attr('id',module.id).html(module.html).data('context',context).appendTo($('body')).each(module.init).dialog(configuration).bind('dialogopen',$.wikiEditor.modules.dialogs.fn.resize).find('.ui-tabs').bind('tabsshow',function(){$(this).closest('.ui-dialog-content').each($.wikiEditor.modules.dialogs.fn.resize);});var maxTI=0;$j('[tabindex]').each(function(){var ti=parseInt($j(this).attr('tabindex'));if(ti>maxTI) |
| 79 | +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) |
| 80 | +configuration.newButtons[gM(msg)]=configuration.buttons[msg];configuration.buttons=configuration.newButtons;$('<div /> ').attr('id',module.id).html(module.html).data('context',context).appendTo($('body')).each(module.init).dialog(configuration).bind('dialogopen',$.wikiEditor.modules.dialogs.fn.resize).find('.ui-tabs').bind('tabsshow',function(){$(this).closest('.ui-dialog-content').each($.wikiEditor.modules.dialogs.fn.resize);});var maxTI=0;$j('[tabindex]').each(function(){var ti=parseInt($j(this).attr('tabindex'));if(ti>maxTI) |
81 | 81 | maxTI=ti;});var tabIndex=maxTI+1;$j('.ui-dialog input, .ui-dialog button').not('[tabindex]').each(function(){$j(this).attr('tabindex',tabIndex++);});}}},resize:function(){var wrapper=$(this).closest('.ui-dialog');var oldHidden=$(this).find('*').not(':visible');oldHidden.each(function(){$(this).data('oldstyle',$(this).attr('style'));});oldHidden.show();var oldWS=$(this).css('white-space');$(this).css('white-space','nowrap');if(wrapper.width()<=$(this).get(0).scrollWidth){$(this).width($(this).get(0).scrollWidth);wrapper.width(wrapper.get(0).scrollWidth);$(this).dialog({'width':wrapper.width()});} |
82 | 82 | $(this).css('white-space',oldWS);oldHidden.each(function(){$(this).attr('style',$(this).data('oldstyle'));});}},'modules':{}};})(jQuery);(function($){$.wikiEditor.modules.toolbar={api:{addToToolbar:function(context,data){for(type in data){switch(type){case'sections':var $sections=context.modules.$toolbar.find('div.sections');var $tabs=context.modules.$toolbar.find('div.tabs');for(section in data[type]){if(section=='main'){context.modules.$toolbar.prepend($.wikiEditor.modules.toolbar.fn.buildSection(context,section,data[type][section]));continue;} |
83 | 83 | $sections.append($.wikiEditor.modules.toolbar.fn.buildSection(context,section,data[type][section]));$tabs.append($.wikiEditor.modules.toolbar.fn.buildTab(context,section,data[type][section]));} |