MetaModels / core

MetaModels Core Module
GNU Lesser General Public License v3.0
96 stars 42 forks source link

Additional CSS/JS for Render Setting is not included when there are no items #1421

Closed cliffparnitzky closed 3 years ago

cliffparnitzky commented 4 years ago

Checklist before I submit this issue report

I confirm that:

My environment is:

(Please fill in the actual values from your environment - check Contao Manager or use composer show)

Key Value Comments
PHP version: 7.3.21
Contao version: 4.4.51
MetaModels version: 2.1.9
Installed MetaModels packages: - variouse attributes
DCG version: 2.1.7

Issue description

Additional CSS/JS for Render Settings is not included in the backend when there are no items (empty list).

Steps to reproduce

  1. Define some CSS for the backend list (e.g. to define the width of the filter selects)
  2. Set the CSS file in the render setting
  3. Open the list and use the search with a value that delivers no results

Describe the behaviour of the application

The additional defined CSS/JS for Render Setting is not included in the backend when there are no items (empty list).

Describe the expected behaviour of the application

The additional defined CSS/JS for Render Setting should also be included in the backend when there are no items (empty list).

Screenshots

At least 30 items ... the CSS for the filter is inclued

s1

No items ... no CSS

s2

zonky2 commented 4 years ago

thx

zonky2 commented 3 years ago

The CSS and Javascript is only for the items and not for the "environment". This is called in Item.php at parseValue. For the BE please use the conventional way...

https://de.contaowiki.org/Stylesheet_f%C3%BCr_Backend-Theme_erg%C3%A4nzen

cliffparnitzky commented 3 years ago

Yeah, you're right ... "i saw the wood not bevore the trees" ... That is the easiest solution. And if i have both, styling the items and the list view parts, I can put them into the same CSS file.

In my opinion, we have to describe this in the manual. This should be enough.

zonky2 commented 3 years ago

In my opinion, we have to describe this in the manual.

manual it´s OpenSource ;-)

zonky2 commented 3 years ago

done https://metamodels.readthedocs.io/de/latest/manual/component/rendersettings.html#optionen