Merge pull request #34 from fabrixxm/master

Allow reshare in display view
This commit is contained in:
fabrixxm 2012-02-13 01:30:42 -08:00
commit f84309eb92
6 changed files with 51 additions and 5 deletions

View file

@ -489,7 +489,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
}
$likebuttons = '';
$shareable = ((($profile_owner == local_user()) && ($mode != 'display') && (! $item['private'])) ? true : false);
$shareable = ((($profile_owner == local_user()) && (! $item['private'])) ? true : false); //($mode != 'display') &&
if($page_writeable) {
if($toplevelpost) {
@ -821,7 +821,7 @@ function format_like($cnt,$arr,$type,$id) {
}}
function status_editor($a,$x, $notes_cid = 0) {
function status_editor($a,$x, $notes_cid = 0, $popup=false) {
$o = '';
@ -885,7 +885,7 @@ function status_editor($a,$x, $notes_cid = 0) {
$o .= replace_macros($tpl,array(
'$return_path' => $a->cmd,
'$action' => 'item',
'$action' => $a->get_baseurl().'/item',
'$share' => (($x['button']) ? $x['button'] : t('Share')),
'$upload' => t('Upload photo'),
'$shortupload' => t('upload photo'),
@ -924,6 +924,12 @@ function status_editor($a,$x, $notes_cid = 0) {
'$preview' => t('Preview'),
));
if ($popup==true){
$o = '<div id="jot-popup" style="display: none;">'.$o.'</div>';
}
return $o;
}

View file

@ -11,6 +11,7 @@ function display_content(&$a) {
require_once("include/bbcode.php");
require_once('include/security.php');
require_once('include/conversation.php');
require_once('include/acl_selectors.php');
$o = '<div id="live-display"></div>' . "\r\n";
@ -67,6 +68,23 @@ function display_content(&$a) {
return;
}
if ($is_owner)
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
$x = array(
'is_owner' => true,
'allow_location' => $a->user['allow_location'],
'default_location' => $a->user['default_location'],
'nickname' => $a->user['nickname'],
'lockstate' => ((($group) || (is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'),
'acl' => populate_acl((($group || $cid) ? $def_acl : $a->user), $celeb),
'bang' => (($group || $cid) ? '!' : ''),
'visitor' => 'block',
'profile_uid' => local_user()
);
$o .= status_editor($a,$x,0,true);
$sql_extra = permissions_sql($a->profile['uid'],$remote_contact,$groups);
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`,

View file

@ -118,7 +118,7 @@ function enableOnUser(){
}
</script>
<script type="text/javascript" src="js/ajaxupload.js" ></script>
<script type="text/javascript" src="$baseurl/js/ajaxupload.js" ></script>
<script>
var ispublic = '$ispublic';
var addtitle = '$addtitle';
@ -209,6 +209,8 @@ function enableOnUser(){
}
function jotShare(id) {
if ($('#jot-popup').length != 0) $('#jot-popup').show();
$('#like-rotator-' + id).show();
$.get('share/' + id, function(data) {
if (!editor) $("#profile-jot-text").val("");

View file

@ -79,5 +79,13 @@
<div class="wall-item-links"></div>
<div class="wall-item-like" id="wall-item-like-$id">$like</div>
<div class="wall-item-dislike" id="wall-item-dislike-$id">$dislike</div>
{{ if $conv }}
<div class="wall-item-conv" id="wall-item-conv-$id" >
<a href='$conv.href' id='context-$id' title='$conv.title'>$conv.title</a>
{{ endif }}
</div>
</div>
</div>

View file

@ -547,6 +547,13 @@ section {
}
.wwto .contact-photo { width: 25px; height: 25px; }
#pause {
position: fixed;
bottom: 5px;
right: 5px;
}
/* contacts menu */
.contact-photo-wrapper { position: relative; }
.contact-photo {

View file

@ -891,6 +891,11 @@ section {
width: 25px;
height: 25px;
}
#pause {
position: fixed;
bottom: 5px;
right: 5px;
}
/* contacts menu */
.contact-photo-wrapper {
position: relative;