aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/shareitemmodel.js
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-07-24 09:12:03 +0200
committerGitHub <noreply@github.com>2018-07-24 09:12:03 +0200
commitb41d0d32e2183b8b241d3764f06a3b0f7d6b86c1 (patch)
tree915e14ceafed060f95255e8d2d7d4ad3ab3df7b5 /core/js/shareitemmodel.js
parent241e5705cb85d24a9c3479c133fcc4d9c069d8c7 (diff)
parentfee62fd20b01b08ffbc7120720ba3bad0a89be73 (diff)
downloadnextcloud-server-b41d0d32e2183b8b241d3764f06a3b0f7d6b86c1.tar.gz
nextcloud-server-b41d0d32e2183b8b241d3764f06a3b0f7d6b86c1.zip
Merge pull request #10218 from nextcloud/share-comments
allow to add a personal note to a share
Diffstat (limited to 'core/js/shareitemmodel.js')
-rw-r--r--core/js/shareitemmodel.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/js/shareitemmodel.js b/core/js/shareitemmodel.js
index 93feba9c889..241b9c19c0d 100644
--- a/core/js/shareitemmodel.js
+++ b/core/js/shareitemmodel.js
@@ -343,6 +343,13 @@
/**
* @returns {string}
*/
+ getReshareNote: function() {
+ return this.get('reshare').note;
+ },
+
+ /**
+ * @returns {string}
+ */
getReshareWith: function() {
return this.get('reshare').share_with;
},
@@ -366,6 +373,10 @@
return this._shareExpireDate(shareIndex);
},
+ getNote: function(shareIndex) {
+ return this._shareNote(shareIndex);
+ },
+
/**
* Returns all share entries that only apply to the current item
* (file/folder)
@@ -502,6 +513,15 @@
return date2;
},
+
+ _shareNote: function(shareIndex) {
+ var share = this.get('shares')[shareIndex];
+ if(!_.isObject(share)) {
+ throw "Unknown Share";
+ }
+ return share.note;
+ },
+
/**
* @return {int}
*/