aboutsummaryrefslogtreecommitdiffstats
path: root/js/acl.js
diff options
context:
space:
mode:
authorOlivier Migeot <olivier+github@migeot.org>2013-11-27 12:30:01 +0100
committerOlivier Migeot <olivier+github@migeot.org>2013-11-27 12:30:01 +0100
commit11983c12429021565f2400f893d85b5d4c6f9779 (patch)
tree8fd0ceded8d8879b469cab6a1751e7dd7499ed44 /js/acl.js
parente3f5c4458bc637ca304b807d2125f332965e4126 (diff)
downloadvolse-hubzilla-11983c12429021565f2400f893d85b5d4c6f9779.tar.gz
volse-hubzilla-11983c12429021565f2400f893d85b5d4c6f9779.tar.bz2
volse-hubzilla-11983c12429021565f2400f893d85b5d4c6f9779.zip
Quick hack to allow themes/modules to use different CSS classes for the ACL selector's icon (e.g. icon-lock/icon-unlock instead of lock/unlock). Unless a theme supports it, they'll stay at their former values. Dunno if it's the best way to achieve this, though.
Diffstat (limited to 'js/acl.js')
-rw-r--r--js/acl.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/js/acl.js b/js/acl.js
index 591c9c467..906b28354 100644
--- a/js/acl.js
+++ b/js/acl.js
@@ -152,11 +152,23 @@ ACL.prototype.set_deny = function(itemid){
}
ACL.prototype.update_view = function(){
+ var jotpermslock;
+ var jotpermsunlock;
+ if (document.jotpermslock == null) {
+ jotpermslock = 'lock';
+ } else {
+ jotpermslock = document.jotpermslock;
+ }
+ if (document.jotpermsunlock == null) {
+ jotpermsunlock = 'unlock';
+ } else {
+ jotpermsunlock = document.jotpermsunlock;
+ }
if (that.allow_gid.length==0 && that.allow_cid.length==0 &&
that.deny_gid.length==0 && that.deny_cid.length==0){
that.showall.addClass("selected");
/* jot acl */
- $('#jot-perms-icon').removeClass('lock').addClass('unlock');
+ $('#jot-perms-icon').removeClass(jotpermslock).addClass(jotpermsunlock);
$('#jot-public').show();
$('.profile-jot-net input').attr('disabled', false);
if(typeof editor != 'undefined' && editor != false) {
@@ -166,7 +178,7 @@ ACL.prototype.update_view = function(){
} else {
that.showall.removeClass("selected");
/* jot acl */
- $('#jot-perms-icon').removeClass('unlock').addClass('lock');
+ $('#jot-perms-icon').removeClass(jotpermsunlock).addClass(jotpermslock);
$('#jot-public').hide();
$('.profile-jot-net input').attr('disabled', 'disabled');
$('#profile-jot-desc').html('&nbsp;');