From 9387e37bef778d51badc8e0a0f4d322a9a255a67 Mon Sep 17 00:00:00 2001 From: Max Shirshin Date: Fri, 18 Sep 2015 18:19:45 +0200 Subject: [PATCH 1/2] If called during closing animation, stop animation immdiately, and re-init the mask --- src/toolbox/toolbox.expose.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/toolbox/toolbox.expose.js b/src/toolbox/toolbox.expose.js index 2525f88..61610f8 100644 --- a/src/toolbox/toolbox.expose.js +++ b/src/toolbox/toolbox.expose.js @@ -62,15 +62,22 @@ if (fn) { return fn.call($.mask); } } - var mask, exposed, loaded, config, overlayIndex; + var mask, exposed, loaded, config, overlayIndex, + closingNow = false; $.mask = { load: function(conf, els) { + if (closingNow && mask) { + // this calls the fadeOut callback + // and sets closingNow to false + mask.finish(); + } + // already loaded ? - if (loaded) { return this; } + if (loaded) { return this; } // configuration if (typeof conf == 'string') { @@ -169,11 +176,13 @@ // onBeforeClose if (call(config.onBeforeClose) === false) { return this; } + closingNow = true; mask.fadeOut(config.closeSpeed, function() { call(config.onClose); if (exposed) { exposed.css({zIndex: overlayIndex}); - } + } + closingNow = false; loaded = false; }); From 7bb063bf36900d7fd7b126e9663622a6b1abffd6 Mon Sep 17 00:00:00 2001 From: Steve Mason Date: Fri, 15 Dec 2017 21:33:54 +0000 Subject: [PATCH 2/2] Added package.json --- package.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..2ae5cd5 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "jquerytools", + "version": "1.2.9-bw-npm", + "description": "[jQuery Tools](http://flowplayer.org/tools/) - The Missing UI library for the Web ================================", + "main": "index.js", + "directories": { + "lib": "lib", + "test": "test" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/BrandwatchLtd/jquerytools.git" + }, + "author": "", + "bugs": { + "url": "https://github.com/BrandwatchLtd/jquerytools/issues" + }, + "homepage": "https://github.com/BrandwatchLtd/jquerytools#readme" +}