r96823 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96822‎ | r96823 | r96824 >
Date:01:15, 12 September 2011
Author:jeroendedauw
Status:ok (Comments)
Tags:
Comment:
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardDeed.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDeed.js
@@ -103,7 +103,13 @@
104104 // XXX do we need to escape authorInput, or is wikitext a feature here?
105105 // what about scripts?
106106 getAuthorWikiText: function() {
107 - return "[[User:" + mw.config.get( 'wgUserName' ) + '|' + $j( _this.authorInput ).val() + ']]';
 107+ var author = $j( _this.authorInput ).val();
 108+
 109+ if ( author === '' ) {
 110+ author = _this.$authorInput2.val();
 111+ }
 112+
 113+ return "[[User:" + mw.config.get( 'wgUserName' ) + '|' + author + ']]';
108114 },
109115
110116
@@ -112,12 +118,12 @@
113119
114120 _this.$form = $j( '<form />' );
115121
116 - var $authorInput2 = $j( '<input type="text" />' ).attr( { name: "author2" } ).addClass( 'mwe-upwiz-sign' );
 122+ _this.$authorInput2 = $j( '<input type="text" />' ).attr( { name: "author2" } ).addClass( 'mwe-upwiz-sign' );
117123 var $standardDiv = $j( '<div />' ).append(
118124 $j( '<label for="author2" generated="true" class="mwe-validator-error" style="display:block;" />' ),
119125 $j( '<p></p>' ).msg( 'mwe-upwiz-source-ownwork-assert',
120126 uploadCount,
121 - $authorInput2 ),
 127+ _this.$authorInput2 ),
122128 $j( '<p class="mwe-small-print"></p>' ).msg(
123129 'mwe-upwiz-source-ownwork-assert-note',
124130 gM( 'mwe-upwiz-license-' + mw.UploadWizard.config.licensesOwnWork.defaults[0] )

Follow-up revisions

RevisionCommit summaryAuthorDate
r968481.17wmf1: MFT r96823catrope15:01, 12 September 2011
r96882rebranching UploadWizard from trunk (up to r96823)neilk18:41, 12 September 2011

Comments

#Comment by Siebrand (talk | contribs)   07:42, 12 September 2011

Can you please be slightly more verbose in your future commit messages, so it is not needed to go elsewhere to find out what you aimed to resolve? Thanks.

#Comment by Jeroen De Dauw (talk | contribs)   13:42, 12 September 2011

Sure, will do :)

#Comment by Jeroen De Dauw (talk | contribs)   13:42, 12 September 2011

Why is this deferred?!

Status & tagging log