diff options
author | Max Kostikov <max@kostikov.co> | 2019-12-03 16:58:46 +0100 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-12-03 16:58:46 +0100 |
commit | b9e083da61dedcdf5dd9ff818c442e42734a02fc (patch) | |
tree | c3ffc7ac1313e6c24ebbc8b7f77f5268a88c92c5 /view/tpl | |
parent | 74aa446190c1049eeb3a77cb6f59819fc20b05fb (diff) | |
download | volse-hubzilla-b9e083da61dedcdf5dd9ff818c442e42734a02fc.tar.gz volse-hubzilla-b9e083da61dedcdf5dd9ff818c442e42734a02fc.tar.bz2 volse-hubzilla-b9e083da61dedcdf5dd9ff818c442e42734a02fc.zip |
Add layout for hiding pinned content and its processing
Diffstat (limited to 'view/tpl')
-rw-r--r-- | view/tpl/pinned_item.tpl | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/view/tpl/pinned_item.tpl b/view/tpl/pinned_item.tpl index e5c45e85c..0dad276d0 100644 --- a/view/tpl/pinned_item.tpl +++ b/view/tpl/pinned_item.tpl @@ -1,3 +1,14 @@ +{{if $hide}} +<script> + function dopinhide(id) { + id = id.toString(); + if($('#pinned-wrapper-' + id).length) { + $('#pinned-wrapper-' + id).fadeTo('fast', 0.33, function() { this.remove(); }); + $.post('pin/hide', { 'id' : id }); + } + } +</script> +{{/if}} <div id="pinned-wrapper-{{$id}}" class="thread-wrapper toplevel_item generic-content-wrapper h-entry" data-b64mids='{{$mids}}'> <div class="wall-item-outside-wrapper" id="pinned-item-outside-wrapper-{{$id}}"> <div class="clearfix wall-item-content-wrapper" id="pinned-item-content-wrapper-{{$id}}"> @@ -118,14 +129,18 @@ </button> <div class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="wall-item-menu-{{$id}}"> {{if $share}} - <a class="dropdown-item" href="#" onclick="jotShare({{$id}},{{$item_type}}); return false"><i class="generic-icons-nav fa fa-fw fa-retweet" title="{{$share.0}}"></i>{{$share.0}}</a> + <a class="dropdown-item" href="#" onclick="jotShare({{$id}},{{$item_type}}); return false;"><i class="generic-icons-nav fa fa-fw fa-retweet" title="{{$share.0}}"></i>{{$share.0}}</a> {{/if}} {{if $embed}} - <a class="dropdown-item" href="#" onclick="jotEmbed({{$id}},{{$item_type}}); return false"><i class="generic-icons-nav fa fa-fw fa-share" title="{{$embed.0}}"></i>{{$embed.0}}</a> + <a class="dropdown-item" href="#" onclick="jotEmbed({{$id}},{{$item_type}}); return false;"><i class="generic-icons-nav fa fa-fw fa-share" title="{{$embed.0}}"></i>{{$embed.0}}</a> {{/if}} {{if $plink}} <a class="dropdown-item" href="{{$plink.href}}" title="{{$plink.title}}" class="u-url"><i class="generic-icons-nav fa fa-fw fa-external-link"></i>{{$plink.title}}</a> {{/if}} + {{if $hide}} + <a class="dropdown-item" href="#" onclick="dopinhide({{$id}}); return false;" class="u-url"><i class="generic-icons-nav fa fa-fw fa-remove"></i>{{$hide}}</a> + {{/if}} + </div> </div> </div> |