Skip to content

Commit

Permalink
Fix tooltips in drawer (#3400)
Browse files Browse the repository at this point in the history
* fix tooltips in drawer, this was a regression from the bower to webpack upgrade

* fix css path
  • Loading branch information
PieterGit authored and sulkaharo committed May 18, 2018
1 parent 6ec78dd commit bd1db6e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions bundle/bundle.source.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../static/css/drawer.css';
import '../static/css/dropdown.css';
import '../static/css/sgv.css';
import '../node_modules/jquery.tipsy/src/jquery.tipsy.css';
import '../node_modules/jquery.tooltips/css/jquery.tooltips.css';


$ = require("jquery");
Expand All @@ -11,7 +11,7 @@ require('jquery-ui-bundle');
window._ = require('lodash');
window.d3 = require('d3');

require('jquery.tipsy');
require('jquery.tooltips');

window.Storage = require('js-storage');

Expand Down
6 changes: 3 additions & 3 deletions lib/client/browser-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ function init ($) {

// Tooltips can remain in the way on touch screens.
if (!isTouch()) {
$('.tip').tipsy();
$('.tip').tooltip();
} else {
// Drawer info tips should be displayed on touchscreens.
$('#drawer').find('.tip').tipsy();
$('#drawer').find('.tip').tooltip();
}
$.fn.tipsy.defaults = {
$.fn.tooltip.defaults = {
fade: true,
gravity: 'n',
opacity: 0.75
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@
"file-loader": "^1.1.11",
"flot": "^0.8.0-alpha",
"forever": "^0.15.3",
"jquery": "^2.2.4",
"jquery-ui-bundle": "^1.12.1",
"jquery.tooltips": "^1.0.0",
"jquery": "^3.3.1",
"jquery-ui-bundle": "^1.12.1-migrate",
"jquery.tipsy": "^1.0.3",
"js-storage": "^1.0.4",
"jsonwebtoken": "^8.2.0",
"lodash": "^4.17.5",
Expand Down
2 changes: 1 addition & 1 deletion tests/admintools.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('admintools', function ( ) {

self.localCookieStorage = self.localStorage = self.$.localStorage = require('./fixtures/localstorage');

self.$.fn.tipsy = function mockTipsy ( ) { };
self.$.fn.tooltip = function mockTooltip ( ) { };

self.$.fn.dialog = function mockDialog (opts) {
function maybeCall (name, obj) {
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/headless.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function headless (benv, binding) {
//self.$ = require('jquery');
//self.$.localStorage = require(localStorage);

self.$.fn.tipsy = function mockTipsy ( ) { };
self.$.fn.tooltip = function mockTooltip ( ) { };

var indexHtml = read(htmlFile, 'utf8');
self.$('body').html(indexHtml);
Expand All @@ -37,7 +37,7 @@ function headless (benv, binding) {
self.$.plot = function mockPlot () {
};

self.$.fn.tipsy = function mockTipsy ( ) { };
self.$.fn.tooltip = function mockTooltip ( ) { };

self.$.fn.dialog = function mockDialog (opts) {
function maybeCall (name, obj) {
Expand Down
2 changes: 1 addition & 1 deletion tests/hashauth.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('hashauth', function ( ) {
self.$ = require('jquery');
self.$.localStorage = require('./fixtures/localstorage');
self.$.fn.tipsy = function mockTipsy ( ) { };
self.$.fn.tooltip = function mockTooltip ( ) { };
var indexHtml = read(__dirname + '/../static/index.html', 'utf8');
self.$('body').html(indexHtml);
Expand Down

0 comments on commit bd1db6e

Please sign in to comment.