Commit 4ffd13ed authored by HERBERT Ryan's avatar HERBERT Ryan
Browse files

js/database.js restructured notifications to display title in user interface....

js/database.js restructured notifications to display title in user interface. And made them clickable to view content
parent 743e332c
......@@ -671,12 +671,10 @@ Database.prototype = {
for (var i=0; i < messages.length; ++i) {
message = document.createElement('div');
message.className = classNames[messages[i]['priority']] + " notification";
// force browser to preserve text formatting
//preformat = document.createElement('pre');
//$(message).append(preformat);
$(message).attr('onclick', "db.call('notification/info', {'id': '" + messages[i]['id'] + "'})");
$(message).append(
// message is sanitized by the server so we unescape the string to include links and formatting
document.createTextNode(unescape(messages[i]['message_content']))
document.createTextNode(unescape(messages[i]['title']))
);
elem.append(message);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment