r85940 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85939‎ | r85940 | r85941 >
Date:05:40, 13 April 2011
Author:neilk
Status:ok
Tags:
Comment:
reverting some changes unintentionally committed in r85939
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js (modified) (history)
  • /trunk/phase3/tests/jasmine/lib/appendto-jquery-mockjax (deleted) (history)
  • /trunk/phase3/tests/jasmine/lib/jasmine-1.0.1 (deleted) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js
@@ -54,7 +54,7 @@
5555 api: _this.upload.api,
5656 spinner: function(bool) { _this.toggleDestinationBusy(bool); },
5757 preprocess: function( name ) {
58 - if ( name !== '' ) {
 58+ if ( name != '' ) {
5959 // turn the contents of the input into a MediaWiki title ("File:foo_bar.jpg") to look up
6060 return _this.upload.title.setNameText( name ).toString();
6161 } else {
@@ -760,16 +760,13 @@
761761 _this.completeDetailsSubmission();
762762 };
763763
764 - var ok = function( result ) {
 764+ var callback = function( result ) {
765765 finalCallback( result );
766766 };
767 - var err = function( result ) {
768 - alert( "there was an error!! OMG" );
769 - };
770767
771768 _this.upload.state = 'submitting-details';
772 -
773 - _this.upload.api.postWithEditToken( params, ok, err );
 769+ // XXX this can still fail with bad filename, or other 'warnings' -- capture these
 770+ _this.upload.api.postWithEditToken( params, callback );
774771 },
775772
776773 completeDetailsSubmission: function() {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85939followup to r85929 -- missing the break;s for non-default cases.neilk05:31, 13 April 2011

Status & tagging log