修改BUG:角色菜单授权页面checbox/radio控件下沉

This commit is contained in:
Argo-Lenovo 2017-04-29 16:21:21 +08:00
parent 2d2ba572eb
commit 3a177bbbde
5 changed files with 11 additions and 9 deletions

View File

@ -98,7 +98,7 @@
margin-top: 1px;
}
.modal-body .checkbox {
.modal-body .checkbox, .modal-body .radio {
min-width: 190px;
overflow: hidden;
white-space: nowrap;
@ -255,16 +255,16 @@ aside {
}
/*Modal Dialog Checkbox*/
.modal-body .checkbox {
.modal-body .checkbox, .modal-dialog .radio {
padding: 0;
margin-top: 0;
}
.modal-body .checkbox label {
.modal-body .checkbox label, .modal-body .radio label {
padding-left: 0;
}
.modal-body .checkbox label input[type='checkbox'] {
.modal-body .checkbox label input[type='checkbox'], .modal-body .radio label input[type='radio'] {
margin: 0 4px 0 0;
vertical-align: middle;
position: relative;

View File

@ -176,6 +176,8 @@
.dd3-content label span i {
width: 22px;
display: inline-block;
text-align: center;
margin-right: 4px;
}
.dd3-content label input {

View File

@ -18,7 +18,7 @@
var initNestMenu = function () {
$nestMenuInput = $nestMenu.find('div.dd3-content');
$nestMenuInput.find('label:first').hide();
$nestMenuInput.children('.checkbox').hide();
}
var bsa = new BootstrapAdmin({

View File

@ -144,6 +144,6 @@
if (child.hasClass('dd-list')) {
child.find(':checkbox').prop('checked', val);
}
}).find('label:last').hide();
}).children('.radio').hide();
});
});

View File

@ -3,10 +3,10 @@
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}"><div class="dd-handle dd3-handle"></div><div class="dd3-content"><label><input type="checkbox" value="{0}"><span><i class="{1}"></i>{2}</span></label><label><input type="radio" name="menu" value="{0}"><span><i class="{1}"></i>{2}</span></label><span class="menuType">{5}</span><span class="menuOrder">{4}</span></div></li>', menu.Id, menu.Icon, menu.Name, menu.Category, menu.Order, menu.CategoryName);
html += $.format('<li class="dd-item dd3-item" data-id="{0}" data-order="{4}" data-category="{3}"><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, menu.CategoryName);
}
else {
html += $.format('<li class="dd-item dd3-item" data-id="{0}" data-order="{5}" data-category="{3}"><div class="dd-handle dd3-handle"></div><div class="dd3-content"><label><input type="checkbox" value="{0}"><span><i class="{1}"></i>{2}</span></label><label><input type="radio" name="menu" value="{0}"><span><i class="{1}"></i>{2}</span></label><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, cascadeSubMenu(menu.Menus), menu.Order, menu.CategoryName);
html += $.format('<li class="dd-item dd3-item" data-id="{0}" data-order="{5}" data-category="{3}"><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, cascadeSubMenu(menu.Menus), menu.Order, menu.CategoryName);
}
});
return html;
@ -15,7 +15,7 @@
var cascadeSubMenu = function (menus) {
var html = ""
$.each(menus, function (index, menu) {
html += $.format('<li class="dd-item dd3-item" data-id="{0}" data-order="{4}" data-category="{3}"><div class="dd-handle dd3-handle"></div><div class="dd3-content"><label><input type="checkbox" value="{0}"><span><i class="{1}"></i>{2}</span></label><label><input type="radio" name="menu" value="{0}"><span><i class="{1}"></i>{2}</span></label><span class="menuType">{5}</span><span class="menuOrder">{4}</span></div></li>', menu.Id, menu.Icon, menu.Name, menu.Category, menu.Order, menu.CategoryName);
html += $.format('<li class="dd-item dd3-item" data-id="{0}" data-order="{4}" data-category="{3}"><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, menu.CategoryName);
});
return html;
};