From 56f1a15cac3aa38ae2453ca3962d5d8414adac9f Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Tue, 17 Apr 2012 13:41:43 +0200 Subject: [PATCH] added function to set messages in JavaScript --- openslides/static/javascript/utils.js | 7 +++++++ openslides/templates/base.html | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/openslides/static/javascript/utils.js b/openslides/static/javascript/utils.js index 7dd13317b..762482d5b 100644 --- a/openslides/static/javascript/utils.js +++ b/openslides/static/javascript/utils.js @@ -11,3 +11,10 @@ $(function () { } }); }); + + +function new_message(text, type) { + message = $('#dummy-notification').clone(true); + $(message).show().addClass(type).children('em').html(text); + $('#notifications').append(message); +} diff --git a/openslides/templates/base.html b/openslides/templates/base.html index a986d6408..fb978887b 100644 --- a/openslides/templates/base.html +++ b/openslides/templates/base.html @@ -50,7 +50,13 @@