Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.dialogs.css |
— | — | @@ -81,6 +81,9 @@ |
82 | 82 | .wikiEditor-toolbar-dialog .ui-dialog-content input[type="checkbox"] { |
83 | 83 | margin-left: 0; |
84 | 84 | } |
| 85 | +.wikiEditor-toolbar-dialog .ui-dialog-titlebar-close { |
| 86 | + padding: 0; |
| 87 | +} |
85 | 88 | body.ltr .wikiEditor-toolbar-dialog .ui-dialog-titlebar-close { |
86 | 89 | right: 0.9em; |
87 | 90 | } |
Index: trunk/extensions/UsabilityInitiative/css/combined.css |
— | — | @@ -328,6 +328,9 @@ |
329 | 329 | .wikiEditor-toolbar-dialog .ui-dialog-content input[type="checkbox"] { |
330 | 330 | margin-left: 0; |
331 | 331 | } |
| 332 | +.wikiEditor-toolbar-dialog .ui-dialog-titlebar-close { |
| 333 | + padding: 0; |
| 334 | +} |
332 | 335 | body.ltr .wikiEditor-toolbar-dialog .ui-dialog-titlebar-close { |
333 | 336 | right: 0.9em; |
334 | 337 | } |
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css |
— | — | @@ -313,6 +313,9 @@ |
314 | 314 | .wikiEditor-toolbar-dialog .ui-dialog-content input[type="checkbox"]{ |
315 | 315 | margin-left:0; |
316 | 316 | } |
| 317 | +.wikiEditor-toolbar-dialog .ui-dialog-titlebar-close{ |
| 318 | +padding:0; |
| 319 | +} |
317 | 320 | body.ltr .wikiEditor-toolbar-dialog .ui-dialog-titlebar-close{ |
318 | 321 | right:0.9em; |
319 | 322 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.templateEditor.js |
— | — | @@ -267,6 +267,9 @@ |
268 | 268 | // Remove any leftover rows |
269 | 269 | $rows.remove(); |
270 | 270 | } |
| 271 | + // Ensure our close button doesn't recieve the ui-state-focus class |
| 272 | + $( this ).parent( '.ui-dialog' ).find( '.ui-dialog-titlebar-close' ) |
| 273 | + .removeClass( 'ui-state-focus' ); |
271 | 274 | } |
272 | 275 | } |
273 | 276 | }; |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -9369,6 +9369,9 @@ |
9370 | 9370 | // Remove any leftover rows |
9371 | 9371 | $rows.remove(); |
9372 | 9372 | } |
| 9373 | + // Ensure our close button doesn't recieve the ui-state-focus class |
| 9374 | + $( this ).parent( '.ui-dialog' ).find( '.ui-dialog-titlebar-close' ) |
| 9375 | + .removeClass( 'ui-state-focus' ); |
9373 | 9376 | } |
9374 | 9377 | } |
9375 | 9378 | }; |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -647,7 +647,8 @@ |
648 | 648 | </fieldset>',init:function(){$(this).find('[rel]').each(function(){$(this).text(mw.usability.getMsg($(this).attr('rel')));});},dialog:{width:600,height:400,dialogClass:'wikiEditor-toolbar-dialog',buttons:{'wikieditor-template-editor-dialog-submit':function(){var $templateDiv=$(this).data('templateDiv');context.fn.highlightLine($templateDiv);var $templateText=$templateDiv.children('.wikiEditor-template-text');var templateModel=$templateText.data('model');$(this).find('.wikiEditor-template-dialog-field-wrapper input').each(function(){templateModel.setValue($(this).data('name'),$(this).val());});$.wikiEditor.modules.templateEditor.fn.updateModel($templateText,templateModel);$(this).dialog('close');}},open:function(){var $templateDiv=$(this).data('templateDiv');var $templateText=$templateDiv.children('.wikiEditor-template-text');var templateModel=$templateText.data('model');if($templateText.html()!=$templateText.data('oldHTML')){templateModel=$.wikiEditor.modules.templateEditor.fn.updateModel($templateText);} |
649 | 649 | var params=templateModel.getAllInitialParams();var $fields=$(this).find('.wikiEditor-template-dialog-fields').empty();var $rows=$fields.find('.wikiEditor-template-dialog-field-wrapper');for(var paramIndex in params){var param=params[paramIndex];if(typeof param.name=='undefined'){continue;} |
650 | 650 | var paramText=typeof param=='string'?param.name.replace(/[\_\-]/g,' '):param.name;var paramVal=templateModel.getValue(param.name);if($rows.length>0){var $row=$rows.eq(0);$row.children('label').text(paramText);$row.children('input').val(paramVal);$rows=$rows.not($row);}else{var $paramRow=$('<div />').addClass('wikiEditor-template-dialog-field-wrapper');$('<label />').text(paramText).appendTo($paramRow);$('<input />').data('name',param.name).val(paramVal).appendTo($paramRow);$fields.append($paramRow);} |
651 | | -$rows.remove();}}}};function createDialog($templateDiv){context.$textarea.wikiEditor('addDialog',{'templateEditor':dialog});$('#'+dialog.id).data('templateDiv',$templateDiv).dialog('open');}},unwrapTemplate:function($wrapper){$wrapper.parent().replaceWith($wrapper);},updateModel:function($templateText,model){var context=$templateText.data('marker').context;var text;if(typeof model=='undefined'){text=context.fn.htmlToText($templateText.html());}else{text=model.getText();} |
| 651 | +$rows.remove();} |
| 652 | +$(this).parent('.ui-dialog').find('.ui-dialog-titlebar-close').removeClass('ui-state-focus');}}};function createDialog($templateDiv){context.$textarea.wikiEditor('addDialog',{'templateEditor':dialog});$('#'+dialog.id).data('templateDiv',$templateDiv).dialog('open');}},unwrapTemplate:function($wrapper){$wrapper.parent().replaceWith($wrapper);},updateModel:function($templateText,model){var context=$templateText.data('marker').context;var text;if(typeof model=='undefined'){text=context.fn.htmlToText($templateText.html());}else{text=model.getText();} |
652 | 653 | $templateText.text(text);$templateText.html($templateText.html().replace(/\n/g,'<br />'));$templateText.data('oldHTML',$templateText.html());if(typeof model=='undefined'){model=new $.wikiEditor.modules.templateEditor.fn.model(text);$templateText.data('model',model);} |
653 | 654 | return model;},getTemplateInfo:function(templateName){var templateInfo='';return $(templateInfo);},model:function(wikitext){var collapsible=true;function Param(name,value,number,nameIndex,equalsIndex,valueIndex){this.name=name;this.value=value;this.number=number;this.nameIndex=nameIndex;this.equalsIndex=equalsIndex;this.valueIndex=valueIndex;} |
654 | 655 | function Range(begin,end){this.begin=begin;this.end=end;} |