modify <buttononly.../> --> <et2-button type="buttononly"...></et2-button>

also adding a class .et2_buttonFitContent and using it for filemanager.admin
This commit is contained in:
Ralf Becker 2021-09-16 09:03:15 +02:00
parent 44fcd07f6b
commit 4063f9fcdb
3 changed files with 10 additions and 6 deletions

View File

@ -67,6 +67,9 @@ function send_template()
// fix <textbox multiline="true" .../> --> <textarea .../> (et2-prefix and self-closing is handled below) // fix <textbox multiline="true" .../> --> <textarea .../> (et2-prefix and self-closing is handled below)
$str = preg_replace('#<textbox(.*?)\smultiline="true"(.*?)/>#u', '<textarea$1$2/>', $str); $str = preg_replace('#<textbox(.*?)\smultiline="true"(.*?)/>#u', '<textarea$1$2/>', $str);
// fix <buttononly.../> --> <button type="buttononly".../>
$str = preg_replace('#<buttononly\s(.*?)/>#u', '<button type="buttononly" $1/>', $str);
$str = preg_replace_callback(ADD_ET2_PREFIX_REGEXP, static function (array $matches) $str = preg_replace_callback(ADD_ET2_PREFIX_REGEXP, static function (array $matches)
{ {
return '<' . $matches[2] . 'et2-' . $matches[3] . return '<' . $matches[2] . 'et2-' . $matches[3] .
@ -120,4 +123,4 @@ function send_template()
echo $str; echo $str;
exit; // stop further processing eg. redirect to login exit; // stop further processing eg. redirect to login
} }

View File

@ -315,6 +315,9 @@ button.et2_button_with_image {
button.et2_button_with_image.et2_button_text { button.et2_button_with_image.et2_button_text {
background-position: 4px center; background-position: 4px center;
} }
button.et2_buttonFitContent, et2-button.et2_buttonFitContent {
max-width: fit-content;
}
/* et2_box_widget ###*/ /* et2_box_widget ###*/
button[id="cancel"], button[id="cancel"],
button#cancel { button#cancel {
@ -3370,4 +3373,4 @@ span.et2_countdown_seconds {
} }
.et2_audio audio { .et2_audio audio {
outline: none; outline: none;
} }

View File

@ -85,10 +85,8 @@
</rows> </rows>
</grid> </grid>
<vbox class="filemanager_config"> <vbox class="filemanager_config">
<button label="Mount /etemplates to allow customizing of eTemplates" id="etemplates"/> <button label="Mount /etemplates to allow customizing of eTemplates" id="etemplates" class="et2_buttonFitContent"/>
<menulist> <select id="allow_delete_versions" onchange="1" label="Who should be allowed to finally delete deleted files or old versions of a file:" empty_label="Noone" disabled="!@versioning"/>
<menupopup id="allow_delete_versions" onchange="1" label="Who should be allowed to finally delete deleted files or old versions of a file:" empty_label="Noone" disabled="!@versioning"/>
</menulist>
<hbox disabled="!@versioning"> <hbox disabled="!@versioning">
<integer id="mtime" label="Delete all older versions and deleted files older then %s days" statustext="0 means all, -N newer then N days"/> <integer id="mtime" label="Delete all older versions and deleted files older then %s days" statustext="0 means all, -N newer then N days"/>
<textbox size="30" label="under directory" id="versionedpath" statustext="/ = everywhere"/> <textbox size="30" label="under directory" id="versionedpath" statustext="/ = everywhere"/>