From 1bc354000ccd591bc8ba3eacd3eb7209bac46574 Mon Sep 17 00:00:00 2001 From: Kenji Okimoto Date: Tue, 9 Oct 2018 14:12:45 +0900 Subject: [PATCH] Use bootstrap-vue's tooltip component Signed-off-by: Kenji Okimoto --- app/views/shared/vue/_navigation.html.haml | 8 ++++---- app/views/shared/vue/_sidemenu.html.haml | 12 ++++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/app/views/shared/vue/_navigation.html.haml b/app/views/shared/vue/_navigation.html.haml index 64c5409..3fc9788 100644 --- a/app/views/shared/vue/_navigation.html.haml +++ b/app/views/shared/vue/_navigation.html.haml @@ -15,10 +15,10 @@ %li.nav-item.fluentd-note = @fluentd.note %li.nav-item.fluentd-status - %a.nav-link{"href" => daemon_path, - "data-toggle" => "tooltip", - "data-placement" => "bottom", - "title" => "fluentd #{fluentd_status_message}"} + %b-tooltip{"target" => "fluentd-status-message", + "placement" => "bottom", + "title" => "fluentd #{fluentd_status_message}"} + %a.nav-link#fluentd-status-message{"href" => daemon_path} = fluentd_status_icon %li.nav-item.dropdown %a.nav-link.dropdown-toggle{"data-toggle" => "dropdown", diff --git a/app/views/shared/vue/_sidemenu.html.haml b/app/views/shared/vue/_sidemenu.html.haml index c9c5fa5..d52115d 100644 --- a/app/views/shared/vue/_sidemenu.html.haml +++ b/app/views/shared/vue/_sidemenu.html.haml @@ -1,6 +1,7 @@ %ul#side-menu.navbar-nav.navbar-sidenav %li.nav-item - %a.section{"data-toggle" => "tooltip", "data-placement" => "right", "title" => "Fluuentd"} + %b-tooltip{"target" => "side-menu-fluentd", "placement" => "right", "title" => "Fluentd"} + %a#side-menu-fluentd.section = icon("fa-puzzle-piece fa-fw") + "fluentd" %ul.sidenav-second-level - if fluentd_exists? @@ -14,7 +15,8 @@ - if fluentd_exists? %li.nav-item - %a.section{"data-toggle" => "tooltip", "data-placement" => "right", "title" => "Plugins"} + %b-tooltip{"target" => "side-menu-plugins", "placement" => "right", "title" => "Plugins"} + %a#side-menu-plugins.section = icon("fa-cogs fa-fw") + t("terms.plugins") %ul.sidenav-second-level %li= link_to_other(t("plugins.installed.page_title"), installed_plugins_path) @@ -22,14 +24,16 @@ %li= link_to_other(t("plugins.updated.page_title"), updated_plugins_path) %li.nav-item - %a.section{"data-toggle" => "tooltip", "data-placement" => "right", "title" => "Misc"} + %b-tooltip{"target" => "side-menu-misc", "placement" => "right", "title" => "Misc"} + %a#side-menu-misc.section = icon("fa-coffee fa-fw") + t("terms.misc") %ul.sidenav-second-level %li= link_to_other(t("misc.information.page_title"), misc_information_path) %li= link_to_other t('users.show.page_title'), user_path %li.nav-item - %a.section{"data-toggle" => "tooltip", "data-placement" => "right", "title" => "Language"} + %b-tooltip{"target" => "side-menu-language", "placement" => "right", "title" => "Language"} + %a#side-menu-language.section = icon("fa-font") + t("terms.languages") %ul.sidenav-second-level - I18n.available_locales.each do |locale|