summaryrefslogtreecommitdiffstats
path: root/install/ui/dns.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2012-08-29 17:35:07 +0200
committerPetr Vobornik <pvoborni@redhat.com>2012-09-06 09:44:15 +0200
commit6a8d6d3fde0ede2e0b976cd5af67a57c0691b1f8 (patch)
tree0e46119ffafca1f15b0da8868f72c3d9a16b8da8 /install/ui/dns.js
parent6ae286a8f5ec7d1633ec733fbe116550bff7141a (diff)
downloadfreeipa.git-6a8d6d3fde0ede2e0b976cd5af67a57c0691b1f8.tar.gz
freeipa.git-6a8d6d3fde0ede2e0b976cd5af67a57c0691b1f8.tar.xz
freeipa.git-6a8d6d3fde0ede2e0b976cd5af67a57c0691b1f8.zip
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
Diffstat (limited to 'install/ui/dns.js')
-rw-r--r--install/ui/dns.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/install/ui/dns.js b/install/ui/dns.js
index 0803fdd3..33db481b 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -384,6 +384,7 @@ IPA.dnszone_details_facet = function(spec, no_init) {
that.update_on_success = function(data, text_status, xhr) {
that.refresh();
that.on_update.notify();
+ that.nofify_update_success();
};
that.update_on_error = function(xhr, text_status, error_thrown) {
@@ -1815,6 +1816,7 @@ IPA.dns.record_type_table_widget = function(spec) {
that.reload_facet(data);
dialog.close();
that.notify_facet_update();
+ that.facet.nofify_update_success();
},
function() {
that.refresh_facet();
@@ -1872,6 +1874,13 @@ IPA.dns.record_type_table_widget = function(spec) {
dialog.on_error = IPA.create_4304_error_handler(dialog);
+ dialog.get_add_message = function() {
+ var label = that.entity.metadata.label_singular;
+ var message = IPA.messages.dialogs.add_confirmation;
+ message = message.replace('${entity}', label);
+ return message;
+ };
+
dialog.create_button({
name: 'add',
label: IPA.messages.buttons.add,
@@ -1887,6 +1896,7 @@ IPA.dns.record_type_table_widget = function(spec) {
}
dialog.close();
that.notify_facet_update();
+ IPA.notify_success(dialog.get_add_message());
},
dialog.on_error);
}
@@ -1899,10 +1909,8 @@ IPA.dns.record_type_table_widget = function(spec) {
dialog.hide_message();
dialog.add(
function(data, text_status, xhr) {
- var label = that.entity.metadata.label_singular;
- var message = IPA.messages.dialogs.add_confirmation;
- message = message.replace('${entity}', label);
- dialog.show_message(message);
+
+ dialog.show_message(dialog.get_add_message());
if (data.result.result.dnsrecords) {
that.reload_facet(data);
@@ -2003,6 +2011,7 @@ IPA.dns.record_type_table_widget = function(spec) {
that.reload_facet(data);
dialog.close();
that.notify_facet_update();
+ that.facet.nofify_update_success();
};
command.on_error = function() {
that.refresh_facet();