统一页面结构,规范代码生成部分

This commit is contained in:
shuzheng 2017-02-24 23:21:10 +08:00
parent 371ec172d1
commit 9ebaa66c54
7 changed files with 56 additions and 63 deletions

View File

@ -39,13 +39,6 @@
<script>
var $table = $('#table');
$(function() {
$(document).on('focus', 'input[type="text"]', function() {
$(this).parent().find('label').addClass('active');
}).on('blur', 'input[type="text"]', function() {
if ($(this).val() == '') {
$(this).parent().find('label').removeClass('active');
}
});
// bootstrap table初始化
$table.bootstrapTable({
url: '${basePath}/manage/organization/list',
@ -90,7 +83,10 @@ function createAction() {
createDialog = $.dialog({
animationSpeed: 300,
title: '新增组织',
content: 'url:${basePath}/manage/organization/create'
content: 'url:${basePath}/manage/organization/create',
onContentReady: function () {
initMaterialInput();
}
});
}
// 编辑
@ -114,7 +110,10 @@ function updateAction() {
updateDialog = $.dialog({
animationSpeed: 300,
title: '编辑组织',
content: 'url:${basePath}/manage/organization/update/' + rows[0].organizationId
content: 'url:${basePath}/manage/organization/update/' + rows[0].organizationId,
onContentReady: function () {
initMaterialInput();
}
});
}
}

View File

@ -39,13 +39,6 @@
<script>
var $table = $('#table');
$(function() {
$(document).on('focus', 'input[type="text"]', function() {
$(this).parent().find('label').addClass('active');
}).on('blur', 'input[type="text"]', function() {
if ($(this).val() == '') {
$(this).parent().find('label').removeClass('active');
}
});
// bootstrap table初始化
$table.bootstrapTable({
url: '${basePath}/manage/permission/list?type=2',
@ -118,7 +111,10 @@ function createAction() {
createDialog = $.dialog({
animationSpeed: 300,
title: '新增权限',
content: 'url:${basePath}/manage/permission/create'
content: 'url:${basePath}/manage/permission/create',
onContentReady: function () {
initMaterialInput();
}
});
}
// 编辑
@ -142,7 +138,10 @@ function updateAction() {
updateDialog = $.dialog({
animationSpeed: 300,
title: '编辑权限',
content: 'url:${basePath}/manage/permission/update/' + rows[0].permissionId
content: 'url:${basePath}/manage/permission/update/' + rows[0].permissionId,
onContentReady: function () {
initMaterialInput();
}
});
}
}

View File

@ -39,13 +39,6 @@
<script>
var $table = $('#table');
$(function() {
$(document).on('focus', 'input[type="text"]', function() {
$(this).parent().find('label').addClass('active');
}).on('blur', 'input[type="text"]', function() {
if ($(this).val() == '') {
$(this).parent().find('label').removeClass('active');
}
});
// bootstrap table初始化
$table.bootstrapTable({
url: '${basePath}/manage/permission/list',
@ -118,7 +111,10 @@ function createAction() {
createDialog = $.dialog({
animationSpeed: 300,
title: '新增权限',
content: 'url:${basePath}/manage/permission/create'
content: 'url:${basePath}/manage/permission/create',
onContentReady: function () {
initMaterialInput();
}
});
}
// 编辑
@ -142,7 +138,10 @@ function updateAction() {
updateDialog = $.dialog({
animationSpeed: 300,
title: '编辑权限',
content: 'url:${basePath}/manage/permission/update/' + rows[0].permissionId
content: 'url:${basePath}/manage/permission/update/' + rows[0].permissionId,
onContentReady: function () {
initMaterialInput();
}
});
}
}

View File

@ -39,13 +39,6 @@
<script>
var $table = $('#table');
$(function() {
$(document).on('focus', 'input[type="text"]', function() {
$(this).parent().find('label').addClass('active');
}).on('blur', 'input[type="text"]', function() {
if ($(this).val() == '') {
$(this).parent().find('label').removeClass('active');
}
});
// bootstrap table初始化
$table.bootstrapTable({
url: '${basePath}/manage/permission/list?type=1',
@ -118,7 +111,10 @@ function createAction() {
createDialog = $.dialog({
animationSpeed: 300,
title: '新增权限',
content: 'url:${basePath}/manage/permission/create'
content: 'url:${basePath}/manage/permission/create',
onContentReady: function () {
initMaterialInput();
}
});
}
// 编辑
@ -142,7 +138,10 @@ function updateAction() {
updateDialog = $.dialog({
animationSpeed: 300,
title: '编辑权限',
content: 'url:${basePath}/manage/permission/update/' + rows[0].permissionId
content: 'url:${basePath}/manage/permission/update/' + rows[0].permissionId,
onContentReady: function () {
initMaterialInput();
}
});
}
}

View File

@ -39,13 +39,6 @@
<script>
var $table = $('#table');
$(function() {
$(document).on('focus', 'input[type="text"]', function() {
$(this).parent().find('label').addClass('active');
}).on('blur', 'input[type="text"]', function() {
if ($(this).val() == '') {
$(this).parent().find('label').removeClass('active');
}
});
// bootstrap table初始化
$table.bootstrapTable({
url: '${basePath}/manage/role/list',
@ -91,7 +84,10 @@ function createAction() {
createDialog = $.dialog({
animationSpeed: 300,
title: '新增角色',
content: 'url:${basePath}/manage/role/create'
content: 'url:${basePath}/manage/role/create',
onContentReady: function () {
initMaterialInput();
}
});
}
// 编辑
@ -115,7 +111,10 @@ function updateAction() {
updateDialog = $.dialog({
animationSpeed: 300,
title: '编辑角色',
content: 'url:${basePath}/manage/role/update/' + rows[0].roleId
content: 'url:${basePath}/manage/role/update/' + rows[0].roleId,
onContentReady: function () {
initMaterialInput();
}
});
}
}

View File

@ -39,13 +39,6 @@
<script>
var $table = $('#table');
$(function() {
$(document).on('focus', 'input[type="text"]', function() {
$(this).parent().find('label').addClass('active');
}).on('blur', 'input[type="text"]', function() {
if ($(this).val() == '') {
$(this).parent().find('label').removeClass('active');
}
});
// bootstrap table初始化
$table.bootstrapTable({
url: '${basePath}/manage/system/list',
@ -105,7 +98,10 @@ function createAction() {
createDialog = $.dialog({
animationSpeed: 300,
title: '新增系统',
content: 'url:${basePath}/manage/system/create'
content: 'url:${basePath}/manage/system/create',
onContentReady: function () {
initMaterialInput();
}
});
}
// 编辑
@ -129,7 +125,10 @@ function updateAction() {
updateDialog = $.dialog({
animationSpeed: 300,
title: '编辑系统',
content: 'url:${basePath}/manage/system/update/' + rows[0].systemId
content: 'url:${basePath}/manage/system/update/' + rows[0].systemId,
onContentReady: function () {
initMaterialInput();
}
});
}
}

View File

@ -39,13 +39,6 @@
<script>
var $table = $('#table');
$(function() {
$(document).on('focus', 'input[type="text"]', function() {
$(this).parent().find('label').addClass('active');
}).on('blur', 'input[type="text"]', function() {
if ($(this).val() == '') {
$(this).parent().find('label').removeClass('active');
}
});
// bootstrap table初始化
$table.bootstrapTable({
url: '${basePath}/manage/user/list',
@ -117,7 +110,10 @@ function createAction() {
createDialog = $.dialog({
animationSpeed: 300,
title: '新增用户',
content: 'url:${basePath}/manage/user/create'
content: 'url:${basePath}/manage/user/create',
onContentReady: function () {
initMaterialInput();
}
});
}
// 编辑
@ -141,7 +137,10 @@ function updateAction() {
updateDialog = $.dialog({
animationSpeed: 300,
title: '编辑用户',
content: 'url:${basePath}/manage/user/update/' + rows[0].userId
content: 'url:${basePath}/manage/user/update/' + rows[0].userId,
onContentReady: function () {
initMaterialInput();
}
});
}
}