From 296b8219121818088772596dfd23370755e230a5 Mon Sep 17 00:00:00 2001 From: erthalion <9erthalion6@gmail.com> Date: Thu, 4 Jun 2015 15:07:16 +0700 Subject: [PATCH 001/114] Set popupClass before tooltip positioning --- src/tooltipcontroller.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tooltipcontroller.js b/src/tooltipcontroller.js index 3573ec36..06db078a 100644 --- a/src/tooltipcontroller.js +++ b/src/tooltipcontroller.js @@ -105,6 +105,9 @@ function TooltipController(options) { tipElement.data(DATA_MOUSEONTOTIP, options.mouseOnToPopup); + // add custom class to tooltip element + tipElement.addClass(options.popupClass); + // set tooltip position if (!options.followMouse) { positionTipOnElement(element); @@ -113,9 +116,6 @@ function TooltipController(options) { positionTipOnCursor(); } - // add custom class to tooltip element - tipElement.addClass(options.popupClass); - // close tooltip when clicking anywhere on the page, with the exception // of the tooltip's trigger element and any elements that are within a // tooltip that has 'mouseOnToPopup' option enabled From a97b8db2f5cfd19de79e768c2b73c194a5d8848a Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 22 Jan 2017 08:24:52 -0800 Subject: [PATCH 002/114] Upgraded grunt-contrib-compress to version 1.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 56d8dd46..74d2c26c 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "grunt": "~1.0", "grunt-browserify": "~5.0", "grunt-contrib-clean": "~1.0", - "grunt-contrib-compress": "~1.3", + "grunt-contrib-compress": "~1.4", "grunt-contrib-concat": "~1.0", "grunt-contrib-copy": "~1.0", "grunt-contrib-csslint": "~2.0", From 31324c809a9a2328549ac25227fd5555f5e7cf5c Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 29 Jan 2017 12:08:12 -0800 Subject: [PATCH 003/114] Added popupClass injection order fix to change log For #138. --- CHANGELOG.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.yml b/CHANGELOG.yml index a4c14d6f..a090f405 100644 --- a/CHANGELOG.yml +++ b/CHANGELOG.yml @@ -1,3 +1,11 @@ +v1.3.1: + date: TBD + diff: https://github.com/stevenbenner/jquery-powertip/compare/v1.3.0...master + description: Several bug fixes + changes: + - section: Bug Fixes + changes: + - Apply popupClass before tooltip positioning. v1.3.0: date: 2017-01-15 diff: https://github.com/stevenbenner/jquery-powertip/compare/v1.2.0...v1.3.0 From a79a8aeee28202edef6680220c392650675e4fb0 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 5 Feb 2017 17:45:09 -0800 Subject: [PATCH 004/114] Removed references to my twitter account from the readme I don't use twitter enough anymore for it to be an especially good way to contact me. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 7ee88882..111e3d1e 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,9 @@ You can find the documentation for the **latest release version** on the [PowerT ## Reporting Bugs -For bug reports, questions, feature requests, or other suggestions the best way to contact me is to [create an issue][newissue] on GitHub. If you don't want to use GitHub please feel free to contact me via twitter at [@stevenbenner][twitter]. As with all open source projects: pull request > bug report > tweet. +For bug reports, questions, feature requests, or other suggestions the best way to contact me is to [create an issue][newissue] on GitHub. [newissue]: https://github.com/stevenbenner/jquery-powertip/issues/new -[twitter]: https://twitter.com/stevenbenner ## Contributor Guide From 0fd794abee163272c6033841703657453f16f345 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 5 Feb 2017 17:50:56 -0800 Subject: [PATCH 005/114] Updated Google JavaScript style guide link in the readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 111e3d1e..0c9974ce 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ These are general guidelines, not rules. I won't refuse a pull request just beca * JSDoc comments: Use [closure compiler annotations][jsdoc]. * Method chaining: Avoid long chained method statements, two or three max. -[styleguide]: https://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml +[styleguide]: https://google.github.io/styleguide/javascriptguide.xml [jsdoc]: https://developers.google.com/closure/compiler/docs/js-for-compiler ## License From c5f41947becb907a7d03c406dec0f0e70ffb50a6 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 12 Feb 2017 11:37:52 -0800 Subject: [PATCH 006/114] Upgraded grunt-contrib-qunit to version 1.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 74d2c26c..3fd38c86 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "grunt-contrib-csslint": "~2.0", "grunt-contrib-cssmin": "~1.0", "grunt-contrib-jshint": "~1.1", - "grunt-contrib-qunit": "~1.2", + "grunt-contrib-qunit": "~1.3", "grunt-contrib-uglify": "~2.0", "grunt-indent": "~0.1", "grunt-jscs": "3.0", From 84e112ca5d2afa7b4f64bdf4e93205543ab5e043 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 12 Feb 2017 11:51:32 -0800 Subject: [PATCH 007/114] Upgraded grunt-contrib-uglify to version 2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3fd38c86..22346388 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "grunt-contrib-cssmin": "~1.0", "grunt-contrib-jshint": "~1.1", "grunt-contrib-qunit": "~1.3", - "grunt-contrib-uglify": "~2.0", + "grunt-contrib-uglify": "~2.1", "grunt-indent": "~0.1", "grunt-jscs": "3.0", "grunt-jsonlint": "~1.1", From a980b6c59d81fd2d9b3b2b384527c90ab0f9971d Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 12 Feb 2017 12:09:27 -0800 Subject: [PATCH 008/114] Changed Travis CI environment to cache node_modules folder This is a commonly used trick to speed up Travis CI builds. Since builds for this project tend to spend upwards of 40 seconds in the `npm install` phase, this has the potential to be a big time saver. --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index c7f62db6..e7ce1dbf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,9 @@ language: node_js node_js: - "node" +cache: + directories: + - node_modules notifications: irc: channels: From 53fbde82a16bbd8477cdd2c3aa41cfb3770316a1 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 12 Feb 2017 12:21:21 -0800 Subject: [PATCH 009/114] Tweaked doc text in the readme file Since the readme is also published to npm now, it is probably a good idea to specify *which* repository I'm talking about. Related to #134. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c9974ce..d6a4ddea 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ PowerTip is a jQuery tooltip plugin with some advanced features like **hover int ## Documentation -You can find the documentation for the **latest release version** on the [PowerTip web site][projectpage]. You will find the documentation for the **latest in-development version** in the [doc folder][docs] in this repository. +You can find the documentation for the **latest release version** on the [PowerTip web site][projectpage]. You will find the documentation for the **latest in-development version** in the [doc folder][docs] in the GitHub repository. [projectpage]: https://stevenbenner.github.io/jquery-powertip/ [docs]: https://github.com/stevenbenner/jquery-powertip/tree/master/doc From 9bcfd3d30b50302a7d3f8dab42d310c4f047f803 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 12 Feb 2017 13:05:33 -0800 Subject: [PATCH 010/114] Updated JSDoc guide link in the readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d6a4ddea..df4bf5e7 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ These are general guidelines, not rules. I won't refuse a pull request just beca * Method chaining: Avoid long chained method statements, two or three max. [styleguide]: https://google.github.io/styleguide/javascriptguide.xml -[jsdoc]: https://developers.google.com/closure/compiler/docs/js-for-compiler +[jsdoc]: https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler ## License From c968f35d574345d0e69a93c22881a9862b204f5c Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 19 Feb 2017 16:46:28 -0800 Subject: [PATCH 011/114] Upgraded grunt-contrib-cssmin to version 2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 22346388..77dc173a 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "grunt-contrib-concat": "~1.0", "grunt-contrib-copy": "~1.0", "grunt-contrib-csslint": "~2.0", - "grunt-contrib-cssmin": "~1.0", + "grunt-contrib-cssmin": "~2.0", "grunt-contrib-jshint": "~1.1", "grunt-contrib-qunit": "~1.3", "grunt-contrib-uglify": "~2.1", From 8540f89dcbae40b8d484ded4b79142c24511f9cb Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 26 Feb 2017 10:09:18 -0800 Subject: [PATCH 012/114] Changed $.Event() invocations to use new --- test/unit/core.js | 8 ++++---- test/unit/utility.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/unit/core.js b/test/unit/core.js index 45f1f6e0..73d1824b 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -101,7 +101,7 @@ $(function() { // test escape key hideTriggered = false; - element.trigger($.Event('keydown', { keyCode: 27 })); + element.trigger(new $.Event('keydown', { keyCode: 27 })); assert.strictEqual(hideTriggered, true, 'keydown event for key code 27 calls DisplayController.hide'); // cleanup test element @@ -217,7 +217,7 @@ $(function() { assert.strictEqual(elementDataAttr.data(DATA_POWERTIP), 'This is the tooltip text', 'destroy method did not remove manually set powertip data attribute'); // events - element.trigger($.Event('mouseenter', { pageX: 10, pageY: 10 })); + element.trigger(new $.Event('mouseenter', { pageX: 10, pageY: 10 })); assert.notOk(showTriggered, 'mouseenter event was unhooked after destroy'); showTriggered = false; @@ -233,7 +233,7 @@ $(function() { assert.notOk(hideTriggered, 'blur event was unhooked after destroy'); hideTriggered = false; - element.trigger($.Event('keydown', { keyCode: 27 })); + element.trigger(new $.Event('keydown', { keyCode: 27 })); assert.notOk(hideTriggered, 'keydown event was unhooked after destroy'); hideTriggered = false; }); @@ -250,7 +250,7 @@ $(function() { // document event (mouse tracking) session.currentX = 1; - $(document).trigger($.Event('mousemove', { pageX: 2, pageY: 3 })); + $(document).trigger(new $.Event('mousemove', { pageX: 2, pageY: 3 })); assert.strictEqual(session.currentX, 1, 'document event removed'); }); diff --git a/test/unit/utility.js b/test/unit/utility.js index 44c9a5c8..9976500c 100644 --- a/test/unit/utility.js +++ b/test/unit/utility.js @@ -12,8 +12,8 @@ $(function() { }); QUnit.test('isMouseEvent', function(assert) { - var mouseEnterEvent = $.Event('mouseenter', { pageX: 2, pageY: 3 }), - emptyEvent = $.Event(); + var mouseEnterEvent = new $.Event('mouseenter', { pageX: 2, pageY: 3 }), + emptyEvent = new $.Event(); assert.strictEqual(isMouseEvent(mouseEnterEvent), true, 'The mouseenter event with coordinates is a mouse event'); assert.strictEqual(isMouseEvent(emptyEvent), false, 'Empty event is not a mouse event'); @@ -26,7 +26,7 @@ $(function() { initTracking(); - $(document).trigger($.Event('mousemove', { pageX: 2, pageY: 3 })); + $(document).trigger(new $.Event('mousemove', { pageX: 2, pageY: 3 })); assert.strictEqual(session.currentX, 2, 'currentX updated with correct value on mousemove'); assert.strictEqual(session.currentY, 3, 'currentY updated with correct value on mousemove'); @@ -36,7 +36,7 @@ $(function() { session.currentX = 1; session.currentY = 1; - trackMouse($.Event('mousemove', { pageX: 4, pageY: 5 })); + trackMouse(new $.Event('mousemove', { pageX: 4, pageY: 5 })); assert.strictEqual(session.currentX, 4, 'currentX updated with correct value on mousemove'); assert.strictEqual(session.currentY, 5, 'currentY updated with correct value on mousemove'); From 0ba6f1d489d42f3b9bea831295b88445c0cc0b90 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 5 Mar 2017 13:13:41 -0800 Subject: [PATCH 013/114] Upgraded grunt-contrib-uglify to version 2.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 77dc173a..bf2c36f3 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "grunt-contrib-cssmin": "~2.0", "grunt-contrib-jshint": "~1.1", "grunt-contrib-qunit": "~1.3", - "grunt-contrib-uglify": "~2.1", + "grunt-contrib-uglify": "~2.2", "grunt-indent": "~0.1", "grunt-jscs": "3.0", "grunt-jsonlint": "~1.1", From f873125714e9e5bdd71e5c3a78b7937c558df51f Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 12 Mar 2017 14:44:18 -0700 Subject: [PATCH 014/114] Moved Gruntfile use strict from funtion to file scope --- Gruntfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 8cd77c1f..6afe5688 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -2,9 +2,9 @@ * PowerTip Grunt Config */ -module.exports = function(grunt) { - 'use strict'; +'use strict'; +module.exports = function(grunt) { // include grunt enhancements require('time-grunt')(grunt); require('jit-grunt')(grunt); From ce45128604af27bc0dc4436d9d89474d772eebef Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 12 Mar 2017 14:53:11 -0700 Subject: [PATCH 015/114] Updated QUnit references to version 2.2.0 --- package.json | 2 +- test/amd.html | 2 +- test/amd.js | 2 +- test/index.html | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index bf2c36f3..54c11293 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "grunt-jsonlint": "~1.1", "grunt-shell": "~2.1", "jit-grunt": "~0.10", - "qunitjs": "~2.1", + "qunitjs": "~2.2", "time-grunt": "~1.4" }, "scripts": { diff --git a/test/amd.html b/test/amd.html index 2a44834f..2cd023d4 100644 --- a/test/amd.html +++ b/test/amd.html @@ -5,7 +5,7 @@ PowerTip AMD Test Suite - +
diff --git a/test/amd.js b/test/amd.js index 58083f8b..b6dfb821 100644 --- a/test/amd.js +++ b/test/amd.js @@ -1,7 +1,7 @@ require.config({ paths: { jquery: 'https://code.jquery.com/jquery-3.1.1', - qunit: 'https://code.jquery.com/qunit/qunit-2.1.1', + qunit: 'https://code.jquery.com/qunit/qunit-2.2.0', 'jquery.powertip': '../dist/jquery.powertip' } }); diff --git a/test/index.html b/test/index.html index 54512a6e..01a742d1 100644 --- a/test/index.html +++ b/test/index.html @@ -5,8 +5,8 @@ PowerTip Test Suite - - + + + From 23cc0d021490655ba08077d009255df26a2ff4e9 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 19 Mar 2017 14:14:39 -0700 Subject: [PATCH 017/114] Updated jQuery references to version 3.2.0 --- examples/examples.html | 2 +- test/amd.js | 2 +- test/edge-cases.html | 2 +- test/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/examples.html b/examples/examples.html index aa4d3c35..69416a2e 100644 --- a/examples/examples.html +++ b/examples/examples.html @@ -12,7 +12,7 @@ #events-examples input, #api-examples input { margin: 10px; padding: 10px 30px; } - + diff --git a/test/amd.js b/test/amd.js index b6dfb821..636164c4 100644 --- a/test/amd.js +++ b/test/amd.js @@ -1,6 +1,6 @@ require.config({ paths: { - jquery: 'https://code.jquery.com/jquery-3.1.1', + jquery: 'https://code.jquery.com/jquery-3.2.0', qunit: 'https://code.jquery.com/qunit/qunit-2.2.0', 'jquery.powertip': '../dist/jquery.powertip' } diff --git a/test/edge-cases.html b/test/edge-cases.html index 10a4c895..4ee42b31 100644 --- a/test/edge-cases.html +++ b/test/edge-cases.html @@ -5,7 +5,7 @@ PowerTip Edge Case Tests - + diff --git a/test/index.html b/test/index.html index 01a742d1..aba32949 100644 --- a/test/index.html +++ b/test/index.html @@ -10,7 +10,7 @@ + diff --git a/test/amd.js b/test/amd.js index 636164c4..91326d66 100644 --- a/test/amd.js +++ b/test/amd.js @@ -1,6 +1,6 @@ require.config({ paths: { - jquery: 'https://code.jquery.com/jquery-3.2.0', + jquery: 'https://code.jquery.com/jquery-3.2.1', qunit: 'https://code.jquery.com/qunit/qunit-2.2.0', 'jquery.powertip': '../dist/jquery.powertip' } diff --git a/test/edge-cases.html b/test/edge-cases.html index 4ee42b31..0da70549 100644 --- a/test/edge-cases.html +++ b/test/edge-cases.html @@ -5,7 +5,7 @@ PowerTip Edge Case Tests - + diff --git a/test/index.html b/test/index.html index aba32949..c3894444 100644 --- a/test/index.html +++ b/test/index.html @@ -10,7 +10,7 @@ - +
diff --git a/test/amd.js b/test/amd.js index 91326d66..8932f5c1 100644 --- a/test/amd.js +++ b/test/amd.js @@ -1,7 +1,7 @@ require.config({ paths: { jquery: 'https://code.jquery.com/jquery-3.2.1', - qunit: 'https://code.jquery.com/qunit/qunit-2.2.0', + qunit: 'https://code.jquery.com/qunit/qunit-2.2.1', 'jquery.powertip': '../dist/jquery.powertip' } }); diff --git a/test/index.html b/test/index.html index c3894444..3bf9f2b0 100644 --- a/test/index.html +++ b/test/index.html @@ -5,8 +5,8 @@ PowerTip Test Suite - - + + - +
diff --git a/test/amd.js b/test/amd.js index 8932f5c1..7946ab3e 100644 --- a/test/amd.js +++ b/test/amd.js @@ -1,7 +1,7 @@ require.config({ paths: { jquery: 'https://code.jquery.com/jquery-3.2.1', - qunit: 'https://code.jquery.com/qunit/qunit-2.2.1', + qunit: 'https://code.jquery.com/qunit/qunit-2.3.0', 'jquery.powertip': '../dist/jquery.powertip' } }); diff --git a/test/index.html b/test/index.html index 3bf9f2b0..1fc4ba39 100644 --- a/test/index.html +++ b/test/index.html @@ -5,8 +5,8 @@ PowerTip Test Suite - - + + - +
diff --git a/test/amd.js b/test/amd.js index 7946ab3e..2716556e 100644 --- a/test/amd.js +++ b/test/amd.js @@ -1,7 +1,7 @@ require.config({ paths: { jquery: 'https://code.jquery.com/jquery-3.2.1', - qunit: 'https://code.jquery.com/qunit/qunit-2.3.0', + qunit: 'https://code.jquery.com/qunit/qunit-2.3.1', 'jquery.powertip': '../dist/jquery.powertip' } }); diff --git a/test/index.html b/test/index.html index 1fc4ba39..06db6f91 100644 --- a/test/index.html +++ b/test/index.html @@ -5,8 +5,8 @@ PowerTip Test Suite - - + + - +
diff --git a/test/amd.js b/test/amd.js index 2716556e..e49666ab 100644 --- a/test/amd.js +++ b/test/amd.js @@ -1,7 +1,7 @@ require.config({ paths: { jquery: 'https://code.jquery.com/jquery-3.2.1', - qunit: 'https://code.jquery.com/qunit/qunit-2.3.1', + qunit: 'https://code.jquery.com/qunit/qunit-2.3.2', 'jquery.powertip': '../dist/jquery.powertip' } }); diff --git a/test/index.html b/test/index.html index 06db6f91..2e416b2f 100644 --- a/test/index.html +++ b/test/index.html @@ -5,8 +5,8 @@ PowerTip Test Suite - - + + '; return content.replace(scriptsRegex, grunt.template.process(builtScriptTag)); } @@ -261,7 +261,7 @@ module.exports = function(grunt) { // custom task to build the gh-pages index.md file grunt.registerTask('build:gh-pages', 'Create the gh-pages markdown.', function() { - var template = grunt.file.read('doc/gh-pages.template.md'), + let template = grunt.file.read('doc/gh-pages.template.md'), data = { pkg: grunt.file.readJSON('package.json'), doc: grunt.file.read('doc/README.md'), From 566b58b9341d6d65e8314a33381ea80f9c80bfe9 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 28 May 2017 00:58:45 -0700 Subject: [PATCH 042/114] Added unit test to verify DisplayController.show() forceOpen param --- test/.jshintrc | 1 + test/unit/displaycontroller.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/test/.jshintrc b/test/.jshintrc index 7dd44e16..cd0c2cb6 100644 --- a/test/.jshintrc +++ b/test/.jshintrc @@ -26,6 +26,7 @@ "DATA_POWERTIP": false, "DATA_POWERTIPJQ": false, "DATA_POWERTIPTARGET": false, + "DATA_FORCEDOPEN": false, "session": true, "Collision": false, diff --git a/test/unit/displaycontroller.js b/test/unit/displaycontroller.js index 7bf19e06..26ead655 100644 --- a/test/unit/displaycontroller.js +++ b/test/unit/displaycontroller.js @@ -98,6 +98,21 @@ $(function() { assert.ok(showCalled, 'showTip called'); }); + QUnit.test('show method adds the DATA_FORCEDOPEN flag when forceOpen is set to true', function(assert) { + var element = $(''), + dc; + + dc = new DisplayController( + element, + $.fn.powerTip.defaults, + new MockTipController() + ); + + dc.show(true, true); + + assert.strictEqual(element.data(DATA_FORCEDOPEN), true, 'DATA_FORCEDOPEN is true'); + }); + QUnit.test('hide method does not delay when disableDelay is set to true', function(assert) { var element = $(''), hideCalled = false, From 271bce2ff00c454aa2f9da3d893c025ab4271208 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 4 Jun 2017 13:41:24 -0700 Subject: [PATCH 043/114] Updated QUnit references to version 2.3.3 --- test/amd.html | 2 +- test/amd.js | 2 +- test/index.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/amd.html b/test/amd.html index 37193268..b910d4a3 100644 --- a/test/amd.html +++ b/test/amd.html @@ -5,7 +5,7 @@ PowerTip AMD Test Suite - +
diff --git a/test/amd.js b/test/amd.js index e49666ab..391c4d08 100644 --- a/test/amd.js +++ b/test/amd.js @@ -1,7 +1,7 @@ require.config({ paths: { jquery: 'https://code.jquery.com/jquery-3.2.1', - qunit: 'https://code.jquery.com/qunit/qunit-2.3.2', + qunit: 'https://code.jquery.com/qunit/qunit-2.3.3', 'jquery.powertip': '../dist/jquery.powertip' } }); diff --git a/test/index.html b/test/index.html index 2e416b2f..1cc5fa8e 100644 --- a/test/index.html +++ b/test/index.html @@ -5,8 +5,8 @@ PowerTip Test Suite - - + + - +
diff --git a/test/amd.js b/test/amd.js index dec0a44d..4cc33d26 100644 --- a/test/amd.js +++ b/test/amd.js @@ -3,7 +3,7 @@ require.config({ paths: { jquery: 'https://code.jquery.com/jquery-3.2.1', - qunit: 'https://code.jquery.com/qunit/qunit-2.3.3', + qunit: 'https://code.jquery.com/qunit/qunit-2.4.0', 'jquery.powertip': '../dist/jquery.powertip' } }); diff --git a/test/index.html b/test/index.html index 1cc5fa8e..43a6ff74 100644 --- a/test/index.html +++ b/test/index.html @@ -5,8 +5,8 @@ PowerTip Test Suite - - + + + From 4076ef2d0449766f3ad4db07ede3f9d357bf2c14 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 17 Sep 2017 09:13:56 -0700 Subject: [PATCH 064/114] Upgraded grunt-contrib-uglify to version 3.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e2774102..c37333b7 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "grunt-contrib-cssmin": "~2.2", "grunt-contrib-jshint": "~1.1", "grunt-contrib-qunit": "~2.0", - "grunt-contrib-uglify": "~3.0", + "grunt-contrib-uglify": "~3.1", "grunt-indent": "~1.0", "grunt-jscs": "3.0", "grunt-jsonlint": "~1.1", From 7b5509eed3994464861a32e109f6fa21271b3a00 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 24 Sep 2017 19:37:10 -0700 Subject: [PATCH 065/114] Combined intro.js and outro.js files into a single wrapper.js file This simplifies the Grunt build process a little bit, removes the need to have the banner text in the Gruntfile, and makes editing the wrapper code a little cleaner. --- Gruntfile.js | 41 ++++++++++++++---------------------- src/outro.js | 12 ----------- src/{intro.js => wrapper.js} | 20 ++++++++++-------- 3 files changed, 27 insertions(+), 46 deletions(-) delete mode 100644 src/outro.js rename src/{intro.js => wrapper.js} (50%) diff --git a/Gruntfile.js b/Gruntfile.js index 24eda619..23c23765 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -23,15 +23,6 @@ module.exports = function(grunt) { license: 'LICENSE.txt', changelog: 'CHANGELOG.yml' }, - banner: [ - '/*!', - ' <%= pkg.title %> v<%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd") %>)', - ' <%= pkg.homepage %>', - ' Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %> (<%= pkg.author.url %>).', - ' Released under <%= pkg.license %> license.', - ' https://raw.github.com/stevenbenner/jquery-powertip/master/<%= files.license %>', - '*/\n' - ].join('\n'), clean: { dist: [ '<%= paths.build %>' ], temp: [ '<%= paths.temp %>' ] @@ -95,19 +86,6 @@ module.exports = function(grunt) { ], dest: '<%= paths.temp %>/core.js', nonull: true - }, - dist: { - src: [ - 'src/intro.js', - '<%= concat.core.dest %>', - 'src/outro.js' - ], - dest: '<%= paths.build %>/<%= files.cat %>', - options: { - banner: '<%= banner %>', - separator: '' - }, - nonull: true } }, indent: { @@ -137,13 +115,26 @@ module.exports = function(grunt) { src: [ '<%= paths.build %>/<%= files.cat %>' ], dest: '<%= paths.build %>/<%= files.min %>', options: { - banner: '<%= banner %>', + output: { + comments: /^!/ + }, report: 'gzip', ie8: true } } }, copy: { + dist: { + src: [ 'src/wrapper.js' ], + dest: '<%= paths.build %>/<%= files.cat %>', + options: { + process: function(content) { + let replaceRegex = /\s\/\* \[POWERTIP CODE\] \*\//, + coreFile = grunt.file.read(grunt.template.process('<%= concat.core.dest %>')); + return grunt.template.process(content).replace(replaceRegex, coreFile); + } + } + }, css: { src: [ 'css/*.css' ], dest: '<%= paths.build %>/' @@ -277,10 +268,10 @@ module.exports = function(grunt) { // register grunt tasks grunt.registerTask('default', [ 'test' ]); - grunt.registerTask('test', [ 'jsonlint', 'concat:core', 'indent', 'concat:dist', 'jshint', 'jscs', 'qunit:tests', 'test:browserify', 'csslint', 'clean:temp' ]); + grunt.registerTask('test', [ 'jsonlint', 'concat:core', 'indent', 'copy:dist', 'jshint', 'jscs', 'qunit:tests', 'test:browserify', 'csslint', 'clean:temp' ]); grunt.registerTask('test:browserify', [ 'copy:browserify', 'browserify', 'qunit:browserify' ]); grunt.registerTask('build', [ 'jsonlint', 'build:js', 'build:css' ]); - grunt.registerTask('build:js', [ 'concat:core', 'indent', 'concat:dist', 'jshint', 'jscs', 'qunit:tests', 'test:browserify', 'uglify', 'clean:temp' ]); + grunt.registerTask('build:js', [ 'concat:core', 'indent', 'copy:dist', 'jshint', 'jscs', 'qunit:tests', 'test:browserify', 'uglify', 'clean:temp' ]); grunt.registerTask('build:css', [ 'csslint', 'copy:css', 'cssmin' ]); grunt.registerTask('build:docs', [ 'copy:examples', 'copy:license', 'copy:changelog' ]); grunt.registerTask('build:release', [ 'clean:dist', 'build', 'build:docs', 'compress' ]); diff --git a/src/outro.js b/src/outro.js deleted file mode 100644 index a3ff8fae..00000000 --- a/src/outro.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * PowerTip Outro - * - * @fileoverview Closing lines for dist version. - * @link https://stevenbenner.github.io/jquery-powertip/ - * @author Steven Benner (http://stevenbenner.com/) - * @requires jQuery 1.7+ - */ - - // return api for commonjs and amd environments - return $.powerTip; -})); diff --git a/src/intro.js b/src/wrapper.js similarity index 50% rename from src/intro.js rename to src/wrapper.js index 1d65af00..b043f723 100644 --- a/src/intro.js +++ b/src/wrapper.js @@ -1,12 +1,10 @@ -/** - * PowerTip Intro - * - * @fileoverview Opening lines for dist version. - * @link https://stevenbenner.github.io/jquery-powertip/ - * @author Steven Benner (http://stevenbenner.com/) - * @requires jQuery 1.7+ - */ - +/*! + <%= pkg.title %> v<%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd") %>) + <%= pkg.homepage %> + Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %> (<%= pkg.author.url %>). + Released under <%= pkg.license %> license. + https://raw.github.com/stevenbenner/jquery-powertip/master/<%= files.license %> +*/ (function(root, factory) { // support loading the plugin via common patterns if (typeof define === 'function' && define.amd) { @@ -20,3 +18,7 @@ factory(root.jQuery); } }(this, function($) { + /* [POWERTIP CODE] */ + // return api for commonjs and amd environments + return $.powerTip; +})); From 81a3728b2eb4ec3105a25829d09e4be1dd32b77c Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 1 Oct 2017 00:04:17 -0700 Subject: [PATCH 066/114] Removed outdated sentence in release process docs --- doc/release-process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release-process.md b/doc/release-process.md index 5975596a..c30fc2dd 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -49,7 +49,7 @@ The events that fire during the tooltip life cycle are also considered to be par **POINT OF NO RETURN** - This is the fail-safe step. Make sure the build looks right. Make sure the commits from steps 1 and 2 are correct. Make sure the commits added to the gh-pages branch look right. If everything looks good then push the commits and the tag. With that the new version is out and available for download. + This is the fail-safe step. Make sure the build looks right. Make sure the commits from steps 1 and 2 are correct. Make sure the commits added to the gh-pages branch look right. If everything looks good then push the commits and the tag. 7. **Publish to npm** From ad9b20fd3c402600fd2052a6c3169786195e3cd2 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 1 Oct 2017 00:05:57 -0700 Subject: [PATCH 067/114] Corrected typo in release process documentation --- doc/release-process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release-process.md b/doc/release-process.md index c30fc2dd..9bb22f25 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -53,7 +53,7 @@ The events that fire during the tooltip life cycle are also considered to be par 7. **Publish to npm** - *Prefer npm version 4.0.0 or greater to for prepublishOnly script* + *Prefer npm version 4.0.0 or greater for prepublishOnly script* First, verify that the package to be release to npm contains the expected files in the expected structure. Run `grunt build:npm && npm pack`. This will generate the appropriate dist folder contents and create the tgz package. Look over the tgz package to make sure everything looks good. From f4677633331d2767a694deb5a1b5ac198dacedbd Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 8 Oct 2017 23:50:50 -0700 Subject: [PATCH 068/114] Update destroy() API method to close any open tooltips This patch adds extra handling for open tooltips to the destroy() API method. Previously, if you destroyed PowerTip on an element while the tooltip is open it could leave some extra state around, such as the desync polling timer. With this patch, destroy() will now invoke the regular tooltip hide() to make sure everything is wrapped up properly. Possibly related to issue #165. --- src/core.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/core.js b/src/core.js index cc11d8c5..47e4926b 100644 --- a/src/core.js +++ b/src/core.js @@ -318,6 +318,17 @@ $.powerTip = { return element; } + // if a tooltip is currently open for an element we are being asked to + // destroy then it should be forced to close + if (session.isTipOpen && !session.isClosing && $element.filter(session.activeHover).length > 0) { + // if the tooltip is waiting to close then cancel that delay timer + if (session.delayInProgress) { + session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel(); + } + // hide the tooltip, immediately + $.powerTip.hide(session.activeHover, true); + } + // unhook events and destroy plugin changes to each element $element.off(EVENT_NAMESPACE).each(function destroy() { var $this = $(this), From 8500a34fb171836324dabdabd91f59a7238e26af Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 15 Oct 2017 15:00:17 -0700 Subject: [PATCH 069/114] Added unit test to verify destroy() API method cleans up open tips Ref commit: f4677633331d2767a694deb5a1b5ac198dacedbd Probably related to issue #165. --- test/unit/core.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/unit/core.js b/test/unit/core.js index 3f3971b9..328b6b84 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -262,6 +262,24 @@ $(function() { assert.strictEqual(session.currentX, 1, 'document event removed'); }); + QUnit.test('API destroy hides a tooltip that is currently open', function(assert) { + var done = assert.async(), + element = $('').powerTip(); + + element.on('powerTipOpen', function() { + // destroy the tooltip + $.powerTip.destroy(element); + + assert.notOk(session.isTipOpen, 'session.isTipOpen is false'); + assert.notOk(session.desyncTimeout, 'session.desyncTimeout is not active'); + + done(); + }); + + // open the tooltip + $.powerTip.show(element); + }); + function MockDisplayController(show, hide, cancel, resetPosition) { this.show = show || $.noop; this.hide = hide || $.noop; From c8be193fb849f72a9ee929723058cef7a6820422 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 22 Oct 2017 02:11:33 -0700 Subject: [PATCH 070/114] Updated QUnit references to version 2.4.1 --- test/amd.html | 2 +- test/amd.js | 2 +- test/index.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/amd.html b/test/amd.html index e0df7140..5e657d41 100644 --- a/test/amd.html +++ b/test/amd.html @@ -5,7 +5,7 @@ PowerTip AMD Test Suite - +
diff --git a/test/amd.js b/test/amd.js index 4cc33d26..271ad625 100644 --- a/test/amd.js +++ b/test/amd.js @@ -3,7 +3,7 @@ require.config({ paths: { jquery: 'https://code.jquery.com/jquery-3.2.1', - qunit: 'https://code.jquery.com/qunit/qunit-2.4.0', + qunit: 'https://code.jquery.com/qunit/qunit-2.4.1', 'jquery.powertip': '../dist/jquery.powertip' } }); diff --git a/test/index.html b/test/index.html index 43a6ff74..ab01d112 100644 --- a/test/index.html +++ b/test/index.html @@ -5,8 +5,8 @@ PowerTip Test Suite - - + + - +
diff --git a/test/browserify.js b/test/browserify.js index 65540c03..5a066aaa 100644 --- a/test/browserify.js +++ b/test/browserify.js @@ -1,7 +1,7 @@ 'use strict'; (function runTests() { - var QUnit = require('qunitjs'), + var QUnit = require('qunit'), $ = require('jquery'), powerTip = require('./../dist/jquery.powertip.js'); From d869359f667edceb805fd6cfbb658ab98624fa08 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 14 Jan 2018 13:09:52 -0800 Subject: [PATCH 086/114] Updated QUnit references to version 2.5.0 --- package.json | 2 +- test/amd.html | 2 +- test/amd.js | 2 +- test/index.html | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c931d962..c249db78 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "grunt-jsonlint": "~1.1", "grunt-shell": "~2.1", "jit-grunt": "~0.10", - "qunit": "~2.4", + "qunit": "~2.5", "time-grunt": "~1.4" }, "scripts": { diff --git a/test/amd.html b/test/amd.html index 5e657d41..e031beae 100644 --- a/test/amd.html +++ b/test/amd.html @@ -5,7 +5,7 @@ PowerTip AMD Test Suite - +
diff --git a/test/amd.js b/test/amd.js index 271ad625..97940294 100644 --- a/test/amd.js +++ b/test/amd.js @@ -3,7 +3,7 @@ require.config({ paths: { jquery: 'https://code.jquery.com/jquery-3.2.1', - qunit: 'https://code.jquery.com/qunit/qunit-2.4.1', + qunit: 'https://code.jquery.com/qunit/qunit-2.5.0', 'jquery.powertip': '../dist/jquery.powertip' } }); diff --git a/test/index.html b/test/index.html index ab01d112..d2b477a8 100644 --- a/test/index.html +++ b/test/index.html @@ -5,8 +5,8 @@ PowerTip Test Suite - - + + + diff --git a/test/amd.js b/test/amd.js index 97940294..b3f144f1 100644 --- a/test/amd.js +++ b/test/amd.js @@ -2,7 +2,7 @@ require.config({ paths: { - jquery: 'https://code.jquery.com/jquery-3.2.1', + jquery: 'https://code.jquery.com/jquery-3.3.1', qunit: 'https://code.jquery.com/qunit/qunit-2.5.0', 'jquery.powertip': '../dist/jquery.powertip' } diff --git a/test/edge-cases.html b/test/edge-cases.html index 9b061977..48438f24 100644 --- a/test/edge-cases.html +++ b/test/edge-cases.html @@ -5,7 +5,7 @@ PowerTip Edge Case Tests - + diff --git a/test/index.html b/test/index.html index d2b477a8..60b36eea 100644 --- a/test/index.html +++ b/test/index.html @@ -10,7 +10,7 @@ - +
diff --git a/test/amd.js b/test/amd.js index b3f144f1..8cf7bf77 100644 --- a/test/amd.js +++ b/test/amd.js @@ -3,7 +3,7 @@ require.config({ paths: { jquery: 'https://code.jquery.com/jquery-3.3.1', - qunit: 'https://code.jquery.com/qunit/qunit-2.5.0', + qunit: 'https://code.jquery.com/qunit/qunit-2.5.1', 'jquery.powertip': '../dist/jquery.powertip' } }); diff --git a/test/index.html b/test/index.html index 60b36eea..2d44e601 100644 --- a/test/index.html +++ b/test/index.html @@ -5,8 +5,8 @@ PowerTip Test Suite - - + + - +
diff --git a/test/amd.js b/test/amd.js index 8cf7bf77..cafab8bf 100644 --- a/test/amd.js +++ b/test/amd.js @@ -3,7 +3,7 @@ require.config({ paths: { jquery: 'https://code.jquery.com/jquery-3.3.1', - qunit: 'https://code.jquery.com/qunit/qunit-2.5.1', + qunit: 'https://code.jquery.com/qunit/qunit-2.6.0', 'jquery.powertip': '../dist/jquery.powertip' } }); diff --git a/test/index.html b/test/index.html index 2d44e601..c4d93d42 100644 --- a/test/index.html +++ b/test/index.html @@ -5,8 +5,8 @@ PowerTip Test Suite - - + + From e30cd550f27e41d1bb9284747d1266da58e72eb9 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 8 Apr 2018 20:41:33 -0700 Subject: [PATCH 110/114] Updated version 1.3.1 release description in change log --- CHANGELOG.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.yml b/CHANGELOG.yml index bc9ec41c..729834a3 100644 --- a/CHANGELOG.yml +++ b/CHANGELOG.yml @@ -1,7 +1,7 @@ v1.3.1: date: TBD diff: https://github.com/stevenbenner/jquery-powertip/compare/v1.3.0...master - description: Several bug fixes + description: Minor bug fixing release with a couple functionality improvements changes: - section: Features & Improvements changes: From b7a17c3bc28176bfa30c4b8d04bba6c85306daef Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 8 Apr 2018 20:46:19 -0700 Subject: [PATCH 111/114] Upgraded grunt-browserify to verison 5.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a5684821..7b5d2461 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "devDependencies": { "@stevenbenner/eslint-config": "~1.0", "grunt": "~1.0", - "grunt-browserify": "~5.2", + "grunt-browserify": "~5.3", "grunt-contrib-clean": "~1.1", "grunt-contrib-compress": "~1.4", "grunt-contrib-concat": "~1.0", From e3305c3d0cb13912197c4251cc9861603d88274e Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 15 Apr 2018 04:55:52 -0700 Subject: [PATCH 112/114] Removed Gemnasium badge from project readme Gemnasium was recently acquired by GitLab and plans to shut down the gemnasium.com service on May 15th. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 2f739d5e..15e9aaf4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ PowerTip is a jQuery tooltip plugin with some advanced features like **hover intent testing**, **tooltip queueing**, and **support for complex data**. It also has that rarest of features in jQuery plugins, it's not abandonware. [![Build Status](https://travis-ci.org/stevenbenner/jquery-powertip.svg?branch=master)](https://travis-ci.org/stevenbenner/jquery-powertip) -[![Dependency Status](https://gemnasium.com/stevenbenner/jquery-powertip.svg)](https://gemnasium.com/stevenbenner/jquery-powertip) [![Release Version](https://img.shields.io/github/release/stevenbenner/jquery-powertip.svg)][projectpage] ## Getting Started From 80ffa95ce4f88251bffc783c4cbc42d2a4ab6252 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 15 Apr 2018 05:46:00 -0700 Subject: [PATCH 113/114] Updated change log v1.3.1 release date and diff --- CHANGELOG.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.yml b/CHANGELOG.yml index 729834a3..f2edf00f 100644 --- a/CHANGELOG.yml +++ b/CHANGELOG.yml @@ -1,6 +1,6 @@ v1.3.1: - date: TBD - diff: https://github.com/stevenbenner/jquery-powertip/compare/v1.3.0...master + date: 2018-04-15 + diff: https://github.com/stevenbenner/jquery-powertip/compare/v1.3.0...v1.3.1 description: Minor bug fixing release with a couple functionality improvements changes: - section: Features & Improvements From 90225c403c8246a0f154f0c0d6a02326d9cd3f4a Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Sun, 15 Apr 2018 06:01:18 -0700 Subject: [PATCH 114/114] Bumped version to 1.3.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7b5d2461..7128d5c7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "jquery-powertip", "title": "PowerTip", "description": "A jQuery plugin that creates hover tooltips.", - "version": "1.3.0", + "version": "1.3.1", "main": "dist/jquery.powertip.js", "homepage": "https://stevenbenner.github.io/jquery-powertip/", "author": {