Turn actions links into buttons (nav, search)

- Mirrored the changes from wall_thread to search_item
- Replaced a navbar link with a button with according CSS
This commit is contained in:
Hypolite Petovan 2017-03-03 01:19:49 -05:00
parent 71f00eaf5f
commit cb49bcdb04
3 changed files with 35 additions and 48 deletions

View file

@ -553,9 +553,8 @@ nav.navbar .nav>li>a:focus{
#topbar-first .dropdown-footer { #topbar-first .dropdown-footer {
margin: 10px 10px 5px margin: 10px 10px 5px
} }
#topbar-first a, #topbar-first a, #topbar-first .btn-link,
nav.navbar a { nav.navbar a, nav.navbar .btn-link {
/*color: #fff*/
color: $nav_icon_color; color: $nav_icon_color;
} }
#topbar-first .caret { #topbar-first .caret {

View file

@ -119,7 +119,7 @@
{{* The user dropdown menu *}} {{* The user dropdown menu *}}
{{if $nav.userinfo}} {{if $nav.userinfo}}
<li role="menu" id="nav-user-linkmenu" class="dropdown account nav-menu hidden-xs"> <li role="menu" id="nav-user-linkmenu" class="dropdown account nav-menu hidden-xs">
<a href="#" id="main-menu" class="dropdown-toggle nav-avatar " data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <button id="main-menu" class="btn-link dropdown-toggle nav-avatar" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">
<div class="user-title pull-left hidden-xs hidden-sm hidden-md"> <div class="user-title pull-left hidden-xs hidden-sm hidden-md">
<strong>{{$nav.userinfo.name}}</strong><br> <strong>{{$nav.userinfo.name}}</strong><br>
{{if $nav.remote}}<span class="trunctate">{{$nav.remote}}</span>{{/if}} {{if $nav.remote}}<span class="trunctate">{{$nav.remote}}</span>{{/if}}
@ -127,8 +127,7 @@
<img id="avatar" src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}"> <img id="avatar" src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}">
<span class="caret"></span> <span class="caret"></span>
</button>
</a>
{{* The list of available usermenu links *}} {{* The list of available usermenu links *}}
<ul id="nav-user-menu" class="dropdown-menu pull-right menu-popup" role="group" aria-labelledby="main-menu"> <ul id="nav-user-menu" class="dropdown-menu pull-right menu-popup" role="group" aria-labelledby="main-menu">

View file

