summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-06-23 23:56:10 +0200
committerVincent Petry <pvince81@owncloud.com>2014-10-31 13:43:30 +0100
commit0f3e6cb50af06bf3a64ea7f1abd360c53fa0bf8c (patch)
treed605ccd4c63eff5c694ad016db5ca43d965e9e17 /apps/files_trashbin/js
parentc7dc656b2bf956758dbf8979ff6b7597d627b884 (diff)
downloadnextcloud-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_trashbin/js')
-rw-r--r--apps/files_trashbin/js/app.js6
-rw-r--r--apps/files_trashbin/js/filelist.js19
2 files changed, 22 insertions, 3 deletions
diff --git a/apps/files_trashbin/js/app.js b/apps/files_trashbin/js/app.js
index 376ee7b01ca..a9727542bad 100644
--- a/apps/files_trashbin/js/app.js
+++ b/apps/files_trashbin/js/app.js
@@ -8,7 +8,13 @@
*
*/
+/**
+ * @namespace OCA.Trashbin
+ */
OCA.Trashbin = {};
+/**
+ * @namespace OCA.Trashbin.App
+ */
OCA.Trashbin.App = {
_initialized: false,
diff --git a/apps/files_trashbin/js/filelist.js b/apps/files_trashbin/js/filelist.js
index b8688d89765..a3631a2d0fe 100644
--- a/apps/files_trashbin/js/filelist.js
+++ b/apps/files_trashbin/js/filelist.js
@@ -14,8 +14,8 @@
* Convert a file name in the format filename.d12345 to the real file name.
* This will use basename.
* The name will not be changed if it has no ".d12345" suffix.
- * @param name file name
- * @return converted file name
+ * @param {String} name file name
+ * @return {String} converted file name
*/
function getDeletedFileName(name) {
name = OC.basename(name);
@@ -26,13 +26,26 @@
return name;
}
+ /**
+ * @class OCA.Trashbin.FileList
+ * @augments OCA.Files.FileList
+ * @classdesc List of deleted files
+ *
+ * @param $el container element with existing markup for the #controls
+ * and a table
+ * @param [options] map of options
+ */
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.Trashbin.FileList.prototype */ {
id: 'trashbin',
appName: t('files_trashbin', 'Deleted files'),
+ /**
+ * @private
+ */
initialize: function() {
var result = OCA.Files.FileList.prototype.initialize.apply(this, arguments);
this.$el.find('.undelete').click('click', _.bind(this._onClickRestoreSelected, this));