public inbox for [email protected]  
help / color / mirror / Atom feed
From: Pradip Parkale <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][RM6417]:Query editor is not being closed if user Click on don't Save button
Date: Thu, 29 Apr 2021 16:06:11 +0530
Message-ID: <CAJ9T6Std7vCXO2wDCxU7eV_8QhDKrr+KGETieSdmSg7WaXCEBA@mail.gmail.com> (raw)

Hi Hackers,

Please find the attached patch for #6417 Query editor is not being closed
if user Click on don't Save button.



-- 
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation


Attachments:

  [application/octet-stream] RM6417.patch (1.1K, 3-RM6417.patch)
  download | inline diff:
diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
index d44d4ea47..1ef690e55 100644
--- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
@@ -4965,6 +4965,7 @@ define('tools.querytool', [
                 break;
               case 1: // Don't Save
                 self.close_on_save = false;
+                self.is_unsaved_data = this.is_unsaved_data;
                 $.ajax({
                   url: url_for('sqleditor._check_server_connection_status', {
                     'sid': self.url_params.sid,
@@ -4977,7 +4978,7 @@ define('tools.querytool', [
                   let response = res.data.result.server;
                   if (response) {
                     closeEvent.cancel = true;
-                    if (this.is_unsaved_data)
+                    if (self.is_unsaved_data)
                       self.ignore_on_close.unsaved_data = true;
                     else
                       self.ignore_on_close.unsaved_query = true;


view thread (2+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [pgAdmin][RM6417]:Query editor is not being closed if user Click on don't Save button
  In-Reply-To: <CAJ9T6Std7vCXO2wDCxU7eV_8QhDKrr+KGETieSdmSg7WaXCEBA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox