Hi,

PFA patch for issue RM1318 with remaining bug fixes.


On Mon, Jun 13, 2016 at 8:49 PM, Dave Page <dp...@pgadmin.org> wrote:

> On Mon, Jun 13, 2016 at 7:25 AM, Harshal Dhumal
> <harshal.dhu...@enterprisedb.com> wrote:
> > Hi,
> >
> > PFA attached patch for issue RM1318.
> >
> >
> > Issue fixed: Added help buttons on backup, restore, maintenance, user
> > management dialogs.
>
> Thanks - I've committed this as-is, however the following issues
> should also be fixed:
>
> - The help for the User Manager dialogue cannot be used because the
> dialogue is modal.
>

Changed user dialog to non modal from modal dialog.


>
> - There's no help button on the Preferences dialogue. It should also
> be made non-modal so the user can actually use the help once it's
> displayed.
>
Added missing help button and also changed dialog to non modal.



>
> Thanks.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
diff --git a/web/pgadmin/preferences/templates/preferences/preferences.js b/web/pgadmin/preferences/templates/preferences/preferences.js
index 69053b3..0600a8c 100644
--- a/web/pgadmin/preferences/templates/preferences/preferences.js
+++ b/web/pgadmin/preferences/templates/preferences/preferences.js
@@ -1,8 +1,8 @@
 define(
-  ['jquery', 'alertify', 'pgadmin', 'underscore', 'backform', 'pgadmin.backform'],
+  ['jquery', 'alertify', 'pgadmin', 'underscore', 'backform', 'pgadmin.browser', 'pgadmin.backform'],
 
   // This defines the Preference/Options Dialog for pgAdmin IV.
-  function($, alertify, pgAdmin, _, Backform) {
+  function($, alertify, pgAdmin, _, Backform, pgBrowser) {
     pgAdmin = pgAdmin || window.pgAdmin || {};
 
     /*
@@ -351,12 +351,13 @@ define(
             },
             setup:function(){
               return {
-                buttons:[
-                  {
+                buttons:[{
+                    text: '', key: 27, className: 'btn btn-default pull-left fa fa-lg fa-question',
+                    attrs:{name:'dialog_help', type:'button', label: '{{ _('Preferences') }}',
+                    url: '{{ url_for('help.static', filename='preferences_dialog.html') }}'}
+                  },{
                     text: "{{ _('OK') }}", key: 13, className: "btn btn-primary fa fa-lg fa-save pg-alertify-button"
-
-                  },
-                  {
+                  },{
                     text: "{{ _('Cancel') }}", className: "btn btn-danger fa fa-lg fa-times pg-alertify-button"
                   }
                 ],
@@ -365,12 +366,20 @@ define(
                   padding: !1,
                   overflow: !1,
                   title: '{{ _('Preferences')|safe }}',
-                  closableByDimmer: false
+                  closableByDimmer: false,
+                  modal:false
                 }
               };
             },
-            callback: function(closeEvent){
-              if (closeEvent.button.text == "{{ _('OK') }}"){
+            callback: function(e){
+              if (e.button.element.name == "dialog_help") {
+                  e.cancel = true;
+                  pgBrowser.showHelp(e.button.element.name, e.button.element.getAttribute('url'),
+                    null, null, e.button.element.getAttribute('label'));
+                  return;
+               }
+
+              if (e.button.text == "{{ _('OK') }}"){
                 preferences.updateAll();
               }
             },
diff --git a/web/pgadmin/tools/user_management/templates/user_management/js/user_management.js b/web/pgadmin/tools/user_management/templates/user_management/js/user_management.js
index 4e01863..9109044 100644
--- a/web/pgadmin/tools/user_management/templates/user_management/js/user_management.js
+++ b/web/pgadmin/tools/user_management/templates/user_management/js/user_management.js
@@ -390,7 +390,7 @@ define([
                     //disable both padding and overflow control.
                     padding : !1,
                     overflow: !1,
-                    model: 0,
+                    modal: false,
                     resizable: true,
                     maximizable: true,
                     pinnable: false,
-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to