Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Commit

Permalink
Clearly that last commit won't work... duh! The checks are now a qTip…
Browse files Browse the repository at this point in the history
… property rahter than a global one e.g. .qtip('api').checks ! Much better.
  • Loading branch information
Craga89 committed Feb 1, 2011
1 parent b01d209 commit 1d60b79
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 33 deletions.
2 changes: 1 addition & 1 deletion dist/jquery.qtip.css
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Tue Feb 1 19:20:50 2011 +0000
* Date: Tue Feb 1 19:43:41 2011 +0000
*/

/* Fluid class for determining actual width in IE */
Expand Down
16 changes: 7 additions & 9 deletions dist/jquery.qtip.js
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Tue Feb 1 19:20:50 2011 +0000
* Date: Tue Feb 1 19:43:41 2011 +0000
*/

"use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
Expand Down Expand Up @@ -143,6 +143,7 @@ function QTip(target, options, id, attr)
self.elements = { target: target };
self.timers = { img: [] };
self.options = options;
self.checks = {};
self.plugins = {};
self.cache = {
event: {},
Expand Down Expand Up @@ -643,7 +644,7 @@ function QTip(target, options, id, attr)
}

// Setup builtin .set() option checks
$.fn.qtip.checks.builtin = {
self.checks.builtin = {
// Core checks
'^id$': function(obj, o, v) {
var id = v === TRUE ? $.fn.qtip.nextid : v,
Expand Down Expand Up @@ -828,7 +829,7 @@ function QTip(target, options, id, attr)
var elems = self.elements,
rmove = /^position.(my|at|adjust|target|container)|style|content/i,
reposition = FALSE,
checks = $.fn.qtip.checks,
checks = self.checks,
name;

function set(notation, value) {
Expand Down Expand Up @@ -1625,7 +1626,6 @@ $.fn.qtip.version = '2.0.0pre';
$.fn.qtip.nextid = 0;
$.fn.qtip.inactiveEvents = 'click dblclick mousedown mouseup mousemove mouseleave mouseenter'.split(' ');
$.fn.qtip.zindex = 15000;
$.fn.qtip.checks = {};

// Setup base plugins
$.fn.qtip.plugins = {
Expand All @@ -1649,8 +1649,6 @@ $.fn.qtip.plugins = {
iOS: parseFloat(((/CPU.+OS ([0-9_]{3}).*AppleWebkit.*Mobile/i.exec(navigator.userAgent)) || [0,'4_2'])[1].replace('_','.')) < 4.1
};



// Define configuration defaults
$.fn.qtip.defaults = {
prerender: FALSE,
Expand Down Expand Up @@ -1714,7 +1712,7 @@ $.fn.qtip.defaults = {
namespace = '.qtip-ajax',
rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;

$.fn.qtip.checks.ajax = {
qTip.checks.ajax = {
'^content.ajax': function(obj, name) {
if(name === 'once') {
self.once();
Expand Down Expand Up @@ -1870,7 +1868,7 @@ function Tip(qTip, command)
self.mimic = NULL;

// Add new option checks for the plugin
$.fn.qtip.checks.tip = {
qTip.checks.tip = {
'^position.my|style.tip.(corner|mimic|border)$': function() {
// Make sure a tip can be drawn
if(!self.init()) {
Expand Down Expand Up @@ -2499,7 +2497,7 @@ function Modal(qTip)
events = 'tooltipshow'+namespace+' tooltiphide'+namespace;

// Setup option set checks
$.fn.qtip.checks.modal = {
qTip.checks.modal = {
'^show.modal.(on|blur)$': function() {
// Initialise
self.init();
Expand Down
26 changes: 13 additions & 13 deletions dist/jquery.qtip.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/jquery.qtip.pack.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/ajax.js
Expand Up @@ -6,7 +6,7 @@ function Ajax(qTip)
namespace = '.qtip-ajax',
rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;

$.fn.qtip.checks.ajax = {
qTip.checks.ajax = {
'^content.ajax': function(obj, name) {
if(name === 'once') {
self.once();
Expand Down
8 changes: 3 additions & 5 deletions src/core.js
Expand Up @@ -102,6 +102,7 @@ function QTip(target, options, id, attr)
self.elements = { target: target };
self.timers = { img: [] };
self.options = options;
self.checks = {};
self.plugins = {};
self.cache = {
event: {},
Expand Down Expand Up @@ -602,7 +603,7 @@ function QTip(target, options, id, attr)
}

// Setup builtin .set() option checks
$.fn.qtip.checks.builtin = {
self.checks.builtin = {
// Core checks
'^id$': function(obj, o, v) {
var id = v === TRUE ? $.fn.qtip.nextid : v,
Expand Down Expand Up @@ -787,7 +788,7 @@ function QTip(target, options, id, attr)
var elems = self.elements,
rmove = /^position.(my|at|adjust|target|container)|style|content/i,
reposition = FALSE,
checks = $.fn.qtip.checks,
checks = self.checks,
name;

function set(notation, value) {
Expand Down Expand Up @@ -1584,7 +1585,6 @@ $.fn.qtip.version = '@VERSION';
$.fn.qtip.nextid = 0;
$.fn.qtip.inactiveEvents = 'click dblclick mousedown mouseup mousemove mouseleave mouseenter'.split(' ');
$.fn.qtip.zindex = 15000;
$.fn.qtip.checks = {};

// Setup base plugins
$.fn.qtip.plugins = {
Expand All @@ -1608,8 +1608,6 @@ $.fn.qtip.plugins = {
iOS: parseFloat(((/CPU.+OS ([0-9_]{3}).*AppleWebkit.*Mobile/i.exec(navigator.userAgent)) || [0,'4_2'])[1].replace('_','.')) < 4.1
};



// Define configuration defaults
$.fn.qtip.defaults = {
prerender: FALSE,
Expand Down
2 changes: 1 addition & 1 deletion src/modal.js
Expand Up @@ -10,7 +10,7 @@ function Modal(qTip)
events = 'tooltipshow'+namespace+' tooltiphide'+namespace;

// Setup option set checks
$.fn.qtip.checks.modal = {
qTip.checks.modal = {
'^show.modal.(on|blur)$': function() {
// Initialise
self.init();
Expand Down
2 changes: 1 addition & 1 deletion src/tips.js
Expand Up @@ -47,7 +47,7 @@ function Tip(qTip, command)
self.mimic = NULL;

// Add new option checks for the plugin
$.fn.qtip.checks.tip = {
qTip.checks.tip = {
'^position.my|style.tip.(corner|mimic|border)$': function() {
// Make sure a tip can be drawn
if(!self.init()) {
Expand Down

0 comments on commit 1d60b79

Please sign in to comment.