修改BUG:菜单管理页面调整弹窗使用系统modal

This commit is contained in:
Argo-Lenovo 2017-05-16 18:31:02 +08:00
parent 26c50c2b7d
commit ead505cb29
6 changed files with 26 additions and 35 deletions

View File

@ -313,7 +313,6 @@
<Content Include="Views\Admin\Logs.cshtml" />
<Content Include="Views\Admin\Settings.cshtml" />
<Content Include="Views\Shared\Footer.cshtml" />
<Content Include="Views\Shared\MenuTree.cshtml" />
<Content Include="Views\Shared\NavigatorConfig.cshtml" />
<Content Include="Views\Shared\SubNavigation.cshtml" />
<Content Include="Views\Home\Lock.cshtml" />

View File

@ -7,7 +7,6 @@
display: block;
margin: 0;
padding: 0;
max-width: 600px;
list-style: none;
font-size: 13px;
line-height: 20px;

View File

@ -1,9 +1,9 @@
$(function () {
var $dialog = $('#dialogNew');
var $pickIcon = $('#pickIcon');
var $dialogNew = $dialog.find('div.modal-dialog');
var $dialogNew = $dialog;
var $dialogIcon = $('#dialogIcon');
var $dialogMenu = $('#dialogSubMenu').find('.modal-content');
var $dialogMenu = $('#dialogMenu');
var $dialogRole = $('#dialogRole');
var $dialogRoleHeader = $('#myRoleModalLabel');
var $dialogRoleForm = $('#roleForm');
@ -178,7 +178,6 @@
// 排序按钮
$('#btnMenuOrder').on('click', function () {
$dialogNew.hide();
$btnSubmitMenu.data('type', 'order');
$nestMenuInput.find('label:last').find('input').hide();
$nestMenu.find('li.dd-item').hide().remove('[data-id="0"]');
@ -193,29 +192,24 @@
$nestMenu.find('ol.dd-list:first').append($.format('<li class="dd-item dd3-item" data-id="0" data-order="10" data-category="{1}"><div class="dd-handle dd3-handle"></div><div class="dd3-content"><label><span>{0}</span></label></div></li>', menuName, menuCate));
}
$nestMenu.find('li[data-id="' + did + '"] > div.dd3-content span').addClass('active');
$dialogMenu.show();
if ($(window).width() >= 768 || $(window).height() >= 672) $dialogMenu.adjustDialog();
$dialogNew.hide();
$dialogMenu.modal('show');
});
// 选择父节点按钮
$('#btnMenuParent').on('click', function () {
$dialogNew.hide();
$btnSubmitMenu.data('type', 'parent');
$nestMenuInput.find('label:last').find('input').show();
$nestMenu.find('li.dd-item').hide().remove('[data-id="0"]');
$nestMenu.find('li[data-category="' + $category.val() + '"]').show();
$dialogMenu.show();
if ($(window).width() >= 768 || $(window).height() >= 672) $dialogMenu.adjustDialog();
$dialogNew.hide();
$dialogMenu.modal('show');
});
$dialogMenu.find('div.modal-header, div.modal-footer').on('click', 'button', function () {
// remove active css
$nestMenu.find('li span').removeClass('active');
$dialogMenu.hide();
$dialogNew.show();
});
$dialogMenu.on('hidden.bs.modal', function () { $dialogNew.show().find('.modal-dialog').adjustDialog(); });
$btnSubmitMenu.on('click', function () {
$nestMenu.find('li span').removeClass('active');
var type = $(this).data('type');
switch (type) {
case "parent":

View File

@ -200,5 +200,5 @@
<button type="button" class="btn btn-primary" id="btnSubmitIcon">保存</button>
</div>
</div>
@Html.Partial("MenuTree")
@Html.Partial("NavigatorConfig")
}

View File

@ -1,17 +0,0 @@
<div id="dialogSubMenu" class="modal-dialog">
<div class="modal-content icon-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myMenuModalLabel">请选择菜单</h4>
</div>
<div class="modal-body">
<div class="dd" id="nestable_menu">
<ol class="dd-list"></ol>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="btnSubmitMenu">保存</button>
</div>
</div>
</div>

View File

@ -1,3 +1,19 @@
<div class="modal fade" id="dialogMenu" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myMenuModalLabel" aria-hidden="true">
@Html.Partial("MenuTree")
<div id="dialogSubMenu" class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myMenuModalLabel">请选择菜单</h4>
</div>
<div class="modal-body">
<div class="dd" id="nestable_menu">
<ol class="dd-list"></ol>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" id="btnSubmitMenu">保存</button>
</div>
</div>
</div>
</div>