aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/mod_cloud.js
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-12-02 17:32:19 -0800
committerzotlabs <mike@macgirvin.com>2017-12-02 17:32:19 -0800
commitd5763ba476290fca6083c7b415a4ae4d177919cf (patch)
tree90ab2e185423eccf806a3cc830fe797c52d5c8a6 /view/js/mod_cloud.js
parent8a8689c19139f075145001b46a15dea56ff21c77 (diff)
parentdd2c4c37ff03eef6470ef0364217b2c6208c38c0 (diff)
downloadvolse-hubzilla-d5763ba476290fca6083c7b415a4ae4d177919cf.tar.gz
volse-hubzilla-d5763ba476290fca6083c7b415a4ae4d177919cf.tar.bz2
volse-hubzilla-d5763ba476290fca6083c7b415a4ae4d177919cf.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'view/js/mod_cloud.js')
-rw-r--r--view/js/mod_cloud.js23
1 files changed, 22 insertions, 1 deletions
diff --git a/view/js/mod_cloud.js b/view/js/mod_cloud.js
index 9f2a007f3..031895caf 100644
--- a/view/js/mod_cloud.js
+++ b/view/js/mod_cloud.js
@@ -23,12 +23,33 @@ function UploadInit() {
url: 'file_upload',
dataType: 'json',
dropZone: filedrag,
- formData: $('#ajax-upload-files').serializeArray(),
maxChunkSize: 4 * 1024 * 1024,
add: function(e,data) {
$(data.files).each( function() { this.count = ++ count; prepareHtml(this); });
+ var allow_cid = ($('#ajax-upload-files').data('allow_cid') || []);
+ var allow_gid = ($('#ajax-upload-files').data('allow_gid') || []);
+ var deny_cid = ($('#ajax-upload-files').data('deny_cid') || []);
+ var deny_gid = ($('#ajax-upload-files').data('deny_gid') || []);
+
+ $('.acl-field').remove();
+
+ $(allow_gid).each(function(i,v) {
+ $('#ajax-upload-files').append("<input class='acl-field' type='hidden' name='group_allow[]' value='"+v+"'>");
+ });
+ $(allow_cid).each(function(i,v) {
+ $('#ajax-upload-files').append("<input class='acl-field' type='hidden' name='contact_allow[]' value='"+v+"'>");
+ });
+ $(deny_gid).each(function(i,v) {
+ $('#ajax-upload-files').append("<input class='acl-field' type='hidden' name='group_deny[]' value='"+v+"'>");
+ });
+ $(deny_cid).each(function(i,v) {
+ $('#ajax-upload-files').append("<input class='acl-field' type='hidden' name='contact_deny[]' value='"+v+"'>");
+ });
+
+ data.formData = $('#ajax-upload-files').serializeArray();
+
data.submit();
},