From 7e5428c69703e16f011e362a9865fe50d4841ddb Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 4 Aug 2016 21:26:30 +0200 Subject: multi acl: provide a acl-form-trigger class which comes handy in certain situations --- view/js/acl.js | 9 +++++---- view/tpl/photo_view.tpl | 2 +- view/tpl/photos_recent.tpl | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/view/js/acl.js b/view/js/acl.js index 175462250..9b08571ae 100644 --- a/view/js/acl.js +++ b/view/js/acl.js @@ -48,6 +48,7 @@ function ACL(backend_url) { $(document).on('focus', '.acl-form', that.get_form_data); $(document).on('click', '.acl-form', that.get_form_data); + $(document).on('click', '.acl-form-trigger', that.get_form_data); $(document).on('click','.acl-button-show',that.on_button_show); $(document).on('click','.acl-button-hide',that.on_button_hide); @@ -71,10 +72,10 @@ ACL.prototype.get_form_data = function(event) { console.log(form_id); - that.allow_cid = ($(this).data('allow_cid') || []); - that.allow_gid = ($(this).data('allow_gid') || []); - that.deny_cid = ($(this).data('deny_cid') || []); - that.deny_gid = ($(this).data('deny_gid') || []); + that.allow_cid = (that.form_id.data('allow_cid') || []); + that.allow_gid = (that.form_id.data('allow_gid') || []); + that.deny_cid = (that.form_id.data('deny_cid') || []); + that.deny_gid = (that.form_id.data('deny_gid') || []); that.update_view(); that.on_submit(); diff --git a/view/tpl/photo_view.tpl b/view/tpl/photo_view.tpl index f81572b8c..ec827d990 100755 --- a/view/tpl/photo_view.tpl +++ b/view/tpl/photo_view.tpl @@ -23,7 +23,7 @@ {{/if}} {{if $edit}} {{/if}} diff --git a/view/tpl/photos_recent.tpl b/view/tpl/photos_recent.tpl index 139f27a23..4cb1bc306 100755 --- a/view/tpl/photos_recent.tpl +++ b/view/tpl/photos_recent.tpl @@ -2,7 +2,7 @@
{{if $can_post}} - + {{/if}} -- cgit v1.2.3