aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/acl.js
diff options
context:
space:
mode:
Diffstat (limited to 'view/js/acl.js')
-rw-r--r--view/js/acl.js24
1 files changed, 11 insertions, 13 deletions
diff --git a/view/js/acl.js b/view/js/acl.js
index eb7b7f523..c11997c43 100644
--- a/view/js/acl.js
+++ b/view/js/acl.js
@@ -68,7 +68,7 @@ function ACL(backend_url) {
}
-ACL.prototype.get_form_data = function(event) {
+ACL.prototype.get_form_data = function(event) {
form_id = $(this).data('form_id');
that.form_id = $('#' + form_id);
@@ -100,13 +100,6 @@ ACL.prototype.on_submit = function() {
$(that.deny_cid).each(function(i,v) {
that.form_id.append("<input class='acl-field' type='hidden' name='contact_deny[]' value='"+v+"'>");
});
-
- var formfields = $('.profile-jot-net input').serializeArray();
-
- $.each(formfields, function(i, field) {
- that.form_id.append("<input class='acl-field' type='hidden' name='"+field.name+"' value='"+field.value+"'>");
- });
-
};
ACL.prototype.search = function() {
@@ -282,7 +275,8 @@ ACL.prototype.update_view = function(value) {
that.update_select('public');
/* jot acl */
- $('#jot-perms-icon, #dialog-perms-icon').removeClass('fa-lock').addClass('fa-unlock');
+ $('#jot-perms-icon, #dialog-perms-icon, #' + that.form_id[0].id + ' .jot-perms-icon').removeClass('fa-lock').addClass('fa-unlock');
+ $('#dbtn-jotnets').show();
$('.profile-jot-net input').attr('disabled', false);
}
@@ -294,7 +288,8 @@ ACL.prototype.update_view = function(value) {
that.update_select(that.selected_id);
/* jot acl */
- $('#jot-perms-icon, #dialog-perms-icon').removeClass('fa-unlock').addClass('fa-lock');
+ $('#jot-perms-icon, #dialog-perms-icon, #' + that.form_id[0].id + ' .jot-perms-icon').removeClass('fa-unlock').addClass('fa-lock');
+ $('#dbtn-jotnets').hide();
$('.profile-jot-net input').attr('disabled', 'disabled');
}
@@ -305,7 +300,8 @@ ACL.prototype.update_view = function(value) {
that.update_select('onlyme');
/* jot acl */
- $('#jot-perms-icon, #dialog-perms-icon').removeClass('fa-unlock').addClass('fa-lock');
+ $('#jot-perms-icon, #dialog-perms-icon, #' + that.form_id[0].id + ' .jot-perms-icon').removeClass('fa-unlock').addClass('fa-lock');
+ $('#dbtn-jotnets').hide();
$('.profile-jot-net input').attr('disabled', 'disabled');
}
@@ -316,11 +312,13 @@ ACL.prototype.update_view = function(value) {
/* jot acl */
if(that.allow_gid.length === 0 && that.allow_cid.length === 0 && that.deny_gid.length === 0 && that.deny_cid.length === 0 && value === 'custom') {
- $('#jot-perms-icon, #dialog-perms-icon').removeClass('fa-lock').addClass('fa-unlock');
+ $('#jot-perms-icon, #dialog-perms-icon, #' + that.form_id[0].id + ' .jot-perms-icon').removeClass('fa-lock').addClass('fa-unlock');
+ $('#dbtn-jotnets').show();
$('.profile-jot-net input').attr('disabled', false);
}
else {
- $('#jot-perms-icon, #dialog-perms-icon').removeClass('fa-unlock').addClass('fa-lock');
+ $('#jot-perms-icon, #dialog-perms-icon, #' + that.form_id[0].id + ' .jot-perms-icon').removeClass('fa-unlock').addClass('fa-lock');
+ $('#dbtn-jotnets').hide();
$('.profile-jot-net input').attr('disabled', 'disabled');
}
}