Fix confusion when connector checkboxes are disabled for private posts
- Saves connector checkbox state when disabling them - Restores connector checkbox state when reenabling them
This commit is contained in:
parent
898f7e7e38
commit
f17a6007e5
1 changed files with 47 additions and 36 deletions
|
@ -231,24 +231,35 @@ ACL.prototype.update_view = function(){
|
||||||
/* jot acl */
|
/* jot acl */
|
||||||
$('#jot-perms-icon').removeClass('lock').addClass('unlock');
|
$('#jot-perms-icon').removeClass('lock').addClass('unlock');
|
||||||
$('#jot-public').show();
|
$('#jot-public').show();
|
||||||
|
$('.profile-jot-net input[type=checkbox]').each(function() {
|
||||||
|
// Restores checkbox state if it had been saved
|
||||||
|
if ($(this).attr('data-checked') !== undefined) {
|
||||||
|
$(this).prop('checked', $(this).attr('data-checked') === 'true');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$('.profile-jot-net input').attr('disabled', false);
|
$('.profile-jot-net input').attr('disabled', false);
|
||||||
if (typeof editor != 'undefined' && editor != false) {
|
if (typeof editor != 'undefined' && editor != false) {
|
||||||
$('#profile-jot-desc').html(ispublic);
|
$('#profile-jot-desc').html(ispublic);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.showall.removeClass("selected");
|
this.showall.removeClass("selected");
|
||||||
/* jot acl */
|
/* jot acl */
|
||||||
$('#jot-perms-icon').removeClass('unlock').addClass('lock');
|
$('#jot-perms-icon').removeClass('unlock').addClass('lock');
|
||||||
$('#jot-public').hide();
|
$('#jot-public').hide();
|
||||||
|
$('.profile-jot-net input[type=checkbox]').each(function() {
|
||||||
|
// Saves current checkbox state
|
||||||
|
$(this)
|
||||||
|
.attr('data-checked', $(this).prop('checked'))
|
||||||
|
.prop('checked', false);
|
||||||
|
});
|
||||||
$('.profile-jot-net input').attr('disabled', 'disabled');
|
$('.profile-jot-net input').attr('disabled', 'disabled');
|
||||||
$('#profile-jot-desc').html(' ');
|
$('#profile-jot-desc').html(' ');
|
||||||
}
|
}
|
||||||
$("#acl-list-content .acl-list-item").each(function(){
|
|
||||||
$(this).removeClass("groupshow grouphide");
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#acl-list-content .acl-list-item").each(function (index, element) {
|
$("#acl-list-content .acl-list-item").each(function (index, element) {
|
||||||
|
$(this).removeClass("groupshow grouphide");
|
||||||
|
|
||||||
itemid = $(element).attr('id');
|
itemid = $(element).attr('id');
|
||||||
type = itemid[0];
|
type = itemid[0];
|
||||||
id = parseInt(itemid.substr(1));
|
id = parseInt(itemid.substr(1));
|
||||||
|
@ -297,7 +308,7 @@ ACL.prototype.update_view = function(){
|
||||||
|
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
ACL.prototype.get = function(start,count, search){
|
ACL.prototype.get = function(start,count, search){
|
||||||
var postdata = {
|
var postdata = {
|
||||||
|
|
Loading…
Reference in a new issue