public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin][RM-6046]: [Query Tool] state of Save File icon does not match dirty editor indicator.
2+ messages / 2 participants
[nested] [flat]

* [pgAdmin][RM-6046]: [Query Tool] state of Save File icon does not match dirty editor indicator.
@ 2020-12-16 05:59  Nikhil Mohite <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Nikhil Mohite @ 2020-12-16 05:59 UTC (permalink / raw)
  To: pgadmin-hackers

Hi Team,

Please find the attached patch for RM-6046:
<https://redmine.postgresql.org/issues/6046; [Query Tool] state of Save
File icon does not match the dirty editor indicator.



-- 
*Thanks & Regards,*
*Nikhil Mohite*
*Software Engineer.*
*EDB Postgres* <https://www.enterprisedb.com/;
*Mob.No: +91-7798364578.*


Attachments:

  [application/octet-stream] RM_6046.patch (1.1K, 3-RM_6046.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 47d4de4..abd33a4 100644
--- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
@@ -4286,7 +4286,14 @@ define('tools.querytool', [
         $('#btn-explain-options-dropdown').prop('disabled', mode_disabled);
         $('#btn-edit-dropdown').prop('disabled', mode_disabled);
         $('#btn-load-file').prop('disabled', mode_disabled);
-        $('#btn-save-file').prop('disabled', mode_disabled);
+        if(this.gridView.current_file) {
+          if(this.gridView.query_tool_obj.file_data != this.gridView.query_tool_obj.getValue()) {
+            $('#btn-save-file').prop('disabled', mode_disabled);
+          }
+        } else {
+          $('#btn-save-file').prop('disabled', mode_disabled);
+        }
+
         $('#btn-file-menu-dropdown').prop('disabled', mode_disabled);
         $('#btn-find').prop('disabled', mode_disabled);
         $('#btn-find-menu-dropdown').prop('disabled', mode_disabled);


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [pgAdmin][RM-6046]: [Query Tool] state of Save File icon does not match dirty editor indicator.
@ 2020-12-17 06:35  Akshay Joshi <[email protected]>
  parent: Nikhil Mohite <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Akshay Joshi @ 2020-12-17 06:35 UTC (permalink / raw)
  To: Nikhil Mohite <[email protected]>; +Cc: pgadmin-hackers

Thanks, patch applied.

On Wed, Dec 16, 2020 at 11:29 AM Nikhil Mohite <
[email protected]> wrote:

> Hi Team,
>
> Please find the attached patch for RM-6046:
> <https://redmine.postgresql.org/issues/6046; [Query Tool] state of Save
> File icon does not match the dirty editor indicator.
>
>
>
> --
> *Thanks & Regards,*
> *Nikhil Mohite*
> *Software Engineer.*
> *EDB Postgres* <https://www.enterprisedb.com/;
> *Mob.No: +91-7798364578.*
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*

*Mobile: +91 976-788-8246*


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-12-17 06:35 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 05:59 [pgAdmin][RM-6046]: [Query Tool] state of Save File icon does not match dirty editor indicator. Nikhil Mohite <[email protected]>
2020-12-17 06:35 ` Akshay Joshi <[email protected]>

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