[opencms-dev] possible solution to missing buttons in source code editor

Alexander Kandzior alex at opencms.org
Sun Jan 19 23:29:56 CET 2003


Stephan,

thank you for the fix. The 50% issue was just there as a workaround. I
will include this as a fix for the final release.

Best Regards,
Alex.

Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com


> -----Original Message-----
> From: owner-opencms-dev at www.opencms.org 
> [mailto:owner-opencms-dev at www.opencms.org] On Behalf Of Stephan Dale
> Sent: Monday, January 13, 2003 11:28 AM
> To: opencms-dev at opencms.org
> Subject: [opencms-dev] possible solution to missing buttons 
> in source code editor
> 
> 
> 
> 
> Dear OpenCMS team,
> 
> I work as a software developer for a small but gifted company 
> called Clicks and Links. We've been using your software to 
> help provide web-sites to various local communities in the 
> UK. First let me congratulate you on producing a great piece 
> of open source software.
> 
> We've been having a problem with the source code editor when 
> the browser is Internet Explorer v6. The text area size is 
> too large, resulting in the top-most buttons being pushed off 
> the page. 
> 
> The getDimensions() method in 
> /system/workplace/scripts/opencms_edit.js seems to work only 
> with the Netscape DOM. To allow it to work with IE you must 
> add a condition to test for the browser and use the 
> document.body object to determine the height and width rather 
> than the window object, like so...
> 
> if (IE)
>   {
>   windowWidth = document.body.clientWidth - 15;
>   windowHeight = document.body.clientHeight - space;
>   }
> else
>   {
>   windowWidth = window.innerWidth - 15;
>   windowHeight = window.innerHeight - space;
>   }
> 
> Note that writing only innerWidth is sufficient - the full 
> form is windowinnerWidth (and the same applies to innerHeight).
> 
> If you make this change you will also need to remove the 
> lines in the edit_text_main template 
> (/system/workplace/templates/edit_text_main) that prevent the 
> getDimensions() call if the browser is not IE. So the 
> following 2 lines should be commented out or removed...
> 
> if(!ie)getDimensions();
> else windowHeight="50%";
> 
> ..and replaced with just...
> 
> getDimensions();
> 
> Note that you may have problems under IE whereby the 
> JavaScript file is somehow cached and hence changes are 
> ignored. To get around this problem you can rename the JS 
> file to something different, edit the source code of a page 
> (resulting in JS errors), then rename it back again. You may 
> have to log in/out of OpenCMS as you do this.
> 
> Finally, I would like to ask whether setting the windowHeight 
> to 50% was a work-around for this problem, or did it have 
> another purpose?
> 
> Many thanks,
> 
> Stephan
> 
> --------------------------------------------------------------
> ----------
> 
> Stephan Dale
> Software Engineer
> 
> Clicks and Links Ltd
> Manchester Technology Centre
> Oxford Road
> Manchester
> M1 7ED
> England
> 
> t +44(0)161 242 2102
> f +44(0)161 242 2202
> e stephan.dale at clicksandlinks.com
> w www.clicksandlinks.com
> 
> --------------------------------------------------------------
> ----------
> 
> This email and any files transmitted with it are confidential 
> and intended solely for the use of the individual or entity 
> to whom they are addressed. If you have received this email 
> in error please notify info at clicksandlinks.com. Clicks and 
> Links Limited is incorporated in England and Wales under 
> company number 4029108. Registered address: 28 Moss Road, 
> Alderley Edge, Cheshire SK9 7HZ.
> Office: Manchester Technology Centre, Oxford Road, Manchester M1 7ED.
> 
> --------------------------------------------------------------
> ----------
> 





More information about the opencms-dev mailing list