summaryrefslogtreecommitdiffstats
path: root/apps/comments/src/commentsummarymodel.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/comments/src/commentsummarymodel.js')
-rw-r--r--apps/comments/src/commentsummarymodel.js60
1 files changed, 31 insertions, 29 deletions
diff --git a/apps/comments/src/commentsummarymodel.js b/apps/comments/src/commentsummarymodel.js
index ffabbc30fb4..1a3002a9f78 100644
--- a/apps/comments/src/commentsummarymodel.js
+++ b/apps/comments/src/commentsummarymodel.js
@@ -12,7 +12,7 @@
_.extend(OC.Files.Client, {
PROPERTY_READMARKER: '{' + OC.Files.Client.NS_OWNCLOUD + '}readMarker'
- });
+ })
/**
* @class OCA.Comments.CommentSummaryModel
@@ -24,45 +24,47 @@
*/
var CommentSummaryModel = OC.Backbone.Model.extend(
/** @lends OCA.Comments.CommentSummaryModel.prototype */ {
- sync: OC.Backbone.davSync,
+ sync: OC.Backbone.davSync,
- /**
+ /**
* Object type
*
* @type string
*/
- _objectType: 'files',
+ _objectType: 'files',
- /**
+ /**
* Object id
*
* @type string
*/
- _objectId: null,
+ _objectId: null,
- davProperties: {
- 'readMarker': OC.Files.Client.PROPERTY_READMARKER
- },
+ davProperties: {
+ 'readMarker': OC.Files.Client.PROPERTY_READMARKER
+ },
- /**
- * Initializes the summary model
- *
- * @param {string} [options.objectType] object type
- * @param {string} [options.objectId] object id
- */
- initialize: function(attrs, options) {
- options = options || {};
- if (options.objectType) {
- this._objectType = options.objectType;
- }
- },
+ /**
+ * Initializes the summary model
+ *
+ * @param {any} [attrs] ignored
+ * @param {Object} [options] destructuring object
+ * @param {string} [options.objectType] object type
+ * @param {string} [options.objectId] object id
+ */
+ initialize: function(attrs, options) {
+ options = options || {}
+ if (options.objectType) {
+ this._objectType = options.objectType
+ }
+ },
- url: function() {
- return OC.linkToRemote('dav') + '/comments/' +
- encodeURIComponent(this._objectType) + '/' +
- encodeURIComponent(this.id) + '/';
- }
- });
+ url: function() {
+ return OC.linkToRemote('dav') + '/comments/'
+ + encodeURIComponent(this._objectType) + '/'
+ + encodeURIComponent(this.id) + '/'
+ }
+ })
- OCA.Comments.CommentSummaryModel = CommentSummaryModel;
-})(OC, OCA);
+ OCA.Comments.CommentSummaryModel = CommentSummaryModel
+})(OC, OCA)