Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notifications.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-09-30 16:53:18 +0300
committerJoas Schilling <nickvergessen@owncloud.com>2015-09-30 16:53:18 +0300
commit1148b1b57982aeab235bfea0c30eb38016d1e5a8 (patch)
treecefaab6721d932cdd5eb819240a752bea5dae0d4 /js/notification.js
parent3922c471f7855581cb674777e161e9b91caa63b3 (diff)
Add a link around the subject if it is given
Diffstat (limited to 'js/notification.js')
-rw-r--r--js/notification.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/js/notification.js b/js/notification.js
index 515928d..8048232 100644
--- a/js/notification.js
+++ b/js/notification.js
@@ -64,6 +64,10 @@
return this.object_id;
},
+ getLink: function() {
+ return this.link;
+ },
+
getActions: function() {
return this.actions;
},
@@ -92,7 +96,12 @@
var el = $('<div class="notification"></div>');
el.attr('data-id', escapeHTML(this.getId()));
el.attr('data-timestamp', escapeHTML(this.getTimestamp()));
- el.append('<div class="notification-subject"> '+escapeHTML(this.getSubject())+'</div>');
+
+ if (this.getLink()) {
+ el.append('<a href="'+this.getLink()+'" class="notification-subject"> '+escapeHTML(this.getSubject())+'</a>');
+ } else {
+ el.append('<div class="notification-subject"> '+escapeHTML(this.getSubject())+'</div>');
+ }
el.append('<div class="notification-message">'+escapeHTML(this.getMessage())+'</div>');
// Add actions
var actions = $('<div class="actions"></div>');