fixed title restore after cancel edit in add-media-wizard
authorMichael Dale <dale@users.mediawiki.org>
Sat, 25 Jul 2009 20:47:42 +0000 (20:47 +0000)
committerMichael Dale <dale@users.mediawiki.org>
Sat, 25 Jul 2009 20:47:42 +0000 (20:47 +0000)
js2/mwEmbed/libAddMedia/remoteSearchDriver.js

index 0825b21..8a3eddc 100644 (file)
@@ -1058,12 +1058,15 @@ remoteSearchDriver.prototype = {
                var _this = this;               
                var b_target =   _this.target_container + '~ .ui-dialog-buttonpane';
                $j('#rsd_resource_edit').remove();
+               //restore the title: 
+               $j( _this.target_container ).dialog( 'option', 'title', gM('add_media_wizard'));
                js_log("should update: " + b_target + ' with: cancel');
+               //restore the buttons: 
                $j(b_target).html( $j.btnHtml( 'Cancel' , 'mv_cancel_rsd', 'close'))
                        .children('.mv_cancel_rsd')
                        .btnBind()
                        .click(function(){
-                               $j( _this.target_container).dialog('close');    
+                               $j( _this.target_container).dialog('close');                                                                                                    
                        })
                                                                                        
        },