mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
When selecting an SSL cert or key, update only the expected path in the UI, not all of them. Fixes #2760. Fixes #2867
This commit is contained in:
parent
dd8e2fe8a6
commit
9212699936
@ -159,6 +159,7 @@ define('misc.file_manager', [
|
||||
$(innerbody).find('*').off();
|
||||
innerbody.remove();
|
||||
removeTransId(trans_id);
|
||||
pgAdmin.Browser.Events.trigger('pgadmin-storage:cancel_btn:storage_dialog');
|
||||
}
|
||||
},
|
||||
build: function() {
|
||||
@ -285,6 +286,7 @@ define('misc.file_manager', [
|
||||
$(innerbody).find('*').off();
|
||||
innerbody.remove();
|
||||
removeTransId(trans_id);
|
||||
pgAdmin.Browser.Events.trigger('pgadmin-storage:cancel_btn:select_file');
|
||||
}
|
||||
},
|
||||
build: function() {
|
||||
@ -409,6 +411,7 @@ define('misc.file_manager', [
|
||||
$(innerbody).find('*').off();
|
||||
innerbody.remove();
|
||||
removeTransId(trans_id);
|
||||
pgAdmin.Browser.Events.trigger('pgadmin-storage:cancel_btn:select_folder');
|
||||
}
|
||||
},
|
||||
build: function() {
|
||||
@ -632,6 +635,7 @@ define('misc.file_manager', [
|
||||
$(innerbody).find('*').off();
|
||||
innerbody.remove();
|
||||
removeTransId(trans_id);
|
||||
pgAdmin.Browser.Events.trigger('pgadmin-storage:cancel_btn:create_file');
|
||||
}
|
||||
},
|
||||
build: function() {
|
||||
|
@ -2163,9 +2163,6 @@
|
||||
},
|
||||
initialize: function(){
|
||||
Backform.InputControl.prototype.initialize.apply(this, arguments);
|
||||
|
||||
// Listen click events of Storage Manager dialog buttons
|
||||
pgAdmin.Browser.Events.on('pgadmin-storage:finish_btn:'+this.field.get('dialog_type'), this.storage_dlg_hander, this);
|
||||
},
|
||||
template: _.template([
|
||||
'<label class="<%=Backform.controlLabelClassName%>"><%=label%></label>',
|
||||
@ -2199,15 +2196,30 @@
|
||||
|
||||
pgAdmin.FileManager.init();
|
||||
pgAdmin.FileManager.show_dialog(params);
|
||||
// Listen click events of Storage Manager dialog buttons
|
||||
this.listen_file_dlg_events();
|
||||
},
|
||||
storage_dlg_hander: function(value) {
|
||||
var field = _.defaults(this.field.toJSON(), this.defaults),
|
||||
attrArr = this.field.get("name").split('.'),
|
||||
name = attrArr.shift();
|
||||
|
||||
this.remove_file_dlg_event_listeners();
|
||||
|
||||
// Set selected value into the model
|
||||
this.model.set(name, decodeURI(value));
|
||||
},
|
||||
storage_close_dlg_hander: function() {
|
||||
this.remove_file_dlg_event_listeners();
|
||||
},
|
||||
listen_file_dlg_events: function() {
|
||||
pgAdmin.Browser.Events.on('pgadmin-storage:finish_btn:'+this.field.get('dialog_type'), this.storage_dlg_hander, this);
|
||||
pgAdmin.Browser.Events.on('pgadmin-storage:cancel_btn:'+this.field.get('dialog_type'), this.storage_close_dlg_hander, this);
|
||||
},
|
||||
remove_file_dlg_event_listeners: function() {
|
||||
pgAdmin.Browser.Events.off('pgadmin-storage:finish_btn:'+this.field.get('dialog_type'), this.storage_dlg_hander, this);
|
||||
pgAdmin.Browser.Events.off('pgadmin-storage:cancel_btn:'+this.field.get('dialog_type'), this.storage_close_dlg_hander, this);
|
||||
},
|
||||
clearInvalid: function() {
|
||||
Backform.InputControl.prototype.clearInvalid.apply(this, arguments);
|
||||
this.$el.removeClass("pgadmin-file-has-error");
|
||||
|
Loading…
Reference in New Issue
Block a user