]> source.dussan.org Git - nextcloud-server.git/commitdiff
canceling individual uploads is currently impossible because there is no placeholder
authorJörn Friedrich Dreyer <jfd@butonic.de>
Fri, 20 Sep 2013 12:58:52 +0000 (14:58 +0200)
committerMorris Jobke <morris.jobke@gmail.com>
Mon, 7 Oct 2013 09:14:11 +0000 (11:14 +0200)
apps/files/js/file-upload.js
apps/files/js/fileactions.js

index b52221ac1fc1953f234a62823c5cd54cffbab055..f1ef485fc3d77eb99ea6e4a703daf9ba54f2bb00 100644 (file)
@@ -41,26 +41,6 @@ function supportAjaxUploadWithProgress() {
  */
 OC.Upload = {
        _uploads: [],
-       /**
-        * cancels a single upload, 
-        * @deprecated because it was only used when a file currently beeing uploaded was deleted. Now they are added after
-        * they have been uploaded.
-        * @param {string} dir
-        * @param {string} filename
-        * @returns {unresolved}
-        */
-       cancelUpload:function(dir, filename) {
-               var self = this;
-               var deleted = false;
-               //FIXME _selections
-               jQuery.each(this._uploads, function(i, jqXHR) {
-                       if (selection.dir === dir && selection.uploads[filename]) {
-                               deleted = self.deleteSelectionUpload(selection, filename);
-                               return false; // end searching through selections
-                       }
-               });
-               return deleted;
-       },
        /**
         * deletes the jqHXR object from a data selection
         * @param {object} data
index 67d3d5ead8d87b935e99f379a005ae8a105abb57..e14e52eb6ca990d3fc2d0880b90b0d26361c7ab2 100644 (file)
@@ -177,20 +177,7 @@ $(document).ready(function () {
 FileActions.register('all', 'Delete', OC.PERMISSION_DELETE, function () {
        return OC.imagePath('core', 'actions/delete');
 }, function (filename) {
-       if (OC.Upload.cancelUpload($('#dir').val(), filename)) {
-               if (filename.substr) {
-                       filename = [filename];
-               }
-               $.each(filename, function (index, file) {
-                       var filename = $('tr').filterAttr('data-file', file);
-                       filename.hide();
-                       filename.find('input[type="checkbox"]').removeAttr('checked');
-                       filename.removeClass('selected');
-               });
-               procesSelection();
-       } else {
-               FileList.do_delete(filename);
-       }
+       FileList.do_delete(filename);
        $('.tipsy').remove();
 });