Fixes the issue about redirection to undesirable URL when clicked on the
file control selection button. All our views are inherited from the Backform.Form (a extended Backbone.View), which has an tag element set to 'form'. The default action for a button in form is to submit the data, and that results into undesirable redirection within our Views. We can resolve the issue of redirection by setting 'preventDefault' to true in the click event object on that button. But - we may use the button control within our view in future, and that will have the similar behaviour. Keeping that in mind, we set the default tag to 'div' instead of 'form' for all our views. ommit.pull/3/head
parent
aff0d417bb
commit
8a3a44ed25
|
@ -486,7 +486,7 @@
|
|||
var Dialog = Backform.Dialog = Backform.Form.extend({
|
||||
/* Array of objects having attributes [label, fields] */
|
||||
schema: undefined,
|
||||
tagName: "form",
|
||||
tagName: "div",
|
||||
legend: true,
|
||||
className: function() {
|
||||
return 'col-sm-12 col-md-12 col-lg-12 col-xs-12';
|
||||
|
@ -2204,13 +2204,6 @@
|
|||
|
||||
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),
|
||||
|
|
Loading…
Reference in New Issue