]> git.mxchange.org Git - friendica.git/commitdiff
Turn actions links into buttons (nav, search)
authorHypolite Petovan <ben.lort@gmail.com>
Fri, 3 Mar 2017 06:19:49 +0000 (01:19 -0500)
committerHypolite Petovan <ben.lort@gmail.com>
Fri, 3 Mar 2017 06:19:49 +0000 (01:19 -0500)
- Mirrored the changes from wall_thread to search_item
- Replaced a navbar link with a button with according CSS

view/theme/frio/css/style.css
view/theme/frio/templates/nav.tpl
view/theme/frio/templates/search_item.tpl

index 40e275ae000a7853a88435dc811d2274576c5505..4e189b11fe5a046c0ec9121b910a4f8238057f68 100644 (file)
@@ -553,9 +553,8 @@ nav.navbar .nav>li>a:focus{
 #topbar-first .dropdown-footer {
     margin: 10px 10px 5px
 }
-#topbar-first a,
-nav.navbar a {
-    /*color: #fff*/
+#topbar-first a, #topbar-first .btn-link,
+nav.navbar a, nav.navbar .btn-link {
     color: $nav_icon_color;
 }
 #topbar-first .caret {
index fc66403019bd11aa488c1be991933e129f3ce89d..ef96249ea4e371588e3671d4d65c93152694a58f 100644 (file)
                                        {{* The user dropdown menu *}}
                                        {{if $nav.userinfo}}
                                        <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">
                                                                <strong>{{$nav.userinfo.name}}</strong><br>
                                                                {{if $nav.remote}}<span class="trunctate">{{$nav.remote}}</span>{{/if}}
 
                                                        <img  id="avatar" src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}">
                                                        <span class="caret"></span>
-
-                                               </a>
+                                               </button>
 
                                                {{* The list of available usermenu links *}}
                                                <ul id="nav-user-menu" class="dropdown-menu pull-right menu-popup" role="group" aria-labelledby="main-menu">
index 90fbe03bbcac66305d366835959099455377272b..bf90f8606bffd53cc3eb0e43889b5cf9b35b3612 100644 (file)
@@ -1,7 +1,7 @@
 <!-- TODO => Unknow block -->
 <div class="wall-item-decor" style="display:none;">
        <span class="icon s22 star {{$item.isstarred}}" id="starred-{{$item.id}}" title="{{$item.star.starred}}">{{$item.star.starred}}</span>
-       {{if $item.lock}}<span class="navicon lock fakelink" onclick="lockview(event,{{$item.id}});" title="{{$item.lock}}"></span><span class="fa fa-lock"></span>{{/if}}
+       {{if $item.lock}}<span class="navicon lock fakelink" onclick="lockview(event, {{$item.id}});" title="{{$item.lock}}"></span><span class="fa fa-lock"></span>{{/if}}
        <img id="like-rotator-{{$item.id}}" class="like-rotator" src="images/rotator.gif" alt="{{$item.wait}}" title="{{$item.wait}}" style="display: none;" />
 </div>
 <!-- ./TODO => Unknow block -->
 
                                {{if $item.plink || $item.star || $item.drop.dropping || $item.edpost}}
                                <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}}">
                                                {{if $item.plink}}      {{*link to the original source of the item *}}
-                                               <li role="menuitem">
-                                                       <a title="{{$item.plink.title}}" href="{{$item.plink.href}}" class="navicon plink"><i class="fa fa-external-link"></i> {{$item.plink.title}}</a>
-                                               </li>
-                                               {{/if}}
+                                               <li role="menuitem">
+                                                       <a title="{{$item.plink.title}}" href="{{$item.plink.href}}" class="navicon plink"><i class="fa fa-external-link"></i> {{$item.plink.title}}</a>
+                                               </li>
+                                               {{/if}}
 
                                                {{if $item.edpost}} {{* edit the posting *}}
                                                <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>
                                                {{/if}}
 
                                                {{if $item.tagger}} {{* tag the post *}}
                                                <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>
                                                {{/if}}
 
                                                {{if $item.filer}}
                                                <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>
                                                {{/if}}
 
                                                {{if $item.star}}
                                                <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>
