Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.RemoteSearchDriver.js |
— | — | @@ -660,12 +660,20 @@ |
661 | 661 | |
662 | 662 | _this.clearTextboxCache(); |
663 | 663 | 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 | + { |
665 | 670 | $j( '#rsd_q' ).val( query ); |
666 | 671 | _this.UpdateResults(); |
667 | 672 | } |
668 | 673 | // $j(_this.target_container).dialog("open"); |
669 | 674 | $j( _this.target_container ).parents( '.ui-dialog' ).fadeIn( 'slow' ); |
| 675 | + |
| 676 | + |
| 677 | + |
670 | 678 | // re-center the dialog: |
671 | 679 | $j( _this.target_container ).dialog( 'option', 'position', 'center' ); |
672 | 680 | }, |