Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CListView - allow customising empty text container #3222

Closed
gstaruk opened this issue Feb 10, 2014 · 4 comments
Closed

CListView - allow customising empty text container #3222

gstaruk opened this issue Feb 10, 2014 · 4 comments

Comments

@gstaruk
Copy link

gstaruk commented Feb 10, 2014

Currently if one wishes to customize the empty text container, the only option available is emptyTagName.

Sometimes we may need further customisation. For example in one of my projects I am using a custom font - Open Sans. I have a CSS class called font-open-sans which I apply to all elements that need this font. So currently I am unable to apply this class to the empty text container.

Incidentally, the summary text container does have an option called summaryCssClass (but strangely enough doesn't have a summaryTagName option).

So I think we need a new option called emptyCssClass, or maybe even a htmlOptions type option so that we can specify more attributes, such as id or data- attributes. What are your views on this?

@klimov-paul
Copy link
Member

CListView applies class "empty" for the empty text container. Is it not enough to apply a font for it via CSS?
Also you may change `emptyText`` field and place whatever HTML you want there:

$this->widget('CListView', array(
    'emptyText' => '<div class="font-open-sans">No results</div>'
));

@gstaruk
Copy link
Author

gstaruk commented Feb 11, 2014

That's fine. I only suggest this as often I find things are a bit inconsistent.

For example what you mentioned above, I can also do that with summaryText - however summary has a summaryCssClass option available. So that makes it easier for me to achieve the desired output.

@klimov-paul
Copy link
Member

OK, I see your point.

@klimov-paul klimov-paul reopened this Feb 12, 2014
@klimov-paul klimov-paul added this to the 1.1.15 milestone Apr 17, 2014
@klimov-paul
Copy link
Member

Issue resolved by commit 9e68cc0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants