我在局部视图中定义了一个剑道调度程序。此部分视图在 kendo 移动标签条中呈现。
问题是调度程序似乎显示在某个空容器后面。当我在手机(iPhone 5)上尝试时,我只看到调度程序标题的一小部分。
当我在javascript中挂钩Databound事件并设置“调试器”断点时,我可以看到“移动”版本被渲染(我使用谷歌浏览器开发人员工具模拟手机上的显示),但在之后事件的执行,一些 div 或其他容器部分覆盖了我的调度程序。
如果我没有在调度程序的定义中指定“.Mobile()”属性,它会相应地显示在我的手机上。但它不是渲染的移动版本,我希望它是移动版本。
我试图显示一个空的调度程序,但它也不起作用。
关于我做错了什么的任何想法?
如果有任何遗漏的信息可以帮助您,请随时索取。
谢谢你。
部分观点:
@model List<ISchedulerEvent>
@using System.Web.UI.WebControls
@using System.Linq;
@using Kendo.Mvc.UI
<section>
<br class="clear"/>
@(Html.Kendo().Scheduler<ISchedulerEvent>()
.Name("scheduler")
.WorkDayStart(8,0,0)
.WorkDayEnd(18,0,0)
.AllDaySlot(false)
.ShowWorkHours(true)
.Editable(false)
.Mobile()
.Views(v =>
{
v.DayView();
v.WeekView();
v.MonthView(monthView => monthView.Selected(true));
v.AgendaView();
})
.DataSource(source => source
.Read("GetEntries", "Calendar")))
</section>
标签条定义:
@using Kendo.Mvc.UI
@using T3.Web.Application.Infrastructure.Helpers
<style>
.km-entry:after,
.km-entry:before
{
content: "\e08d";
}
.km-summary:after,
.km-summary:before
{
content: "\e04b";
}
.km-calendar:after,
.km-calendar:before
{
content: "\e089";
}
</style>
<div data-role="view" id="entry" data-title="Entrée de temps" data-layout="mobile-tabstrip"></div>
<div data-role="view" id="calendar" data-title="Calendrier" data-layout="mobile-tabstrip">@Html.Action("Index", "Calendar")</div>
<div data-role="view" id="summary" data-title="Sommaire" data-layout="mobile-tabstrip"></div>
<div data-role="view" id="profile" data-title="Profil utilisateur" data-layout="mobile-tabstrip" ></div>
<div id="maintabstrip" data-role="layout" data-id="mobile-tabstrip">
<p>TabStrip</p>
<div data-role="footer">
<div id="tabstrip" data-role="tabstrip">
<a href="#entry" data-icon="entry">Entrée de temps</a>
<a href="#calendar" data-icon="calendar">Calendrier</a>
<a href="#summary" data-icon="summary">Sommaire</a>
<a href="#profile" data-icon="contacts">Utilisateur</a>
</div>
</div>
</div>
<script>
var app = new kendo.mobile.Application($(document.body), { skin: "flat", useNativeScrolling: true });
</script>
局部视图的控制器
[HttpGet]
public ActionResult Index()
{
return this.PartialView("_Calendar");
}
为调度程序返回数据的控制器
public ActionResult GetEntries([DataSourceRequest]DataSourceRequest request)
{
var entries = _presenter.GetEntries(base.GetUserAccount().Id);
return Json(entries.ToDataSourceResult(request));
}