-
-
Save seyDoggy/03cb25b39dc76ab21ae1 to your computer and use it in GitHub Desktop.
Ray's work on iframe popup resizing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
parent.FF.popup.resize(document); | |
} catch(e) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FF.popup = { | |
resize: function(d,w,h,options) { | |
options = options ? options : {}; | |
options.inner = options.inner==undefined ? true : options.inner; | |
options.height = options.height==undefined ? true : options.height; | |
options.width = options.width==undefined ? false : options.width; | |
options.force = options.force==undefined ? false : options.force; | |
b = $(d).find("body"); | |
w = w ? w : b.width(); | |
h = h ? h : b.outerHeight(true); | |
r = bheight<b.outerHeight(true); | |
_cb = $.fn["colorbox"]; | |
if((_cb.options.scrolling==false && r) || options.force) { | |
if(h>wheight) { | |
b.css("overflow-y","auto"); | |
biframe.attr("scrolling","yes"); | |
options.scrolling = false; | |
options.height = wheight; | |
} else { | |
if(options.inner) { | |
if(options.height) | |
options.innerHeight = options.innerHeight ? options.innerHeight : h; | |
if(options.width) | |
options.innerWidth = options.innerWidth ? options.innerWidth : w; | |
} else { | |
if(options.height) | |
options.height = options.height ? options.height : h; | |
if(options.width) | |
options.width = options.width ? options.width : w; | |
} | |
} | |
_cb.resize(options); | |
} | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment