From a129b1f36f80c5d57f40f88085ecb91151d6b759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no> Date: Tue, 20 Sep 2011 18:42:13 +0000 Subject: [PATCH] Add function for adding error messages to UI git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2916 44740490-163a-0410-bde0-09ae8108e29a --- .../discojuice/www/discojuice/discojuice.ui.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/discojuice/www/discojuice/discojuice.ui.js b/modules/discojuice/www/discojuice/discojuice.ui.js index 06d96f7e6..d8ca8cc8b 100644 --- a/modules/discojuice/www/discojuice/discojuice.ui.js +++ b/modules/discojuice/www/discojuice/discojuice.ui.js @@ -73,9 +73,9 @@ DiscoJuice.UI = { // Add matched search term if (search && search !== true) { - textLink += '<span class="substring">– ' + search + '</span>'; + textLink += '<span class="substring">— ' + search + '</span>'; } else if (item.descr) { - textLink += '<span class="substring">– ' + item.descr + '</span>'; + textLink += '<span class="substring">— ' + item.descr + '</span>'; } @@ -189,6 +189,12 @@ DiscoJuice.UI = { } } }, + + "error": function(message) { + console.log("error" + message); + this.popup.find("div#discojuice_error").show(); + this.popup.find("div.discojuice_errortext").append('<p style="border-bottom: 1px dotted #ddd; margin-bottom: 3px" class="discojuice_errortext">' + message + '</p>'); + }, "enable": function(control) { var imgpath = this.parent.Utils.options.get('discoPath', '') + 'images/'; @@ -222,6 +228,12 @@ DiscoJuice.UI = { '</div>' + '</div>' + + '<div id="discojuice_error" style="display: none" class="" >' + + '<img src="' + imgpath + 'error.png" style="float: left" />' + + '<div class="discojuice_errortext" style="clear: none; margin-top: 0px; margin-left: 30px; font-size: 11px;">' + + '</div>' + + '</div>' + + '<div id="locatemediv">' + '<div class="locatemebefore">' + '<p style="margin-top: 10px"><a id="locateme" href="">' + -- GitLab