diff options
author | dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> | 2019-11-13 12:05:10 +0000 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-12-19 11:55:33 +0100 |
commit | ec01e0a790448fff38364f629a4de4edb5d465bf (patch) | |
tree | 8fb5369e3d6f9f805025802e12feaa4dfaef1e03 /apps/files_versions/src | |
parent | 5d9fd7ba0cced84f1d07627b0860ac5490de164d (diff) | |
download | nextcloud-server-ec01e0a790448fff38364f629a4de4edb5d465bf.tar.gz nextcloud-server-ec01e0a790448fff38364f629a4de4edb5d465bf.zip |
Bump eslint-config-nextcloud from 0.0.6 to 0.1.0
Bumps [eslint-config-nextcloud](https://github.com/nextcloud/eslint-config-nextcloud) from 0.0.6 to 0.1.0.
- [Release notes](https://github.com/nextcloud/eslint-config-nextcloud/releases)
- [Commits](https://github.com/nextcloud/eslint-config-nextcloud/compare/v0.0.6...v0.1.0)
Co-authored-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_versions/src')
-rw-r--r-- | apps/files_versions/src/filesplugin.js | 2 | ||||
-rw-r--r-- | apps/files_versions/src/versioncollection.js | 16 | ||||
-rw-r--r-- | apps/files_versions/src/versionmodel.js | 16 | ||||
-rw-r--r-- | apps/files_versions/src/versionstabview.js | 39 |
4 files changed, 36 insertions, 37 deletions
diff --git a/apps/files_versions/src/filesplugin.js b/apps/files_versions/src/filesplugin.js index e47003d6611..845e70a5425 100644 --- a/apps/files_versions/src/filesplugin.js +++ b/apps/files_versions/src/filesplugin.js @@ -26,7 +26,7 @@ } fileList.registerTabView(new OCA.Versions.VersionsTabView('versionsTabView', { order: -10 })) - } + }, } })() diff --git a/apps/files_versions/src/versioncollection.js b/apps/files_versions/src/versioncollection.js index 1f3356e43d3..9fdcde88602 100644 --- a/apps/files_versions/src/versioncollection.js +++ b/apps/files_versions/src/versioncollection.js @@ -12,7 +12,7 @@ /** * @memberof OCA.Versions */ - var VersionCollection = OC.Backbone.Collection.extend({ + const VersionCollection = OC.Backbone.Collection.extend({ model: OCA.Versions.VersionModel, sync: OC.Backbone.davSync, @@ -49,7 +49,7 @@ return this._client || new OC.Files.Client({ host: OC.getHost(), root: OC.linkToRemoteBase('dav') + '/versions/' + this.getCurrentUser(), - useHTTPS: OC.getProtocol() === 'https' + useHTTPS: OC.getProtocol() === 'https', }) }, @@ -58,11 +58,11 @@ }, parse: function(result) { - var fullPath = this._fileInfo.getFullPath() - var fileId = this._fileInfo.get('id') - var name = this._fileInfo.get('name') - var user = this.getCurrentUser() - var client = this.getClient() + const fullPath = this._fileInfo.getFullPath() + const fileId = this._fileInfo.get('id') + const name = this._fileInfo.get('name') + const user = this.getCurrentUser() + const client = this.getClient() return _.map(result, function(version) { version.fullPath = fullPath version.fileId = fileId @@ -74,7 +74,7 @@ version.client = client return version }) - } + }, }) OCA.Versions = OCA.Versions || {} diff --git a/apps/files_versions/src/versionmodel.js b/apps/files_versions/src/versionmodel.js index e36e59ac046..9ad4ffd839d 100644 --- a/apps/files_versions/src/versionmodel.js +++ b/apps/files_versions/src/versionmodel.js @@ -12,13 +12,13 @@ /** * @memberof OCA.Versions */ - var VersionModel = OC.Backbone.Model.extend({ + const VersionModel = OC.Backbone.Model.extend({ sync: OC.Backbone.davSync, davProperties: { 'size': '{DAV:}getcontentlength', 'mimetype': '{DAV:}getcontenttype', - 'timestamp': '{DAV:}getlastmodified' + 'timestamp': '{DAV:}getlastmodified', }, /** @@ -29,9 +29,9 @@ */ revert: function(options) { options = options ? _.clone(options) : {} - var model = this + const model = this - var client = this.get('client') + const client = this.get('client') return client.move('/versions/' + this.get('fileId') + '/' + this.get('id'), '/restore/target', true) .done(function() { @@ -53,17 +53,17 @@ }, getPreviewUrl: function() { - var url = OC.generateUrl('/apps/files_versions/preview') - var params = { + const url = OC.generateUrl('/apps/files_versions/preview') + const params = { file: this.get('fullPath'), - version: this.get('id') + version: this.get('id'), } return url + '?' + OC.buildQueryString(params) }, getDownloadUrl: function() { return OC.linkToRemoteBase('dav') + '/versions/' + this.get('user') + '/versions/' + this.get('fileId') + '/' + this.get('id') - } + }, }) OCA.Versions = OCA.Versions || {} diff --git a/apps/files_versions/src/versionstabview.js b/apps/files_versions/src/versionstabview.js index b85cb6b08f5..4617a2861c1 100644 --- a/apps/files_versions/src/versionstabview.js +++ b/apps/files_versions/src/versionstabview.js @@ -15,7 +15,7 @@ import Template from './templates/template.handlebars'; /** * @memberof OCA.Versions */ - var VersionsTabView = OCA.Files.DetailTabView.extend(/** @lends OCA.Versions.VersionsTabView.prototype */{ + const VersionsTabView = OCA.Files.DetailTabView.extend(/** @lends OCA.Versions.VersionsTabView.prototype */{ id: 'versionsTabView', className: 'tab versionsTabView', @@ -24,7 +24,7 @@ import Template from './templates/template.handlebars'; $versionsContainer: null, events: { - 'click .revertVersion': '_onClickRevertVersion' + 'click .revertVersion': '_onClickRevertVersion', }, initialize: function() { @@ -57,18 +57,17 @@ import Template from './templates/template.handlebars'; }, _onClickRevertVersion: function(ev) { - var self = this - var $target = $(ev.target) - var fileInfoModel = this.collection.getFileInfo() - var revision + const self = this + let $target = $(ev.target) + const fileInfoModel = this.collection.getFileInfo() if (!$target.is('li')) { $target = $target.closest('li') } ev.preventDefault() - revision = $target.attr('data-revision') + const revision = $target.attr('data-revision') - var versionModel = this.collection.get(revision) + const versionModel = this.collection.get(revision) versionModel.revert({ success: function() { // reset and re-fetch the updated collection @@ -85,7 +84,7 @@ import Template from './templates/template.handlebars'; size: versionModel.get('size'), mtime: versionModel.get('timestamp') * 1000, // temp dummy, until we can do a PROPFIND - etag: versionModel.get('id') + versionModel.get('timestamp') + etag: versionModel.get('id') + versionModel.get('timestamp'), }) }, @@ -96,13 +95,13 @@ import Template from './templates/template.handlebars'; OC.Notification.show(t('files_version', 'Failed to revert {file} to revision {timestamp}.', { file: versionModel.getFullPath(), - timestamp: OC.Util.formatDate(versionModel.get('timestamp') * 1000) + timestamp: OC.Util.formatDate(versionModel.get('timestamp') * 1000), }), { - type: 'error' + type: 'error', } ) - } + }, }) // spinner @@ -125,7 +124,7 @@ import Template from './templates/template.handlebars'; }, _onAddModel: function(model) { - var $el = $(this.itemTemplate(this._formatItem(model))) + const $el = $(this.itemTemplate(this._formatItem(model))) this.$versionsContainer.append($el) $el.find('.has-tooltip').tooltip() }, @@ -151,10 +150,10 @@ import Template from './templates/template.handlebars'; }, _formatItem: function(version) { - var timestamp = version.get('timestamp') * 1000 - var size = version.has('size') ? version.get('size') : 0 - var preview = OC.MimeType.getIconUrl(version.get('mimetype')) - var img = new Image() + const timestamp = version.get('timestamp') * 1000 + const size = version.has('size') ? version.get('size') : 0 + const preview = OC.MimeType.getIconUrl(version.get('mimetype')) + const img = new Image() img.onload = function() { $('li[data-revision=' + version.get('id') + '] .preview').attr('src', version.getPreviewUrl()) } @@ -174,7 +173,7 @@ import Template from './templates/template.handlebars'; revertIconUrl: OC.imagePath('core', 'actions/history'), previewUrl: preview, revertLabel: t('files_versions', 'Restore'), - canRevert: (this.collection.getFileInfo().get('permissions') & OC.PERMISSION_UPDATE) !== 0 + canRevert: (this.collection.getFileInfo().get('permissions') & OC.PERMISSION_UPDATE) !== 0, }, version.attributes) }, @@ -183,7 +182,7 @@ import Template from './templates/template.handlebars'; */ render: function() { this.$el.html(this.template({ - emptyResultLabel: t('files_versions', 'No other versions available') + emptyResultLabel: t('files_versions', 'No other versions available'), })) this.$el.find('.has-tooltip').tooltip() this.$versionsContainer = this.$el.find('ul.versions') @@ -200,7 +199,7 @@ import Template from './templates/template.handlebars'; return false } return !fileInfo.isDirectory() - } + }, }) OCA.Versions = OCA.Versions || {} |