aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-09-13 17:00:07 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-09-13 17:07:52 +0200
commit7854cf04eec68da83655a819f081d2f2e12f607b (patch)
tree2b4594179f17c534989e043b4c54ff655842249a /apps/files/js
parentd5ddbfb04562ba69a94d05413b931a4b378f0220 (diff)
downloadnextcloud-server-7854cf04eec68da83655a819f081d2f2e12f607b.tar.gz
nextcloud-server-7854cf04eec68da83655a819f081d2f2e12f607b.zip
refactor upload js & html to always use only js to fill form data
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/file-upload.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 970aad1f978..aeb2da90d5f 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -46,6 +46,15 @@ $(document).ready(function() {
$('#uploadprogresswrapper input.stop').show();
}
},
+ submit: function(e, data) {
+ if ( ! data.formData ) {
+ // noone set update parameters, we set the minimum
+ data.formData = {
+ requesttoken: oc_requesttoken,
+ dir: $('#dir').val()
+ };
+ }
+ },
/**
* called after the first add, does NOT have the data param
* @param e
@@ -141,15 +150,8 @@ $(document).ready(function() {
$('#uploadprogressbar').fadeOut();
}
};
- var file_upload_handler = function() {
- $('#file_upload_start').fileupload(file_upload_param);
- };
-
-
-
- if ( document.getElementById('data-upload-form') ) {
- $(file_upload_handler);
- }
+ $('#file_upload_start').fileupload(file_upload_param);
+
$.assocArraySize = function(obj) {
// http://stackoverflow.com/a/6700/11236
var size = 0, key;