replace lock icon with icon-{lock, unlock}

This commit is contained in:
marijus 2014-04-09 17:10:07 +02:00
parent c4233232b7
commit 74bd772a5b
11 changed files with 19 additions and 37 deletions

View File

@ -30,10 +30,6 @@
margin-top: 10px; margin-top: 10px;
} }
#jot-perms-icon {
margin: 1px;
}
#profile-jot-perms-end { #profile-jot-perms-end {
height: 30px; height: 30px;
} }

View File

@ -162,23 +162,11 @@ ACL.prototype.set_deny = function(itemid){
} }
ACL.prototype.update_view = function(){ 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 && if (that.allow_gid.length==0 && that.allow_cid.length==0 &&
that.deny_gid.length==0 && that.deny_cid.length==0){ that.deny_gid.length==0 && that.deny_cid.length==0){
that.showall.addClass("selected"); that.showall.addClass("selected");
/* jot acl */ /* jot acl */
$('#jot-perms-icon').removeClass(jotpermslock).addClass(jotpermsunlock); $('#jot-perms-icon').removeClass('icon-lock').addClass('icon-unlock');
$('#jot-public').show(); $('#jot-public').show();
$('.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) {
@ -188,7 +176,7 @@ ACL.prototype.update_view = function(){
} else { } else {
that.showall.removeClass("selected"); that.showall.removeClass("selected");
/* jot acl */ /* jot acl */
$('#jot-perms-icon').removeClass(jotpermsunlock).addClass(jotpermslock); $('#jot-perms-icon').removeClass('icon-unlock').addClass('icon-lock');
$('#jot-public').hide(); $('#jot-public').hide();
$('.profile-jot-net input').attr('disabled', 'disabled'); $('.profile-jot-net input').attr('disabled', 'disabled');
$('#profile-jot-desc').html(' '); $('#profile-jot-desc').html(' ');

View File

@ -4,11 +4,11 @@ $(document).ready(function() {
var selstr; var selstr;
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
selstr = $(this).text(); selstr = $(this).text();
$('#jot-perms-icon').removeClass('unlock').addClass('lock'); $('#jot-perms-icon').removeClass('icon-unlock').addClass('icon-lock');
$('#jot-public').hide(); $('#jot-public').hide();
}); });
if(selstr == null) { if(selstr == null) {
$('#jot-perms-icon').removeClass('lock').addClass('unlock'); $('#jot-perms-icon').removeClass('icon-lock').addClass('icon-unlock');
$('#jot-public').show(); $('#jot-public').show();
} }

View File

@ -4,11 +4,11 @@ $(document).ready(function() {
var selstr; var selstr;
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
selstr = $(this).text(); selstr = $(this).text();
$('#jot-perms-icon').removeClass('unlock').addClass('lock'); $('#jot-perms-icon').removeClass('icon-unlock').addClass('icon-lock');
$('#jot-public').hide(); $('#jot-public').hide();
}); });
if(selstr == null) { if(selstr == null) {
$('#jot-perms-icon').removeClass('lock').addClass('unlock'); $('#jot-perms-icon').removeClass('icon-lock').addClass('icon-unlock');
$('#jot-public').show(); $('#jot-public').show();
} }

View File

@ -10,11 +10,11 @@ $(document).ready(function() {
var selstr; var selstr;
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
selstr = $(this).text(); selstr = $(this).text();
$('#jot-perms-icon').removeClass('unlock').addClass('lock'); $('#jot-perms-icon').removeClass('icon-unlock').addClass('icon-lock');
$('#jot-public').hide(); $('#jot-public').hide();
}); });
if(selstr == null) { if(selstr == null) {
$('#jot-perms-icon').removeClass('lock').addClass('unlock'); $('#jot-perms-icon').removeClass('icon-lock').addClass('icon-unlock');
$('#jot-public').show(); $('#jot-public').show();
} }

View File

@ -17,11 +17,11 @@ $(document).ready(function() {
var selstr; var selstr;
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
selstr = $(this).text(); selstr = $(this).text();
$('#jot-perms-icon').removeClass('unlock').addClass('lock'); $('#jot-perms-icon').removeClass('icon-unlock').addClass('icon-lock');
$('#jot-public').hide(); $('#jot-public').hide();
}); });
if(selstr == null) { if(selstr == null) {
$('#jot-perms-icon').removeClass('lock').addClass('unlock'); $('#jot-perms-icon').removeClass('icon-lock').addClass('icon-unlock');
$('#jot-public').show(); $('#jot-public').show();
} }

