[frio] Add a conditional browser share button
This commit is contained in:
parent
18b32b68aa
commit
f2af985350
4 changed files with 18 additions and 2 deletions
|
@ -459,6 +459,10 @@ $(document).ready(function () {
|
|||
$pokeSubmit.button("reset");
|
||||
});
|
||||
});
|
||||
|
||||
if (!navigator.canShare || !navigator.canShare()) {
|
||||
$('.button-browser-share').hide();
|
||||
}
|
||||
});
|
||||
|
||||
function openClose(theID) {
|
||||
|
|
|
@ -177,6 +177,10 @@
|
|||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{if !$item.lock && !$item.connector}}
|
||||
<span role="presentation" class="separator button-browser-share"></span>
|
||||
<button type="button" class="btn-link button-browser-share" onclick="navigator.share({url: '{{$item.plink.orig}}'})"><i class="fa fa-share-alt"></i> {{$item.browsershare}}</button>
|
||||
{{/if}}
|
||||
|
||||
{{* Put additional actions in a dropdown menu *}}
|
||||
{{if $item.menu && ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread || $item.ignore || $item.drop.dropping)}}
|
||||
|
|
|
@ -330,6 +330,11 @@ as the value of $top_child_total (this is done at the end of this file)
|
|||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{if !$item.lock && !$item.connector}}
|
||||
<span role="presentation" class="separator button-browser-share"></span>
|
||||
<button type="button" class="btn-link button-browser-share" onclick="navigator.share({url: '{{$item.plink.orig}}'})"><i class="fa fa-share-alt"></i> {{$item.browsershare}}</button>
|
||||
{{/if}}
|
||||
|
||||
{{* Put additional actions in a dropdown menu *}}
|
||||
{{if $item.menu && ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread || $item.ignore || $item.drop.dropping)}}
|
||||
<span role="presentation" class="separator"></span>
|
||||
|
@ -481,6 +486,10 @@ as the value of $top_child_total (this is done at the end of this file)
|
|||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if !$item.lock && !$item.connector}}
|
||||
<button type="button" class="btn btn-sm button-browser-share" onclick="navigator.share({url: '{{$item.plink.orig}}'})" title="{{$item.browsershare}}"><i class="fa fa-share-alt"></i></button>
|
||||
{{/if}}
|
||||
|
||||
{{* Put additional actions in a dropdown menu *}}
|
||||
<div class="btn-group" role="group">
|
||||
<img id="like-rotator-{{$item.id}}" class="like-rotator" src="images/rotator.gif" alt="{{$item.wait}}" title="{{$item.wait}}" style="display: none;" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue