Index: trunk/extensions/UsabilityInitiative/css/combined.css |
— | — | @@ -476,7 +476,7 @@ |
477 | 477 | text-transform: capitalize; |
478 | 478 | float: left; |
479 | 479 | width: 25%; |
480 | | - line-height: 1.5em; |
| 480 | + line-height: 2.25em; |
481 | 481 | } |
482 | 482 | .wikiEditor-template-dialog-fields textarea { |
483 | 483 | float: right; |
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css |
— | — | @@ -453,7 +453,7 @@ |
454 | 454 | text-transform:capitalize; |
455 | 455 | float:left; |
456 | 456 | width:25%; |
457 | | -line-height:1.5em; |
| 457 | +line-height:2.25em; |
458 | 458 | } |
459 | 459 | .wikiEditor-template-dialog-fields textarea{ |
460 | 460 | float:right; |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -9342,7 +9342,6 @@ |
9343 | 9343 | // param is the template name, skip it |
9344 | 9344 | continue; |
9345 | 9345 | } |
9346 | | - |
9347 | 9346 | var paramText = typeof param == 'string' ? |
9348 | 9347 | param.name.replace( /[\_\-]/g, ' ' ) : |
9349 | 9348 | param.name; |
— | — | @@ -9387,6 +9386,7 @@ |
9388 | 9387 | } |
9389 | 9388 | // Remove any leftover rows |
9390 | 9389 | $rows.remove(); |
| 9390 | + $fields.find( 'label' ).autoEllipsis(); |
9391 | 9391 | } |
9392 | 9392 | // Ensure our close button doesn't recieve the ui-state-focus class |
9393 | 9393 | $( this ).parent( '.ui-dialog' ).find( '.ui-dialog-titlebar-close' ) |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -647,7 +647,7 @@ |
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 textarea').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);$('<textarea />').data('name',param.name).val(paramVal).bind('cut paste keypress click',function(){$this=$(this);setTimeout(function(){var expanded=$this.data('expanded');if($this.val().length>24){if(!expanded){$this.animate({'height':'4.5em'},'fast');$this.data('expanded',true);}}else{if(expanded){$this.animate({'height':'1.5em'},'fast');$this.data('expanded',false);}}},0);}).appendTo($paramRow);$('<div style="clear:both"></div>').appendTo($paramRow);$fields.append($paramRow);} |
651 | | -$rows.remove();} |
| 651 | +$rows.remove();$fields.find('label').autoEllipsis();} |
652 | 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();} |
653 | 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);} |
654 | 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;} |