mysliceMessage() js function can be used to display a message
authorCiro Scognamiglio <ciro.scognamiglio@cslash.net>
Tue, 6 May 2014 15:40:10 +0000 (17:40 +0200)
committerCiro Scognamiglio <ciro.scognamiglio@cslash.net>
Tue, 6 May 2014 15:40:10 +0000 (17:40 +0200)
portal/static/js/myslice-ui.js
portal/templates/_widget-message.html [new file with mode: 0644]
portal/templates/home-view.html

index 747098a..5b8e7f6 100644 (file)
@@ -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 (file)
index 0000000..5a18222
--- /dev/null
@@ -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
index c008692..c51c876 100644 (file)
@@ -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">