r61483 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61482‎ | r61483 | r61484 >
Date:07:36, 25 January 2010
Author:dale
Status:deferred
Tags:
Comment:
* bug 22186 refresh upload form to clear old data
Modified paths:
  • /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
@@ -660,12 +660,20 @@
661661
662662 _this.clearTextboxCache();
663663 var query = _this.getDefaultQuery();
664 - if ( query != $j( '#rsd_q' ).val() ) {
 664+
 665+ // Refresh the container if "upload" or "changed query"
 666+ if ( query != $j( '#rsd_q' ).val()
 667+ ||
 668+ this.current_provider == 'upload' )
 669+ {
665670 $j( '#rsd_q' ).val( query );
666671 _this.UpdateResults();
667672 }
668673 // $j(_this.target_container).dialog("open");
669674 $j( _this.target_container ).parents( '.ui-dialog' ).fadeIn( 'slow' );
 675+
 676+
 677+
670678 // re-center the dialog:
671679 $j( _this.target_container ).dialog( 'option', 'position', 'center' );
672680 },

Status & tagging log