summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-05-28 18:08:13 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-06-10 10:23:31 +0200
commitbc6105b270ad10349d12d144b5f67660e7f734e3 (patch)
treee3aceddb86b25d0fa15bf039463b7798aa04bfe9 /install
parentbedd128de07f502cdc68d8c7a9f6b8ef48d1727b (diff)
downloadfreeipa-bc6105b270ad10349d12d144b5f67660e7f734e3.tar.gz
freeipa-bc6105b270ad10349d12d144b5f67660e7f734e3.tar.xz
freeipa-bc6105b270ad10349d12d144b5f67660e7f734e3.zip
webui: use propert alerts in header notification area
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
Diffstat (limited to 'install')
-rw-r--r--install/ui/ipa.css4
-rw-r--r--install/ui/src/freeipa/ipa.js21
-rw-r--r--install/ui/src/freeipa/widget.js2
3 files changed, 5 insertions, 22 deletions
diff --git a/install/ui/ipa.css b/install/ui/ipa.css
index 5a5262f3e..41f88a763 100644
--- a/install/ui/ipa.css
+++ b/install/ui/ipa.css
@@ -50,11 +50,7 @@ textarea[readonly] {
.notification-area div {
position: relative;
left: -50%;
-
- line-height: 1.5em;
z-index: 20;
- padding: 4px;
- text-align: center;
word-wrap: break-word;
max-width: 500px;
}
diff --git a/install/ui/src/freeipa/ipa.js b/install/ui/src/freeipa/ipa.js
index d74881924..8a1ebaed7 100644
--- a/install/ui/src/freeipa/ipa.js
+++ b/install/ui/src/freeipa/ipa.js
@@ -1164,8 +1164,6 @@ IPA.notify = function(message, type, timeout) {
}
var notification_area = $('.notification-area');
- var message_el = $('.notification-area div');
-
if (notification_area.length === 0) {
notification_area = $('<div/>', {
'class': 'notification-area',
@@ -1174,25 +1172,14 @@ IPA.notify = function(message, type, timeout) {
notification_area.fadeOut(100);
}
});
- message_el = $('<div/>', {
- 'class': 'alert'
- }).appendTo(notification_area);
notification_area.appendTo('#container');
}
+ notification_area.empty();
- if (IPA.notify_success.current_cls) {
- message_el.removeClass(IPA.notify_success.current_cls);
- IPA.notify_success.current_cls = null;
- }
-
- if (type && type !== 'warning') {
- var type_cls = 'alert-'+type;
- message_el.addClass(type_cls);
- IPA.notify_success.current_cls = type_cls;
- }
-
- message_el.text(message);
+ var alert = IPA.alert_helper.create_alert('msg', message, type);
+ var el = IPA.alert_helper.render_alert(alert);
+ notification_area.append(el);
destroy_timeout();
notification_area.fadeIn(IPA.config.message_fadein_time);
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index 6c08e1e60..fc60959cd 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -5444,7 +5444,7 @@ IPA.value_map_widget = function(spec) {
* @alternateClassName IPA.alert_helper
* @singleton
*/
-exp.alert_helper = {
+exp.alert_helper = IPA.alert_helper = {
/**
* Create alert object