@ -17,7 +17,7 @@
{{if $item.plink || $item.star || $item.drop.dropping || $item.edpost}} {{if $item.plink || $item.star || $item.drop.dropping || $item.edpost}}
<li class="dropdown"> <li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" id="dropdownMenuTools-{{$item.id}}" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-angle-down"></i></a> <button class="btn-link dropdown-toggle" data-toggle="dropdown" id="dropdownMenuTools-{{$item.id}}" type="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-angle-down"></i></button>
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dropdownMenuTools-{{$item.id}}"> <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dropdownMenuTools-{{$item.id}}">
{{if $item.plink}} {{*link to the original source of the item *}} {{if $item.plink}} {{*link to the original source of the item *}}
@ -28,33 +28,33 @@
{{if $item.edpost}} {{* edit the posting *}} {{if $item.edpost}} {{* edit the posting *}}
<li role="menuitem"> <li role="menuitem">
<a href="#" href="{{$item.edpost.0}}" title="{{$item.edpost.1}}" class="navicon pencil"><i class="fa fa-pencil"></i> {{$item.edpost.1}}</a> <button type="button" href="{{$item.edpost.0}}" title="{{$item.edpost.1}}" class="btn-link navicon pencil"><i class="fa fa-pencil"></i> {{$item.edpost.1}}</button>
</li> </li>
{{/if}} {{/if}}
{{if $item.tagger}} {{* tag the post *}} {{if $item.tagger}} {{* tag the post *}}
<li role="menuitem"> <li role="menuitem">
<a href="#" id="tagger-{{$item.id}}" onclick="itemTag({{$item.id}}); return false;" class="{{$item.tagger.class}}" title="{{$item.tagger.add}}"><i class="fa fa-tag"></i> {{$item.tagger.add}}</a> <button type="button" id="tagger-{{$item.id}}" onclick="itemTag({{$item.id}}); return false;" class="btn-link {{$item.tagger.class}}" title="{{$item.tagger.add}}"><i class="fa fa-tag"></i> {{$item.tagger.add}}</button>
</li> </li>
{{/if}} {{/if}}
{{if $item.filer}} {{if $item.filer}}
<li role="menuitem"> <li role="menuitem">
<a href="#" id="filer-{{$item.id}}" onclick="itemFiler({{$item.id}}); return false;" class="filer-item filer-icon" title="{{$item.filer}}"><i class="fa fa-folder"></i>&nbsp;{{$item.filer}}</a> <button type="button" id="filer-{{$item.id}}" onclick="itemFiler({{$item.id}}); return false;" class="btn-link filer-item filer-icon" title="{{$item.filer}}"><i class="fa fa-folder"></i>&nbsp;{{$item.filer}}</button>
</li> </li>
{{/if}} {{/if}}
{{if $item.star}} {{if $item.star}}
<li role="menuitem"> <li role="menuitem">
<a href="#" id="star-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="{{$item.star.classdo}}" title="{{$item.star.do}}"><i class="fa fa-star-o"></i>&nbsp;{{$item.star.do}}</a> <button type="button" id="star-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="btn-link {{$item.star.classdo}}" title="{{$item.star.do}}"><i class="fa fa-star-o"></i>&nbsp;{{$item.star.do}}</button>
<a href="#" id="unstar-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="{{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="fa fa-star"></i>&nbsp;{{$item.star.undo}}</a> <button type="button" id="unstar-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="btn-link {{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="fa fa-star"></i>&nbsp;{{$item.star.undo}}</button>
</li> </li>
{{/if}} {{/if}}
{{if $item.drop.dropping}} {{if $item.drop.dropping}}
<li role="separator" class="divider"></li> <li role="separator" class="divider"></li>
<li role="menuitem"> <li role="menuitem">
<a class="navicon delete" onclick="dropItem('item/drop/{{$item.id}}', '#item-{{$item.guid}}'); return false;" title="{{$item.drop.delete}}"><i class="fa fa-trash"></i> {{$item.drop.delete}}</a> <button type="button" class="btn-link navicon delete" onclick="dropItem('item/drop/{{$item.id}}', '#item-{{$item.guid}}'); return false;" title="{{$item.drop.delete}}"><i class="fa fa-trash"></i> {{$item.drop.delete}}</button>
</li> </li>
{{/if}} {{/if}}
</ul> </ul>
@ -137,19 +137,19 @@
</div> </div>
<div class="wall-item-tags"> <div class="wall-item-tags">
{{foreach $item.hashtags as $tag}} {{foreach $item.hashtags as $tag}}
<span class='tag label btn-info sm'>{{$tag}} <i class="fa fa-bolt"></i></span> <span class="tag label btn-info sm">{{$tag}} <i class="fa fa-bolt"></i></span>
{{/foreach}} {{/foreach}}
{{foreach $item.mentions as $tag}} {{foreach $item.mentions as $tag}}
<span class='mention label btn-warning sm'>{{$tag}} <i class="fa fa-user"></i></span> <span class="mention label btn-warning sm">{{$tag}} <i class="fa fa-user"></i></span>
{{/foreach}} {{/foreach}}
{{foreach $item.folders as $cat}} {{foreach $item.folders as $cat}}
<span class='folder label btn-danger sm'>{{$cat.name}}</a>{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span> <span class="folder label btn-danger sm">{{$cat.name}}</a>{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
{{/foreach}} {{/foreach}}
{{foreach $item.categories as $cat}} {{foreach $item.categories as $cat}}
<span class='category label btn-success sm'>{{$cat.name}}</a>{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span> <span class="category label btn-success sm">{{$cat.name}}</a>{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
{{/foreach}} {{/foreach}}
</div> </div>
{{if $item.edited}}<div class="itemedited text-muted">{{$item.edited['label']}} (<span title="{{$item.edited['date']}}">{{$item.edited['relative']}}</span>)</div>{{/if}} {{if $item.edited}}<div class="itemedited text-muted">{{$item.edited['label']}} (<span title="{{$item.edited['date']}}">{{$item.edited['relative']}}</span>)</div>{{/if}}
@ -170,34 +170,23 @@
{{* Buttons for like and dislike *}} {{* Buttons for like and dislike *}}
{{if $item.vote}} {{if $item.vote}}
{{if $item.vote.like}} {{if $item.vote.like}}
<a role="button" href="#" class="button-likes{{if $item.responses.like.self}} active{{/if}}" id="like-{{$item.id}}" title="{{$item.vote.like.0}}" onclick="dolike({{$item.id}},'like'); return false;">{{$item.vote.like.0}}</a> <button type="button" class="btn btn-defaultbutton-likes{{if $item.responses.like.self}} active" aria-pressed="true{{/if}}" id="like-{{$item.id}}" title="{{$item.vote.like.0}}" onclick="dolike({{$item.id}}, 'like'); return false;">{{$item.vote.like.0}}</button>
{{/if}}
{{if $item.vote.like AND $item.vote.dislike}}
<span role="presentation" class="separator">&nbsp;•&nbsp;</span>
{{/if}} {{/if}}
{{if $item.vote.dislike}} {{if $item.vote.dislike}}
<a role="button" href="#" class="button-likes{{if $item.responses.like.self}} active{{/if}}" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.0}}" onclick="dolike({{$item.id}},'dislike'); return false;">{{$item.vote.dislike.0}}</a> <button type="button" class="btn btn-defaultbutton-likes{{if $item.responses.like.self}} active" aria-pressed="true{{/if}}" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.0}}" onclick="dolike({{$item.id}}, 'dislike'); return false;">{{$item.vote.dislike.0}}</button>
{{/if}}
{{if ($item.vote.like OR $item.vote.dislike) AND $item.comment}}
<span role="presentation" class="separator">&nbsp;•&nbsp;</span>
{{/if}} {{/if}}
{{/if}} {{/if}}
{{* Butten to open the comment text field *}} {{* Button to open the comment text field *}}
{{if $item.comment}} {{if $item.comment}}
<a role="button" class="" id="comment-{{$item.id}}" title="{{$item.switchcomment}}" onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});">{{$item.switchcomment}} </a> <button type="button" class="btn btn-default" id="comment-{{$item.id}}" title="{{$item.switchcomment}}" onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});">{{$item.switchcomment}}</button>
{{/if}} {{/if}}
{{* Button for sharing the item *}} {{* Button for sharing the item *}}
{{if $item.vote}} {{if $item.vote}}
{{if ($item.vote.like OR $item.vote.dislike OR $item.comment) AND $item.vote.share}}
<span role="presentation" class="separator">&nbsp;•&nbsp;</span>
{{/if}}
{{if $item.vote.share}} {{if $item.vote.share}}
<a role="button" href="#" class="" id="share-{{$item.id}}" title="{{$item.vote.share.0}}" onclick="jotShare({{$item.id}}); return false;"><i class="fa fa-retweet"></i>&nbsp;{{$item.vote.share.0}}</a> <button type="button" class="btn btn-default" id="share-{{$item.id}}" title="{{$item.vote.share.0}}" onclick="jotShare({{$item.id}}); return false;"><i class="fa fa-retweet"></i>&nbsp;{{$item.vote.share.0}}</button>
{{/if}} {{/if}}
{{/if}} {{/if}}
</div> </div>
@ -207,9 +196,9 @@
{{* Event attendance buttons *}} {{* Event attendance buttons *}}
{{if $item.isevent}} {{if $item.isevent}}
<div class="vote-event"> <div class="vote-event">
<a role="button" href="#" class="button-event{{if $item.responses.attendyes.self}} active{{/if}}" id="attendyes-{{$item.id}}" title="{{$item.attend.0}}" onclick="dolike({{$item.id}},'attendyes'); return false;"><i class="fa fa-check"><span class="sr-only">{{$item.attend.0}}</span></i></a> <button type="button" class="btn btn-defaultbutton-event{{if $item.responses.attendyes.self}} active" aria-pressed="true{{/if}}" id="attendyes-{{$item.id}}" title="{{$item.attend.0}}" onclick="dolike({{$item.id}}, 'attendyes'); return false;"><i class="fa fa-check"><span class="sr-only">{{$item.attend.0}}</span></i></button>
<a role="button" href="#" class="button-event{{if $item.responses.attendno.self}} active{{/if}}" id="attendno-{{$item.id}}" title="{{$item.attend.1}}" onclick="dolike({{$item.id}},'attendno'); return false;"><i class="fa fa-times"><span class="sr-only">{{$item.attend.1}}</span></i></a> <button type="button" class="btn btn-defaultbutton-event{{if $item.responses.attendno.self}} active" aria-pressed="true{{/if}}" id="attendno-{{$item.id}}" title="{{$item.attend.1}}" onclick="dolike({{$item.id}}, 'attendno'); return false;"><i class="fa fa-times"><span class="sr-only">{{$item.attend.1}}</span></i></button>
<a role="button" href="#" class="button-event{{if $item.responses.attendmaybe.self}} active{{/if}}" id="attendmaybe-{{$item.id}}" title="{{$item.attend.2}}" onclick="dolike({{$item.id}},'attendmaybe'); return false;"><i class="fa fa-question"><span class="sr-only">{{$item.attend.2}}</span></i></a> <button type="button" class="btn btn-defaultbutton-event{{if $item.responses.attendmaybe.self}} active" aria-pressed="true{{/if}}" id="attendmaybe-{{$item.id}}" title="{{$item.attend.2}}" onclick="dolike({{$item.id}}, 'attendmaybe'); return false;"><i class="fa fa-question"><span class="sr-only">{{$item.attend.2}}</span></i></button>
</div> </div>
{{/if}} {{/if}}
@ -234,7 +223,7 @@
<div class="wall-item-conv" id="wall-item-conv-{{$item.id}}" > <div class="wall-item-conv" id="wall-item-conv-{{$item.id}}" >
{{if $item.conv}} {{if $item.conv}}
<a href='{{$item.conv.href}}' id='context-{{$item.id}}' title='{{$item.conv.title}}'>{{$item.conv.title}}</a> <a href="{{$item.conv.href}}" id="context-{{$item.id}}" title="{{$item.conv.title}}">{{$item.conv.title}}</a>
{{/if}} {{/if}}
</div> </div>
</div><!--./media>--> </div><!--./media>-->