diff options
author | Sandro Lutz <sandro.lutz@temparus.ch> | 2017-02-07 00:12:45 +0100 |
---|---|---|
committer | Sandro Lutz <sandro.lutz@temparus.ch> | 2017-02-07 00:15:30 +0100 |
commit | fa1d607bfa951711a2c358f889db56962c179153 (patch) | |
tree | 904b6bd3b7f9d2ed133f64da22b3fb9bbfbf1842 /apps/comments/js/filesplugin.js | |
parent | ff3fa538e43bb38a5ff142b07216b9de79645c01 (diff) | |
parent | b55f5af7eaab6f827989407fa7b8d51cbb877eab (diff) | |
download | nextcloud-server-fa1d607bfa951711a2c358f889db56962c179153.tar.gz nextcloud-server-fa1d607bfa951711a2c358f889db56962c179153.zip |
Merge remote-tracking branch 'nextcloud/master'
Signed-off-by: Sandro Lutz <sandro.lutz@temparus.ch>
Diffstat (limited to 'apps/comments/js/filesplugin.js')
-rw-r--r-- | apps/comments/js/filesplugin.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/comments/js/filesplugin.js b/apps/comments/js/filesplugin.js index cc419c18ddb..8c5762065a1 100644 --- a/apps/comments/js/filesplugin.js +++ b/apps/comments/js/filesplugin.js @@ -11,6 +11,11 @@ /* global Handlebars */ (function() { + + _.extend(OC.Files.Client, { + PROPERTY_COMMENTS_UNREAD: '{' + OC.Files.Client.NS_OWNCLOUD + '}comments-unread' + }); + var TEMPLATE_COMMENTS_UNREAD = '<a class="action action-comment permanent" title="{{countMessage}}" href="#">' + '<img class="svg" src="{{iconUrl}}"/>' + @@ -52,19 +57,17 @@ fileList.registerTabView(new OCA.Comments.CommentsTabView('commentsTabView')); - var NS_OC = 'http://owncloud.org/ns'; - var oldGetWebdavProperties = fileList._getWebdavProperties; fileList._getWebdavProperties = function() { var props = oldGetWebdavProperties.apply(this, arguments); - props.push('{' + NS_OC + '}comments-unread'); + props.push(OC.Files.Client.PROPERTY_COMMENTS_UNREAD); return props; }; fileList.filesClient.addFileInfoParser(function(response) { var data = {}; var props = response.propStat[0].properties; - var commentsUnread = props['{' + NS_OC + '}comments-unread']; + var commentsUnread = props[OC.Files.Client.PROPERTY_COMMENTS_UNREAD]; if (!_.isUndefined(commentsUnread) && commentsUnread !== '') { data.commentsUnread = parseInt(commentsUnread, 10); } |