summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2012-09-05 16:55:57 +0200
committerPetr Vobornik <pvoborni@redhat.com>2012-09-06 10:27:36 +0200
commit22b7d7e7d952d5c4928bfcc4b3d88fec9a1cdd31 (patch)
treebf1a72c0fa563d531b97b49a0493c3950a210c7d /install
parentda10cc96a681ad64831c883100a8f359587f7448 (diff)
downloadfreeipa-22b7d7e7d952d5c4928bfcc4b3d88fec9a1cdd31.tar.gz
freeipa-22b7d7e7d952d5c4928bfcc4b3d88fec9a1cdd31.tar.xz
freeipa-22b7d7e7d952d5c4928bfcc4b3d88fec9a1cdd31.zip
Fixed problem while deleting entry with unsaved changes
While deleting an entry it now resets a facet if there are unsaved changes. It prevents pop up of various error dialogs when UI tries to redirect to search page after successful delete. https://fedorahosted.org/freeipa/ticket/3047
Diffstat (limited to 'install')
-rw-r--r--install/ui/details.js9
-rw-r--r--install/ui/ipa.js2
2 files changed, 11 insertions, 0 deletions
diff --git a/install/ui/details.js b/install/ui/details.js
index cdb6a82bf..f038daa67 100644
--- a/install/ui/details.js
+++ b/install/ui/details.js
@@ -1160,6 +1160,8 @@ IPA.object_action = function(spec) {
return IPA.confirm(msg);
};
+ that.object_execute_action = that.execute_action;
+
return that;
};
@@ -1201,6 +1203,13 @@ IPA.delete_action = function(spec) {
var that = IPA.object_action(spec);
+ that.execute_action = function(facet, on_success, on_error) {
+
+ if (facet.is_dirty()) facet.reset();
+
+ that.object_execute_action(facet, on_success, on_error);
+ };
+
that.on_success = function(facet, data, text_status, xhr) {
IPA.notify_success(data.result.summary);
diff --git a/install/ui/ipa.js b/install/ui/ipa.js
index 7df4deed3..23c9933df 100644
--- a/install/ui/ipa.js
+++ b/install/ui/ipa.js
@@ -2042,6 +2042,8 @@ IPA.confirm = function(msg) {
IPA.notify_success = function(message) {
+ if (!message) return; // don't show undefined, null and such
+
function destroy_timeout() {
if (IPA.notify_success.timeout) window.clearTimeout(IPA.notify_success.timeout);
}