From 6c4a7c5f341409c6bba4d40c06c03ddbad5811bf Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 10 May 2013 08:24:15 +0000 Subject: [PATCH] had to remove width: 100% from .prefValue as it conflicts with float: left, setting rows and cols for old eT --- preferences/inc/class.preferences_settings.inc.php | 12 ++++++++---- preferences/templates/default/app.css | 1 - 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/preferences/inc/class.preferences_settings.inc.php b/preferences/inc/class.preferences_settings.inc.php index 62c9d3ab14..c54eff52bd 100644 --- a/preferences/inc/class.preferences_settings.inc.php +++ b/preferences/inc/class.preferences_settings.inc.php @@ -112,10 +112,9 @@ class preferences_settings 'old_type' => $content['type'], 'types' => array(), ); - if ($button == 'apply') $old_tab = $content['tabs']; + if ($content['old_appname'] == $content['appname']) $old_tab = $content['tabs']; $content = $this->get_content($appname, $type, $sel_options, $readonlys, $preserve['types'], $tpl); - error_log(__METHOD__."() preserve=".array2string($preserve)); - if ($button == 'apply') $content['tabs'] = $old_tab; + if (isset($old_tab)) $content['tabs'] = $old_tab; // if not just saved, call validation before, to be able to show failed validation of current prefs if (!isset($button)) @@ -298,7 +297,12 @@ class preferences_settings case 'textarea': $setting['type'] = is_a($tpl, 'etemplate_old') ? 'textarea' : 'textbox'; $tpl->setElementAttribute($tab.'['.$setting['name'].']', 'multiline', 'true'); - // ignoring rows and cols in favor of hardcoded: width: 100%, height: 5em + // anyway setting via css: width: 99%, height: 5em + // for old eT use size attribute + if (is_a($tpl, 'etemplate_old') && (!empty($setting['cols']) || !empty($setting['rows']))) + { + $setting['size'] = $setting['rows'].','.$setting['cols']; + } break; case 'password': case 'vfs_file': diff --git a/preferences/templates/default/app.css b/preferences/templates/default/app.css index 7eace80f07..fd83bac783 100644 --- a/preferences/templates/default/app.css +++ b/preferences/templates/default/app.css @@ -39,7 +39,6 @@ tr.prefRow:hover .prefHelp { } .prefValue { margin-right: 5px; - width: 100%; } .prefValue textarea, textarea.prefValue { width: 99%;