Hi,

PFA attached patch to show save as option always and to show menu save
option only when file is changed.

-- 
*Harshal Dhumal*
*Software Engineer*

EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Thu, Jul 21, 2016 at 6:18 PM, Dave Page <[email protected]> wrote:

> Hi
>
> Works nicely - committed!
>
> One change I think we should make (please provide a patch when you get
> a minute) is to always allow the dropdown menu and Save As to be used,
> regardless of whether the file is dirty. Save should only be available
> when there are changes of course.
>
> Thanks!
>
> On Wed, Jul 20, 2016 at 1:12 PM, Harshal Dhumal
> <[email protected]> wrote:
> > Hi,
> >
> > PFA patch for RM1460
> >
> > Changes:
> > - Opening a file should set the tab name to the filename
> > - Editing a file should add a * to the tab name to indicate the file is
> > dirty
> > - Saving changes to a file should clear the *
> > - The Save button should have a drop-down menu, with a Save As option.
> >
> > --
> > Harshal Dhumal
> > Software Engineer
> >
> > EnterpriseDB India: http://www.enterprisedb.com
> > The Enterprise PostgreSQL Company
> >
> >
> > --
> > Sent via pgadmin-hackers mailing list ([email protected])
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgadmin-hackers
> >
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
index 6db2310..8961c55 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
@@ -2065,7 +2065,7 @@ define(
                 self.setTitle(self.gridView.current_file.replace(/^\/|\/$/g, ''));
                 // disable save button on file save
                 $("#btn-save").prop('disabled', true);
-                $("#btn-file-menu-dropdown").prop('disabled', true);
+                $("#btn-file-menu-save").css('display', 'none');
               }
             },
             error: function(e) {
@@ -2080,6 +2080,7 @@ define(
           var self = this;
           if(query_tool_obj.getValue().length == 0) {
             $("#btn-save").prop('disabled', true);
+            $("#btn-file-menu-save").css('display', 'none');
             $("#btn-file-menu-dropdown").prop('disabled', true);
           } else {
             if(self.gridView.current_file) {
@@ -2087,6 +2088,7 @@ define(
               self.setTitle(title);
             }
             $("#btn-save").prop('disabled', false);
+            $("#btn-file-menu-save").css('display', 'block');
             $("#btn-file-menu-dropdown").prop('disabled', false);
           }
         },
-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to