Width and height mixed up

LoRaK - January 12, 2007 - 13:14
Project:Greybox
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Setting width to X and height to Y on the greybox settings page has the effect of the box actually having a width of Y and a height of X.

That happens, because the GB_show() function takes parameters in the wrong order:

The greybox_add_files() function in greybox.module produces the javascript code:

...
var t = this.title || $(this).text() || this.href;
GB_show(t,this.href,' . $width . ',' . $height . ');
return false;
...

But greybox.js contains:
...
function GB_show(caption, url, height, width) {
...

The problem can be easily solved by switching "height" and "width" in the GB_show function inside greybox.js.

I do not know how to patch'n stuff, I'm just submitting this so someone else could do it.

#1

Gurpartap Singh - January 19, 2007 - 20:59
Status:active» fixed

Thanks!

#2

Anonymous - February 2, 2007 - 21:03
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.