diff --git a/src/dateinput/dateinput.js b/src/dateinput/dateinput.js index 1a23643..1c78d58 100644 --- a/src/dateinput/dateinput.js +++ b/src/dateinput/dateinput.js @@ -289,7 +289,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; @@ -300,7 +305,7 @@ e || (e = $.Event("api")); // 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(); } @@ -402,7 +407,7 @@ $(document).on("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); } @@ -420,7 +425,7 @@ */ show: function(e) { - if (input.attr("readonly") || input.attr("disabled") || opened) { return; } + if (input.attr("disabled") || opened) { return; } // onBeforeShow e = e || $.Event(); @@ -471,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] }); diff --git a/src/overlay/overlay.apple.js b/src/overlay/overlay.apple.js index 0163f37..fb0b669 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'; diff --git a/src/overlay/overlay.js b/src/overlay/overlay.js index 1954251..a6cf9ae 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 @@ -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) : diff --git a/src/rangeinput/rangeinput.js b/src/rangeinput/rangeinput.js index 518502b..bbf6acc 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'}; 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); diff --git a/src/toolbox/toolbox.expose.js b/src/toolbox/toolbox.expose.js index 2859e45..3cc226d 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(); @@ -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 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) { diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js index ffe1047..d888cf8 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 { @@ -203,7 +203,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(); } } @@ -331,10 +332,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 +341,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; 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 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; } }); diff --git a/test/tooltip/index.html b/test/tooltip/index.html index 180d94e..61c8a65 100644 --- a/test/tooltip/index.html +++ b/test/tooltip/index.html @@ -107,6 +107,39 @@

Manual tooltip

+
+ +

Manual enclosed tooltip

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

Same tip element

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy