This is a migrated thread and some comments may be shown as answers.

Icons problem

1 Answer 103 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mariyana
Top achievements
Rank 1
Mariyana asked on 21 Feb 2013, 09:00 AM
Hello,

 I'm trying to build small application with kendo mobile. I have list and want to put icon for every item but if this list is in template icons don't show

 <div data-role="view" data-title="" id="side-root">
   <ul data-role="listview" data-style="inset" data-source="splitViewCategories" data-template="categoriesTemplate">
   </ul>
 </div>
 <script id="categoriesTemplate" type="text/x-kendo-template">
   <a data-icon="about" href=">Category</a>
 </script>
If I use ready list like this

<ul data-role="listview" data-style="inset">
 <li data-icon="about"><a>about</a></li>
 <li data-icon="action"><a>action</a></li>
 <li data-icon="add"><a>add</a></li>                    
</ul>
I can see icons

Thanks,
Mariyana

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 22 Feb 2013, 04:34 PM
Hello Mariyana,

Thank you for getting in touch with us.
This is a bug in the current implementation which we will try to fix as soon as possible. As a temporary workaround I can suggest you to hard-code the spans with icon classes. As an example:
<script id="categoriesTemplate" type="text/x-kendo-template">
  <a><span class="km-icon km-about"></span>Category</a>
</script>

The span element should be nested inside the <a> tag and should have a classes .km-icon .km-<icon name>

As a small sign of our appreciation for the discovery I updated your Telerik points.

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Mariyana
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or