public inbox for [email protected]
help / color / mirror / Atom feedFrom: Harshal Dhumal <[email protected]>
To: Dave Page <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: patch for RM1460 [pgAdmin4]
Date: Fri, 22 Jul 2016 14:56:35 +0530
Message-ID: <CAFiP3vy-O7R8uCWLqzK90uZ5evHKUFYGvtCveUN=v4UUxXRVEw@mail.gmail.com> (raw)
In-Reply-To: <CA+OCxowpT=WPamrmAvqrcNEqAx0yimHU13_iOLP4WBTXEEkVfg@mail.gmail.com>
References: <CAFiP3vxypqvRUNMNcQjM6Fqn19fvLdBH91W116ouBj=59qQ5SQ@mail.gmail.com>
<CA+OCxowpT=WPamrmAvqrcNEqAx0yimHU13_iOLP4WBTXEEkVfg@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
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
>
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[text/x-patch] RM1460_enhancement.patch (1.4K, 3-RM1460_enhancement.patch)
download | inline diff:
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);
}
},
view thread (6+ 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], [email protected]
Subject: Re: patch for RM1460 [pgAdmin4]
In-Reply-To: <CAFiP3vy-O7R8uCWLqzK90uZ5evHKUFYGvtCveUN=v4UUxXRVEw@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