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

Commit

Permalink
Latest master merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Nov 15, 2012
2 parents 25c30b0 + 30ed702 commit 3c0e14b
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 15 deletions.
2 changes: 1 addition & 1 deletion dist/basic/jquery.qtip.css
@@ -1,4 +1,4 @@
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-11-02
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-11-15
* http://craigsworks.com/projects/qtip2/
* Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */

Expand Down
2 changes: 1 addition & 1 deletion dist/basic/jquery.qtip.js
@@ -1,4 +1,4 @@
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-11-02
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-11-15
* http://craigsworks.com/projects/qtip2/
* Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */

Expand Down
7 changes: 6 additions & 1 deletion dist/jquery.qtip.css
@@ -1,4 +1,4 @@
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-11-02
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-11-15
* http://craigsworks.com/projects/qtip2/
* Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */

Expand Down Expand Up @@ -589,3 +589,8 @@
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
}


/* IE6 Modal plugin fix */
#qtip-overlay.ie6-fix{
position: absolute !important;
}
26 changes: 21 additions & 5 deletions dist/jquery.qtip.js
@@ -1,4 +1,4 @@
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-11-02
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-11-15
* http://craigsworks.com/projects/qtip2/
* Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */

Expand Down Expand Up @@ -2767,7 +2767,7 @@ function Modal(api)

create: function()
{
var elem = $(overlaySelector);
var elem = $(overlaySelector), win = $(window);

// Return if overlay is already rendered
if(elem.length) {
Expand All @@ -2787,11 +2787,11 @@ function Modal(api)
// Update position on window resize or scroll
function resize() {
overlay.css({
height: $(window).height(),
width: $(window).width()
height: win.height(),
width: win.width()
});
}
$(window).unbind(globalNamespace).bind('resize'+globalNamespace, resize);
win.unbind(globalNamespace).bind('resize'+globalNamespace, resize);
resize(); // Fire it initially too

return overlay;
Expand Down Expand Up @@ -3220,6 +3220,7 @@ function IE6(api)
namespace = '.ie6-' + api.id,
bgiframe = $('select, object').length < 1,
isDrawing = 0,
modalProcessed = FALSE,
redrawContainer;

api.checks.ie6 = {
Expand All @@ -3229,6 +3230,8 @@ function IE6(api)
$.extend(self, {
init: function()
{
var win = $(window), scroll;

// Create the BGIFrame element if needed
if(bgiframe) {
elems.bgiframe = $('<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';" ' +
Expand All @@ -3248,6 +3251,19 @@ function IE6(api)

// Set dimensions
self.redraw();

// Fixup modal plugin if present too
if(elems.overlay && !modalProcessed) {
scroll = function() {
elems.overlay[0].style.top = win.scrollTop() + 'px';
};
win.bind('scroll.qtip-ie6, resize.qtip-ie6', scroll);
scroll(); // Fire it initially too

elem.overlay.addClass('ie6-fix'); // Add fix class

modalProcessed = TRUE; // Set flag
}
},

adjustBGIFrame: function()
Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.qtip.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jquery.qtip.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion grunt.js
Expand Up @@ -35,7 +35,7 @@ module.exports = function(grunt) {
modal: { js: '<%=dirs.src%>/modal/modal.js', css: '<%=dirs.src%>/modal/modal.css' },
viewport: { js: '<%=dirs.src%>/viewport/viewport.js' },
imagemap: { js: '<%=dirs.src%>/imagemap/imagemap.js' },
ie6: { js: '<%=dirs.src%>/ie6/ie6.js' }
ie6: { js: '<%=dirs.src%>/ie6/ie6.js', css: '<%=dirs.src%>/ie6/ie6.css' }
},

// Actual tasks
Expand Down
4 changes: 4 additions & 0 deletions src/ie6/ie6.css
@@ -0,0 +1,4 @@
/* IE6 Modal plugin fix */
#qtip-overlay.ie6-fix{
position: absolute !important;
}
16 changes: 16 additions & 0 deletions src/ie6/ie6.js
Expand Up @@ -11,6 +11,7 @@ function IE6(api)
namespace = '.ie6-' + api.id,
bgiframe = $('select, object').length < 1,
isDrawing = 0,
modalProcessed = FALSE,
redrawContainer;

api.checks.ie6 = {
Expand All @@ -20,6 +21,8 @@ function IE6(api)
$.extend(self, {
init: function()
{
var win = $(window), scroll;

// Create the BGIFrame element if needed
if(bgiframe) {
elems.bgiframe = $('<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';" ' +
Expand All @@ -39,6 +42,19 @@ function IE6(api)

// Set dimensions
self.redraw();

// Fixup modal plugin if present too
if(elems.overlay && !modalProcessed) {
scroll = function() {
elems.overlay[0].style.top = win.scrollTop() + 'px';
};
win.bind('scroll.qtip-ie6, resize.qtip-ie6', scroll);
scroll(); // Fire it initially too

elem.overlay.addClass('ie6-fix'); // Add fix class

modalProcessed = TRUE; // Set flag
}
},

adjustBGIFrame: function()
Expand Down
8 changes: 4 additions & 4 deletions src/modal/modal.js
Expand Up @@ -152,7 +152,7 @@ function Modal(api)

create: function()
{
var elem = $(overlaySelector);
var elem = $(overlaySelector), win = $(window);

// Return if overlay is already rendered
if(elem.length) {
Expand All @@ -172,11 +172,11 @@ function Modal(api)
// Update position on window resize or scroll
function resize() {
overlay.css({
height: $(window).height(),
width: $(window).width()
height: win.height(),
width: win.width()
});
}
$(window).unbind(globalNamespace).bind('resize'+globalNamespace, resize);
win.unbind(globalNamespace).bind('resize'+globalNamespace, resize);
resize(); // Fire it initially too

return overlay;
Expand Down

0 comments on commit 3c0e14b

Please sign in to comment.