Skip to content
Snippets Groups Projects
Commit a129b1f3 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Add function for adding error messages to UI

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2916 44740490-163a-0410-bde0-09ae8108e29a
parent d4a50c65
No related branches found
No related tags found
No related merge requests found
......@@ -73,9 +73,9 @@ DiscoJuice.UI = {
// Add matched search term
if (search && search !== true) {
textLink += '<span class="substring"> ' + search + '</span>';
textLink += '<span class="substring">&#8212; ' + search + '</span>';
} else if (item.descr) {
textLink += '<span class="substring"> ' + item.descr + '</span>';
textLink += '<span class="substring">&#8212; ' + 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="">' +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment