修改BUG:角色菜单授权页面checbox/radio控件下沉
This commit is contained in:
parent
2d2ba572eb
commit
3a177bbbde
|
@ -98,7 +98,7 @@
|
||||||
margin-top: 1px;
|
margin-top: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-body .checkbox {
|
.modal-body .checkbox, .modal-body .radio {
|
||||||
min-width: 190px;
|
min-width: 190px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -255,16 +255,16 @@ aside {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Modal Dialog Checkbox*/
|
/*Modal Dialog Checkbox*/
|
||||||
.modal-body .checkbox {
|
.modal-body .checkbox, .modal-dialog .radio {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-body .checkbox label {
|
.modal-body .checkbox label, .modal-body .radio label {
|
||||||
padding-left: 0;
|
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;
|
margin: 0 4px 0 0;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
@ -176,6 +176,8 @@
|
||||||
.dd3-content label span i {
|
.dd3-content label span i {
|
||||||
width: 22px;
|
width: 22px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dd3-content label input {
|
.dd3-content label input {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
var initNestMenu = function () {
|
var initNestMenu = function () {
|
||||||
$nestMenuInput = $nestMenu.find('div.dd3-content');
|
$nestMenuInput = $nestMenu.find('div.dd3-content');
|
||||||
$nestMenuInput.find('label:first').hide();
|
$nestMenuInput.children('.checkbox').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
var bsa = new BootstrapAdmin({
|
var bsa = new BootstrapAdmin({
|
||||||
|
|
|
@ -144,6 +144,6 @@
|
||||||
if (child.hasClass('dd-list')) {
|
if (child.hasClass('dd-list')) {
|
||||||
child.find(':checkbox').prop('checked', val);
|
child.find(':checkbox').prop('checked', val);
|
||||||
}
|
}
|
||||||
}).find('label:last').hide();
|
}).children('.radio').hide();
|
||||||
});
|
});
|
||||||
});
|
});
|
|
@ -3,10 +3,10 @@
|
||||||
var html = "";
|
var html = "";
|
||||||
$.each(menus, function (index, menu) {
|
$.each(menus, function (index, menu) {
|
||||||
if (menu.Menus.length == 0) {
|
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 {
|
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;
|
return html;
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
var cascadeSubMenu = function (menus) {
|
var cascadeSubMenu = function (menus) {
|
||||||
var html = ""
|
var html = ""
|
||||||
$.each(menus, function (index, menu) {
|
$.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;
|
return html;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue