r63825 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63824‎ | r63825 | r63826 >
Date:19:38, 16 March 2010
Author:nimishg
Status:ok (Comments)
Tags:
Comment:
publish dialog looks less cluttered now
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.php (modified) (history)
  • /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.publish.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.php
@@ -21,7 +21,7 @@
2222 /* Configuration */
2323
2424 // Set this to false to include all plugins individually
25 -$wgUsabilityInitiativeResourceMode = 'minified';
 25+$wgUsabilityInitiativeResourceMode = 'raw';
2626
2727 /* Setup */
2828
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.dialogs.css
@@ -280,3 +280,8 @@
281281 .wikiEditor-toolbar-dialog .ui-dialog-content {
282282 padding-bottom: 1em !important;
283283 }
 284+
 285+/* Edit dialog */
 286+.wikiEditor-dialog-editoptions {
 287+ margin-top: 15px;
 288+}
\ No newline at end of file
Index: trunk/extensions/UsabilityInitiative/css/combined.css
@@ -527,7 +527,11 @@
528528 .wikiEditor-toolbar-dialog .ui-dialog-content {
529529 padding-bottom: 1em !important;
530530 }
531 -/* wikiEditor toc module */
 531+
 532+/* Edit dialog */
 533+.wikiEditor-dialog-editoptions {
 534+ margin-top: 15px;
 535+}/* wikiEditor toc module */
532536 .wikiEditor-ui-toc {
533537 /* height and width are set dynamically */
534538 /*float: right;*/
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css
@@ -499,6 +499,9 @@
500500 .wikiEditor-toolbar-dialog .ui-dialog-content{
501501 padding-bottom:1em !important;
502502 }
 503+.wikiEditor-dialog-editoptions{
 504+margin-top:15px;
 505+}
503506 .wikiEditor-ui-toc{
504507 padding:0;
505508 overflow:auto;
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.publish.js
@@ -63,9 +63,24 @@
6464 $(this).find( '[rel]' ).each( function() {
6565 $(this).text( mw.usability.getMsg( $(this).attr( 'rel' ) ) );
6666 });
67 - $(this).find( '.wikiEditor-dialog-copywarn' )
68 - .html( $( '#editpage-copywarn' ).html() );
6967
 68+ //reformat the copyright warning stuff
 69+ var copywarnHTML = $( '#editpage-copywarn' ).html();
 70+
 71+ //TODO: internationalize by splitting on other characters that end statements
 72+ var copywarnStatements = copywarnHTML.split(". ");
 73+ var newcopywarnHTML = "<ul>";
 74+ for(var i = 0; i < copywarnStatements.length; i++){
 75+ if(copywarnStatements[i] != ""){
 76+ newcopywarnHTML += "<li>" + copywarnStatements[i] + ". </li>" ;
 77+ }
 78+ }
 79+ newcopywarnHTML += "</ul>";
 80+
 81+ //no list if there's only one element
 82+ $(this).find( '.wikiEditor-dialog-copywarn' ).html(
 83+ copywarnStatements.length > 1 ? newcopywarnHTML : copywarnHTML );
 84+
7085 if ( $( '#wpMinoredit' ).size() == 0 )
7186 $( '#wikiEditor-' + context.instance + '-dialog-minor' ).hide();
7287 else if ( $( '#wpMinoredit' ).is( ':checked' ) )
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -9130,9 +9130,24 @@
91319131 $(this).find( '[rel]' ).each( function() {
91329132 $(this).text( mw.usability.getMsg( $(this).attr( 'rel' ) ) );
91339133 });
9134 - $(this).find( '.wikiEditor-dialog-copywarn' )
9135 - .html( $( '#editpage-copywarn' ).html() );
91369134
 9135+ //reformat the copyright warning stuff
 9136+ var copywarnHTML = $( '#editpage-copywarn' ).html();
 9137+
 9138+ //TODO: internationalize by splitting on other characters that end statements
 9139+ var copywarnStatements = copywarnHTML.split(". ");
 9140+ var newcopywarnHTML = "<ul>";
 9141+ for(var i = 0; i < copywarnStatements.length; i++){
 9142+ if(copywarnStatements[i] != ""){
 9143+ newcopywarnHTML += "<li>" + copywarnStatements[i] + ". </li>" ;
 9144+ }
 9145+ }
 9146+ newcopywarnHTML += "</ul>";
 9147+
 9148+ //no list if there's only one element
 9149+ $(this).find( '.wikiEditor-dialog-copywarn' ).html(
 9150+ copywarnStatements.length > 1 ? newcopywarnHTML : copywarnHTML );
 9151+
91379152 if ( $( '#wpMinoredit' ).size() == 0 )
91389153 $( '#wikiEditor-' + context.instance + '-dialog-minor' ).hide();
91399154 else if ( $( '#wpMinoredit' ).is( ':checked' ) )
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -636,7 +636,8 @@
637637 <label for="wikiEditor-'+context.instance+'-dialog-watch"\
638638 rel="wikieditor-publish-dialog-watch"></label>\
639639 </form>\
640 - </div>',init:function(){$(this).find('[rel]').each(function(){$(this).text(mw.usability.getMsg($(this).attr('rel')));});$(this).find('.wikiEditor-dialog-copywarn').html($('#editpage-copywarn').html());if($('#wpMinoredit').size()==0)
 640+ </div>',init:function(){$(this).find('[rel]').each(function(){$(this).text(mw.usability.getMsg($(this).attr('rel')));});var copywarnHTML=$('#editpage-copywarn').html();var copywarnStatements=copywarnHTML.split(". ");var newcopywarnHTML="<ul>";for(var i=0;i<copywarnStatements.length;i++){if(copywarnStatements[i]!=""){newcopywarnHTML+="<li>"+copywarnStatements[i]+". </li>";}}
 641+newcopywarnHTML+="</ul>";$(this).find('.wikiEditor-dialog-copywarn').html(copywarnStatements.length>1?newcopywarnHTML:copywarnHTML);if($('#wpMinoredit').size()==0)
641642 $('#wikiEditor-'+context.instance+'-dialog-minor').hide();else if($('#wpMinoredit').is(':checked'))
642643 $('#wikiEditor-'+context.instance+'-dialog-minor').attr('checked','checked');if($('#wpWatchthis').size()==0)
643644 $('#wikiEditor-'+context.instance+'-dialog-watch').hide();else if($('#wpWatchthis').is(':checked'))

Follow-up revisions

RevisionCommit summaryAuthorDate
r63858UsabilityInitiative: Revert unintended change to extension setup file in r638...catrope11:07, 17 March 2010
r63864UsabilityInitiative: Fix undefined variable in r63825, consistent casingcatrope16:46, 17 March 2010

Comments

#Comment by Catrope (talk | contribs)   11:13, 17 March 2010
+
+/* Edit dialog */
+.wikiEditor-dialog-editoptions {
+	margin-top: 15px;
+}

CSS for the publish dialog should go in wikiEditor.publish.css

-$wgUsabilityInitiativeResourceMode = 'minified';
+$wgUsabilityInitiativeResourceMode = 'raw';

You should set this setting in your LocalSettings.php after the line that require_once()s UsabilityInitiative.php . You shouldn't change settings in the actual extension files like that, and under no circumstances should you commit them. To prevent the latter from happening (and as a general best practice), you should sanity-check the diff of your changes or at the very least the list of changed files. Cleaned this up in r63858.

Status & tagging log