Browse Source

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

shuzheng 9 years ago
parent
commit
9ebaa66c54

+ 8 - 9
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/organization/index.jsp

@@ -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();
+			}
 		});
 	}
 }

+ 8 - 9
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/permission/button.jsp

@@ -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();
+			}
 		});
 	}
 }

+ 8 - 9
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/permission/index.jsp

@@ -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();
+			}
 		});
 	}
 }

+ 8 - 9
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/permission/menu.jsp

@@ -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();
+			}
 		});
 	}
 }

+ 8 - 9
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/role/index.jsp

@@ -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();
+			}
 		});
 	}
 }

+ 8 - 9
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/system/index.jsp

@@ -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();
+			}
 		});
 	}
 }

+ 8 - 9
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/user/index.jsp

@@ -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();
+			}
 		});
 	}
 }