From bdfaa2b2cff1bf24258ccd7944fd0b1f72576017 Mon Sep 17 00:00:00 2001 From: Ciro Scognamiglio Date: Tue, 6 May 2014 17:40:10 +0200 Subject: [PATCH] mysliceMessage() js function can be used to display a message --- portal/static/js/myslice-ui.js | 4 ++++ portal/templates/_widget-message.html | 5 +++++ portal/templates/home-view.html | 2 ++ 3 files changed, 11 insertions(+) create mode 100644 portal/templates/_widget-message.html 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 @@ +
+ + + +
\ 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 %}
{% widget '_widget_news.html' %} +{% widget '_widget_message.html' %} +