pgAdmin 4 commit: Fixes the issue about redirection to undesirable URL

From: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: pgAdmin 4 commit: Fixes the issue about redirection to undesirable URL
Date: 2016-05-23 11:07:58
Message-ID: E1b4niI-00061C-7A@gothos.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=8a3a44ed25051af0c8eb6479d0c26c592cb2111b
Author: Surinder Kumar <surinder(dot)kumar(at)enterprisedb(dot)com>

Modified Files
--------------
web/pgadmin/static/js/backform.pgadmin.js | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)

Browse pgadmin-hackers by date

  From Date Subject
Next Message Ashesh Vashi 2016-05-23 11:09:30 Re: [pgAdmin4][Patch]: Auto redirect to page on opening FileManager when used in Fieldset
Previous Message Surinder Kumar 2016-05-23 10:45:22 [pgAdmin4][Patch]: Auto redirect to page on opening FileManager when used in Fieldset