Tooltips shouldn't stay visible after clicking

pull/6/head
Mark McDowall 11 years ago
parent 6ee876392c
commit 34ca5d4014

@ -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…
Cancel
Save