From 1b55859eb29d22867d8563527ad3d57a67bbc8f4 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Thu, 20 Jun 2013 23:01:00 -0700 Subject: [PATCH] all tooltips are automatically converted to bootstrap. --- UI/Router.js | 2 +- UI/Settings/DownloadClient/DownloadClientView.js | 2 -- UI/Settings/Misc/MiscView.js | 7 ++----- UI/app.js | 3 ++- UI/{ => jQuery}/RouteBinder.js | 0 UI/jQuery/TooltipBinder.js | 9 +++++++++ 6 files changed, 14 insertions(+), 9 deletions(-) rename UI/{ => jQuery}/RouteBinder.js (100%) create mode 100644 UI/jQuery/TooltipBinder.js diff --git a/UI/Router.js b/UI/Router.js index 07c76295f..ae4d9f4d6 100644 --- a/UI/Router.js +++ b/UI/Router.js @@ -4,7 +4,7 @@ require( 'app', 'marionette', 'Controller', - 'RouteBinder' + 'jQuery/RouteBinder' ], function (App, Marionette, Controller, RouterBinder) { NzbDrone.Router = Marionette.AppRouter.extend({ diff --git a/UI/Settings/DownloadClient/DownloadClientView.js b/UI/Settings/DownloadClient/DownloadClientView.js index 715b6bef1..239b63ea8 100644 --- a/UI/Settings/DownloadClient/DownloadClientView.js +++ b/UI/Settings/DownloadClient/DownloadClientView.js @@ -25,9 +25,7 @@ define([ }, onRender: function () { - this.ui.tooltip.tooltip({ placement: 'right', html: true }); this.ui.pathInput.autoComplete('/directories'); - this.refreshUIVisibility(this.model.get('downloadClient')); }, diff --git a/UI/Settings/Misc/MiscView.js b/UI/Settings/Misc/MiscView.js index c8d2ccdd4..ffbba425a 100644 --- a/UI/Settings/Misc/MiscView.js +++ b/UI/Settings/Misc/MiscView.js @@ -1,6 +1,6 @@ 'use strict'; -define(['marionette', 'Mixins/AsModelBoundview', 'bootstrap'], function (Marionette, AsModelBoundView) { +define(['marionette', 'Mixins/AsModelBoundview'], function (Marionette, AsModelBoundView) { var view = Marionette.ItemView.extend({ template : 'Settings/Misc/MiscTemplate', @@ -8,11 +8,8 @@ define(['marionette', 'Mixins/AsModelBoundview', 'bootstrap'], function (Marione ui: { tooltip: '[class^="help-inline"] i' - }, - - onRender: function () { - this.ui.tooltip.tooltip({ placement: 'right', html: true }); } + }); return AsModelBoundView.call(view); diff --git a/UI/app.js b/UI/app.js index 393c91112..e8f5c2faa 100644 --- a/UI/app.js +++ b/UI/app.js @@ -238,7 +238,8 @@ define( window.require( [ - 'Router' + 'Router', + 'jQuery/TooltipBinder' ]); return NzbDrone; diff --git a/UI/RouteBinder.js b/UI/jQuery/RouteBinder.js similarity index 100% rename from UI/RouteBinder.js rename to UI/jQuery/RouteBinder.js diff --git a/UI/jQuery/TooltipBinder.js b/UI/jQuery/TooltipBinder.js new file mode 100644 index 000000000..b0d9bb43b --- /dev/null +++ b/UI/jQuery/TooltipBinder.js @@ -0,0 +1,9 @@ +"use strict"; +define( + [ + 'bootstrap' + ], function () { + $(document).on('mouseenter', '[title]', function () { + $(this).tooltip('show'); + }); + });