Commit c85f36fa by RuoYi

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

parent e68e13bc
...@@ -335,8 +335,13 @@ label { ...@@ -335,8 +335,13 @@ label {
} }
} }
@media ( min-width : 768px) {
.select-list li {
float: left;
}
}
.select-list li { .select-list li {
float: left;
color: #333; color: #333;
margin: 5px 15px 5px 0px; margin: 5px 15px 5px 0px;
} }
......
...@@ -304,8 +304,16 @@ ...@@ -304,8 +304,16 @@
shade: 0.3, shade: 0.3,
title: title, title: title,
content: url, content: url,
btn: ['确定', '关闭'],
// 弹层外区域关闭 // 弹层外区域关闭
shadeClose: true shadeClose: true,
yes: function(index, layero) {
var iframeWin = layero.find('iframe')[0];
iframeWin.contentWindow.submitHandler();
},
cancel: function(index) {
return true;
}
}); });
}, },
// 弹出层指定参数选项 // 弹出层指定参数选项
...@@ -401,8 +409,23 @@ ...@@ -401,8 +409,23 @@
}, },
// 详细信息 // 详细信息
detail: function(id) { detail: function(id) {
var url = $.common.isEmpty(id) ? $.table._option.detailUrl : $.table._option.detailUrl.replace("{id}", id); var _url = $.common.isEmpty(id) ? $.table._option.detailUrl : $.table._option.detailUrl.replace("{id}", id);
$.modal.open($.table._option.modalName + "详细", url); layer.open({
type: 2,
area: ['800px', ($(window).height() - 50) + 'px'],
fix: false,
//不固定
maxmin: true,
shade: 0.3,
title: $.table._option.modalName + "详细",
content: _url,
btn: ['<i class="fa fa-close"></i> 关闭'],
// 弹层外区域关闭
shadeClose: true,
cancel: function(index) {
return true;
}
});
}, },
// 删除信息 // 删除信息
remove: function(id) { remove: function(id) {
...@@ -494,6 +517,13 @@ ...@@ -494,6 +517,13 @@
return true; return true;
} }
return false; return false;
},
// 表单验证
form: function (id) {
if ($.common.isEmpty(id)) {
return false;
}
return $(id).validate().form();
} }
}, },
// 树插件封装处理 // 树插件封装处理
......
...@@ -58,12 +58,6 @@ ...@@ -58,12 +58,6 @@
<textarea id="remark" name="remark" class="form-control"></textarea> <textarea id="remark" name="remark" class="form-control"></textarea>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
...@@ -86,6 +80,12 @@ ...@@ -86,6 +80,12 @@
$.operate.save(prefix + "/add", $('#form-job-add').serialize()); $.operate.save(prefix + "/add", $('#form-job-add').serialize());
} }
}); });
function submitHandler() {
if ($.validate.form("#form-job-add")) {
$.operate.save(prefix + "/add", $('#form-job-add').serialize());
}
}
</script> </script>
</body> </body>
</html> </html>
...@@ -59,12 +59,6 @@ ...@@ -59,12 +59,6 @@
<textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea> <textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
...@@ -82,11 +76,14 @@ ...@@ -82,11 +76,14 @@
cronExpression:{ cronExpression:{
required:true, required:true,
}, },
},
submitHandler:function(form){
$.operate.save(prefix + "/edit", $('#form-job-edit').serialize());
} }
}); });
function submitHandler() {
if ($.validate.form("#form-job-edit")) {
$.operate.save(prefix + "/edit", $('#form-job-edit').serialize());
}
}
</script> </script>
</body> </body>
</html> </html>
...@@ -41,11 +41,6 @@ ...@@ -41,11 +41,6 @@
<div class="form-control-static" th:text="${operLog.errorMsg}"> <div class="form-control-static" th:text="${operLog.errorMsg}">
</div> </div>
</div> </div>
<div class="form-group">
<div class="form-control-static col-sm-offset-9">
<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
</div>
</div>
</form> </form>
</div> </div>
<div th:include="include :: footer"></div> <div th:include="include :: footer"></div>
......
...@@ -38,17 +38,11 @@ ...@@ -38,17 +38,11 @@
<textarea id="remark" name="remark" class="form-control"></textarea> <textarea id="remark" name="remark" class="form-control"></textarea>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
<script type="text/javascript"> <script type="text/javascript">
var prefix = ctx + "system/config" var prefix = ctx + "system/config";
$("#form-config-add").validate({ $("#form-config-add").validate({
rules: { rules: {
...@@ -79,11 +73,14 @@ ...@@ -79,11 +73,14 @@
"configKey": { "configKey": {
remote: "参数键名已经存在" remote: "参数键名已经存在"
} }
},
submitHandler: function(form) {
$.operate.save(prefix + "/add", $('#form-config-add').serialize());
} }
}); });
function submitHandler() {
if ($.validate.form("#form-config-add")) {
$.operate.save(prefix + "/add", $('#form-config-add').serialize());
}
}
</script> </script>
</body> </body>
</html> </html>
...@@ -39,18 +39,12 @@ ...@@ -39,18 +39,12 @@
<textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea> <textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
<script type="text/javascript"> <script type="text/javascript">
var prefix = ctx + "system/config" var prefix = ctx + "system/config";
$("#form-config-edit").validate({ $("#form-config-edit").validate({
rules: { rules: {
configKey: { configKey: {
...@@ -83,11 +77,14 @@ ...@@ -83,11 +77,14 @@
"configKey": { "configKey": {
remote: "参数键名已经存在" remote: "参数键名已经存在"
} }
},
submitHandler: function(form) {
$.operate.save(prefix + "/edit", $('#form-config-edit').serialize());
} }
}); });
function submitHandler() {
if ($.validate.form("#form-config-edit")) {
$.operate.save(prefix + "/edit", $('#form-config-edit').serialize());
}
}
</script> </script>
</body> </body>
</html> </html>
...@@ -51,19 +51,12 @@ ...@@ -51,19 +51,12 @@
</div> </div>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
<script type="text/javascript"> <script type="text/javascript">
var prefix = ctx + "system/dept" var prefix = ctx + "system/dept";
$("#form-dept-add").validate({ $("#form-dept-add").validate({
rules:{ rules:{
deptName:{ deptName:{
...@@ -100,11 +93,14 @@ ...@@ -100,11 +93,14 @@
"deptName": { "deptName": {
remote: "部门已经存在" remote: "部门已经存在"
} }
}, }
submitHandler:function(form){
$.operate.save(prefix + "/add", $('#form-dept-add').serialize());
}
}); });
function submitHandler() {
if ($.validate.form("#form-dept-add")) {
$.operate.save(prefix + "/add", $('#form-dept-add').serialize());
}
}
/*部门管理-新增-选择父部门树*/ /*部门管理-新增-选择父部门树*/
function selectDeptTree() { function selectDeptTree() {
......
...@@ -52,18 +52,12 @@ ...@@ -52,18 +52,12 @@
</div> </div>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
<script type="text/javascript"> <script type="text/javascript">
var prefix = ctx + "system/dept" var prefix = ctx + "system/dept";
$("#form-dept-edit").validate({ $("#form-dept-edit").validate({
rules:{ rules:{
deptName:{ deptName:{
...@@ -103,11 +97,14 @@ ...@@ -103,11 +97,14 @@
"deptName": { "deptName": {
remote: "部门已经存在" remote: "部门已经存在"
} }
}, }
submitHandler:function(form){
$.operate.save(prefix + "/edit", $('#form-dept-edit').serialize());
}
}); });
function submitHandler() {
if ($.validate.form("#form-dept-edit")) {
$.operate.save(prefix + "/edit", $('#form-dept-edit').serialize());
}
}
/*部门管理-修改-选择部门树*/ /*部门管理-修改-选择部门树*/
function selectDeptTree() { function selectDeptTree() {
......
...@@ -74,18 +74,11 @@ ...@@ -74,18 +74,11 @@
<textarea id="remark" name="remark" class="form-control"></textarea> <textarea id="remark" name="remark" class="form-control"></textarea>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
<script type="text/javascript"> <script type="text/javascript">
var prefix = ctx + "system/dict/data" var prefix = ctx + "system/dict/data";
$("#form-dict-add").validate({ $("#form-dict-add").validate({
rules:{ rules:{
...@@ -99,11 +92,14 @@ ...@@ -99,11 +92,14 @@
required:true, required:true,
digits:true digits:true
}, },
},
submitHandler:function(form){
$.operate.save(prefix + "/add", $('#form-dict-add').serialize());
} }
}); });
function submitHandler() {
if ($.validate.form("#form-dict-add")) {
$.operate.save(prefix + "/add", $('#form-dict-add').serialize());
}
}
</script> </script>
</body> </body>
</html> </html>
...@@ -75,18 +75,11 @@ ...@@ -75,18 +75,11 @@
<textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea> <textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
<script type="text/javascript"> <script type="text/javascript">
var prefix = ctx + "system/dict/data" var prefix = ctx + "system/dict/data";
$("#form-dict-edit").validate({ $("#form-dict-edit").validate({
rules:{ rules:{
...@@ -100,11 +93,14 @@ ...@@ -100,11 +93,14 @@
required:true, required:true,
digits:true digits:true
}, },
},
submitHandler:function(form){
$.operate.save(prefix + "/edit", $('#form-dict-edit').serialize());
} }
}); });
function submitHandler() {
if ($.validate.form("#form-dict-edit")) {
$.operate.save(prefix + "/edit", $('#form-dict-edit').serialize());
}
}
</script> </script>
</body> </body>
</html> </html>
...@@ -32,18 +32,11 @@ ...@@ -32,18 +32,11 @@
<textarea id="remark" name="remark" class="form-control"></textarea> <textarea id="remark" name="remark" class="form-control"></textarea>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
<script type="text/javascript"> <script type="text/javascript">
var prefix = ctx + "system/dict" var prefix = ctx + "system/dict";
$("#form-dict-add").validate({ $("#form-dict-add").validate({
rules:{ rules:{
...@@ -72,11 +65,14 @@ ...@@ -72,11 +65,14 @@
"dictType": { "dictType": {
remote: "该字典类型已经存在" remote: "该字典类型已经存在"
} }
}, }
submitHandler:function(form){
$.operate.save(prefix + "/add", $('#form-dict-add').serialize());
}
}); });
function submitHandler() {
if ($.validate.form("#form-dict-add")) {
$.operate.save(prefix + "/add", $('#form-dict-add').serialize());
}
}
</script> </script>
</body> </body>
</html> </html>
...@@ -33,18 +33,11 @@ ...@@ -33,18 +33,11 @@
<textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea> <textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
<script type="text/javascript"> <script type="text/javascript">
var prefix = ctx + "system/dict" var prefix = ctx + "system/dict";
$("#form-dict-edit").validate({ $("#form-dict-edit").validate({
rules:{ rules:{
...@@ -76,11 +69,14 @@ ...@@ -76,11 +69,14 @@
"dictType": { "dictType": {
remote: "该字典类型已经存在" remote: "该字典类型已经存在"
} }
}, }
submitHandler:function(form){
$.operate.save(prefix + "/edit", $('#form-dict-edit').serialize());
}
}); });
function submitHandler() {
if ($.validate.form("#form-dict-edit")) {
$.operate.save(prefix + "/edit", $('#form-dict-edit').serialize());
}
}
</script> </script>
</body> </body>
</html> </html>
...@@ -64,12 +64,6 @@ ...@@ -64,12 +64,6 @@
</div> </div>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
...@@ -108,11 +102,14 @@ ...@@ -108,11 +102,14 @@
"menuName": { "menuName": {
remote: "菜单已经存在" remote: "菜单已经存在"
} }
}, }
submitHandler:function(form){
$.operate.save(prefix + "/add", $('#form-menu-add').serialize());
}
}); });
function submitHandler() {
if ($.validate.form("#form-menu-add")) {
$.operate.save(prefix + "/add", $('#form-menu-add').serialize());
}
}
$(function() { $(function() {
$("input[name='icon']").focus(function() { $("input[name='icon']").focus(function() {
......
...@@ -65,12 +65,6 @@ ...@@ -65,12 +65,6 @@
</div> </div>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
...@@ -118,11 +112,14 @@ ...@@ -118,11 +112,14 @@
"menuName": { "menuName": {
remote: "菜单已经存在" remote: "菜单已经存在"
} }
}, }
submitHandler:function(form){
$.operate.save(prefix + "/edit", $('#form-menu-edit').serialize());
}
}); });
function submitHandler() {
if ($.validate.form("#form-menu-edit")) {
$.operate.save(prefix + "/edit", $('#form-menu-edit').serialize());
}
}
$(function() { $(function() {
$("input[name='icon']").focus(function() { $("input[name='icon']").focus(function() {
......
...@@ -38,18 +38,12 @@ ...@@ -38,18 +38,12 @@
<textarea id="remark" name="remark" class="form-control"></textarea> <textarea id="remark" name="remark" class="form-control"></textarea>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
<script type="text/javascript"> <script type="text/javascript">
var prefix = ctx + "system/post" var prefix = ctx + "system/post";
$("#form-post-add").validate({ $("#form-post-add").validate({
rules:{ rules:{
postName:{ postName:{
...@@ -96,11 +90,14 @@ ...@@ -96,11 +90,14 @@
"postName": { "postName": {
remote: "岗位名称已经存在" remote: "岗位名称已经存在"
} }
}, }
submitHandler:function(form){
$.operate.save(prefix + "/add", $('#form-post-add').serialize());
}
}); });
function submitHandler() {
if ($.validate.form("#form-post-add")) {
$.operate.save(prefix + "/add", $('#form-post-add').serialize());
}
}
</script> </script>
</body> </body>
</html> </html>
...@@ -39,18 +39,12 @@ ...@@ -39,18 +39,12 @@
<textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea> <textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
<script type="text/javascript"> <script type="text/javascript">
var prefix = ctx + "system/post" var prefix = ctx + "system/post";
$("#form-post-edit").validate({ $("#form-post-edit").validate({
rules:{ rules:{
postName:{ postName:{
...@@ -103,11 +97,14 @@ ...@@ -103,11 +97,14 @@
"postName": { "postName": {
remote: "岗位名称已经存在" remote: "岗位名称已经存在"
} }
}, }
submitHandler:function(form){
$.operate.save(prefix + "/edit", $('#form-post-edit').serialize());
}
}); });
function submitHandler() {
if ($.validate.form("#form-post-edit")) {
$.operate.save(prefix + "/edit", $('#form-post-edit').serialize());
}
}
</script> </script>
</body> </body>
</html> </html>
...@@ -48,12 +48,6 @@ ...@@ -48,12 +48,6 @@
<div id="menuTrees" class="ztree"></div> <div id="menuTrees" class="ztree"></div>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
...@@ -116,11 +110,14 @@ ...@@ -116,11 +110,14 @@
"roleKey": { "roleKey": {
remote: "角色权限已经存在" remote: "角色权限已经存在"
} }
}, }
submitHandler:function(form){
add();
}
}); });
function submitHandler() {
if ($.validate.form("#form-role-add")) {
add();
}
}
function add() { function add() {
var roleName = $("input[name='roleName']").val(); var roleName = $("input[name='roleName']").val();
......
...@@ -49,12 +49,6 @@ ...@@ -49,12 +49,6 @@
<div id="menuTrees" class="ztree"></div> <div id="menuTrees" class="ztree"></div>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
...@@ -123,10 +117,7 @@ ...@@ -123,10 +117,7 @@
"roleKey": { "roleKey": {
remote: "角色权限已经存在" remote: "角色权限已经存在"
} }
}, }
submitHandler:function(form){
edit();
}
}); });
function edit() { function edit() {
...@@ -159,6 +150,12 @@ ...@@ -159,6 +150,12 @@
} }
}); });
} }
function submitHandler() {
if ($.validate.form("#form-role-edit")) {
edit();
}
}
</script> </script>
</body> </body>
</html> </html>
...@@ -35,12 +35,6 @@ ...@@ -35,12 +35,6 @@
<div id="deptTrees" class="ztree"></div> <div id="deptTrees" class="ztree"></div>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
...@@ -59,11 +53,11 @@ ...@@ -59,11 +53,11 @@
$("#dataScope").change(); $("#dataScope").change();
}); });
$("#form-role-edit").validate({ function submitHandler() {
submitHandler:function(form){ if ($.validate.form("#form-role-edit")) {
edit(); edit();
} }
}); }
function edit() { function edit() {
var roleId = $("input[name='roleId']").val(); var roleId = $("input[name='roleId']").val();
......
...@@ -79,13 +79,6 @@ ...@@ -79,13 +79,6 @@
</label> </label>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
...@@ -167,11 +160,14 @@ ...@@ -167,11 +160,14 @@
"phonenumber":{ "phonenumber":{
remote: "手机号码已经存在" remote: "手机号码已经存在"
} }
}, }
submitHandler:function(form){
add();
}
}); });
function submitHandler() {
if ($.validate.form("#form-user-add")) {
add();
}
}
function add() { function add() {
var userId = $("input[name='userId']").val(); var userId = $("input[name='userId']").val();
......
...@@ -74,13 +74,6 @@ ...@@ -74,13 +74,6 @@
</label> </label>
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
...@@ -147,6 +140,12 @@ ...@@ -147,6 +140,12 @@
edit(); edit();
} }
}); });
function submitHandler() {
if ($.validate.form("#form-user-edit")) {
edit();
}
}
function edit() { function edit() {
var userId = $("input[name='userId']").val(); var userId = $("input[name='userId']").val();
......
...@@ -50,12 +50,6 @@ ...@@ -50,12 +50,6 @@
</div> </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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
...@@ -113,11 +107,14 @@ ...@@ -113,11 +107,14 @@
"phonenumber":{ "phonenumber":{
remote: "手机号码已经存在" remote: "手机号码已经存在"
} }
}, }
submitHandler:function(form){
$.operate.save(ctx + "system/user/profile/update", $('#form-user-edit').serialize());
}
}); });
function submitHandler() {
if ($.validate.form("#form-user-edit")) {
$.operate.save(ctx + "system/user/profile/update", $('#form-user-edit').serialize());
}
}
</script> </script>
</body> </body>
</html> </html>
...@@ -31,12 +31,6 @@ ...@@ -31,12 +31,6 @@
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请再次输入您的密码</span> <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请再次输入您的密码</span>
</div> </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> </form>
</div> </div>
<div th:include="include :: footer"></div> <div th:include="include :: footer"></div>
...@@ -82,11 +76,14 @@ ...@@ -82,11 +76,14 @@
equalTo: "两次密码输入不一致" equalTo: "两次密码输入不一致"
} }
}, }
submitHandler:function(form){
$.operate.save(ctx + "system/user/profile/resetPwd", $('#form-user-resetPwd').serialize());
}
}); });
function submitHandler() {
if ($.validate.form("#form-user-resetPwd")) {
$.operate.save(ctx + "system/user/profile/resetPwd", $('#form-user-resetPwd').serialize());
}
}
</script> </script>
</body> </body>
......
...@@ -18,12 +18,6 @@ ...@@ -18,12 +18,6 @@
<input class="form-control" type="password" name="password" id="password" th:value="${@config.getKey('sys.user.initPassword')}"> <input class="form-control" type="password" name="password" id="password" th:value="${@config.getKey('sys.user.initPassword')}">
</div> </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> </form>
</div> </div>
<div th:include="include :: footer"></div> <div th:include="include :: footer"></div>
...@@ -35,11 +29,14 @@ ...@@ -35,11 +29,14 @@
minlength: 5, minlength: 5,
maxlength: 20 maxlength: 20
}, },
},
submitHandler:function(form){
$.operate.save(ctx + "system/user/resetPwd", $('#form-user-resetPwd').serialize());
} }
}); });
function submitHandler() {
if ($.validate.form("#form-user-resetPwd")) {
$.operate.save(ctx + "system/user/resetPwd", $('#form-user-resetPwd').serialize());
}
}
</script> </script>
</body> </body>
......
...@@ -15,12 +15,6 @@ ...@@ -15,12 +15,6 @@
</div> </div>
#end #end
#end #end
<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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
...@@ -31,11 +25,14 @@ ...@@ -31,11 +25,14 @@
xxxx:{ xxxx:{
required:true, required:true,
}, },
},
submitHandler: function(form) {
$.operate.save(prefix + "/add", $('#form-${classname}-add').serialize());
} }
}); });
function submitHandler() {
if ($.validate.form("#form-${classname}-add")) {
$.operate.save(prefix + "/add", $('#form-${classname}-add').serialize());
}
}
</script> </script>
</body> </body>
</html> </html>
...@@ -16,12 +16,6 @@ ...@@ -16,12 +16,6 @@
</div> </div>
#end #end
#end #end
<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> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
...@@ -32,11 +26,14 @@ ...@@ -32,11 +26,14 @@
xxxx:{ xxxx:{
required:true, required:true,
}, },
},
submitHandler: function(form) {
$.operate.save(prefix + "/edit", $('#form-${classname}-edit').serialize());
} }
}); });
function submitHandler() {
if ($.validate.form("#form-${classname}-edit")) {
$.operate.save(prefix + "/edit", $('#form-${classname}-edit').serialize());
}
}
</script> </script>
</body> </body>
</html> </html>
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
<head th:include="include :: header"></head> <head th:include="include :: header"></head>
<body class="gray-bg"> <body class="gray-bg">
<div class="container-div"> <div class="container-div">
<div class="btn-group hidden-xs" id="toolbar" role="group"> <div class="btn-group-sm hidden-xs" id="toolbar" role="group">
<a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="${moduleName}:${classname}:add"> <a class="btn btn-primary" onclick="$.operate.add()" shiro:hasPermission="${moduleName}:${classname}:add">
<i class="fa fa-plus"></i> 新增 <i class="fa fa-plus"></i> 添加
</a> </a>
<a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.removeAll()" shiro:hasPermission="${moduleName}:${classname}:remove"> <a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="${moduleName}:${classname}:remove">
<i class="fa fa-trash-o"></i> 删除 <i class="fa fa-remove"></i> 删除
</a> </a>
</div> </div>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('${moduleName}:${classname}:edit')}]]; var editFlag = [[${@permission.hasPermi('${moduleName}:${classname}:edit')}]];
var removeFlag = [[${@permission.hasPermi('${moduleName}:${classname}:remove')}]]; var removeFlag = [[${@permission.hasPermi('${moduleName}:${classname}:remove')}]];
var prefix = ctx + "${moduleName}/${classname}" var prefix = ctx + "${moduleName}/${classname}";
$(function() { $(function() {
var options = { var options = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment