From bb293caf9d8bdc632c36ef64802ed3a85bfc6e75 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 9 Nov 2010 12:17:35 +0100 Subject: [PATCH 01/18] added possibility to enclose tooltip element inside trigger element (e.g. for table cells), incl. test --- src/tooltip/tooltip.js | 3 ++- test/tooltip/index.html | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js index cf9a451..6e6d64b 100644 --- a/src/tooltip/tooltip.js +++ b/src/tooltip/tooltip.js @@ -189,7 +189,8 @@ // manual tooltip } else { - tip = trigger.next(); + tip = trigger.find('.' + conf.tipClass); + if (!tip.length) { tip = trigger.next(); } if (!tip.length) { tip = trigger.parent().next(); } } diff --git a/test/tooltip/index.html b/test/tooltip/index.html index 0177a66..b8d5469 100644 --- a/test/tooltip/index.html +++ b/test/tooltip/index.html @@ -104,6 +104,39 @@

Manual tooltip

+
+ +

Manual enclosed tooltip

+ + + + + + + + + +
+ trigger 1 +
Manual enclosed #1
+
+ trigger 2 +
Manual enclosed #2
+
+ trigger 3 +
Manual enclosed #3
+
+ + + +
+

Same tip element

From 28b63c51fc6c70c4fa6019878749c7bba8f91642 Mon Sep 17 00:00:00 2001 From: Adrian Yee Date: Mon, 14 Mar 2011 11:48:19 -0700 Subject: [PATCH 02/18] Fix for clicking on the next/prev month when it's been disabled via visibility: hidden closes the calendar - target is the root node instead of the button. --- src/dateinput/dateinput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dateinput/dateinput.js b/src/dateinput/dateinput.js index 64f2098..af8115b 100644 --- a/src/dateinput/dateinput.js +++ b/src/dateinput/dateinput.js @@ -371,7 +371,7 @@ $(document).bind("click.d", function(e) { var el = e.target; - if (!$(el).parents("#" + css.root).length && el != input[0] && (!trigger || el != trigger[0])) { + if (!(el.id == css.root || $(el).parents("#" + css.root).length) && el != input[0] && (!trigger || el != trigger[0])) { self.hide(e); } From ebb5784bfbb9c9215333989c5c6a7e21102ccce3 Mon Sep 17 00:00:00 2001 From: Adrian Yee Date: Thu, 8 Sep 2011 13:20:15 -0700 Subject: [PATCH 03/18] Fix for clicking on the next/prev month button hides calendar. If the next/prev month buttons are hidden via visibility: hidden and the user clicks on the area where the button is after it's been hidden, the click event's target ends up being the root node. The code that checks for this expects the event to be a child of the root node instead of the root node itself, so this patch just adds a check for this. --- src/dateinput/dateinput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dateinput/dateinput.js b/src/dateinput/dateinput.js index 6bc0788..a12dabe 100644 --- a/src/dateinput/dateinput.js +++ b/src/dateinput/dateinput.js @@ -375,7 +375,7 @@ $(document).bind("click.d", function(e) { var el = e.target; - if (!$(el).parents("#" + css.root).length && el != input[0] && (!trigger || el != trigger[0])) { + if (!(el.id == css.root || $(el).parents("#" + css.root).length) && el != input[0] && (!trigger || el != trigger[0])) { self.hide(e); } From d55f9bb714e85f9d421cbef0675602c9a16ce813 Mon Sep 17 00:00:00 2001 From: ewheeler Date: Mon, 28 Mar 2011 13:38:49 -0400 Subject: [PATCH 04/18] check each tooltip for existence, fixes issue 349 rather than checking if any tooltips already exist. this way tooltips on some elements that are reloaded via ajax calls will continue working. the previous code would assume all tooltips still exist if *any* of the tooltips still exist -- even if some of them no longer exist. now, part of a page may be changed and can have new tooltips created instead of only the ones for elements that did not change. resolves: https://github.com/jquerytools/jquerytools/issues/349 Signed-off-by: Adam Mckaig --- src/tooltip/tooltip.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js index 273624c..6e35c6a 100644 --- a/src/tooltip/tooltip.js +++ b/src/tooltip/tooltip.js @@ -331,10 +331,6 @@ // jQuery plugin implementation $.fn.tooltip = function(conf) { - - // return existing instance - var api = this.data("tooltip"); - if (api) { return api; } conf = $.extend(true, {}, $.tools.tooltip.conf, conf); @@ -344,9 +340,12 @@ } // install tooltip for each entry in jQuery object + // that is not an existing instance this.each(function() { - api = new Tooltip($(this), conf); - $(this).data("tooltip", api); + if ( $(this).data("tooltip")===null){ + api = new Tooltip($(this), conf); + $(this).data("tooltip", api); + }; }); return conf.api ? api: this; From 6899ce478f7c563c699d3d22d4bb36f00483bb7c Mon Sep 17 00:00:00 2001 From: Duc Tri Le Date: Sun, 18 Dec 2011 15:56:43 -0500 Subject: [PATCH 05/18] #480: Fixing readonly bug --- src/dateinput/dateinput.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/dateinput/dateinput.js b/src/dateinput/dateinput.js index a66d615..498a3b0 100644 --- a/src/dateinput/dateinput.js +++ b/src/dateinput/dateinput.js @@ -274,7 +274,12 @@ //{{{ pick - function select(date, conf, e) { + function select(date, conf, e) { + // If it is readonly, then we'll just close the calendar + if (input.attr('readonly')) { + self.hide(e); + return; + } // current value value = date; @@ -405,7 +410,7 @@ */ show: function(e) { - if (input.attr("readonly") || input.attr("disabled") || opened) { return; } + if (input.attr("disabled") || opened) { return; } // onBeforeShow e = e || $.Event(); From aa46f7b229e14a99894bdebdf960226f5d679e90 Mon Sep 17 00:00:00 2001 From: Roberto Ricardo Date: Fri, 24 Feb 2012 16:39:27 -0800 Subject: [PATCH 06/18] When you have a mask currently open and close and need another opened right after. Enables chaining using the onClose callback method --- src/toolbox/toolbox.expose.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/toolbox/toolbox.expose.js b/src/toolbox/toolbox.expose.js index 2312683..5f9f6f5 100644 --- a/src/toolbox/toolbox.expose.js +++ b/src/toolbox/toolbox.expose.js @@ -169,12 +169,12 @@ // onBeforeClose if (call(config.onBeforeClose) === false) { return this; } - mask.fadeOut(config.closeSpeed, function() { - call(config.onClose); + mask.fadeOut(config.closeSpeed, function() { if (exposed) { exposed.css({zIndex: overlayIndex}); } loaded = false; + call(config.onClose); }); // unbind various event listeners From a864dd01ed135b392133a2fdac2d8f656a6ba20e Mon Sep 17 00:00:00 2001 From: Duc Tri Le Date: Sat, 17 Mar 2012 22:12:20 +0000 Subject: [PATCH 07/18] Issue #563: Fixed --- src/tooltip/tooltip.dynamic.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tooltip/tooltip.dynamic.js b/src/tooltip/tooltip.dynamic.js index 629aa66..b0bf6b4 100644 --- a/src/tooltip/tooltip.dynamic.js +++ b/src/tooltip/tooltip.dynamic.js @@ -67,8 +67,8 @@ var confOrigin = $.extend(true,{},conf), cls = conf.classNames.split(/\s/), - orig; - + orig, ret; + this.each(function() { var api = $(this).tooltip().onBeforeShow(function(e, pos) { From fd6d62d84b46db921a4cf4237b474538aaf9116d Mon Sep 17 00:00:00 2001 From: jpass Date: Wed, 26 Sep 2012 15:12:43 +0300 Subject: [PATCH 08/18] Update src/overlay/overlay.js outerWidth() in jQuery 1.8.2 takes only [true|false] as argument also works for jQuery 1.7.0 --- src/overlay/overlay.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/overlay/overlay.js b/src/overlay/overlay.js index 1954251..b790a1c 100644 --- a/src/overlay/overlay.js +++ b/src/overlay/overlay.js @@ -137,8 +137,8 @@ // position & dimensions var top = conf.top, left = conf.left, - oWidth = overlay.outerWidth({margin:true}), - oHeight = overlay.outerHeight({margin:true}); + oWidth = overlay.outerWidth(true), + oHeight = overlay.outerHeight(true); if (typeof top == 'string') { top = top == 'center' ? Math.max((w.height() - oHeight) / 2, 0) : From d900d7ea672479be9261cdcdb1468eb26ad2e49c Mon Sep 17 00:00:00 2001 From: Eamonn O'Connell Date: Fri, 30 Nov 2012 13:23:18 +0100 Subject: [PATCH 09/18] Update src/dateinput/dateinput.js fixed issue in calculation of top. Probably due to new version of Jquery. --- src/dateinput/dateinput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dateinput/dateinput.js b/src/dateinput/dateinput.js index c407c3e..1366249 100644 --- a/src/dateinput/dateinput.js +++ b/src/dateinput/dateinput.js @@ -476,7 +476,7 @@ } root.css({ - top: pos.top + input.outerHeight({margins: true}) + conf.offset[0], + top: pos.top + input.outerHeight(true) + conf.offset[0], left: pos.left + conf.offset[1] }); From 6ac76ce87375b974cd23f1e39146805f320c941d Mon Sep 17 00:00:00 2001 From: Alexander Grein Date: Wed, 27 Feb 2013 17:31:03 +0100 Subject: [PATCH 10/18] Fix for issue #733 --- src/validator/validator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/validator/validator.js b/src/validator/validator.js index 6f939c9..94ab9a0 100644 --- a/src/validator/validator.js +++ b/src/validator/validator.js @@ -258,10 +258,10 @@ return v === '' || new RegExp("^" + el.attr("pattern") + "$").test(v); }); - v.fn(":radio", "Please select an option.", function(el) { + v.fn(":radio[required]", "Please select an option.", function(el) { var checked = false; var els = $("[name='" + el.attr("name") + "']").each(function(i, el) { - if ($(el).is(":checked")) { + if ($(el).is(":checked") || checked) { checked = true; } }); From ac2613ba379e72855f19e9959336da1a40769130 Mon Sep 17 00:00:00 2001 From: evrard Date: Mon, 4 Mar 2013 08:58:36 +0100 Subject: [PATCH 11/18] Fixes #885 Prevent multiple timer launch (angry clicks bug). Attemp dev pull request. --- src/tabs/tabs.slideshow.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tabs/tabs.slideshow.js b/src/tabs/tabs.slideshow.js index 532de2d..d59c79d 100644 --- a/src/tabs/tabs.slideshow.js +++ b/src/tabs/tabs.slideshow.js @@ -54,6 +54,8 @@ * Similar fix for autoscroll animation queue problem */ function next(){ + // Fixes https://github.com/jquerytools/jquerytools/issues/885 + if (timer) clearTimeout(timer); // reset timeout, especially for angry clicks timer = setTimeout(function(){ tabs.next(); }, conf.interval); From 5b7000a1d4437b8d93da64de30012c302cb30169 Mon Sep 17 00:00:00 2001 From: alibby251 Date: Thu, 25 Apr 2013 21:16:47 +0200 Subject: [PATCH 12/18] Update tooltip.js This change is to make Tooltip compatible with jQuery 1.9.1 --- src/tooltip/tooltip.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js index 273624c..95596f9 100644 --- a/src/tooltip/tooltip.js +++ b/src/tooltip/tooltip.js @@ -69,7 +69,7 @@ fade: [ function(done) { var conf = this.getConf(); - if (!$.browser.msie || conf.fadeIE) { + if (!/msie/.test(navigator.userAgent.toLowerCase()) || conf.fadeIE) { this.getTip().fadeTo(conf.fadeInSpeed, conf.opacity, done); } else { @@ -79,7 +79,7 @@ }, function(done) { var conf = this.getConf(); - if (!$.browser.msie || conf.fadeIE) { + if (!/msie/.test(navigator.userAgent.toLowerCase()) || conf.fadeIE) { this.getTip().fadeOut(conf.fadeOutSpeed, done); } else { From 3eed2b8afed59a63b5de167aec00333c60cc9e20 Mon Sep 17 00:00:00 2001 From: alibby251 Date: Thu, 25 Apr 2013 21:23:16 +0200 Subject: [PATCH 13/18] Update dateinput.js This change is to update DateInput to be compatible with jQuery 1.9.1 --- src/dateinput/dateinput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dateinput/dateinput.js b/src/dateinput/dateinput.js index 4ac3624..885aa51 100644 --- a/src/dateinput/dateinput.js +++ b/src/dateinput/dateinput.js @@ -283,7 +283,7 @@ currDay = date.getDate(); // focus the input after selection (doesn't work in IE) - if (e.type == "click" && !$.browser.msie) { + if (e.type == "click" && !/msie/.test(navigator.userAgent.toLowerCase())) { input.focus(); } From ce83ce1363dbb7695f6feda1470d903fd546db09 Mon Sep 17 00:00:00 2001 From: alibby251 Date: Thu, 25 Apr 2013 21:26:53 +0200 Subject: [PATCH 14/18] Update tooltip.slide.js This change is to update Tooltip's slide functionality to be compatible with jQuery 1.9.1 --- src/tooltip/tooltip.slide.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tooltip/tooltip.slide.js b/src/tooltip/tooltip.slide.js index e5aad5c..eac5057 100644 --- a/src/tooltip/tooltip.slide.js +++ b/src/tooltip/tooltip.slide.js @@ -21,7 +21,7 @@ slideOffset: 10, slideInSpeed: 200, slideOutSpeed: 200, - slideFade: !$.browser.msie + slideFade: !/msie/.test(navigator.userAgent.toLowerCase()) }); // directions for slide effect From ec4486be487ead6ef1a20cb7bbf5bdc6601891c0 Mon Sep 17 00:00:00 2001 From: alibby251 Date: Thu, 25 Apr 2013 21:32:13 +0200 Subject: [PATCH 15/18] Update overlay.apple.js This change is to update Overlay's apple functionality to work correctly with jQuery 1.9.1 --- src/overlay/overlay.apple.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/overlay/overlay.apple.js b/src/overlay/overlay.apple.js index b51e867..c3d63bd 100644 --- a/src/overlay/overlay.apple.js +++ b/src/overlay/overlay.apple.js @@ -43,7 +43,7 @@ conf = this.getConf(), trigger = this.getTrigger(), self = this, - oWidth = overlay.outerWidth({margin:true}), + oWidth = overlay.outerWidth({true}), img = overlay.data("img"), position = conf.fixed ? 'fixed' : 'absolute'; From 68117fdd54fabf0acce89fb0814fc32878b5234d Mon Sep 17 00:00:00 2001 From: alibby251 Date: Thu, 25 Apr 2013 21:39:21 +0200 Subject: [PATCH 16/18] Update overlay.js This change updates Overlay to be compatible with jQuery 1.9.1 --- src/overlay/overlay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/overlay/overlay.js b/src/overlay/overlay.js index 286faaf..5853362 100644 --- a/src/overlay/overlay.js +++ b/src/overlay/overlay.js @@ -28,7 +28,7 @@ effect: 'default', // since 1.2. fixed positioning not supported by IE6 - fixed: !$.browser.msie || $.browser.version > 6, + fixed: !/msie/.test(navigator.userAgent.toLowerCase()) || navigator.appVersion > 6, left: 'center', load: false, // 1.2 From 506518676aaf82a77c0d63c686cc9f717a55ec0d Mon Sep 17 00:00:00 2001 From: alibby251 Date: Wed, 8 May 2013 21:46:48 +0200 Subject: [PATCH 17/18] Update rangeinput.js This patch is to ensure compatibility with jQuery 1.9.1 --- src/rangeinput/rangeinput.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/rangeinput/rangeinput.js b/src/rangeinput/rangeinput.js index 09d591b..cd08260 100644 --- a/src/rangeinput/rangeinput.js +++ b/src/rangeinput/rangeinput.js @@ -9,6 +9,21 @@ * Since: Mar 2010 * Date: @DATE */ + + var oldFnData = jQuery.fn.data; + +jQuery.fn.data = function( name ) { + var ret, evt, + elem = this[0]; + + // Handles 1.7 which has this behavior and 1.8 which doesn't + if ( elem && name === "events" && arguments.length === 1 ) { + ret = jQuery.data( elem, name ); + evt = jQuery._data( elem, name ); + } + return oldFnData.apply( this, arguments ); +}; + (function($) { $.tools = $.tools || {version: '@VERSION'}; From 7ece31ab041aa95f3e23121879d184e00b44b93e Mon Sep 17 00:00:00 2001 From: alibby251 Date: Mon, 27 May 2013 16:09:17 +0200 Subject: [PATCH 18/18] Update toolbox.expose.js Update Expose to work with jQuery 1.9.1 --- src/toolbox/toolbox.expose.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/toolbox/toolbox.expose.js b/src/toolbox/toolbox.expose.js index 2312683..24beb41 100644 --- a/src/toolbox/toolbox.expose.js +++ b/src/toolbox/toolbox.expose.js @@ -41,7 +41,7 @@ function viewport() { // the horror case - if ($.browser.msie) { + if (/msie/.test(navigator.userAgent.toLowerCase())) { // if there are no scrollbars then use window.height var d = $(document).height(), w = $(window).height();