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

Commit

Permalink
Ensure globals are flagg in JShint and fix errors (Fixes #586). Fix i…
Browse files Browse the repository at this point in the history
…e6 plugin error
  • Loading branch information
Craga89 committed Sep 11, 2013
1 parent 4073ba6 commit 254fd91
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
12 changes: 9 additions & 3 deletions Gruntfile.js
Expand Up @@ -180,11 +180,17 @@ module.exports = function(grunt) {
boss: true,
eqnull: true,
browser: true,
undef: false,
undef: true,
expr: true,
globals: {
jQuery: true,
'$': true
jQuery: true, '$': true, QTip: true, TRUE: true, FALSE: true, NULL: true, X: true, Y: true,
WIDTH: true, HEIGHT: true, TOP: true, LEFT: true, BOTTOM: true, RIGHT: true,
CENTER: true, FLIP: true, FLIPINVERT: true, SHIFT: true, QTIP: true, PROTOTYPE: true,
CORNER: true, CHECKS: true, PLUGINS: true, NAMESPACE: true, ATTR_HAS: true, ATTR_ID: true,
WIDGET: true, SELECTOR: true, INACTIVE_EVENTS: true, CLASS_FIXED: true, CLASS_DEFAULT: true,
CLASS_FOCUS: true, CLASS_HOVER: true, CLASS_DISABLED: true, replaceSuffix: true, oldtitle: true,
trackingBound: true, BROWSER: true, createWidgetClass: true, sanitizeOptions: true, cloneEvent: true

}
},
beforeconcat: [
Expand Down
6 changes: 3 additions & 3 deletions src/ie6/ie6.js
Expand Up @@ -71,7 +71,7 @@ $.extend(Ie6.prototype, {

// Max/min width simulator function
redraw: function() {
if(this.qtip.rendered < 1 || this.drawing) { return self; }
if(this.qtip.rendered < 1 || this.drawing) { return this; }

var tooltip = this.qtip.tooltip,
style = this.qtip.options.style,
Expand Down Expand Up @@ -100,7 +100,7 @@ $.extend(Ie6.prototype, {

// Parse into proper pixel values
perc = (max + min).indexOf('%') > -1 ? container.width() / 100 : 0;
max = ((max.indexOf('%') > -1 ? perc : 1) * parseInt(max, 10)) || width;
max = ((max.indexOf('%') > -1 ? perc : 1) * parseInt(max, 10)) || width;
min = ((min.indexOf('%') > -1 ? perc : 1) * parseInt(min, 10)) || 0;

// Determine new dimension size based on max/min/current values
Expand All @@ -113,7 +113,7 @@ $.extend(Ie6.prototype, {
// Set drawing flag
this.drawing = 0;

return self;
return this;
},

destroy: function() {
Expand Down
4 changes: 2 additions & 2 deletions src/tips/tips.js
@@ -1,4 +1,4 @@
var TIP,
var TIP, createVML,

// .bind()/.on() namespace
TIPNS = '.qtip-tip',
Expand Down Expand Up @@ -412,7 +412,7 @@ $.extend(Tip.prototype, {
// Opera bug #357 - Incorrect tip position
// https://github.com/Craga89/qTip2/issues/367
window.opera && setTimeout(function() {
elems.tip.css({
elements.tip.css({
display: 'inline-block',
visibility: 'visible'
});
Expand Down

0 comments on commit 254fd91

Please sign in to comment.