From 7f886541473fb73591a8930e322250cdc6496bfc Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Sun, 3 Feb 2019 19:56:44 +0100 Subject: Move of files_versions to webpack * Move CSS into bundle * Old merged.json no longer needed! * No need to load the style still Signed-off-by: Roeland Jago Douma --- apps/files_versions/js/versionmodel.js | 72 ---------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 apps/files_versions/js/versionmodel.js (limited to 'apps/files_versions/js/versionmodel.js') diff --git a/apps/files_versions/js/versionmodel.js b/apps/files_versions/js/versionmodel.js deleted file mode 100644 index 15469927475..00000000000 --- a/apps/files_versions/js/versionmodel.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2015 - * - * This file is licensed under the Affero General Public License version 3 - * or later. - * - * See the COPYING-README file. - * - */ - -/* global moment */ - -(function () { - /** - * @memberof OCA.Versions - */ - var VersionModel = OC.Backbone.Model.extend({ - sync: OC.Backbone.davSync, - - davProperties: { - 'size': '{DAV:}getcontentlength', - 'mimetype': '{DAV:}getcontenttype', - 'timestamp': '{DAV:}getlastmodified', - }, - - /** - * Restores the original file to this revision - */ - revert: function (options) { - options = options ? _.clone(options) : {}; - var model = this; - - var client = this.get('client'); - - return client.move('/versions/' + this.get('fileId') + '/' + this.get('id'), '/restore/target', true) - .done(function () { - if (options.success) { - options.success.call(options.context, model, {}, options); - } - model.trigger('revert', model, options); - }) - .fail(function () { - if (options.error) { - options.error.call(options.context, model, {}, options); - } - model.trigger('error', model, {}, options); - }); - }, - - getFullPath: function () { - return this.get('fullPath'); - }, - - getPreviewUrl: function () { - var url = OC.generateUrl('/apps/files_versions/preview'); - var params = { - file: this.get('fullPath'), - version: this.get('timestamp') - }; - 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 || {}; - - OCA.Versions.VersionModel = VersionModel; -})(); - -- cgit v1.2.3