From: Ciro Scognamiglio <ciro.scognamiglio@cslash.net>
Date: Tue, 6 May 2014 15:40:10 +0000 (+0200)
Subject: mysliceMessage() js function can be used to display a message
X-Git-Tag: myslice-1.1~120
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=bdfaa2b2cff1bf24258ccd7944fd0b1f72576017;p=unfold.git

mysliceMessage() js function can be used to display a message
---

diff --git a/portal/static/js/myslice-ui.js b/portal/static/js/myslice-ui.js
index 747098a1..5b8e7f6a 100644
--- a/portal/static/js/myslice-ui.js
+++ b/portal/static/js/myslice-ui.js
@@ -1,4 +1,8 @@
 
+function mysliceAlert(msg) {
+	$('#myslice-message').find('.message').text(msg);
+	$('#myslice-message').fadeIn('fast');
+}
 /* Table initialisation */
 $(document).ready(function() {
 	
diff --git a/portal/templates/_widget-message.html b/portal/templates/_widget-message.html
new file mode 100644
index 00000000..5a182229
--- /dev/null
+++ b/portal/templates/_widget-message.html
@@ -0,0 +1,5 @@
+<div class="alert alert-warning alert-dismissable" id="myslice-message">
+<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
+<span class="glyphicon glyphicon-exclamation-sign"></span>
+<span class="message"></span>
+</div>
\ No newline at end of file
diff --git a/portal/templates/home-view.html b/portal/templates/home-view.html
index c0086922..c51c8763 100644
--- a/portal/templates/home-view.html
+++ b/portal/templates/home-view.html
@@ -4,6 +4,8 @@
 {% block content %}
 <div class="row">
 {% widget '_widget_news.html' %}
+{% widget '_widget_message.html' %}
+
 </div>
 <div class="row" id="home-dashboard">
 	<ul class="nav nav-tabs">