i-fekt hat geschrieben:Es liegt nicht am Code, sondern an den Firefox Erweiterungen ... Wenn ihr diese mal deaktiviert seht ihr, dass alles wunderbar funktioniert.

...
sind wir hier bei
Wünscht Dir was? oder bei
Das is so!
Ich werd' hier doch keine Erweiterungen deaktivieren - nur weil eine Software kleinere Schwierigkeiten hat ein PopUp korrekt zu öffnen...
Ich darf Dir also widersprechen? Das liegt nicht am Browser und auch nicht an den Erweiterungen ... sondern ist ein BUG im messageBox von Contenido - der Source hat einiges an falschen HTML-Syntax!
Ursache liegt in der unteren Statuszeile des Browserfenster vom FF, die beim IE nicht existiert. Und wird dort von einer Erweiterung eine Messag angezeigt - die länger ist - als die vorgegebenen 350px vom PopUp - zieht die Tabelle mit der Vorgabe von 100% so lang auf - wie die Msg in der Statuszeile ist.
Hier der Bug-Fix - damit wird das PopUp mit dem IE6 und FF1.5.0.4, sowie mit Contenido 4.6.4 und 4.6.8.5 korrekt angezeigt.
Anbei der komplette Source des Files - da an einigen Zeilen im Source Änderungen entstanden sind - und somit die detailierte Änderungsliste länger geworden wäre ... die Änderungen sind mit "hes" gekennzeichnet.
File: contenido\scripts\messageBox.js.php
:replaceCode: Alles auswählen
<?php
/******************************************
* File : messageBox.js
* Project : Contenido
* Descr : Message Box for errors
* and / or confirms
*
* Author : Jan Lengowski
* Created : 08.05.2003
* Modified : 08.05.2003
* Modified : 28.06.2006 // hes
*
* © four for business AG
******************************************/
include_once ('../includes/startup.php');
include_once ($cfg["path"]["contenido"].$cfg["path"]["includes"] . 'functions.i18n.php');
header("Content-Type: text/javascript");
page_open(array('sess' => 'Contenido_Session',
'auth' => 'Contenido_Challenge_Crypt_Auth',
'perm' => 'Contenido_Perm'));
i18nInit($cfg["path"]["contenido"].$cfg["path"]["locale"], $belang);
page_close();
?>
function resizeDialogToContent()
{
// resize window so there are no scrollbars visible
var dw = window.innerWidth;
while (isNaN(dw))
{
dw = dw.substr(0,dw.length-1);
}
difw = dw - this.document.body.clientWidth;
window.dialogWidth = this.document.body.scrollWidth+difw+'px';
var dh = window.innerHeight;
while (isNaN(dh))
{
dh = dh.substr(0,dh.length-1);
}
difh = dh - this.document.body.clientHeight;
window.dialogHeight = this.document.body.scrollHeight+difh+'px';
}
try {
/**
* OK and CANCEL buttons
*/
button = new Array();
/* BEGIN 2006-06-28 hes */
button['confirm'] = '<a href="javascript:msgConfirm()" title="<?php echo i18n("Confirm"); ?>"><img src="images/but_ok.gif" width="20" height="20" border="0" alt="<?php echo i18n("Confirm"); ?>"></a>';
button['cancel'] = '<a href="javascript:msgCancel()" title="<?php echo i18n("Cancel"); ?>"><img src="images/but_cancel.gif" width="20" height="20" border="0" alt="<?php echo i18n("Cancel"); ?>"></a>';
button['ok'] = '<a href="javascript:window.close()" title="<?php echo i18n("Close window"); ?>"><img src="images/but_ok.gif" width="20" height="20" border="0" alt="<?php echo i18n("Close window"); ?>"></a>';
button['warn'] = '<img src="images/but_warn.gif" alt="">';
/* END 2006-06-28 hes */
/**
* Default HTML Template for the
* messageBox class
*/
/* BEGIN 2006-06-28 hes */
defaultTemplate = '';
defaultTemplate += '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"\n';
defaultTemplate += ' "http://www.w3.org/TR/html4/strict.dtd">\n';
defaultTemplate += '<html>';
defaultTemplate += ' <head>';
defaultTemplate += ' <title>Contenido</title>';
defaultTemplate += ' <style type="text/css">';
defaultTemplate += ' body { margin:0px; padding:0px; background-color: #ffffff; }';
defaultTemplate += ' .tableout { height:{TSH}px; width:{TSW}px; border: 2px solid #C54A33; border-spacing:10px; }';
defaultTemplate += ' .head { vertical-align:middle; font-family: verdana; font-weight: bold; font-size: 12px; color: #000000; }';
defaultTemplate += ' .text { vertical-align:top; font-family: verdana; font-size: 11px; color: #000000; }';
defaultTemplate += ' .right { text-align:right; }';
defaultTemplate += ' </style>';
defaultTemplate += ' <script type="text/javascript">';
defaultTemplate += ' window.onclose = msgCancel;';
defaultTemplate += ' function msgConfirm(){ {CALLBACK} window.close() }';
defaultTemplate += ' function msgCancel(){ window.close(); }';
defaultTemplate += ' </script>';
defaultTemplate += ' </head>';
defaultTemplate += '<body>';
defaultTemplate += ' <table class="tableout">';
defaultTemplate += ' <tr>';
defaultTemplate += ' <td class="head">{IMAGE}</td>';
defaultTemplate += ' <td class="head">{HEADLINE}</td>';
defaultTemplate += ' </tr>';
defaultTemplate += ' <tr>';
defaultTemplate += ' <td> </td>';
defaultTemplate += ' <td class="text">{MESSAGE}</td>';
defaultTemplate += ' </tr>';
defaultTemplate += ' <tr>';
defaultTemplate += ' <td> </td>';
defaultTemplate += ' <td class="right">{CANCEL} {CONFIRM}</td>';
defaultTemplate += ' </tr>';
defaultTemplate += ' </table>';
defaultTemplate += '</body>';
defaultTemplate += '</html>';
/* END 2006-06-28 hes */
/**
* Class to display errors and notifications
*
* @param headline string The headline of the message
* @param message srint The message text
* @param htmlTemplate
*
*
* @author Jan Lengowski <Jan.Lengowski@4fb.de>
* @copyright four for business AG <www.4fb.de>
* @version 0.9
*/
function messageBox(headline, message, htmlTemplate, width, height) {
/* The error message
headline */
this.headline = headline || "";
/* The error message /
notification */
this.message = message || "";
/* HTML Template for
the message */
this.html = htmlTemplate || defaultTemplate;
/* Width of the popup,
defaults to '350' */
this.width = width || 350;
/* Height of the popup,
defaults to '170' */
this.height = height || 170;
/* Status of the popup,
true => popup open
false => popup closed */
this.status = false;
/* Reference to the pop-up
window. */
this.winRef = false;
}
/**
* Displays a notification
*
* @author Jan Lengowski <Jan.Lengowski@4fb.de>
* @copyright four for business AG <www.4fb.de>
*/
messageBox.prototype.notify = function(head, msg) {
/* Some required variables */
var template = this.html;
var msg = msg || this.message;
var head = head || this.headline;
/* X and Y position where the
pop-up is centered */
var x = parseInt( (screen.availWidth / 2) - (this.width / 2) );
var y = parseInt( (screen.availHeight / 2) - (this.height / 2) );
/* Replace placeholder with
the contents */
template = template.replace(/{HEADLINE}/, head);
template = template.replace(/{MESSAGE}/, msg);
template = template.replace(/{IMAGE}/, button['warn']);
template = template.replace(/{CALLBACK}/, "");
template = template.replace(/{CANCEL}/, "");
template = template.replace(/{CONFIRM}/, button['ok']);
/* BEGIN 2006-06-28 hes */
template = template.replace(/{TSW}/, this.width);
template = template.replace(/{TSH}/, this.height);
/* END 2006-06-28 hes */
/* Open a new pop-up
window */
this.winRef = window.open("", "", "left="+x+",top="+y+",width="+this.width+",height="+this.height+""");
this.winRef.moveTo(x, y);
/* Write template */
this.winRef.document.open();
this.winRef.document.write(template);
this.winRef.document.close();
/* Focus the pop-up */
this.winRef.focus();
}
/**
* Displays a confirmation pop-up.
*
* @param head string Headline for the message
* @param msg string The message
* @param callback string Name of the function executed on confirmation
*
* @author Jan Lengowski <Jan.Lengowski@4fb.de>
* @copyright four for business AG <www.4fb.de>
*/
messageBox.prototype.confirm = function(head, msg, callback) {
/* Some required variables */
var template = this.html;
var msg = msg || this.message;
var head = head || this.headline;
/* X and Y position where the
pop-up is centered */
var x = parseInt( (screen.availWidth / 2) - (this.width / 2) );
var y = parseInt( (screen.availHeight / 2) - (this.height / 2) );
/* Replace placeholder with
the contents */
template = template.replace(/{HEADLINE}/, head);
template = template.replace(/{MESSAGE}/, msg);
template = template.replace(/{IMAGE}/, button['warn']);
var sCallback = "";
/* Check if the callback functions are passed as array */
if (typeof(callback) == "object")
{
for (var i=0; i < callback.length; i++)
{
sCallback += "window.opener." + callback[i] + ";";
}
} else {
sCallback = "window.opener." + callback + ";";
}
template = template.replace(/{CALLBACK}/, sCallback);
template = template.replace(/{CANCEL}/, button['cancel']);
template = template.replace(/{CONFIRM}/, button['confirm']);
/* BEGIN 2006-06-28 hes */
template = template.replace(/{TSW}/, this.width);
template = template.replace(/{TSH}/, this.height);
/* END 2006-06-28 hes */
/* Open a new pop-up
window */
this.winRef = window.open("", "", "left="+x+",top="+y+",width="+this.width+",height="+this.height+""");
this.winRef.moveTo(x, y);
/* Write template */
this.winRef.document.open();
this.winRef.document.write(template);
this.winRef.document.close();
/* Focus the pop-up */
this.winRef.focus();
}
} catch(e) {
}
function performAction (area, action, frame, itemtype, itemid, sid)
{
url = 'main.php?area='+area;
url += '&action='+action;
url += '&frame='+frame;
url += '&' + itemtype + '=' + itemid;
url += '&contenido=' + sid;
if (frame == 1)
{
parent.parent.left.left_top.location.href = url;
}
if (frame == 2)
{
parent.parent.left.left_bottom.location.href = url;
}
if (frame == 3)
{
parent.parent.right.right_top.location.href = url;
}
if (frame == 4)
{
parent.parent.right.right_bottom.location.href = url;
}
}
Mfg. hes