Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 191 ), |
80 | 80 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 53 ), |
81 | 81 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 65 ), |
82 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 24 ), |
| 82 | + array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 25 ), |
83 | 83 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 98 ), |
84 | 84 | array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 11 ), |
85 | 85 | array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 77 ), |
— | — | @@ -89,10 +89,10 @@ |
90 | 90 | array( 'src' => 'js/thirdparty/contentCollector.js', 'version' => 1 ), |
91 | 91 | ), |
92 | 92 | 'combined' => array( |
93 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 416 ), |
| 93 | + array( 'src' => 'js/plugins.combined.js', 'version' => 417 ), |
94 | 94 | ), |
95 | 95 | 'minified' => array( |
96 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 416 ), |
| 96 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 417 ), |
97 | 97 | ), |
98 | 98 | ), |
99 | 99 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.dialogs.js |
— | — | @@ -51,6 +51,12 @@ |
52 | 52 | $.wikiEditor.modules.dialogs.fn.reallyCreate( context, mod ); |
53 | 53 | $dialog = $( '#' + mod.id ); |
54 | 54 | } |
| 55 | + |
| 56 | + // Workaround for bug in jQuery UI: close button in top right retains focus |
| 57 | + $dialog.closest( '.ui-dialog' ) |
| 58 | + .find( '.ui-dialog-titlebar-close' ) |
| 59 | + .removeClass( 'ui-state-focus' ); |
| 60 | + |
55 | 61 | $dialog.dialog( 'open' ); |
56 | 62 | } |
57 | 63 | }, |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -8732,6 +8732,12 @@ |
8733 | 8733 | $.wikiEditor.modules.dialogs.fn.reallyCreate( context, mod ); |
8734 | 8734 | $dialog = $( '#' + mod.id ); |
8735 | 8735 | } |
| 8736 | + |
| 8737 | + // Workaround for bug in jQuery UI: close button in top right retains focus |
| 8738 | + $dialog.closest( '.ui-dialog' ) |
| 8739 | + .find( '.ui-dialog-titlebar-close' ) |
| 8740 | + .removeClass( 'ui-state-focus' ); |
| 8741 | + |
8736 | 8742 | $dialog.dialog( 'open' ); |
8737 | 8743 | } |
8738 | 8744 | }, |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -602,7 +602,7 @@ |
603 | 603 | for(module in modules){if(module in $.wikiEditor.modules&&$.wikiEditor.isSupported($.wikiEditor.modules[module])&&$.wikiEditor.isRequired($.wikiEditor.modules[module],'iframe')){context.fn.setupIframe();break;}}} |
604 | 604 | if(args.length>0){var call=args.shift();if(call in context.api){context.api[call](context,typeof args[0]=='undefined'?{}:args[0]);}} |
605 | 605 | return $(this).data('wikiEditor-context',context);};})(jQuery);RegExp.escape=function(s){return s.replace(/([.*+?^${}()|\/\\[\]])/g,'\\$1');};(function($){$.wikiEditor.modules.dialogs={'browsers':{'ltr':{'msie':[['>=',7]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',3]],'chrome':[['>=',3]]},'rtl':{'msie':[['>=',7]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',3]],'chrome':[['>=',3]]}},api:{addDialog:function(context,data){$.wikiEditor.modules.dialogs.fn.create(context,data)},openDialog:function(context,module){if(module in $.wikiEditor.modules.dialogs.modules){var mod=$.wikiEditor.modules.dialogs.modules[module];var $dialog=$('#'+mod.id);if($dialog.length==0){$.wikiEditor.modules.dialogs.fn.reallyCreate(context,mod);$dialog=$('#'+mod.id);} |
606 | | -$dialog.dialog('open');}},closeDialog:function(context,module){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('close');}}},fn:{create:function(context,config){for(mod in config){var module=config[mod];var filtered=false;if(typeof module.filters!='undefined'){for(var i=0;i<module.filters.length;i++){if($(module.filters[i]).length==0){filtered=true;break;}}} |
| 606 | +$dialog.closest('.ui-dialog').find('.ui-dialog-titlebar-close').removeClass('ui-state-focus');$dialog.dialog('open');}},closeDialog:function(context,module){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('close');}}},fn:{create:function(context,config){for(mod in config){var module=config[mod];var filtered=false;if(typeof module.filters!='undefined'){for(var i=0;i<module.filters.length;i++){if($(module.filters[i]).length==0){filtered=true;break;}}} |
607 | 607 | if(!filtered&&$.wikiEditor.isSupported(module)&&$('#'+module.id).size()==0){$.wikiEditor.modules.dialogs.modules[mod]=module;if(typeof context.$iframe=='undefined'&&$.wikiEditor.isRequired(module,'iframe')){context.fn.setupIframe();} |
608 | 608 | context.$textarea.trigger('wikiEditor-dialogs-setup-'+mod);}}},reallyCreate:function(context,module){mw.usability.load(['$j.ui','$j.ui.dialog','$j.ui.draggable','$j.ui.resizable'],function(){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) |
609 | 609 | configuration.newButtons[mw.usability.getMsg(msg)]=configuration.buttons[msg];configuration.buttons=configuration.newButtons;var dialogDiv=$('<div />').attr('id',module.id).html(module.html).data('context',context).appendTo($('body')).each(module.init).dialog(configuration);$.wikiEditor.modules.dialogs.fn.setTabindexes(dialogDiv.closest('.ui-dialog').find('button').not('[tabindex]'));if(!('resizeme'in module)||module.resizeme){dialogDiv.bind('dialogopen',$.wikiEditor.modules.dialogs.fn.resize).find('.ui-tabs').bind('tabsshow',function(){$(this).closest('.ui-dialog-content').each($.wikiEditor.modules.dialogs.fn.resize);});} |