r84217 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84216‎ | r84217 | r84218 >
Date:00:31, 18 March 2011
Author:kaldari
Status:deferred
Tags:
Comment:
cleaning up valid function
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js
@@ -247,31 +247,27 @@
248248 var _this = this;
249249 // at least one description -- never mind, we are disallowing removal of first description
250250 // all the descriptions -- check min & max length
 251+ // categories are assumed valid
 252+ // pop open the 'more-options' if the date is bad
 253+ // location?
251254
252 - // the title
 255+ // make sure title is valid
253256 var titleInputValid = $j( _this.titleInput ).data( 'valid' );
254257 if ( typeof titleInputValid == 'undefined' ) {
255258 alert( "please wait, still checking the title for uniqueness..." );
256259 return false;
257260 }
258 -
 261+
 262+ // make sure licenses are valid (needed for multi-file deed selection)
 263+ var deedValid = _this.upload.deedChooser.valid();
 264+
259265 // all other fields validated with validator js
260266 var formValid = _this.$form.valid();
261 - var deedValid = _this.upload.deedChooser.valid();
262 - return titleInputValid && formValid && deedValid;
263267
264 - // categories are assumed valid
265 -
266 - // the license, if any
267 -
268 - // pop open the 'more-options' if the date is bad
269 - // the date
270 -
271 - // location?
 268+ return titleInputValid && deedValid && formValid;
272269 },
273270
274271
275 -
276272 /**
277273 * toggles whether we use the 'macro' deed or our own
278274 */

Status & tagging log