From 19c93adf846647a61e407e8172ea7153cb7f2c41 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Wed, 20 Jul 2011 11:40:24 +0200 Subject: [PATCH] Use popup ACL selector in photo upload. js_upload use new acl selector. --- addon/js_upload/js_upload.php | 28 +++++++++++++++++++--------- view/photos_upload.tpl | 19 ++++++++++++++----- view/theme/duepuntozero/style.css | 2 +- view/theme/loozah/style.css | 1 + 4 files changed, 35 insertions(+), 15 deletions(-) diff --git a/addon/js_upload/js_upload.php b/addon/js_upload/js_upload.php index 06a907603f..331548f880 100644 --- a/addon/js_upload/js_upload.php +++ b/addon/js_upload/js_upload.php @@ -92,15 +92,25 @@ function createUploader() { debug: true, onSubmit: function(id,filename) { - - uploader.setParams( { - newalbum : document.getElementById('photos-upload-newalbum').value, - album : document.getElementById('photos-upload-album-select').value, - group_allow : getSelected(document.getElementById('group_allow')).join(','), - contact_allow : getSelected(document.getElementById('contact_allow')).join(','), - group_deny : getSelected(document.getElementById('group_deny')).join(','), - contact_deny : getSelected(document.getElementById('contact_deny')).join(',') - }); + if (typeof acl!="undefined"){ + uploader.setParams( { + newalbum : document.getElementById('photos-upload-newalbum').value, + album : document.getElementById('photos-upload-album-select').value, + group_allow : acl.allow_gid.join(','), + contact_allow : acl.allow_cid.join(','), + group_deny : acl.deny_gid.join(','), + contact_deny : acl.deny_cid.join(',') + }); + } else { + uploader.setParams( { + newalbum : document.getElementById('photos-upload-newalbum').value, + album : document.getElementById('photos-upload-album-select').value, + group_allow : getSelected(document.getElementById('group_allow')).join(','), + contact_allow : getSelected(document.getElementById('contact_allow')).join(','), + group_deny : getSelected(document.getElementById('group_deny')).join(','), + contact_deny : getSelected(document.getElementById('contact_deny')).join(',') + }); + } } }); } diff --git a/view/photos_upload.tpl b/view/photos_upload.tpl index 2dbcddefd0..10240b5965 100644 --- a/view/photos_upload.tpl +++ b/view/photos_upload.tpl @@ -14,13 +14,16 @@
-
$permissions
+
+ + $permissions +
-