summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2016-12-23 15:38:48 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2016-12-23 15:38:48 +0100
commitcfada468e6a0b277b6c80ddd7f5ebfdad78326f6 (patch)
tree6ee3218cf2726a3126c85ec9aec273a139e3547e
parent450373fd18de1d0478737e923dfe0bc6f0470d99 (diff)
downloadnextcloud-server-cfada468e6a0b277b6c80ddd7f5ebfdad78326f6.tar.gz
nextcloud-server-cfada468e6a0b277b6c80ddd7f5ebfdad78326f6.zip
OC.Uploader does not have a 'state' method, therefore the
dead code can be removed Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--apps/files/js/file-upload.js31
1 files changed, 0 insertions, 31 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 25136d042a9..2f2748f5ead 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -158,15 +158,6 @@ OC.FileUpload.prototype = {
this._conflictMode = mode;
},
- /**
- * Returns whether the upload is in progress
- *
- * @return {boolean}
- */
- isPending: function() {
- return this.data.state() === 'pending';
- },
-
deleteUpload: function() {
delete this.data.jqXHR;
},
@@ -561,21 +552,6 @@ OC.Uploader.prototype = _.extend({
OC.Notification.showTemporary(t('files', 'Upload cancelled.'), {timeout: 10});
}, 500),
/**
- * Checks the currently known uploads.
- * returns true if any hxr has the state 'pending'
- * @returns {boolean}
- */
- isProcessing:function() {
- var count = 0;
-
- jQuery.each(this._uploads, function(i, upload) {
- if (upload.isPending()) {
- count++;
- }
- });
- return count > 0;
- },
- /**
* callback for the conflicts dialog
*/
onCancel:function() {
@@ -1168,13 +1144,6 @@ OC.Uploader.prototype = _.extend({
}
}
- // warn user not to leave the page while upload is in progress
- $(window).on('beforeunload', function(e) {
- if (self.isProcessing()) {
- return t('files', 'File upload is in progress. Leaving the page now will cancel the upload.');
- }
- });
-
//add multiply file upload attribute to all browsers except konqueror (which crashes when it's used)
if (navigator.userAgent.search(/konqueror/i) === -1) {
this.$uploadEl.attr('multiple', 'multiple');