aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-05 18:32:37 -0700
committerzotlabs <mike@macgirvin.com>2017-09-05 18:32:37 -0700
commit45eb61bcf079557094fed8714afc994f1120e6db (patch)
treec524eed94b4edebae1a641b3f95f888d21a07f06 /view
parent80400d719145c843a1bb80a34d5815d15ffc5893 (diff)
downloadvolse-hubzilla-45eb61bcf079557094fed8714afc994f1120e6db.tar.gz
volse-hubzilla-45eb61bcf079557094fed8714afc994f1120e6db.tar.bz2
volse-hubzilla-45eb61bcf079557094fed8714afc994f1120e6db.zip
provide sharing of cards
Diffstat (limited to 'view')
-rwxr-xr-xview/tpl/conv_item.tpl2
-rwxr-xr-xview/tpl/conv_list.tpl2
-rwxr-xr-xview/tpl/jot-header.tpl27
3 files changed, 18 insertions, 13 deletions
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index 663b02890..b3fe60750 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -151,7 +151,7 @@
</button>
<div class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="wall-item-menu-{{$item.id}}">
{{if $item.share}}
- <a class="dropdown-item" href="#" onclick="jotShare({{$item.id}}); return false"><i class="generic-icons-nav fa fa-fw fa-retweet" title="{{$item.share.0}}"></i>{{$item.share.0}}</a>
+ <a class="dropdown-item" href="#" onclick="jotShare({{$item.id}},{{$item.item_type}}); return false"><i class="generic-icons-nav fa fa-fw fa-retweet" title="{{$item.share.0}}"></i>{{$item.share.0}}</a>
{{/if}}
{{if $item.plink}}
<a class="dropdown-item" href="{{$item.plink.href}}" title="{{$item.plink.title}}" class="u-url"><i class="generic-icons-nav fa fa-fw fa-external-link"></i>{{$item.plink.title}}</a>
diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl
index e442dd3cc..e599f84b5 100755
--- a/view/tpl/conv_list.tpl
+++ b/view/tpl/conv_list.tpl
@@ -150,7 +150,7 @@
</button>
<div class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="wall-item-menu-{{$item.id}}">
{{if $item.share}}
- <a class="dropdown-item" href="#" onclick="jotShare({{$item.id}}); return false"><i class="generic-icons-nav fa fa-fw fa-retweet" title="{{$item.share.0}}"></i>{{$item.share.0}}</a>
+ <a class="dropdown-item" href="#" onclick="jotShare({{$item.id}},{{$item.item_type}}); return false"><i class="generic-icons-nav fa fa-fw fa-retweet" title="{{$item.share.0}}"></i>{{$item.share.0}}</a>
{{/if}}
{{if $item.plink}}
<a class="dropdown-item" href="{{$item.plink.href}}" title="{{$item.plink.title}}" class="u-url"><i class="generic-icons-nav fa fa-fw fa-external-link"></i>{{$item.plink.title}}</a>
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index 91c30423d..2d37b3ca2 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -247,18 +247,23 @@ var activeCommentText = '';
}
- function jotShare(id) {
- if ($('#jot-popup').length != 0) $('#jot-popup').show();
-
- $('#like-rotator-' + id).spin('tiny');
- $.get('{{$baseurl}}/share/' + id, function(data) {
- if (!editor) $("#profile-jot-text").val("");
- initEditor(function(){
- addeditortext(data);
- $('#like-rotator-' + id).spin(false);
- $(window).scrollTop(0);
+ function jotShare(id,post_type) {
+ if(post_type == 6) {
+ window.location.href = 'rpost?f=&post_id='+id;
+ }
+ else {
+ if ($('#jot-popup').length != 0) $('#jot-popup').show();
+
+ $('#like-rotator-' + id).spin('tiny');
+ $.get('{{$baseurl}}/share/' + id, function(data) {
+ if (!editor) $("#profile-jot-text").val("");
+ initEditor(function(){
+ addeditortext(data);
+ $('#like-rotator-' + id).spin(false);
+ $(window).scrollTop(0);
+ });
});
- });
+ }
}
function linkdropper(event) {