r63419 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63418‎ | r63419 | r63420 >
Date:21:19, 8 March 2010
Author:adam
Status:ok
Tags:
Comment:
WikiEditor Dialogs: visual improvement to close button on dialogs
Modified paths:
  • /trunk/extensions/UsabilityInitiative/css/combined.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/combined.min.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/wikiEditor.dialogs.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.templateEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.dialogs.css
@@ -81,6 +81,9 @@
8282 .wikiEditor-toolbar-dialog .ui-dialog-content input[type="checkbox"] {
8383 margin-left: 0;
8484 }
 85+.wikiEditor-toolbar-dialog .ui-dialog-titlebar-close {
 86+ padding: 0;
 87+}
8588 body.ltr .wikiEditor-toolbar-dialog .ui-dialog-titlebar-close {
8689 right: 0.9em;
8790 }
Index: trunk/extensions/UsabilityInitiative/css/combined.css
@@ -328,6 +328,9 @@
329329 .wikiEditor-toolbar-dialog .ui-dialog-content input[type="checkbox"] {
330330 margin-left: 0;
331331 }
 332+.wikiEditor-toolbar-dialog .ui-dialog-titlebar-close {
 333+ padding: 0;
 334+}
332335 body.ltr .wikiEditor-toolbar-dialog .ui-dialog-titlebar-close {
333336 right: 0.9em;
334337 }
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css
@@ -313,6 +313,9 @@
314314 .wikiEditor-toolbar-dialog .ui-dialog-content input[type="checkbox"]{
315315 margin-left:0;
316316 }
 317+.wikiEditor-toolbar-dialog .ui-dialog-titlebar-close{
 318+padding:0;
 319+}
317320 body.ltr .wikiEditor-toolbar-dialog .ui-dialog-titlebar-close{
318321 right:0.9em;
319322 }
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.templateEditor.js
@@ -267,6 +267,9 @@
268268 // Remove any leftover rows
269269 $rows.remove();
270270 }
 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' );
271274 }
272275 }
273276 };
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -9369,6 +9369,9 @@
93709370 // Remove any leftover rows
93719371 $rows.remove();
93729372 }
 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' );
93739376 }
93749377 }
93759378 };
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -647,7 +647,8 @@
648648 </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);}
649649 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;}
650650 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();}
652653 $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);}
653654 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;}
654655 function Range(begin,end){this.begin=begin;this.end=end;}

Follow-up revisions

RevisionCommit summaryAuthorDate
r63420Revision bump for r63419adam21:20, 8 March 2010

Status & tagging log