View File

@ -12,11 +12,11 @@ $(document).ready(function() {
var selstr; var selstr;
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
selstr = $(this).text(); selstr = $(this).text();
$('#jot-perms-icon').removeClass('unlock').addClass('lock'); $('#jot-perms-icon').removeClass('icon-unlock').addClass('icon-lock');
$('#jot-public').hide(); $('#jot-public').hide();
}); });
if(selstr == null) { if(selstr == null) {
$('#jot-perms-icon').removeClass('lock').addClass('unlock'); $('#jot-perms-icon').removeClass('icon-lock').addClass('icon-unlock');
$('#jot-public').show(); $('#jot-public').show();
} }

View File

@ -1896,6 +1896,7 @@ img.mail-list-sender-photo {
color: #777; color: #777;
} }
#jot-perms-icon,
.jot-icons { .jot-icons {
color: $toolicon_colour; color: $toolicon_colour;
} }

View File

@ -70,14 +70,12 @@
</button> </button>
{{/if}} {{/if}}
</div> </div>
<div id="profile-rotator-wrapper" style="display: {{$visitor}};" > <div id="profile-rotator-wrapper">
<div id="profile-rotator"></div> <div id="profile-rotator"></div>
</div> </div>
<div id="profile-jot-submit-right" class="btn-group pull-right"> <div id="profile-jot-submit-right" class="btn-group pull-right">
{{if $showacl}} {{if $showacl}}
<div class="btn btn-default btn-sm" id="profile-jot-perms" style="display: {{$pvisit}};" title="{{$permset}}" > <a href="#profile-jot-acl-wrapper" class="btn btn-default btn-sm jot-icons icon-{{$lockstate}}" id="jot-perms-icon" title="{{$permset}}" style="display: {{$pvisit}};"></a>{{$bang}}
<a href="#profile-jot-acl-wrapper" id="jot-perms-icon" class="icon {{$lockstate}}"></a>{{$bang}}
</div>
{{/if}} {{/if}}
{{if $preview}} {{if $preview}}
<button class="btn btn-default btn-sm" onclick="preview_post();return false;" title="{{$preview}}"> <button class="btn btn-default btn-sm" onclick="preview_post();return false;" title="{{$preview}}">
@ -105,7 +103,7 @@
</div> </div>
<!-- Modal for item expiry--> <!-- Modal for item expiry-->
<div class="modal fade" id="expiryModal" tabindex="-1" role="dialog" aria-labelledby="expiryModalLabel" aria-hidden="true"> <div class="modal" id="expiryModal" tabindex="-1" role="dialog" aria-labelledby="expiryModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">

View File

@ -53,7 +53,7 @@
<div id="photo-edit-rotate-end"></div> <div id="photo-edit-rotate-end"></div>
<div id="settings-default-perms" class="settings-default-perms" > <div id="settings-default-perms" class="settings-default-perms" >
<span id="jot-perms-icon" class="icon {{$edit.lockstate}}" ></span> <span id="jot-perms-icon" class="{{$edit.lockstate}}" ></span>
<a href="#profile-jot-acl-wrapper" id="settings-default-perms-menu" >{{$edit.permissions}}</a> <a href="#profile-jot-acl-wrapper" id="settings-default-perms-menu" >{{$edit.permissions}}</a>
<div id="settings-default-perms-menu-end"></div> <div id="settings-default-perms-menu-end"></div>
<div id="settings-default-perms-select" style="display: none; margin-bottom: 20px" > <div id="settings-default-perms-select" style="display: none; margin-bottom: 20px" >

View File

@ -24,9 +24,8 @@
<div id="photos-upload-perms" class="photos-upload-perms" > <div id="photos-upload-perms" class="photos-upload-perms" >
<a href="#photos-upload-permissions-wrapper" id="photos-upload-perms-menu" class="button" /> <span id="jot-perms-icon" class="icon-{{$lockstate}}" ></span>
<span id="jot-perms-icon" class="icon {{$lockstate}}" ></span>{{$permissions}} <a href="#photos-upload-permissions-wrapper" id="photos-upload-perms-menu" class="button" />{{$permissions}}</a>
</a>
</div> </div>
<div id="photos-upload-perms-end"></div> <div id="photos-upload-perms-end"></div>