I originally had a listview with a hard coded list and the layout was fine. I changed it to use a datasource and template instead and now gaps appear between the list items. Can anyone suggest why this is and how to remove these?
original code which displays no gaps:
amended code which displays gaps:
If I change the li's to divs this works layout wise but then the links within the divs will not work as remote view navigation. Please advise..
original code which displays no gaps:
<div data-role="view" data-title=" Control Panel - Mobile" id="listmessages" data-init="listMessagesInit"> <h2>Customer Messages</h2> <p><?php echo $unread_messages . ' - unread messages'; ?></p> <a data-align="right" data-role="button" id="markasread">Mark as read</a><a data-align="right" data-role="button" id="delete">Delete</a> <ul id="message_list"> <li class="isnew_1" id="890"><a href="/messages/view/890"> <div style="float:left; width:150px; height: 50px">customer name<br />date</div> <div style="height: 50px"id="message_#= id #">customer name</div> </a></li><li class="isnew_0" id="234"><a href="/messages/view/#= id #"> <div style="float:left; width:150px; height: 50px">customer name<br />date</div> <div style="height: 50px"id="message_#= id #">customer name</div> </a></li><li class="isnew_0" id="456"><a href="/messages/view/#= id #"> <div style="float:left; width:150px; height: 50px">customer name<br />date</div> <div style="height: 50px"id="message_234">customer name</div> </a></li> </ul> </div><script> function listMessagesInit(){ $("#message_list").kendoMobileListView({ style: "inset", }); } </script>amended code which displays gaps:
<div data-role="view" data-title="Control Panel - Mobile" id="listmessages" data-init="listMessagesInit"> <h2>Customer Messages</h2> <p><?php echo $unread_messages . ' - unread messages'; ?></p> <a data-align="right" data-role="button" id="markasread">Mark as read</a><a data-align="right" data-role="button" id="delete">Delete</a> <ul id="message_list"></ul> </div> <script id="message_list_template" type="text/x-kendo-template"><li class="isnew_#= isnew #" id="#= id #"><a href="/messages/view/#= id #"> <div style="float:left; width:150px; height: 50px">#= customer_name #<br />#= created #</div> <div style="height: 50px"id="message_#= id #">#= message #</div> </a></li></script> function listMessagesInit(){ var messageDataSource = new kendo.data.DataSource({ transport: { read: "/messages/data", dataType: "json", schema: { model: { id: "id", fields: { created: { type: "string" }, message: { type: "string" }, customer_name: { type: "string" }, isnew: { type: "string" } } } }, }); $("#message_list").kendoMobileListView({ dataSource: messageDataSource, //pullToRefresh: true, //appendOnRefresh: true, style: "inset", template: $("#message_list_template").text() }); }If I change the li's to divs this works layout wise but then the links within the divs will not work as remote view navigation. Please advise..
