Re: [Freeipa-devel] [PATCH] 203 Notify success on add, delete and update
On 09/05/2012 07:25 PM, Endi Sukma Dewata wrote: On 9/3/2012 8:35 AM, Petr Vobornik wrote: Notification of success was added to: * details facet: update * association facet and association widget: add, delete items * attribute facet: delete items (notification of add should be handled in entity adder dialog) * sudo rule: add, remove option * dnsrecord: add, update, delete https://fedorahosted.org/freeipa/ticket/2977 ACK. Some minor issues below: Pushed to master. 1. The notification for operations involving multiple entries are a bit inconsistent. In the search facet deleting entries will generate "Selected entries were deleted." Enabling/disabling entries will generate " items were enabled/disabled". In the association facet, HBAC/sudo rules, adding/deleting entries will generate "Items added/removed." For sudo options it's "Option/Option(s) added/removed." To change notification we should also review confirmation messages. For example delete message reflect 'Do you want to delete selected items'. I guess if we want to change it, we should make them more specific and avoid general words like items or entries. Btw which of the two is better? 2. The notification for operations involving a single entry are a bit consistent too, but I think this is an existing issue. If you add an entry the notification will say " successfully added". It doesn't show the primary key which may be generated by the server. As a comparison if you delete an entry from the details page it will say "Deleted ''", and for update operation " updated." In adder dialog we should probably used the message sent by the server, as we do in the other cases. 3. Also existing issue, if you add using "Add and Add Another" the notification doesn't fade away, does it matter? I don't think we should change it. Because in the time when it would fade away user will be filling some fields. User might be surprised by sudden move in the dialog. Feel free to address this separately. -- Petr Vobornik ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 203 Notify success on add, delete and update
On 9/3/2012 8:35 AM, Petr Vobornik wrote: Notification of success was added to: * details facet: update * association facet and association widget: add, delete items * attribute facet: delete items (notification of add should be handled in entity adder dialog) * sudo rule: add, remove option * dnsrecord: add, update, delete https://fedorahosted.org/freeipa/ticket/2977 ACK. Some minor issues below: 1. The notification for operations involving multiple entries are a bit inconsistent. In the search facet deleting entries will generate "Selected entries were deleted." Enabling/disabling entries will generate " items were enabled/disabled". In the association facet, HBAC/sudo rules, adding/deleting entries will generate "Items added/removed." For sudo options it's "Option/Option(s) added/removed." 2. The notification for operations involving a single entry are a bit consistent too, but I think this is an existing issue. If you add an entry the notification will say " successfully added". It doesn't show the primary key which may be generated by the server. As a comparison if you delete an entry from the details page it will say "Deleted ''", and for update operation " updated." 3. Also existing issue, if you add using "Add and Add Another" the notification doesn't fade away, does it matter? Feel free to address this separately. -- Endi S. Dewata ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
[Freeipa-devel] [PATCH] 203 Notify success on add, delete and update
Notification of success was added to: * details facet: update * association facet and association widget: add, delete items * attribute facet: delete items (notification of add should be handled in entity adder dialog) * sudo rule: add, remove option * dnsrecord: add, update, delete https://fedorahosted.org/freeipa/ticket/2977 -- Petr Vobornik From bcd93674450ad3bfbc1e3781cf699692b2928e3c Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Wed, 29 Aug 2012 17:35:07 +0200 Subject: [PATCH] Notify success on add, delete and update Notification of success was added to: * details facet: update * association facet and association widget: add, delete items * attribute facet: delete items (notification of add should be handled in entity adder dialog) * sudo rule: add, remove option * dnsrecord: add, update, delete https://fedorahosted.org/freeipa/ticket/2977 --- install/ui/add.js | 12 install/ui/association.js | 5 + install/ui/details.js | 10 ++ install/ui/dns.js | 17 + install/ui/hbac.js | 1 + install/ui/netgroup.js | 1 + install/ui/selinux.js | 1 + install/ui/sudo.js | 3 +++ install/ui/test/data/ipa_init.json | 7 ++- ipalib/plugins/internal.py | 7 ++- 10 files changed, 54 insertions(+), 10 deletions(-) diff --git a/install/ui/add.js b/install/ui/add.js index caa1ab5a0b13e43c8c8988cec027707d45d72333..d855879452e5812c8c7fbae7bc9d1ff9035f1a6e 100644 --- a/install/ui/add.js +++ b/install/ui/add.js @@ -52,6 +52,7 @@ IPA.entity_adder_dialog = function(spec) { var facet = IPA.current_entity.get_facet(); facet.refresh(); that.close(); +IPA.notify_success(that.get_success_message()); }, that.on_error); } @@ -65,10 +66,7 @@ IPA.entity_adder_dialog = function(spec) { that.add( function(data, text_status, xhr) { that.added.notify(); -var message = IPA.messages.dialogs.add_confirmation; -message = message.replace('${entity}', that.subject); -that.show_message(message); - +that.show_message(that.get_success_message()); var facet = IPA.current_entity.get_facet(); facet.refresh(); that.reset(); @@ -88,6 +86,7 @@ IPA.entity_adder_dialog = function(spec) { that.close(); var result = data.result.result; that.show_edit_page(that.entity, result); +IPA.notify_success(that.get_success_message()); }, that.on_error); } @@ -103,6 +102,11 @@ IPA.entity_adder_dialog = function(spec) { }); }; +that.get_success_message = function() { +var message = IPA.messages.dialogs.add_confirmation; +return message.replace('${entity}', that.subject); +}; + function show_edit_page(entity,result) { var pkey_name = entity.metadata.primary_key; var pkey = result[pkey_name]; diff --git a/install/ui/association.js b/install/ui/association.js index bb10387a51cd8081147eb6acd02b3b0587f30e56..edba681f0f943e66358c8a9c490ab0e00a96429f 100644 --- a/install/ui/association.js +++ b/install/ui/association.js @@ -571,6 +571,7 @@ IPA.association_table_widget = function (spec) { function() { that.refresh(); dialog.close(); +IPA.notify_success(IPA.messages.association.added); }, function() { that.refresh(); @@ -632,6 +633,7 @@ IPA.association_table_widget = function (spec) { function() { that.refresh(); dialog.close(); +IPA.notify_success(IPA.messages.association.removed); }, function() { that.refresh(); @@ -998,6 +1000,7 @@ IPA.association_facet = function (spec, no_init) { on_success: function() { that.refresh(); dialog.close(); +IPA.notify_success(IPA.messages.association.added); }, on_error: function() { that.refresh(); @@ -1049,6 +1052,7 @@ IPA.association_facet = function (spec, no_init) { on_success: function() { that.refresh(); dialog.close(); +IPA.notify_success(IPA.messages.association.removed); }, on_error: function() { that.refresh(); @@ -13