[Kimchi-devel] [PATCH] [Wok] Issue #10: wok.message with closeable as true is also fading out after timeout
archus at linux.vnet.ibm.com
archus at linux.vnet.ibm.com
Thu Dec 17 05:56:30 UTC 2015
From: Archana Singh <archus at linux.vnet.ibm.com>
Added check if closeable is true, then don't
setTimeout to fadeOut the message.
Signed-off-by: Archana Singh <archus at linux.vnet.ibm.com>
---
ui/js/src/wok.message.js | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/ui/js/src/wok.message.js b/ui/js/src/wok.message.js
index 5f5759e..63bf84e 100644
--- a/ui/js/src/wok.message.js
+++ b/ui/js/src/wok.message.js
@@ -36,15 +36,17 @@ wok.message = function(msg, level, node, closeable) {
$message.alert();
$message.fadeIn(100);
- var timeout = setTimeout(function() {
- $message.delay(4000).fadeOut(100, function() {
- $message.alert('close');
- $(this).remove();
- if ($(container).children().length < 1) {
- $(container).hide();
- }
- });
- }, 10000);
+ if(!closeable){
+ var timeout = setTimeout(function() {
+ $message.delay(4000).fadeOut(100, function() {
+ $message.alert('close');
+ $(this).remove();
+ if ($(container).children().length < 1) {
+ $(container).hide();
+ }
+ });
+ }, 10000);
+ }
};
wok.message.warn = function(msg, node, closeable) {
--
2.1.0
More information about the Kimchi-devel
mailing list