重构代码:调整菜单页面弹窗UI摆放位置,数字化菜单路径长度

This commit is contained in:
Argo-Lenovo 2017-03-29 13:59:17 +08:00
parent d48e4f05c9
commit 2e5a18de25
3 changed files with 42 additions and 25 deletions

View File

@ -32,7 +32,7 @@
}
.form-group .form-control-url {
width: 85%;
width: 442px;
}
}
@ -67,6 +67,10 @@
.modal-dialog {
width: 900px;
}
.form-group .form-control-url {
width: 742px;
}
}
@media (min-height: 672px) {

View File

@ -132,7 +132,18 @@
});
// validate
$('#dataForm').autoValidate({
$('#dataForm').on('click', '[data-method]', function () {
var $this = $(this);
var $input = $this.parent().prev();
switch ($this.attr('data-method')) {
case 'clear':
$input.val("");
break;
case 'sel':
$input.select();
break;
}
}).autoValidate({
name: {
required: true,
maxlength: 50
@ -202,10 +213,6 @@
$dialogNew.show();
});
$('#btnClearIcon, #btnMenuClearParent').on('click', function () {
$(this).parent().prev().val("");
});
$btnSubmitMenu.on('click', function () {
var type = $(this).data('type');
switch (type) {

View File

@ -14,14 +14,14 @@
@section query {
<form class="form-inline" role="form">
<div class="row">
<div class="form-group col-sm-6 col-md-3">
<label class="control-label" for="txt_parent_menus_name">父级菜单</label>
<input type="text" class="form-control" id="txt_parent_menus_name" />
</div>
<div class="form-group col-sm-6 col-md-3">
<label class="control-label" for="txt_menus_name">菜单名称</label>
<input type="text" class="form-control" id="txt_menus_name" />
</div>
<div class="form-group col-sm-6 col-md-3">
<label class="control-label" for="txt_parent_menus_name">父级菜单</label>
<input type="text" class="form-control" id="txt_parent_menus_name" />
</div>
<div class="form-group col-sm-6 col-md-2">
<label class="control-label" for="sel_menus_category">菜单类别</label>
<div class="dropdown lgbDropdown">
@ -78,41 +78,47 @@
<div class="modal-body">
<form class="form-inline" id="dataForm" name="dataForm" role="form">
<div class="row">
<div class="form-group col-sm-6">
<input type="text" class="form-control hidden" id="menuID" name="menuID" />
<label class="control-label" for="name">菜单名称</label>
<div class="input-group">
<input type="text" class="form-control" id="name" name="name" placeholder="不可为空" maxlength="50" />
<span class="input-group-btn">
<button data-method="clear" class="btn btn-default" type="button"><i class="fa fa-remove"></i></button>
<button data-method="sel" class="btn btn-default" type="button"><i class="fa fa-edit"></i>全选</button>
</span>
</div>
</div>
<div class="form-group col-sm-6">
<input type="text" class="form-control hidden" id="parentId" name="parentId" />
<label class="control-label" for="parentName">父级菜单</label>
<div class="input-group">
<input type="text" class="form-control" readonly id="parentName" name="parentName" placeholder="请选择...(可为空)" maxlength="50" />
<span class="input-group-btn">
<button id="btnMenuClearParent" class="btn btn-default" type="button"><i class="fa fa-remove"></i></button>
<button data-method="clear" class="btn btn-default" type="button"><i class="fa fa-remove"></i></button>
<button id="btnMenuParent" class="btn btn-default" type="button"><i class="fa fa-hand-o-up"></i>选择</button>
</span>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label" for="icon">菜单图标</label>
<div class="input-group">
<input type="text" class="form-control" readonly id="icon" name="icon" placeholder="请选择...(可为空)" maxlength="50" />
<span class="input-group-btn">
<button id="btnClearIcon" class="btn btn-default" type="button"><i class="fa fa-remove"></i></button>
<button id="btnIcon" class="btn btn-default" type="button"><i class="fa fa-dashboard"></i>选择</button>
</span>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label" for="order">菜单序号</label>
<div class="input-group">
<input type="text" class="form-control" id="order" name="order" data-default-val="10" placeholder="默认为10" maxlength="8" />
<span class="input-group-btn">
<button id="btnClearIcon" class="btn btn-default" type="button"><i class="fa fa-remove"></i></button>
<button data-method="clear" class="btn btn-default" type="button"><i class="fa fa-remove"></i></button>
<button id="btnMenuOrder" class="btn btn-default" type="button"><i class="fa fa-list-ol"></i>调整</button>
</span>
</div>
</div>
<div class="form-group col-sm-6">
<input type="text" class="form-control hidden" id="menuID" name="menuID" />
<label class="control-label" for="name">菜单名称</label>
<input type="text" class="form-control" id="name" name="name" placeholder="不可为空" maxlength="50" />
<label class="control-label" for="icon">菜单图标</label>
<div class="input-group">
<input type="text" class="form-control" readonly id="icon" name="icon" placeholder="请选择...(可为空)" maxlength="50" />
<span class="input-group-btn">
<button data-method="clear" class="btn btn-default" type="button"><i class="fa fa-remove"></i></button>
<button id="btnIcon" class="btn btn-default" type="button"><i class="fa fa-dashboard"></i>选择</button>
</span>
</div>
</div>
<div class="form-group col-xs-12">
<label class="control-label" for="url">路径</label>