If your product descriptions are big or contain a lot of HTML code, you may find it quite inconvenient to update the text and scroll it up/down.
The following mod will add two new links near each textarea, so you'll be able to increase the textarea's size dynamically.
1. Edit
skin1/common.js file and add the following code:
PHP Code:
function changeCommentSize(id,d)
{
var el = document.getElementById(id);
var height = parseInt(el.style.height);
if(!height && el.offsetHeight)
height = el.offsetHeight;
height += d;
if(height < 20)
height = 20;
el.style.height = height+"px";
}
2. Edit
skin1/main/textarea.tpl template and replace:
PHP Code:
<div class="AELinkBox" style="width: 576px;">
<a href="javascript: void(0);" style="display: none;" id="{$id}Dis" onclick="javascript: disableEditor('{$id}','{$name}', {$id}Editor);">{$lng.lbl_default_editor}</a>
with:
PHP Code:
<div class="AELinkBox" style="width: 576px;">
<a href="#" onClick="changeCommentSize('{$id}',80); return false;">Bigger</a> / <a href="#" onClick="changeCommentSize('{$id}',-80); return false;">Smaller</a> |
<a href="javascript: void(0);" style="display: none;" id="{$id}Dis" onclick="javascript: disableEditor('{$id}','{$name}', {$id}Editor);">{$lng.lbl_default_editor}</a>
That's all.
__________________
Eugene Kaznacheev,
Evangelist/Product Manager at Ecwid:
http://www.ecwid.com/ (since Sept 2009)
ex-Head of X-Cart Tech Support Department
ex- X-Cart Hosting Manager -
X-Cart hosting
ex-X-Cart Technical Support Engineer
Note: For the official guaranteed tech support services please turn to the
Customers HelpDesk.