mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixes few issues with File Manager.
- Rename file/folder not working in list view. - Selection folder only should not allow to select file. - Ui changes in table list to match with the pgadmin color styles. - Custom STORAGE_DIR path don't list files/folders when opened in window system. - Code cleanup, formatting & did proper commenting. - In file selection mode, the value typed in text box not setting into backbone model. - Removed create file code, it should be handled on module using it. - Written a common function to make ajax request, instead of writing individual functions for same task.
This commit is contained in:
committed by
Ashesh Vashi
parent
875e251359
commit
3120ce1909
@@ -2090,23 +2090,32 @@
|
||||
'</div>'
|
||||
].join("\n")),
|
||||
events: function() {
|
||||
// Inherit all default events of InputControl
|
||||
return _.extend({}, Backform.InputControl.prototype.events, {
|
||||
"click .select_item": "onSelect",
|
||||
});
|
||||
"click .select_item": "onSelect"
|
||||
});
|
||||
},
|
||||
onSelect: function(e) {
|
||||
onSelect: function(ev) {
|
||||
var dialog_type = this.field.get('dialog_type');
|
||||
supp_types = this.field.get('supp_types'),
|
||||
btn_primary = this.field.get('btn_primary'),
|
||||
dialog_title = this.field.get('dialog_title');
|
||||
var params = {
|
||||
supported_types: supp_types,
|
||||
dialog_type: dialog_type,
|
||||
dialog_title: dialog_title,
|
||||
btn_primary: btn_primary
|
||||
};
|
||||
dialog_title = this.field.get('dialog_title'),
|
||||
params = {
|
||||
supported_types: supp_types,
|
||||
dialog_type: dialog_type,
|
||||
dialog_title: dialog_title,
|
||||
btn_primary: btn_primary
|
||||
};
|
||||
|
||||
pgAdmin.FileManager.init();
|
||||
pgAdmin.FileManager.show_dialog(params);
|
||||
|
||||
// Stop prograting the event further
|
||||
ev = ev || window.event;
|
||||
if (ev) {
|
||||
ev.cancelBubble = true;
|
||||
ev.stopPropagation();
|
||||
}
|
||||
},
|
||||
storage_dlg_hander: function(value) {
|
||||
var field = _.defaults(this.field.toJSON(), this.defaults),
|
||||
|
||||
Reference in New Issue
Block a user