r61484 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61483‎ | r61484 | r61485 >
Date:08:41, 25 January 2010
Author:dale
Status:deferred
Tags:
Comment:
* bug 22150 import resource page search results are displayed after a canceled import
Modified paths:
  • /branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.BaseUploadInterface.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.RemoteSearchDriver.js (modified) (history)

Diff [purge]

Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.RemoteSearchDriver.js
@@ -35,6 +35,7 @@
3636 "mwe-missing_desc_see_source" : "This asset is missing a description. Please see the [$1 original source] and help describe it.",
3737 "rsd_config_error" : "Add media wizard configuration error: $1",
3838 "mwe-your_recent_uploads" : "Your recent uploads to $1",
 39+ "mwe-no_recent_uploads" : "No recent uploads",
3940 "mwe-upload_a_file" : "Upload a new file to $1",
4041 "mwe-resource_page_desc" : "Resource page description:",
4142 "mwe-edit_resource_desc" : "Edit wiki text resource description:",
@@ -849,6 +850,9 @@
850851 // Don't submit the form
851852 return false;
852853 } );
 854+
 855+ // Setup base cancel button binding
 856+ this.onCancelClipEdit();
853857 },
854858
855859 /**
@@ -1015,6 +1019,8 @@
10161020 );
10171021 _this.showResults();
10181022 } );
 1023+ }else{
 1024+ $j('#upload_bin').empty().text( gM( 'mwe-no_recent_uploads' ) );
10191025 }
10201026
10211027 // Deal with the api form upload form directly:
@@ -1776,6 +1782,8 @@
17771783 // Remove preview if its 'on'
17781784 $j( '#rsd_preview_display' ).remove();
17791785
 1786+ // Remove resource import if present
 1787+ $j( '#rsd_resource_import' ).remove();
17801788 // Restore the resource container:
17811789 this.$resultsContainer.show();
17821790
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.BaseUploadInterface.js
@@ -723,7 +723,7 @@
724724 'ignorewarnings': 1,
725725 'filename': $j( '#wpDestFile' ).val(),
726726 'token' : _this.editToken,
727 - 'comment' : $j( '#wpUploadDescription' ).val(),
 727+ 'comment' : $j( '#wpUploadDescription' ).val()
728728 };
729729 //run the upload from stash request
730730 mw.getJSON(_this.api_url, request, function( data ) {

Status & tagging log