primefaces / primeui

Rich set of javascript-css only widgets
http://www.primefaces.org/primeui
278 stars 125 forks source link

Panel - allow custom content in header and footer #227

Closed djmj closed 8 years ago

djmj commented 8 years ago

We are missing functionality to define custom content in header. Footer is not existent.

Maybe allow optional to include header and footer as childs something like this:

<div id="panel">
    <!-- header -->
    <div class="GreenBack"><i class="fa fa-user"/> User</div>
    <div>content</div>
    <div>footer</div>
</div>

Example:

In our adamantium page we often need to recreate DOM panels since we need custom footer, header with icon and different background color. On our main page we have 5 panels with different header background colors and footers: http://www.deloma.de/Agentur

Mrtcndkn commented 8 years ago

It is in progress both footer header and custom content for them will be available soon.

djmj commented 8 years ago

Thank you :) PrimeUI Rocks!, especially in combination with PrimeFaces and CMS.

Mrtcndkn commented 8 years ago

Thanks for your thoughts :)

djmj commented 7 years ago

I am not really a fan of putting html into javascript variables just for simple styling. It is much harder to maintain. If html gets complex it will get a mess to put it into a variable.

Declarative approach using data attribute is much cleaner:

<div id="panel">
    <!-- header -->
    <div class="GreenBack" data-facet="header"><i class="fa fa-user"/>User</div>
    <div data-facet="content">content</div>
    <div data-facet="footer">footer</div>
</div>

You should reconsider this approach. Just retrieve the element with facet "header".

I also don't use PrimeUI datatable since its a mess to use with javascript (#243).