]> git.mxchange.org Git - friendica.git/commitdiff
hidden jot in "display" to allow reshare
authorFabio Comuni <fabrix.xm@gmail.com>
Fri, 10 Feb 2012 16:30:22 +0000 (17:30 +0100)
committerFabio Comuni <fabrix.xm@gmail.com>
Fri, 10 Feb 2012 16:30:22 +0000 (17:30 +0100)
include/conversation.php
mod/display.php
view/jot-header.tpl

index 6defefc731ee111be17ccf0aafe1465255992934..947a9b040a85b14d4e95ccac76488f8ff6997f2d 100755 (executable)
@@ -494,7 +494,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) {
@@ -832,7 +832,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 = '';
                
@@ -896,7 +896,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'),
@@ -935,6 +935,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;
 }
 
index 02f080a790587c1ffc36deeb03abd762511854b4..79eaf371782a3c2f00985a89b2531d1e5a662979 100755 (executable)
@@ -66,6 +66,10 @@ function display_content(&$a) {
                notice( t('Access to this profile has been restricted.') . EOL);
                return;
        }
+       
+       if ($is_owner)
+               $o .= status_editor($a,$x,0,true);
+
 
        $sql_extra = permissions_sql($a->profile['uid'],$remote_contact,$groups);
 
index 22b4349166f1129bb939b1a36e8df4e24006ba2d..482fb0e0dc69f56a59039e7a37459a8db20f258f 100755 (executable)
@@ -215,6 +215,9 @@ function enableOnUser(){
                        initEditor(function(){
                                addeditortext(data);
                                $('#like-rotator-' + id).hide();
+                               if ($('#jot-popup').length != 0){
+                                       $('#jot-popup').show();
+                               } 
                                $(window).scrollTop(0);
                        });