Index: branches/unlabeled/unlabeled-1.3.2/core/admin_templates/incs/footer.tpl
===================================================================
diff -u -N -r7648 -r7701
--- branches/unlabeled/unlabeled-1.3.2/core/admin_templates/incs/footer.tpl (.../footer.tpl) (revision 7648)
+++ branches/unlabeled/unlabeled-1.3.2/core/admin_templates/incs/footer.tpl (.../footer.tpl) (revision 7701)
@@ -17,14 +17,44 @@
function MakeHeight100(id)
{
if (!id) id = 'scroll_container';
+ AdjustTextAreas(true); // reseting textareas to minimal size
var el = document.getElementById(id);
var h = (document.all ? window.document.body.offsetHeight : window.innerHeight) - el.offsetTop + 'px';
var w = (document.all ? window.document.body.offsetWidth : window.innerWidth) - el.offsetLeft + 'px';
// alert('h: '+h)
el.style.height = h;
// el.style.width=w;
+ AdjustTextAreas(); // adjusting textarea height
}
+ function AdjustTextAreas(reset)
+ {
+ var tmp;
+ var sizes = new Array();
+ if (isset(textareas100)) {
+ // we need separate cycle to get heights, because if we set the height in the same cycle
+ // it will recursively affect heights of other textareas
+ for (var i in textareas100) {
+ tmp = document.getElementById(textareas100[i]);
+ sizes[tmp.name] = tmp.parentNode.offsetHeight;
+ }
+ for (var i in textareas100) {
+ tmp = document.getElementById(textareas100[i]);
+ tmp.style.height = reset ? '70px' : (sizes[tmp.name] - 18) + 'px';
+ }
+ }
+ }
+
+ if (isset(first_error)) {
+ for (var i in first_error) {
+ if (first_error[i] != false) {
+// show_form_error(i, first_error[i][0]);
+ document.getElementById(first_error[i][1]).focus();
+// alert('focused on '+first_error[i][1])
+ }
+ }
+ }
+