This commit is contained in:
friendica 2014-04-09 21:13:40 -07:00
commit 8d8d739242
25 changed files with 70 additions and 83 deletions

View File

@ -1133,7 +1133,6 @@ function status_editor($a,$x,$popup=false) {
'$baseurl' => $a->get_baseurl(true),
'$defloc' => $x['default_location'],
'$visitor' => $x['visitor'],
'$pvisit' => (($notes_cid) ? 'none' : $x['visitor']),
'$public' => t('Public post'),
'$jotnets' => $jotnets,
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
@ -1141,16 +1140,16 @@ function status_editor($a,$x,$popup=false) {
'$acl' => $x['acl'],
'$mimeselect' => $mimeselect,
'$layoutselect' => $layoutselect,
'$showacl' => ((array_key_exists('showacl',$x)) ? $x['showacl'] : 'yes'),
'$showacl' => ((array_key_exists('showacl',$x)) ? $x['showacl'] : true),
'$bang' => $x['bang'],
'$profile_uid' => $x['profile_uid'],
'$preview' => $preview,
'$source' => ((x($x,'source')) ? $x['source'] : ''),
'$jotplugins' => $jotplugins,
'$defexpire' => '',
'$feature_expire' => ((feature_enabled($x['profile_uid'],'content_expire') && (! $webpage)) ? 'block' : 'none'),
'$feature_expire' => ((feature_enabled($x['profile_uid'],'content_expire') && (! $webpage)) ? true : false),
'$expires' => t('Set expiration date'),
'$feature_encrypt' => ((feature_enabled($x['profile_uid'],'content_encrypt') && (! $webpage)) ? 'block' : 'none'),
'$feature_encrypt' => ((feature_enabled($x['profile_uid'],'content_encrypt') && (! $webpage)) ? true : false),
'$encrypt' => t('Encrypt text'),
'$cipher' => $cipher,
'$expiryModalOK' => t('OK'),

View File

@ -60,7 +60,8 @@ require_once ('include/conversation.php');
'nickname' => $a->profile['channel_address'],
'lockstate' => (($group || $cid || $channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
'bang' => (($group || $cid) ? '!' : ''),
'visitor' => 'block',
'showacl' => false,
'visitor' => true,
'mimetype' => 'choose',
'ptlabel' => t('Block Name'),
'profile_uid' => intval($owner),

View File

@ -115,7 +115,7 @@ function channel_content(&$a, $update = 0, $load = false) {
'acl' => (($is_owner) ? populate_acl($channel_acl) : ''),
'showacl' => (($is_owner) ? 'yes' : ''),
'bang' => '',
'visitor' => (($is_owner || $observer) ? 'block' : 'none'),
'visitor' => (($is_owner || $observer) ? true : false),
'profile_uid' => $a->profile['profile_uid']
);

View File

@ -57,7 +57,7 @@ function display_content(&$a, $update = 0, $load = false) {
'acl' => populate_acl($channel_acl, false),
'bang' => '',
'visitor' => 'block',
'visitor' => true,
'profile_uid' => local_user(),
'return_path' => 'channel/' . $channel['channel_address']
);

View File

@ -125,8 +125,7 @@ function editblock_content(&$a) {
'$post_id' => $post_id,
'$baseurl' => $a->get_baseurl(),
'$defloc' => $channel['channel_location'],
'$visitor' => 'none',
'$pvisit' => 'none',
'$visitor' => false,
'$public' => t('Public post'),
'$jotnets' => $jotnets,
'$title' => htmlspecialchars($itm[0]['title'],ENT_COMPAT,'UTF-8'),
@ -143,7 +142,7 @@ function editblock_content(&$a) {
'$jotplugins' => $jotplugins,
'$sourceapp' => $itm[0]['app'],
'$defexpire' => '',
'$feature_expire' => 'none',
'$feature_expire' => false,
'$expires' => t('Set expiration date'),
));

View File

@ -119,8 +119,7 @@ function editlayout_content(&$a) {
'$post_id' => $post_id,
'$baseurl' => $a->get_baseurl(),
'$defloc' => $channel['channel_location'],
'$visitor' => 'none',
'$pvisit' => 'none',
'$visitor' => false,
'$public' => t('Public post'),
'$jotnets' => $jotnets,
'$title' => htmlspecialchars($itm[0]['title'],ENT_COMPAT,'UTF-8'),
@ -137,7 +136,7 @@ function editlayout_content(&$a) {
'$jotplugins' => $jotplugins,
'$sourceapp' => t($a->sourcename),
'$defexpire' => '',
'$feature_expire' => 'none',
'$feature_expire' => false,
'$expires' => t('Set expiration date'),
));

View File

@ -125,8 +125,7 @@ function editpost_content(&$a) {
'$post_id' => $post_id,
'$baseurl' => $a->get_baseurl(),
'$defloc' => $channel['channel_location'],
'$visitor' => 'none',
'$pvisit' => 'none',
'$visitor' => false,
'$public' => t('Public post'),
'$jotnets' => $jotnets,
'$title' => htmlspecialchars($itm[0]['title'],ENT_COMPAT,'UTF-8'),
@ -143,9 +142,9 @@ function editpost_content(&$a) {
'$sourceapp' => t($a->sourcename),
'$catsenabled' => $catsenabled,
'$defexpire' => datetime_convert('UTC', date_default_timezone_get(),$itm[0]['expires']),
'$feature_expire' => ((feature_enabled(get_app()->profile['profile_uid'],'content_expire') && (! $webpage)) ? 'block' : 'none'),
'$feature_expire' => ((feature_enabled(get_app()->profile['profile_uid'],'content_expire') && (! $webpage)) ? true : false),
'$expires' => t('Set expiration date'),
'$feature_encrypt' => ((feature_enabled(get_app()->profile['profile_uid'],'content_encrypt') && (! $webpage)) ? 'block' : 'none'),
'$feature_encrypt' => ((feature_enabled(get_app()->profile['profile_uid'],'content_encrypt') && (! $webpage)) ? true : false),
'$encrypt' => t('Encrypt text'),
'$cipher' => $cipher,
'$expiryModalOK' => t('OK'),

View File

@ -156,10 +156,9 @@ function editwebpage_content(&$a) {
'$post_id' => $post_id,
'$baseurl' => $a->get_baseurl(),
'$defloc' => $itm[0]['location'],
'$visitor' => ($is_owner) ? 'block' : 'none',
'$visitor' => ($is_owner) ? true : false,
'$acl' => populate_acl($itm[0]),
'$showacl' => true,
'$pvisit' => ($is_owner) ? 'block' : 'none',
'$showacl' => ($is_owner) ? true : false,
'$public' => t('Public post'),
'$jotnets' => $jotnets,
'$mimeselect' => $mimeselect,
@ -177,7 +176,7 @@ function editwebpage_content(&$a) {
'$jotplugins' => $jotplugins,
'$sourceapp' => t($a->sourcename),
'$defexpire' => '',
'$feature_expire' => 'none',
'$feature_expire' => false,
'$expires' => t('Set expiration date'),
));

View File

@ -78,7 +78,8 @@ function layouts_content(&$a) {
'nickname' => $a->profile['channel_address'],
'lockstate' => (($group || $cid || $channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
'bang' => (($group || $cid) ? '!' : ''),
'visitor' => 'none',
'showacl' => false,
'visitor' => false,
'nopreview' => 1,
'ptlabel' => t('Layout Name'),
'profile_uid' => intval($owner),

View File

@ -222,9 +222,9 @@ function mail_content(&$a) {
'$wait' => t('Please wait'),
'$submit' => t('Submit'),
'$defexpire' => '',
'$feature_expire' => ((feature_enabled(local_user(),'content_expire')) ? 'block' : 'none'),
'$feature_expire' => ((feature_enabled(local_user(),'content_expire')) ? true : false),
'$expires' => t('Set expiration date'),
'$feature_encrypt' => ((feature_enabled(local_user(),'content_encrypt')) ? 'block' : 'none'),
'$feature_encrypt' => ((feature_enabled(local_user(),'content_encrypt')) ? true : false),
'$encrypt' => t('Encrypt text'),
'$cipher' => $cipher,
@ -335,9 +335,9 @@ function mail_content(&$a) {
'$submit' => t('Submit'),
'$wait' => t('Please wait'),
'$defexpire' => '',
'$feature_expire' => ((feature_enabled(local_user(),'content_expire')) ? 'block' : 'none'),
'$feature_expire' => ((feature_enabled(local_user(),'content_expire')) ? true : false),
'$expires' => t('Set expiration date'),
'$feature_encrypt' => ((feature_enabled(local_user(),'content_encrypt')) ? 'block' : 'none'),
'$feature_encrypt' => ((feature_enabled(local_user(),'content_encrypt')) ? true : false),
'$encrypt' => t('Encrypt text'),
'$cipher' => $cipher,

View File

@ -136,7 +136,7 @@ function network_content(&$a, $update = 0, $load = false) {
'lockstate' => (($group || $cid || $channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
'acl' => populate_acl((($group || $cid) ? $def_acl : $channel_acl)),
'bang' => (($group || $cid) ? '!' : ''),
'visitor' => 'block',
'visitor' => true,
'profile_uid' => local_user()
);

View File

@ -107,7 +107,7 @@ function rpost_content(&$a) {
'acl' => populate_acl($channel, $false),
'bang' => '',
// 'channel_select' => true,
'visitor' => 'block',
'visitor' => true,
'profile_uid' => local_user(),
'title' => $_REQUEST['title'],
'body' => $_REQUEST['body'],

View File

@ -85,7 +85,7 @@ function webpages_content(&$a) {
'lockstate' => (($group || $cid || $channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
'bang' => (($group || $cid) ? '!' : ''),
'acl' => ((local_user() && local_user() == $owner) ? populate_acl($channel_acl) : ''),
'visitor' => 'block',
'visitor' => true,
'profile_uid' => intval($owner),
'mimetype' => $mimetype,
'layout' => $layout,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -36,43 +36,47 @@
</div>
<div id="profile-jot-submit-wrapper" class="jothidden">
<div id="profile-jot-submit-left" class="btn-group pull-left">
<button id="wall-image-upload" class="btn btn-default btn-sm" title="{{$upload}}" style="display: {{$visitor}};" >
{{if $visitor}}
<button id="wall-image-upload" class="btn btn-default btn-sm" title="{{$upload}}" >
<i class="icon-camera jot-icons"></i>
</button>
<button id="wall-file-upload" class="btn btn-default btn-sm" title="{{$attach}}" style="display: {{$visitor}};" >
<button id="wall-file-upload" class="btn btn-default btn-sm" title="{{$attach}}" >
<i id="wall-file-upload" class="icon-paper-clip jot-icons"></i>
</button>
<button id="profile-link-wrapper" class="btn btn-default btn-sm" style="display: {{$visitor}};" title="{{$weblink}}" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;">
<button id="profile-link-wrapper" class="btn btn-default btn-sm" title="{{$weblink}}" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;">
<i id="profile-link" class="icon-link jot-icons"></i>
</button>
<button id="profile-video-wrapper" class="btn btn-default btn-sm" style="display: {{$visitor}};" title="{{$video}}" onclick="jotVideoURL();return false;">
<button id="profile-video-wrapper" class="btn btn-default btn-sm" title="{{$video}}" onclick="jotVideoURL();return false;">
<i id="profile-video" class="icon-facetime-video jot-icons"></i>
</button>
<button id="profile-audio-wrapper" class="btn btn-default btn-sm" style="display: {{$visitor}};" title="{{$audio}}" onclick="jotAudioURL();return false;">
<button id="profile-audio-wrapper" class="btn btn-default btn-sm" title="{{$audio}}" onclick="jotAudioURL();return false;">
<i id="profile-audio" class="icon-volume-up jot-icons"></i>
</button>
<button id="profile-nolocation-wrapper" class="btn btn-default btn-sm" style="display: none;" title="{{$noloc}}" onclick="jotClearLocation();return false;">
<i id="profile-nolocation" class="icon-circle-blank jot-icons"></i>
</button>
<button id="profile-location-wrapper" class="btn btn-default btn-sm" style="display: {{$visitor}};" title="{{$setloc}}" onclick="jotGetLocation();return false;">
<button id="profile-location-wrapper" class="btn btn-default btn-sm" title="{{$setloc}}" onclick="jotGetLocation();return false;">
<i id="profile-location" class="icon-globe jot-icons"></i>
</button>
<button id="profile-expire-wrapper" class="btn btn-default btn-sm" style="display: {{$feature_expire}};" title="{{$expires}}" onclick="jotGetExpiry();return false;">
{{/if}}
{{if $feature_expire}}
<button id="profile-expire-wrapper" class="btn btn-default btn-sm" title="{{$expires}}" onclick="jotGetExpiry();return false;">
<i id="profile-expires" class="icon-eraser jot-icons"></i>
</button>
<button id="profile-encrypt-wrapper" class="btn btn-default btn-sm" style="display: {{$feature_encrypt}};" title="{{$encrypt}}" onclick="red_encrypt('{{$cipher}}','#profile-jot-text',$('#profile-jot-text').val());return false;">
{{/if}}
{{if $feature_encrypt}}
<button id="profile-encrypt-wrapper" class="btn btn-default btn-sm" title="{{$encrypt}}" onclick="red_encrypt('{{$cipher}}','#profile-jot-text',$('#profile-jot-text').val());return false;">
<i id="profile-encrypt" class="icon-key jot-icons"></i>
</button>
{{/if}}
</div>
<div id="profile-rotator-wrapper" style="display: {{$visitor}};" >
<div id="profile-rotator-wrapper">
<div id="profile-rotator"></div>
</div>
<div id="profile-jot-submit-right" class="btn-group pull-right">
{{if $showacl}}
<div class="btn btn-default btn-sm" id="profile-jot-perms" style="display: {{$pvisit}};" title="{{$permset}}" >
<a href="#profile-jot-acl-wrapper" id="jot-perms-icon" class="icon {{$lockstate}}"></a>{{$bang}}
</div>
{{/if}}
{{if $showacl}}
<a href="#profile-jot-acl-wrapper" class="btn btn-default btn-sm jot-icons icon-{{$lockstate}}" id="jot-perms-icon" title="{{$permset}}"></a>{{$bang}}
{{/if}}
{{if $preview}}
<button class="btn btn-default btn-sm" onclick="preview_post();return false;" title="{{$preview}}">
<i class="icon-eye-open jot-icons" ></i>
@ -82,7 +86,7 @@
</div>
<div id="profile-jot-perms-end"></div>
<div id="profile-jot-plugin-wrapper">
{{$jotplugins}}
{{$jotplugins}}
</div>
<div style="display: none;">
<div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
@ -99,7 +103,7 @@
</div>
<!-- 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-content">
<div class="modal-header">

View File

@ -53,7 +53,7 @@
<div id="photo-edit-rotate-end"></div>
<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>
<div id="settings-default-perms-menu-end"></div>
<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" >
<a href="#photos-upload-permissions-wrapper" id="photos-upload-perms-menu" class="button" />
<span id="jot-perms-icon" class="icon {{$lockstate}}" ></span>{{$permissions}}
</a>
<span id="jot-perms-icon" class="icon-{{$lockstate}}" ></span>
<a href="#photos-upload-permissions-wrapper" id="photos-upload-perms-menu" class="button" />{{$permissions}}</a>
</div>
<div id="photos-upload-perms-end"></div>

View File

@ -37,14 +37,16 @@
<div id="prvmail-link-wrapper" >
<i id="prvmail-link" class="icon-link jot-icons" title="{{$insert}}" onclick="jotGetLink(); return false;"></i>
</div>
<div id="prvmail-expire-wrapper" style="display: {{$feature_expire}};" >
<i id="prvmail-expires" class="icon-eraser jot-icons" title="{{$expires}}" onclick="prvmailGetExpiry();return false;"></i>
</div>
<div id="prvmail-encrypt-wrapper" style="display: {{$feature_encrypt}};" >
{{if $feature_expire}}
<div id="prvmail-expire-wrapper" >
<i id="prvmail-expires" class="icon-eraser jot-icons" title="{{$expires}}" onclick="prvmailGetExpiry();return false;"></i>
</div>
{{/if}}
{{if $feature_encrypt}}
<div id="prvmail-encrypt-wrapper" >
<i id="prvmail-encrypt" class="icon-key jot-icons" title="{{$encrypt}}" onclick="red_encrypt('{{$cipher}}','#prvmail-text',$('#prvmail-text').val());return false;"></i>
</div>
{{/if}}
<div id="prvmail-rotator-wrapper" >
<img id="prvmail-rotator" src="images/rotator.gif" alt="{{$wait}}" title="{{$wait}}" style="display: none;" />
</div>