Index: branches/RC/core/admin_templates/js/forms.js =================================================================== diff -u -N -r10832 -r10863 --- branches/RC/core/admin_templates/js/forms.js (.../forms.js) (revision 10832) +++ branches/RC/core/admin_templates/js/forms.js (.../forms.js) (revision 10863) @@ -94,6 +94,10 @@ a_div.style.position = 'relative'; a_div.style.overflow = 'auto'; a_div.style.width = '100%'; + a_div.id = this.Div.id + '_container'; + +// console.log('scroll_container height: ', this.Div.style.height); + // a_div.style.height = '100%'; // a_div.style.backgroundColor = 'yellow'; @@ -188,14 +192,29 @@ // print_pre(this.Options[id]); } +Form._parseSize = function ($size) { + if ($size.toString().match(/^([\d]+)px$/)) { + return parseInt(RegExp.$1); + } + + return parseInt($size); +} + Form.Resize = function() { var h = (document.all ? window.document.body.offsetHeight : window.innerHeight); var pos = findPos(this.Div); var dim = getDimensions(this.Div); h -= pos[1] + dim.padding[0] + dim.padding[2] + dim.borders[0] + dim.borders[2]; -// alert('h after correction is '+h); + + if (this.Div.style.height.length) { + // height set for scroll_container overrides automatic container height detection + var h = this._parseSize(this.Div.style.height); + } + + // alert('h after correction is '+h); + window.document.body.style.width = '100%'; var w = (document.all ? window.document.body.offsetWidth : window.innerWidth); w -= pos[0] + dim.padding[1] + dim.padding[3] + dim.borders[1] + dim.borders[3];