Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/forms.js =================================================================== diff -u -N -r7727 -r7735 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/forms.js (.../forms.js) (revision 7727) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/forms.js (.../forms.js) (revision 7735) @@ -2,7 +2,6 @@ var errors = new Object(); var first_error = new Object(); var fields = new Object(); -var textareas100 = new Array(); function show_form_error(prefix, field, sticky) { if (isset(errors[prefix]) && isset(errors[prefix][field])) { @@ -40,13 +39,14 @@ Form = new Form(); -Form.Textareas = new Array(); +Form.Controls = new Array(); Form.Div = false; -Form.MinTextareasHeight = 0; +Form.MinControlsHeight = 0; Form.Coeffs = new Object(); Form.ScrollerW = 17; Form.ScrollerH = 17; +Form.Wrap = true; Form.Init = function(id) { @@ -56,17 +56,24 @@ document.body.style.overflow = 'hidden'; document.body.scroll = 'no' - o += '
'; - o += this.Div.innerHTML + '
'; - el.innerHTML = o; + if (this.Wrap) { + o += '
'; + o += this.Div.innerHTML + '
'; + el.innerHTML = o; + } this.Table = this.Div.getElementsByTagName('table')[0]; this.Table.style.height = 'auto'; this.MinHeight = this.Table.offsetHeight; this.MinWidth = this.Table.offsetWidth; - //we need to init form BEFORE executing JS, becasue JS adds textareas to Form object - execJS(el) + //we need to init form BEFORE executing JS, becasue JS adds controls to Form object + if (this.Wrap) { + execJS(el) + } + else { + this.Resize() + } addEvent(window, 'resize', function() {Form.Resize()}) @@ -85,14 +92,14 @@ } } -Form.addTextarea = function(id, coeff) { - if (!this.Div) return; +Form.addControl = function(id, coeff) { + if (this.Wrap && !this.Div) return; - this.Textareas.push(id); + this.Controls.push(id); this.Coeffs[id] = coeff ? coeff : 1; dim = getDimensions(document.getElementById(id)); - this.MinTextareasHeight += dim.innerHeight; -// alert('adding textarea '+id+' height: '+dim.innerHeight+' total: '+this.MinTextareasHeight) + this.MinControlsHeight += dim.innerHeight; +// alert('adding element '+id+' height: '+dim.innerHeight+' total: '+this.MinControlsHeight) } Form.Resize = function() @@ -109,23 +116,25 @@ scroller_width = this.MinHeight >= h - scroller_height ? this.ScrollerW : 0; scroller_height = this.MinWidth >= w - scroller_width ? this.ScrollerH : 0; +// alert('resize: '+w+'x'+h) + this.Table.style.width = (w-scroller_width) + 'px'; this.Div.style.width = (w)+'px'; this.Div.style.height = (h)+'px'; - var count = this.Textareas.length; + var count = this.Controls.length; - // -count here is adjustment - 1px for each textarea - var split = h - count - this.MinHeight + this.MinTextareasHeight; - if (split < this.MinTextareasHeight) split = this.MinTextareasHeight; + // -count here is adjustment - 1px for each control + var split = h - count - this.MinHeight + this.MinControlsHeight; + if (split < this.MinControlsHeight) split = this.MinControlsHeight; var new_height = Math.round(split / count) -2; -// alert('h is: '+h+' min height is '+this.MinHeight+' MinTextareasHeight is '+this.MinTextareasHeight+' -> '+split+' to split between '+count+' new height is '+new_height); -// print_pre(this.Textareas) +// alert('h is: '+h+' min height is '+this.MinHeight+' MinControlsHeight is '+this.MinControlsHeight+' -> '+split+' to split between '+count+' new height is '+new_height); +// print_pre(this.Controls) - for (var i in this.Textareas) { - document.getElementById(this.Textareas[i]).style.height = new_height + 'px'; + for (var i in this.Controls) { + document.getElementById(this.Controls[i]).style.height = new_height + 'px'; } Index: branches/unlabeled/unlabeled-1.71.2/core/kernel/db/db_tag_processor.php =================================================================== diff -u -N -r7725 -r7735 --- branches/unlabeled/unlabeled-1.71.2/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 7725) +++ branches/unlabeled/unlabeled-1.71.2/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 7735) @@ -1841,7 +1841,6 @@ //'UserFilesPath' => $pathtoroot.'kernel/user_files', 'ProjectPath' => BASE_PATH.'/', 'CustomConfigurationsPath' => $this->Application->BaseURL().'core/admin_templates/js/inp_fckconfig.js', -// 'EditorAreaCSS' => $this->Application->BaseURL().'/themes/inportal_site/inc/inportal.css', //GetThemeCSS(), 'StylesXmlPath' => $theme_path.'/inc/styles.xml', 'EditorAreaCSS' => $theme_path.'/inc/style.css', 'DefaultClass' => 'Default Text',