mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-07 06:52:35 +00:00
Tooltips shouldn't stay visible after clicking
This commit is contained in:
parent
6ee876392c
commit
34ca5d4014
2 changed files with 35 additions and 8 deletions
28
src/UI/Shared/Tooltip.js
Normal file
28
src/UI/Shared/Tooltip.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'jquery'
|
||||
], function ($) {
|
||||
return {
|
||||
|
||||
appInitializer: function () {
|
||||
console.log('starting signalR');
|
||||
|
||||
$('body').tooltip({
|
||||
selector: '[title]',
|
||||
container: 'body'
|
||||
});
|
||||
|
||||
$(document).click(function(e) {
|
||||
|
||||
if ($(e.target).attr('title') !== undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('.tooltip').remove();
|
||||
});
|
||||
|
||||
return this;
|
||||
}
|
||||
};
|
||||
});
|
|
@ -68,13 +68,7 @@ require.config({
|
|||
deps:
|
||||
[
|
||||
'jquery'
|
||||
],
|
||||
init: function ($) {
|
||||
$('body').tooltip({
|
||||
selector: '[title]',
|
||||
container: 'body'
|
||||
});
|
||||
}
|
||||
]
|
||||
},
|
||||
backstrech : {
|
||||
deps:
|
||||
|
@ -249,9 +243,10 @@ define(
|
|||
'Shared/Modal/ModalController',
|
||||
'Shared/ControlPanel/ControlPanelController',
|
||||
'System/StatusModel',
|
||||
'Shared/Tooltip',
|
||||
'Instrumentation/StringFormat',
|
||||
'LifeCycle'
|
||||
], function ($, Backbone, Marionette, RouteBinder, SignalRBroadcaster, NavbarView, AppLayout, SeriesController, Router, ModalController, ControlPanelController, serverStatusModel) {
|
||||
], function ($, Backbone, Marionette, RouteBinder, SignalRBroadcaster, NavbarView, AppLayout, SeriesController, Router, ModalController, ControlPanelController, serverStatusModel, Tooltip) {
|
||||
|
||||
new SeriesController();
|
||||
new ModalController();
|
||||
|
@ -268,6 +263,10 @@ define(
|
|||
app: app
|
||||
});
|
||||
|
||||
app.addInitializer(Tooltip.appInitializer, {
|
||||
app: app
|
||||
});
|
||||
|
||||
app.addInitializer(function () {
|
||||
Backbone.history.start({ pushState: true, root: serverStatusModel.get('urlBase') });
|
||||
RouteBinder.bind();
|
||||
|
|
Loading…
Reference in a new issue