固定按钮位置(提交/关闭)

This commit is contained in:
RuoYi
2018-10-03 21:44:14 +08:00
parent e68e13bc16
commit c85f36fa1f
28 changed files with 216 additions and 262 deletions

View File

@@ -48,12 +48,6 @@
<div id="menuTrees" class="ztree"></div>
</div>
</div>
<div class="form-group">
<div class="form-control-static col-sm-offset-9">
<button type="submit" class="btn btn-primary">提交</button>
<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
@@ -116,11 +110,14 @@
"roleKey": {
remote: "角色权限已经存在"
}
},
submitHandler:function(form){
add();
}
}
});
function submitHandler() {
if ($.validate.form("#form-role-add")) {
add();
}
}
function add() {
var roleName = $("input[name='roleName']").val();

View File

@@ -49,12 +49,6 @@
<div id="menuTrees" class="ztree"></div>
</div>
</div>
<div class="form-group">
<div class="form-control-static col-sm-offset-9">
<button type="submit" class="btn btn-primary">提交</button>
<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
@@ -123,10 +117,7 @@
"roleKey": {
remote: "角色权限已经存在"
}
},
submitHandler:function(form){
edit();
}
}
});
function edit() {
@@ -159,6 +150,12 @@
}
});
}
function submitHandler() {
if ($.validate.form("#form-role-edit")) {
edit();
}
}
</script>
</body>
</html>

View File

@@ -35,12 +35,6 @@
<div id="deptTrees" class="ztree"></div>
</div>
</div>
<div class="form-group">
<div class="form-control-static col-sm-offset-9">
<button type="submit" class="btn btn-primary">提交</button>
<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
@@ -59,11 +53,11 @@
$("#dataScope").change();
});
$("#form-role-edit").validate({
submitHandler:function(form){
edit();
}
});
function submitHandler() {
if ($.validate.form("#form-role-edit")) {
edit();
}
}
function edit() {
var roleId = $("input[name='roleId']").val();