Commit ef1e3d0d authored by Annabel Dunstone's avatar Annabel Dunstone Committed by Alfredo Sumaran

Add tooltip on pin/unpin nav

parent 027b07ca
......@@ -278,7 +278,9 @@ $ ->
$('.navbar-fixed-top')
.removeClass('header-pinned-nav')
.toggleClass('header-collapsed header-expanded')
$('.pin-nav-btn').attr('data-original-title', 'Pin sidebar').tooltip('fixTitle').tooltip('setContent')
else
$.cookie 'pin_nav', 'true', { path: '/' }
$('.page-with-sidebar').addClass('page-sidebar-pinned')
$('.navbar-fixed-top').addClass('header-pinned-nav')
$('.pin-nav-btn').attr('data-original-title', 'Unpin sidebar').tooltip('fixTitle').tooltip('setContent')
......@@ -13,7 +13,7 @@
= image_tag avatar_icon(current_user, 60), alt: 'Profile', class: 'avatar avatar s36'
.username
= current_user.username
= link_to '#', class: "nav-header-btn text-center pin-nav-btn #{'is-active' if pinned_nav?} js-nav-pin", title: 'Pin/Unpin navigation' do
= link_to '#', class: "nav-header-btn text-center pin-nav-btn has-tooltip #{'is-active' if pinned_nav?} js-nav-pin", title: pinned_nav? ? "Unpin navigation" : "Pin Navigation", data: {placement: 'right', container: 'body'} do
%span.sr-only Toggle navigation pinning
= icon('thumb-tack')
- if defined?(nav) && nav
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment