diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-06-23 23:56:10 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-10-31 13:43:30 +0100 |
commit | 0f3e6cb50af06bf3a64ea7f1abd360c53fa0bf8c (patch) | |
tree | d605ccd4c63eff5c694ad016db5ca43d965e9e17 /apps/files_external/js | |
parent | c7dc656b2bf956758dbf8979ff6b7597d627b884 (diff) | |
download | nextcloud-server-0f3e6cb50af06bf3a64ea7f1abd360c53fa0bf8c.tar.gz nextcloud-server-0f3e6cb50af06bf3a64ea7f1abd360c53fa0bf8c.zip |
Improved Javascript docs for JSDoc
Added namespaces so that JSDoc can find them.
Fixed a few warnings.
Improved some comments.
Diffstat (limited to 'apps/files_external/js')
-rw-r--r-- | apps/files_external/js/app.js | 6 | ||||
-rw-r--r-- | apps/files_external/js/mountsfilelist.js | 33 |
2 files changed, 36 insertions, 3 deletions
diff --git a/apps/files_external/js/app.js b/apps/files_external/js/app.js index 58ad1a0f6ef..bf853f926dc 100644 --- a/apps/files_external/js/app.js +++ b/apps/files_external/js/app.js @@ -9,8 +9,14 @@ */ if (!OCA.External) { + /** + * @namespace + */ OCA.External = {}; } +/** + * @namespace + */ OCA.External.App = { fileList: null, diff --git a/apps/files_external/js/mountsfilelist.js b/apps/files_external/js/mountsfilelist.js index 20bf0f785db..c45faafd9bf 100644 --- a/apps/files_external/js/mountsfilelist.js +++ b/apps/files_external/js/mountsfilelist.js @@ -10,15 +10,29 @@ (function() { /** - * External storage file list - */ + * @class OCA.External.FileList + * @augments OCA.Files.FileList + * + * @classdesc External storage file list. + * + * Displays a list of mount points visible + * for the current user. + * + * @param $el container element with existing markup for the #controls + * and a table + * @param [options] map of options, see other parameters + **/ var FileList = function($el, options) { this.initialize($el, options); }; - FileList.prototype = _.extend({}, OCA.Files.FileList.prototype, { + FileList.prototype = _.extend({}, OCA.Files.FileList.prototype, + /** @lends OCA.External.FileList.prototype */ { appName: 'External storage', + /** + * @private + */ initialize: function($el, options) { OCA.Files.FileList.prototype.initialize.apply(this, arguments); if (this.initialized) { @@ -26,6 +40,9 @@ } }, + /** + * @param {OCA.External.MountPointInfo} fileData + */ _createRow: function(fileData) { // TODO: hook earlier and render the whole row here var $tr = OCA.Files.FileList.prototype._createRow.apply(this, arguments); @@ -114,5 +131,15 @@ } }); + /** + * Mount point info attributes. + * + * @typedef {Object} OCA.External.MountPointInfo + * + * @property {String} name mount point name + * @property {String} scope mount point scope "personal" or "system" + * @property {String} backend external storage backend name + */ + OCA.External.FileList = FileList; })(); |