菜单父节点选择弹框内增加子菜单支持

This commit is contained in:
Argo-Lenovo 2016-11-06 00:23:16 +08:00
parent 33d65cd0b0
commit ce142d0adb
4 changed files with 22 additions and 12 deletions

View File

@ -249,6 +249,7 @@
<Content Include="Views\Shared\MenuTree.cshtml" />
<Content Include="Views\Shared\SubNavigation.cshtml" />
<Content Include="Views\Shared\SubMenu.cshtml" />
<Content Include="Views\Shared\SubMenuTree.cshtml" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>

View File

@ -14,7 +14,7 @@
<li>
<div class="menu-submenu">
@foreach (var menu in Model.Menus)
{
{
@Html.Partial("SubMenu", menu)
}
</div>

View File

@ -5,17 +5,12 @@
<h4 class="modal-title" id="myMenuModalLabel">请选择菜单</h4>
</div>
<div class="modal-body">
<div class="dd" id="nestable_menu">
<ol class="dd-list">
@foreach (var menu in Model)
{
<li class="dd-item dd3-item" data-id="@menu.ID">
<div class="dd-handle dd3-handle"></div>
<div class="dd3-content"><label><input name="menuParent" type="checkbox" value="@menu.ID" /><input type="radio" name="menu" value="@menu.ID" /><span>@menu.Name</span></label></div>
</li>
}
</ol>
</div>
@if (Model.Count() > 0)
{
<div class="dd" id="nestable_menu">
@Html.Partial("SubMenuTree", @Model)
</div>
}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>

View File

@ -0,0 +1,14 @@
@model IEnumerable<Menu>
<ol class="dd-list">
@foreach (var menu in Model)
{
<li class="dd-item dd3-item" data-id="@menu.ID">
<div class="dd-handle dd3-handle"></div>
<div class="dd3-content"><label><input name="menuParent" type="checkbox" value="@menu.ID" /><input type="radio" name="menu" value="@menu.ID" /><span>@menu.Name</span></label></div>
@if (menu.Menus.Count() > 0)
{
@Html.Partial("SubMenuTree", menu.Menus)
}
</li>
}
</ol>