From 6a8d6d3fde0ede2e0b976cd5af67a57c0691b1f8 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Wed, 29 Aug 2012 17:35:07 +0200 Subject: 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/details.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'install/ui/details.js') diff --git a/install/ui/details.js b/install/ui/details.js index 883bb06b..cdb6a82b 100644 --- a/install/ui/details.js +++ b/install/ui/details.js @@ -508,10 +508,20 @@ IPA.details_facet = function(spec, no_init) { return valid; }; + that.nofify_update_success = function() { + var msg = IPA.messages.details.updated; + var key = that.get_primary_key(); + key = key[key.length -1] || ''; + msg = msg.replace('${entity}', that.entity.metadata.label_singular); + msg = msg.replace('${primary_key}', key); + IPA.notify_success(msg); + }; + that.update_on_success = function(data, text_status, xhr) { that.load(data); that.on_update.notify(); + that.nofify_update_success(); }; that.update_on_error = function(xhr, text_status, error_thrown) { -- cgit