Commit 4ea0c458 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Fixes #9521 Textarea auto-grow - PHP and JS have been lost in GIT!

parent 85a66cd9
Pipeline #2664 passed with stages
in 2 minutes and 48 seconds
...@@ -1406,7 +1406,6 @@ abstract class AbstractBuildForm { ...@@ -1406,7 +1406,6 @@ abstract class AbstractBuildForm {
$attribute .= Support::doAttribute('id', $formElement[FE_HTML_ID]); $attribute .= Support::doAttribute('id', $formElement[FE_HTML_ID]);
$attribute .= Support::doAttribute('name', $htmlFormElementName); $attribute .= Support::doAttribute('name', $htmlFormElementName);
$attribute .= Support::doAttribute('class', $class);
$attribute .= Support::doAttribute(ATTRIBUTE_DATA_REFERENCE, $formElement[FE_DATA_REFERENCE]); $attribute .= Support::doAttribute(ATTRIBUTE_DATA_REFERENCE, $formElement[FE_DATA_REFERENCE]);
if (isset($formElement[FE_RETYPE_SOURCE_NAME])) { if (isset($formElement[FE_RETYPE_SOURCE_NAME])) {
...@@ -1444,10 +1443,14 @@ abstract class AbstractBuildForm { ...@@ -1444,10 +1443,14 @@ abstract class AbstractBuildForm {
// Check for input type 'textarea'. Possible notation: a) '', b) '<width>', c) '<width>,<height>', d) '<width>,<min-height>,<max-height>' // Check for input type 'textarea'. Possible notation: a) '', b) '<width>', c) '<width>,<height>', d) '<width>,<min-height>,<max-height>'
$colsRows = explode(',', $formElement[FE_SIZE], 3); $colsRows = explode(',', $formElement[FE_SIZE], 3);
// AutoHeight if (empty($colsRows[1])) {
$colsRows[1] = HelperFormElement::textareaAutoHeight($colsRows, $value); $colsRows[1] = 1;
}
$flagTextarea = ($colsRows[1] > 1); $flagTextarea = ($colsRows[1] > 1);
// AutoHeight
// $colsRows[1] = HelperFormElement::textareaAutoHeight($colsRows, $value);
$formElement = HelperFormElement::prepareExtraButton($formElement, !$flagTextarea); $formElement = HelperFormElement::prepareExtraButton($formElement, !$flagTextarea);
...@@ -1456,6 +1459,16 @@ abstract class AbstractBuildForm { ...@@ -1456,6 +1459,16 @@ abstract class AbstractBuildForm {
$attribute .= Support::doAttribute('cols', $colsRows[0]); $attribute .= Support::doAttribute('cols', $colsRows[0]);
$attribute .= Support::doAttribute('rows', $colsRows[1]); $attribute .= Support::doAttribute('rows', $colsRows[1]);
if (($formElement[FE_TEXTAREA_RESIZE] ?? '1') == '0') {
$attribute .= Support::doAttribute('style', 'resize: none;');
}
// Check if $colsRows[2] != 0 >> enable auto-grow (if nothing is defined: enable auto-grow)
$maxHeight = $colsRows[2] ?? '350';
if ($maxHeight != '0') {
$class .= ' ' . CLASS_FORM_ELEMENT_AUTO_GROW;
$attribute .= Support::doAttribute(ATTRIBUTE_DATA_MAX_HEIGHT, $maxHeight);
}
$textarea = htmlentities($value) . '</textarea>'; $textarea = htmlentities($value) . '</textarea>';
} else { } else {
$htmlTag = '<input'; $htmlTag = '<input';
...@@ -1480,6 +1493,7 @@ abstract class AbstractBuildForm { ...@@ -1480,6 +1493,7 @@ abstract class AbstractBuildForm {
$attribute .= Support::doAttribute(F_FE_DATA_PATTERN_ERROR, $formElement[F_FE_DATA_PATTERN_ERROR], true, ESCAPE_WITH_BACKSLASH); $attribute .= Support::doAttribute(F_FE_DATA_PATTERN_ERROR, $formElement[F_FE_DATA_PATTERN_ERROR], true, ESCAPE_WITH_BACKSLASH);
} }
if ($formElement[FE_MODE] == FE_MODE_REQUIRED) { if ($formElement[FE_MODE] == FE_MODE_REQUIRED) {
$attribute .= Support::doAttribute(F_FE_DATA_REQUIRED_ERROR, $formElement[F_FE_DATA_REQUIRED_ERROR]); $attribute .= Support::doAttribute(F_FE_DATA_REQUIRED_ERROR, $formElement[F_FE_DATA_REQUIRED_ERROR]);
} }
...@@ -1495,6 +1509,8 @@ abstract class AbstractBuildForm { ...@@ -1495,6 +1509,8 @@ abstract class AbstractBuildForm {
$attribute .= $this->getAttributeFeMode($formElement[FE_MODE], false); $attribute .= $this->getAttributeFeMode($formElement[FE_MODE], false);
$attribute .= Support::doAttribute('class', $class);
$json = $this->getFormElementForJson($htmlFormElementName, $value, $formElement); $json = $this->getFormElementForJson($htmlFormElementName, $value, $formElement);
$input = "$htmlTag $attribute>$textarea"; $input = "$htmlTag $attribute>$textarea";
......
...@@ -858,6 +858,11 @@ const DATA_CHARACTER_COUNT_ID = 'data-character-count-id'; ...@@ -858,6 +858,11 @@ const DATA_CHARACTER_COUNT_ID = 'data-character-count-id';
const CLASS_FORM_ELEMENT_EDIT = 'qfq-form-element-edit'; const CLASS_FORM_ELEMENT_EDIT = 'qfq-form-element-edit';
const CLASS_FORM_ELEMENT_AUTO_GROW = 'qfq-auto-grow';
const ATTRIBUTE_DATA_MAX_HEIGHT = 'data-max-height';
// BuildForm // BuildForm
const SYMBOL_NEW = 'new'; const SYMBOL_NEW = 'new';
const SYMBOL_EDIT = 'edit'; const SYMBOL_EDIT = 'edit';
...@@ -1241,6 +1246,7 @@ const FE_RECORD_DESTINATION_TABLE = 'recordDestinationTable'; ...@@ -1241,6 +1246,7 @@ const FE_RECORD_DESTINATION_TABLE = 'recordDestinationTable';
const FE_RECORD_SOURCE_TABLE = 'recordSourceTable'; const FE_RECORD_SOURCE_TABLE = 'recordSourceTable';
const FE_TRANSLATE_ID_COLUMN = 'translateIdColumn'; const FE_TRANSLATE_ID_COLUMN = 'translateIdColumn';
const FE_EMPTY_MEANS_NULL = 'emptyMeansNull'; const FE_EMPTY_MEANS_NULL = 'emptyMeansNull';
const FE_TEXTAREA_RESIZE = 'textareaResize';
const FE_EMPTY_ITEM_AT_START = 'emptyItemAtStart'; const FE_EMPTY_ITEM_AT_START = 'emptyItemAtStart';
const FE_EMPTY_ITEM_AT_END = 'emptyItemAtEnd'; const FE_EMPTY_ITEM_AT_END = 'emptyItemAtEnd';
const FE_SUBRECORD_TABLE_CLASS = 'subrecordTableClass'; const FE_SUBRECORD_TABLE_CLASS = 'subrecordTableClass';
......
...@@ -200,25 +200,25 @@ VALUES ...@@ -200,25 +200,25 @@ VALUES
'<a tabindex="-1" href="{{documentation:Y}}#form-name">Info</a>', '', '', '', '<a tabindex="-1" href="{{documentation:Y}}#form-name">Info</a>', '', '', '',
'autofocus\ndata-pattern-error=Allowed characters: alphabet, number or . - +', 'autofocus\ndata-pattern-error=Allowed characters: alphabet, number or . - +',
1, '', '', '', 'specialchar', 'no', '[a-zA-Z0-9._+-]+'), 1, '', '', '', 'specialchar', 'no', '[a-zA-Z0-9._+-]+'),
(1, 'title', 'Title', 'show', 'text', 'all', 'native', 120, '80,2,15', 0, (1, 'title', 'Title', 'show', 'text', 'all', 'native', 120, '80,2', 0,
'<a tabindex="-1" href="{{documentation:Y}}#form-title">Info</a>', '<a tabindex="-1" href="{{documentation:Y}}#form-title">Info</a>',
'', '', '', '', 1, '', '', '', 'none', 'no', ''), '', '', '', '', 1, '', '', '', 'none', 'no', ''),
(1, 'noteInternal', 'Note', 'show', 'text', 'all', 'native', 130, '80,2,15', 0, (1, 'noteInternal', 'Note', 'show', 'text', 'all', 'native', 130, '80,2', 0,
'<a tabindex="-1" href="{{documentation:Y}}#form-note">Info</a>', '', '', '', '', 1, '', '', '', 'specialchar', 'no', '<a tabindex="-1" href="{{documentation:Y}}#form-note">Info</a>', '', '', '', '', 1, '', '', '', 'specialchar', 'no',
''), ''),
(1, 'tableName', 'Table', 'required', 'select', 'all', 'native', 140, 0, 0, (1, 'tableName', 'Table', 'required', 'select', 'all', 'native', 140, 0, 0,
'<a tabindex="-1" href="{{documentation:Y}}#form-tablename">Info</a>', '', '', '{{[{{indexData:Y}}]!SHOW tables}}', '<a tabindex="-1" href="{{documentation:Y}}#form-tablename">Info</a>', '', '', '{{[{{indexData:Y}}]!SHOW tables}}',
'emptyItemAtStart', 1, '', '', '', 'specialchar', 'no', ''), 'emptyItemAtStart', 1, '', '', '', 'specialchar', 'no', ''),
(1, 'parameterLanguageA', 'Language: {{formLanguageALabel:YE}}', 'show', 'text', 'all', 'native', 150, '80,2,15', 0, (1, 'parameterLanguageA', 'Language: {{formLanguageALabel:YE}}', 'show', 'text', 'all', 'native', 150, '80,2', 0,
'<a tabindex="-1" href="{{documentation:Y}}#multi-language-form">Info</a>', '', '', '', '', 1, '', '<a tabindex="-1" href="{{documentation:Y}}#multi-language-form">Info</a>', '', '', '', '', 1, '',
'{{SELECT IF("{{formLanguageAId:YE}}"="","hidden","show" ) }}', '', 'none', 'no', ''), '{{SELECT IF("{{formLanguageAId:YE}}"="","hidden","show" ) }}', '', 'none', 'no', ''),
(1, 'parameterLanguageB', 'Language: {{formLanguageBLabel:YE}}', 'show', 'text', 'all', 'native', 160, '80,2,15', 0, (1, 'parameterLanguageB', 'Language: {{formLanguageBLabel:YE}}', 'show', 'text', 'all', 'native', 160, '80,2', 0,
'<a tabindex="-1" href="{{documentation:Y}}#multi-language-form">Info</a>', '', '', '', '', 1, '', '<a tabindex="-1" href="{{documentation:Y}}#multi-language-form">Info</a>', '', '', '', '', 1, '',
'{{SELECT IF("{{formLanguageBId:YE}}"="","hidden","show" ) }}', '', 'none', 'no', ''), '{{SELECT IF("{{formLanguageBId:YE}}"="","hidden","show" ) }}', '', 'none', 'no', ''),
(1, 'parameterLanguageC', 'Language: {{formLanguageCLabel:YE}}', 'show', 'text', 'all', 'native', 170, '80,2,15', 0, (1, 'parameterLanguageC', 'Language: {{formLanguageCLabel:YE}}', 'show', 'text', 'all', 'native', 170, '80,2', 0,
'<a tabindex="-1" href="{{documentation:Y}}#multi-language-form">Info</a>', '', '', '', '', 1, '', '<a tabindex="-1" href="{{documentation:Y}}#multi-language-form">Info</a>', '', '', '', '', 1, '',
'{{SELECT IF("{{formLanguageCId:YE}}"="","hidden","show" ) }}', '', 'none', 'no', ''), '{{SELECT IF("{{formLanguageCId:YE}}"="","hidden","show" ) }}', '', 'none', 'no', ''),
(1, 'parameterLanguageD', 'Language: {{formLanguageDLabel:YE}}', 'show', 'text', 'all', 'native', 180, '80,2,15', 0, (1, 'parameterLanguageD', 'Language: {{formLanguageDLabel:YE}}', 'show', 'text', 'all', 'native', 180, '80,2', 0,
'<a tabindex="-1" href="{{documentation:Y}}#multi-language-form">Info</a>', '', '', '', '', 1, '', '<a tabindex="-1" href="{{documentation:Y}}#multi-language-form">Info</a>', '', '', '', '', 1, '',
'{{SELECT IF("{{formLanguageDId:YE}}"="","hidden","show" ) }}', '', 'none', 'no', ''), '{{SELECT IF("{{formLanguageDId:YE}}"="","hidden","show" ) }}', '', 'none', 'no', ''),
...@@ -238,7 +238,7 @@ VALUES ...@@ -238,7 +238,7 @@ VALUES
(1, 'labelAlign', 'Label Align', 'show', 'radio', 'alnumx', 'native', 225, 0, 5, (1, 'labelAlign', 'Label Align', 'show', 'radio', 'alnumx', 'native', 225, 0, 5,
'<a tabindex="-1" href="{{documentation:Y}}#definition">Info</a>', '', '', '', 'buttonClass', 3, '', '<a tabindex="-1" href="{{documentation:Y}}#definition">Info</a>', '', '', '', 'buttonClass', 3, '',
'', '', 'specialchar', 'no', ''), '', '', 'specialchar', 'no', ''),
(1, 'parameter', 'Parameter', 'show', 'text', 'all', 'native', 230, '80,2,15', 0, (1, 'parameter', 'Parameter', 'show', 'text', 'all', 'native', 230, '80,2', 0,
'<a tabindex="-1" href="{{documentation:Y}}#form-parameter">Info</a>', '', '', '', '', 3, '', '', '', 'none', 'no', '<a tabindex="-1" href="{{documentation:Y}}#form-parameter">Info</a>', '', '', '', '', 3, '', '', '', 'none', 'no',
''), ''),
(1, 'bsLabelColumns', 'BS Label Columns', 'show', 'text', 'all', 'native', 240, 0, 0, (1, 'bsLabelColumns', 'BS Label Columns', 'show', 'text', 'all', 'native', 240, 0, 0,
...@@ -302,7 +302,7 @@ VALUES ...@@ -302,7 +302,7 @@ VALUES
(1, 'multiMode', 'Multi Mode', 'show', 'radio', 'all', 'native', 520, 0, 0, '', '', '', '', 'buttonClass', 5, '', '', (1, 'multiMode', 'Multi Mode', 'show', 'radio', 'all', 'native', 520, 0, 0, '', '', '', '', 'buttonClass', 5, '', '',
'', '',
'specialchar', 'no', ''), 'specialchar', 'no', ''),
(1, 'multiSql', 'Multi SQL', 'show', 'text', 'all', 'native', 530, '80,2,15', 0, '', '', '', '', '', 5, '', '', '', (1, 'multiSql', 'Multi SQL', 'show', 'text', 'all', 'native', 530, '80,2', 0, '', '', '', '', '', 5, '', '', '',
'none', 'no', ''), 'none', 'no', ''),
(1, 'multiDetailForm', 'Multi Detail Form', 'show', 'text', 'all', 'native', 540, 0, 0, '', '', '', '', '', 5, (1, 'multiDetailForm', 'Multi Detail Form', 'show', 'text', 'all', 'native', 540, 0, 0, '', '', '', '', '', 5,
'', '', '', 'specialchar', 'no', ''), '', '', '', 'specialchar', 'no', ''),
...@@ -380,22 +380,22 @@ VALUES (2, 'feIdContainer', 'Container', 'show', 'select', 'all', 'native', 120, ...@@ -380,22 +380,22 @@ VALUES (2, 'feIdContainer', 'Container', 'show', 'select', 'all', 'native', 120,
'', 100, '', 'yes', '', '', '', '', 100, '', 'yes', '', '', '',
'{{ SELECT IF("{{type:FRE:alnumx}}"="subrecord" AND "{{class:FRE:alnumx}}"="native", "show", "hidden") }}', '', '{{ SELECT IF("{{type:FRE:alnumx}}"="subrecord" AND "{{class:FRE:alnumx}}"="native", "show", "hidden") }}', '',
'specialchar'), 'specialchar'),
(2, 'parameterLanguageA', 'Language: {{formLanguageALabel:YE}}', 'show', 'text', 'all', 'native', 210, '80,2,15', (2, 'parameterLanguageA', 'Language: {{formLanguageALabel:YE}}', 'show', 'text', 'all', 'native', 210, '80,2',
0, 0,
'<a tabindex="-1" href="{{documentation:Y}}#multi-language-form">Info</a>', '', '', '', '', 100, '', 'no', '', '<a tabindex="-1" href="{{documentation:Y}}#multi-language-form">Info</a>', '', '', '', '', 100, '', 'no', '',
'', '', '', '',
'{{SELECT IF("{{formLanguageAId:YE}}"="","hidden","show" ) }}', '', 'none'), '{{SELECT IF("{{formLanguageAId:YE}}"="","hidden","show" ) }}', '', 'none'),
(2, 'parameterLanguageB', 'Language: {{formLanguageBLabel:YE}}', 'show', 'text', 'all', 'native', 210, '80,2,15', (2, 'parameterLanguageB', 'Language: {{formLanguageBLabel:YE}}', 'show', 'text', 'all', 'native', 210, '80,2',
0, 0,
'<a tabindex="-1" href="{{documentation:Y}}#multi-language-form">Info</a>', '', '', '', '', 100, '', 'no', '', '<a tabindex="-1" href="{{documentation:Y}}#multi-language-form">Info</a>', '', '', '', '', 100, '', 'no', '',
'', '', '', '',
'{{SELECT IF("{{formLanguageBId:YE}}"="","hidden","show" ) }}', '', 'none'), '{{SELECT IF("{{formLanguageBId:YE}}"="","hidden","show" ) }}', '', 'none'),
(2, 'parameterLanguageC', 'Language: {{formLanguageCLabel:YE}}', 'show', 'text', 'all', 'native', 210, '80,2,15', (2, 'parameterLanguageC', 'Language: {{formLanguageCLabel:YE}}', 'show', 'text', 'all', 'native', 210, '80,2',
0, 0,
'<a tabindex="-1" href="{{documentation:Y}}#multi-language-form">Info</a>', '', '', '', '', 100, '', 'no', '', '<a tabindex="-1" href="{{documentation:Y}}#multi-language-form">Info</a>', '', '', '', '', 100, '', 'no', '',
'', '', '', '',
'{{SELECT IF("{{formLanguageCId:YE}}"="","hidden","show" ) }}', '', 'none'), '{{SELECT IF("{{formLanguageCId:YE}}"="","hidden","show" ) }}', '', 'none'),
(2, 'parameterLanguageD', 'Language: {{formLanguageDLabel:YE}}', 'show', 'text', 'all', 'native', 210, '80,2,15', (2, 'parameterLanguageD', 'Language: {{formLanguageDLabel:YE}}', 'show', 'text', 'all', 'native', 210, '80,2',
0, 0,
'<a tabindex="-1" href="{{documentation:Y}}#multi-language-form">Info</a>', '', '', '', '', 100, '', 'no', '', '<a tabindex="-1" href="{{documentation:Y}}#multi-language-form">Info</a>', '', '', '', '', 100, '', 'no', '',
'', '', '', '',
...@@ -427,7 +427,7 @@ VALUES (2, 'feIdContainer', 'Container', 'show', 'select', 'all', 'native', 120, ...@@ -427,7 +427,7 @@ VALUES (2, 'feIdContainer', 'Container', 'show', 'select', 'all', 'native', 120,
# '<a tabindex="-1" href="{{documentation:Y}}#field-tabindex">Info</a>', '', '', '', '', 101, '', 'no', '', '', # '<a tabindex="-1" href="{{documentation:Y}}#field-tabindex">Info</a>', '', '', '', '', 101, '', 'no', '', '',
# '', '', '', # '', '', '',
# 'specialchar'), # 'specialchar'),
(2, 'adminNote', 'Internal Note', 'show', 'text', 'all', 'native', 360, '80,2,15', 0, '', '', '', '', '', 101, (2, 'adminNote', 'Internal Note', 'show', 'text', 'all', 'native', 360, '80,2', 0, '', '', '', '', '', 101,
'', '',
'no', 'no',
'', '', '', '',
...@@ -465,7 +465,7 @@ VALUES (2, 'feIdContainer', 'Container', 'show', 'select', 'all', 'native', 120, ...@@ -465,7 +465,7 @@ VALUES (2, 'feIdContainer', 'Container', 'show', 'select', 'all', 'native', 120,
'<a tabindex="-1" href="{{documentation:Y}}#field-maxlength">Info</a>', '', '', '', '', 102, '', 'no', '', '', '<a tabindex="-1" href="{{documentation:Y}}#field-maxlength">Info</a>', '', '', '', '', 102, '', 'no', '', '',
'', '', '', '', '', '',
'specialchar'), 'specialchar'),
(2, 'note', 'Note', 'show', 'text', 'all', 'native', 460, '80,2,15', 0, (2, 'note', 'Note', 'show', 'text', 'all', 'native', 460, '80,2', 0,
'<a tabindex="-1" href="{{documentation:Y}}#field-note">Info</a>', '', '', '', '', 102, '', 'no', '', '', '', '<a tabindex="-1" href="{{documentation:Y}}#field-note">Info</a>', '', '', '', '', 102, '', 'no', '', '', '',
'', '', 'none'), '', '', 'none'),
(2, 'tooltip', 'Tooltip', 'show', 'text', 'all', 'native', 470, 0, 0, (2, 'tooltip', 'Tooltip', 'show', 'text', 'all', 'native', 470, 0, 0,
...@@ -477,14 +477,14 @@ VALUES (2, 'feIdContainer', 'Container', 'show', 'select', 'all', 'native', 120, ...@@ -477,14 +477,14 @@ VALUES (2, 'feIdContainer', 'Container', 'show', 'select', 'all', 'native', 120,
'', '', '', '', '', '',
'none'), 'none'),
(2, 'value', 'value', 'show', 'text', 'all', 'native', 500, '80,2,15', 0, (2, 'value', 'value', 'show', 'text', 'all', 'native', 500, '80,2', 0,
'<a tabindex="-1" href="{{documentation:Y}}#field-value">Info</a>', '', '', '', '', 103, '', 'no', '', '', '', '<a tabindex="-1" href="{{documentation:Y}}#field-value">Info</a>', '', '', '', '', 103, '', 'no', '', '', '',
'', '', '', '',
'none'), 'none'),
(2, 'sql1', 'sql1', 'show', 'text', 'all', 'native', 510, '80,2,15', 0, (2, 'sql1', 'sql1', 'show', 'text', 'all', 'native', 510, '80,2', 0,
'<a tabindex="-1" href="{{documentation:Y}}#sql1">Info</a><br><br>MariaDB: <a tabindex="-1" href="https://mariadb.com/kb/en/mariadb/select/">Select</a>, <a tabindex="-1" href="https://mariadb.com/kb/en/mariadb/functions-and-operators/">Functions</a>', '<a tabindex="-1" href="{{documentation:Y}}#sql1">Info</a><br><br>MariaDB: <a tabindex="-1" href="https://mariadb.com/kb/en/mariadb/select/">Select</a>, <a tabindex="-1" href="https://mariadb.com/kb/en/mariadb/functions-and-operators/">Functions</a>',
'', '', '', '', 103, '', 'no', '', '', '', '', '', 'none'), '', '', '', '', 103, '', 'no', '', '', '', '', '', 'none'),
(2, 'parameter', 'Parameter', 'show', 'text', 'all', 'native', 520, '80,2,15', 0, (2, 'parameter', 'Parameter', 'show', 'text', 'all', 'native', 520, '80,2', 0,
'<a tabindex="-1" href="{{documentation:Y}}#fe-parameter-attributes">Info</a>', '<a tabindex="-1" href="{{documentation:Y}}#fe-parameter-attributes">Info</a>',
'', '', '', '', 103, '', 'no', '', '', '', '', '', 'none'); '', '', '', '', 103, '', 'no', '', '', '', '', '', 'none');
...@@ -642,10 +642,10 @@ VALUES (4, 'status', 'Enabled', 'show', '', 'checkbox', 'specialchar', 'alnumx', ...@@ -642,10 +642,10 @@ VALUES (4, 'status', 'Enabled', 'show', '', 'checkbox', 'specialchar', 'alnumx',
(4, 'sql1', 'Mail', 'show', '{{SELECT IF("{{type:FR:alnumx}}"="mail","show","hidden") }}', 'text', 'none', 'all', (4, 'sql1', 'Mail', 'show', '{{SELECT IF("{{type:FR:alnumx}}"="mail","show","hidden") }}', 'text', 'none', 'all',
60, 60,
'extraButtonInfo = Query: &#123;&#123;!SELECT ... as sendMailTo...&#125;&#125;<br><b>sendMailTo / sendMailCc / sendMailBcc</b>: Separate multiple by comma.<br><b>sendMailFrom</b><br><b>sendMailSubject</b><br><b>sendMailReplyTo</b>: Optional<br><b>sendMailFlagAutoSubmit</b>: Optional. on|off. Default on - if "on", suppresses OoO answers from receivers.<br><b>sendMailGrId</b>: Optional<br><b>sendMailXId</b>: Optional', 'extraButtonInfo = Query: &#123;&#123;!SELECT ... as sendMailTo...&#125;&#125;<br><b>sendMailTo / sendMailCc / sendMailBcc</b>: Separate multiple by comma.<br><b>sendMailFrom</b><br><b>sendMailSubject</b><br><b>sendMailReplyTo</b>: Optional<br><b>sendMailFlagAutoSubmit</b>: Optional. on|off. Default on - if "on", suppresses OoO answers from receivers.<br><b>sendMailGrId</b>: Optional<br><b>sendMailXId</b>: Optional',
'80,2,15', '', 'yes', '', '', ''), '80,2', '', 'yes', '', '', ''),
(4, 'content', '{{SELECT IF("{{type:FR:alnumx}}"="mail","Mail body","URL") }}', 'show', '', 'text', 'none', (4, 'content', '{{SELECT IF("{{type:FR:alnumx}}"="mail","Mail body","URL") }}', 'show', '', 'text', 'none',
'all', 70, 'all', 70,
'', '80,2,15', '', '80,2',
'Website: URL absolute like "http://..." or relative like "?id=pagealias..."<br>Mail: Static Body or &#123;{SELECT ...&#125;}', 'Website: URL absolute like "http://..." or relative like "?id=pagealias..."<br>Mail: Static Body or &#123;{SELECT ...&#125;}',
'yes', '', '', ''), 'yes', '', '', ''),
...@@ -660,7 +660,7 @@ VALUES (4, 'status', 'Enabled', 'show', '', 'checkbox', 'specialchar', 'alnumx', ...@@ -660,7 +660,7 @@ VALUES (4, 'status', 'Enabled', 'show', '', 'checkbox', 'specialchar', 'alnumx',
'yes', '', '', ''), 'yes', '', '', ''),
(4, 'lastRun', 'Last run', 'readonly', '', 'text', 'specialchar', 'alnumx', 120, '', '', '', 'no', '', '', ''), (4, 'lastRun', 'Last run', 'readonly', '', 'text', 'specialchar', 'alnumx', 120, '', '', '', 'no', '', '', ''),
(4, 'lastStatus', 'Laststatus', 'readonly', '', 'text', 'specialchar', 'alnumx', 130, '', '80,2,15', '', 'no', (4, 'lastStatus', 'Laststatus', 'readonly', '', 'text', 'specialchar', 'alnumx', 130, '', '80,2', '', 'no',
'3', '3',
'9', '9',
'0'), '0'),
......
...@@ -13,19 +13,43 @@ $(document).ready( function () { ...@@ -13,19 +13,43 @@ $(document).ready( function () {
}); // end .each() }); // end .each()
$('.qfq-auto-grow').each(function() { $('.qfq-auto-grow').each(function() {
var minHeight = $(this).attr("rows") * 14 + 18;
var newHeight = $(this).prop('scrollHeight'); var newHeight = $(this).prop('scrollHeight');
var maxHeight = $(this).data('max-height') || 0; var maxHeight = $(this).data('max-height') || 0;
if(newHeight < maxHeight || maxHeight === 0) {
if ($(this).val === '' || newHeight < minHeight) {
return;
}
if (newHeight < maxHeight || maxHeight === 0) {
$(this).height(newHeight);
} else {
$(this).height(maxHeight);
}
});
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
$('.qfq-auto-grow').each(function () {
var minHeight = $(this).attr("rows") * 14 + 18;
var newHeight = $(this).prop('scrollHeight');
var maxHeight = $(this).data('max-height') || 0;
if ($(this).val === '' || newHeight < minHeight) {
return;
}
if (newHeight < maxHeight || maxHeight === 0) {
$(this).height(newHeight); $(this).height(newHeight);
} else { } else {
$(this).height(maxHeight); $(this).height(maxHeight);
} }
}); });
});
$('.qfq-auto-grow').on('input', function() { $('.qfq-auto-grow').on('input', function() {
var newHeight = $(this).prop('scrollHeight'); var newHeight = $(this).prop('scrollHeight');
var maxHeight = $(this).data('max-height') || 0; var maxHeight = $(this).data('max-height') || 0;
if($(this).height() + 10 < newHeight) { if ($(this).outerHeight() < newHeight) {
if(newHeight < maxHeight || maxHeight === 0) { if(newHeight < maxHeight || maxHeight === 0) {
$(this).height(newHeight); $(this).height(newHeight);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment