fix(#I17P4U): 角色对菜单授权界面增加所属应用

#Issue
close https://gitee.com/LongbowEnterprise/BootstrapAdmin/issues/I17P4U?from=project-issue
This commit is contained in:
Argo-2016 2020-01-02 17:17:46 +08:00
parent 5855df9240
commit d754d42b9d
4 changed files with 14 additions and 5 deletions

View File

@ -350,6 +350,10 @@ body.trans-mute * {
}
.dd3-content .menuType {
right: 100px;
}
.dd3-content .menuApp {
right: 45px;
}

View File

@ -1,4 +1,4 @@
(function ($) {
(function ($) {
$.fn.extend({
autoScrollSidebar: function (options) {
var option = $.extend({ target: null, offsetTop: 0 }, options);
@ -127,14 +127,18 @@
return ret;
};
var formatApplicationName = function (app) {
return app;
}
var cascadeMenu = function (menus) {
var html = "";
$.each(menus, function (index, menu) {
if (menu.Menus.length === 0) {
html += $.format('<li class="dd-item dd3-item" data-id="{0}" data-order="{4}" data-category="{3}" data-resource="{6}"><div class="dd-handle dd3-handle"></div><div class="dd3-content"><div class="checkbox"><label><input type="checkbox" value="{0}"><span><i class="{1}"></i>{2}</span></label></div><div class="radio"><label><input type="radio" name="menu" value="{0}"><span><i class="{1}"></i>{2}</span></label></div><span class="menuType">{5}</span><span class="menuOrder">{4}</span></div></li>', menu.Id, menu.Icon, menu.Name, menu.Category, menu.Order, formatCategoryName(menu), menu.IsResource);
html += $.format('<li class="dd-item dd3-item" data-id="{0}" data-order="{4}" data-category="{3}" data-resource="{6}"><div class="dd-handle dd3-handle"></div><div class="dd3-content"><div class="checkbox"><label><input type="checkbox" value="{0}"><span><i class="{1}"></i>{2}</span></label></div><div class="radio"><label><input type="radio" name="menu" value="{0}"><span><i class="{1}"></i>{2}</span></label></div><span class="menuType">{5}</span><span class="menuApp">{7}</span><span class="menuOrder">{4}</span></div></li>', menu.Id, menu.Icon, menu.Name, menu.Category, menu.Order, formatCategoryName(menu), menu.IsResource, formatApplicationName(menu.Application));
}
else {
html += $.format('<li class="dd-item dd3-item" data-id="{0}" data-order="{5}" data-category="{3}" data-resource="{7}"><div class="dd-handle dd3-handle"></div><div class="dd3-content"><div class="checkbox"><label><input type="checkbox" value="{0}"><span><i class="{1}"></i>{2}</span></label></div><div class="radio"><label><input type="radio" name="menu" value="{0}"><span><i class="{1}"></i>{2}</span></label></div><span class="menuType">{6}</span><span class="menuOrder">{5}</span></div><ol class="dd-list">{4}</ol></li>', menu.Id, menu.Icon, menu.Name, menu.Category, cascadeMenu(menu.Menus), menu.Order, formatCategoryName(menu), menu.IsResource);
html += $.format('<li class="dd-item dd3-item" data-id="{0}" data-order="{5}" data-category="{3}" data-resource="{7}"><div class="dd-handle dd3-handle"></div><div class="dd3-content"><div class="checkbox"><label><input type="checkbox" value="{0}"><span><i class="{1}"></i>{2}</span></label></div><div class="radio"><label><input type="radio" name="menu" value="{0}"><span><i class="{1}"></i>{2}</span></label></div><span class="menuType">{6}</span><span class="menuApp">{8}</span><span class="menuOrder">{5}</span></div><ol class="dd-list">{4}</ol></li>', menu.Id, menu.Icon, menu.Name, menu.Category, cascadeMenu(menu.Menus), menu.Order, formatCategoryName(menu), menu.IsResource, formatApplicationName(menu.Application));
}
});
return html;

View File

@ -5,8 +5,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Bootstrap.Security.DataAccess" Version="3.1.0" />
<PackageReference Include="Bootstrap.Security.DataAccess" Version="3.1.1-beta-01" />
<PackageReference Include="Bootstrap.Security.Mvc" Version="3.1.1-beta-01" />
<PackageReference Include="Bootstrap.Security.DataAccess" Version="3.1.1-beta-01" />
<PackageReference Include="Longbow" Version="3.1.0" />
<PackageReference Include="Longbow.Cache" Version="3.1.1-beta-02" />
<PackageReference Include="Longbow.Data" Version="3.1.0" />

View File

@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Bootstrap.Security.DataAccess" Version="3.1.0" />
<PackageReference Include="Bootstrap.Security.DataAccess" Version="3.1.1-beta-01" />
<PackageReference Include="Bootstrap.Security.Mvc" Version="3.1.1-beta-01" />
<PackageReference Include="Longbow" Version="3.1.0" />
<PackageReference Include="Longbow.Cache" Version="3.1.1-beta-02" />