From cb63269598ca009d5939aeb92f4dc02dfd838bf4 Mon Sep 17 00:00:00 2001 From: ralf Date: Tue, 9 Aug 2022 16:54:21 +0200 Subject: [PATCH] style former buttons without background-image, which are now just an et2-image with a more fitting height preprocessor rewriting them adds class imageButton giving the image a height of 20px, like the image in buttons has --- api/etemplate.php | 1 + api/templates/default/etemplate2.css | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/api/etemplate.php b/api/etemplate.php index eb4f794819..8301dc0fe3 100644 --- a/api/etemplate.php +++ b/api/etemplate.php @@ -318,6 +318,7 @@ function send_template() { $tag = 'et2-image'; $attrs['src'] = $attrs['image']; + $attrs['class'] = (!empty($attrs['class']) ? $attrs['class'].' ':'').'imageButton'; unset($attrs['image']); // Was expected to submit. Images don't have noValidation, so add directly if (!array_key_exists('onclick', $attrs) && empty($attrs['noSubmit'])) diff --git a/api/templates/default/etemplate2.css b/api/templates/default/etemplate2.css index d1af126998..e5d9826459 100644 --- a/api/templates/default/etemplate2.css +++ b/api/templates/default/etemplate2.css @@ -358,6 +358,13 @@ a.et2_url.url { margin-left: 0px; } +/** + * Former button without background_image -->