PDA

View Full Version : sp2 popups in admin wysiwyg too small



battleaxe
10-31-2004, 02:00 PM
Hi all. Has anyone noticed that after installation of sp2 (wish i hadnt), pop up images cont work. There is a fix for the popups in catalog over on oscommerce contributions. It goes like this:

Popup fix for IE with WinXP_SP2
---------------------------------------------------------------

Original author: zcan Kaymak <o.kaymak@tiscali.nl>


Step 1. Backup your files first !!
Step 2. Edit the lines indicated below

---------------------------------------------------------------
Open catalog/popup_image.php (standard install 2.2MS2) or catalog/includes/javascript/popup_image.js (BTS)

Search for:

<script language="javascript"><!--
var i=0;
function resize() {
if (navigator.appName == 'Netscape') i=40;
if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);
self.focus();
}
//--></script>

Replace by:

<script language="javascript" type="text/javascript"><!--
var i=0;
var s=0;
function resize() {
if (navigator.appName == 'Netscape') i=40;
if (window.navigator.userAgent.indexOf("SV1") != -1) s=20; //This browser is Internet Explorer in SP2.
if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i+s);
self.focus();
}
//--></script>

I am not a programmer, so could anyone work a similar fix for the wysiwyg editor in admin, as we are now unble to access the colour chats in popup windows.
Cheers
Kim

battleaxe
11-06-2004, 09:23 AM
sorry to bump guys, but here it is "bump" :oops:

cbensi
07-24-2005, 07:37 PM
this is most definitely related to windows sp2 internet explorer as it no longer allows windows without the bottom info bar.


As a temporary fix (read -> HACK) for the admin section :
in the files 'admin/htmlarea/editor_advanced.js' and
'admin/htmlarea/editor_basic.js'

search for 'resizable: no;'
and change to 'resizable: yes;'

there are about 11 changes in editor_advanced.js and 6 in editor_basic.js

this will at least let you resize the windows so that you can select all the items.

[optional]
Also if you want to fix the size enter in the quotes before resizable

'dialogHeight: 245px;' to set it to open the window at 245px high

eg
******BEFORE

var newcolor = showModalDialog(_editor_url + "popups/select_color.html", oldcolor, "resizable: no; help: no; status: no; scroll: no;");

*****AFTER

var newcolor = showModalDialog(_editor_url + "popups/select_color.html", oldcolor, "dialogHeight: 220px; resizable: yes; help: no; status: no; scroll: no;");

this is at line 627 and controls both colour selector popup's.


Ps. I will continue to look for a proper fix when i have a chance