-                                                       <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="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>
+                                                       <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>
                                                {{/if}}
 
                                                {{if $item.drop.dropping}}
                                                <li role="separator" class="divider"></li>
                                                <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>
                                                {{/if}}
                                        </ul>
@@ -85,7 +85,7 @@
                        <div role="heading " class="contact-info hidden-sm hidden-xs media-body"><!-- <= For computer -->
                                <h4 class="media-heading"><a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link userinfo"><span class="wall-item-name btn-link {{$item.sparkle}}">{{$item.name}}</span></a>
                                        {{if $item.owner_url}}{{$item.via}} <a href="{{$item.owner_url}}" target="redir" title="{{$item.olinktitle}}" class="wall-item-name-link userinfo"><span class="wall-item-name{{$item.osparkle}} btn-link" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a>{{/if}}
-                                       {{if $item.lock}}<span class="navicon lock fakelink" onClick="lockview(event,{{$item.id}});" title="{{$item.lock}}">&nbsp;<small><i class="fa fa-lock"></i></small></span>{{/if}}
+                                       {{if $item.lock}}<span class="navicon lock fakelink" onClick="lockview(event, {{$item.id}});" title="{{$item.lock}}">&nbsp;<small><i class="fa fa-lock"></i></small></span>{{/if}}
 
                                        <div class="additional-info text-muted">
                                                <div id="wall-item-ago-{{$item.id}}" class="wall-item-ago">
                                </div>
                                <div class="wall-item-tags">
                                        {{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 $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 $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 $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}}
                                </div>
                                        {{if $item.edited}}<div class="itemedited text-muted">{{$item.edited['label']}} (<span title="{{$item.edited['date']}}">{{$item.edited['relative']}}</span>)</div>{{/if}}
                                        {{* Buttons for like and dislike *}}
                                        {{if $item.vote}}
                                                {{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>
-                                               {{/if}}
-
-                                               {{if $item.vote.like AND $item.vote.dislike}}
-                                               <span role="presentation" class="separator">&nbsp;•&nbsp;</span>
+                                               <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.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>
-                                               {{/if}}
-
-                                               {{if ($item.vote.like OR $item.vote.dislike) AND $item.comment}}
-                                               <span role="presentation" class="separator">&nbsp;•&nbsp;</span>
+                                               <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}}
 
-                                       {{* Butten to open the comment text field *}}
+                                       {{* Button to open the comment text field *}}
                                        {{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}}
 
                                        {{* Button for sharing the item *}}
                                        {{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}}
-                                               <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}}
                                </div>
                                        {{* Event attendance buttons *}}
                                        {{if $item.isevent}}
                                        <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>
-                                               <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>
-                                               <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.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>
+                                               <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>
+                                               <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>
                                        {{/if}}
 
 
                                        {{* Display likes, dislike and attendance stats *}}
                        {{if $item.responses}}
-                               <div class="wall-item-responses">
-                                       {{foreach $item.responses as $verb=>$response}}
-                                       <div class="wall-item-{{$verb}}" id="wall-item-{{$verb}}-{{$item.id}}">{{$response.output}}</div>
-                                       {{/foreach}}
-                               </div>
+                       <div class="wall-item-responses">
+                               {{foreach $item.responses as $verb=>$response}}
+                               <div class="wall-item-{{$verb}}" id="wall-item-{{$verb}}-{{$item.id}}">{{$response.output}}</div>
+                               {{/foreach}}
+                       </div>
                        {{/if}}
 
                        <div class="wall-item-conv" id="wall-item-conv-{{$item.id}}" >
                        {{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}}
                        </div>
                </div><!--./media>-->