[luci] luci: Make pop-up messages act like static status messages
by Ryan McCabe
commit 7442a3f0ab9fbb951039a2dacbb900e8dec7381c
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Tue Jan 8 18:07:59 2013 -0500
luci: Make pop-up messages act like static status messages
Remove the pop-up status messages and instead add the messages
so that they look the same way static status messages look.
Resolves: rhbz#773491
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
luci/public/js/busy.js | 6 ++++--
luci/templates/master.html | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/luci/public/js/busy.js b/luci/public/js/busy.js
index 9559349..9f04f3a 100644
--- a/luci/public/js/busy.js
+++ b/luci/public/js/busy.js
@@ -65,7 +65,8 @@ function get_task_status(cluster_name) {
if (cur.db_task_type != 2 && cur.db_task_type != 9) {
// 2=set conf, 9=activate conf
try {
- $.jnotify(cur.db_status + ' completed successfully', true);
+ $('<div class="info">' + cur.db_status + " completed successfully" + '</div>').appendTo($('#flash'));
+ //$.jnotify(cur.db_status + ' completed successfully', true);
} catch (e) {}
}
if (cur.db_task_type == 1 || cur.db_task_type == 3 ||
@@ -94,7 +95,8 @@ function get_task_status(cluster_name) {
$('<li class="status_msg_text">' + cur.db_status + substatus + '</li>').appendTo($('#status_msg_details'));
} else if (cur.ricci_code == -1) {
try {
- $.jnotify(cur.db_status + " failed: " + cur.ricci_msg, "error", true);
+ $('<div class="error">' + cur.db_status + " failed: " + cur.ricci_msg + '</div>').appendTo($('#flash'));
+ //$.jnotify(cur.db_status + " failed: " + cur.ricci_msg, "error", true);
cur_errors++;
} catch (e) {}
} else {
diff --git a/luci/templates/master.html b/luci/templates/master.html
index 0417409..16ad632 100644
--- a/luci/templates/master.html
+++ b/luci/templates/master.html
@@ -58,6 +58,7 @@
<div id="content">
<py:with vars="flash=tg.flash_obj.render('flash', use_js=False)">
<div py:if="flash" py:content="XML(flash)" class="message"/>
+ <div py:if="not flash" id="flash"/>
</py:with>
<py:if test="'flash2' in session">
<div py:for="message in session['flash2']" class="message" id="${message.hash}">
11 years, 3 months