Răsfoiți Sursa

支持多系统多主题切换,增加cookie支持刷新

shuzheng 9 ani în urmă
părinte
comite
c473eedfc8

+ 10 - 1
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/index.jsp

@@ -19,6 +19,14 @@
 	<link href="${basePath}/resources/zheng-ui/plugins/waves-0.7.5/waves.min.css" rel="stylesheet"/>
 	<link href="${basePath}/resources/zheng-ui/plugins/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.min.css" rel="stylesheet"/>
 	<link href="${basePath}/resources/zheng-ui/css/admin.css" rel="stylesheet"/>
+	<style>
+		/** skins **/
+		<c:forEach var="upmsSystem" items="${upmsSystems}">
+		#${upmsSystem.name} #header {background: ${upmsSystem.theme};}
+		#${upmsSystem.name} .content_tab{background: ${upmsSystem.theme};}
+		#${upmsSystem.name} .s-profile>a{background: url(${basePath}${upmsSystem.banner}) left top no-repeat;}
+		</c:forEach>
+	</style>
 </head>
 <body>
 <header id="header">
@@ -65,7 +73,7 @@
 						<li class="divider hidden-xs"></li>
 						<c:forEach var="upmsSystem" items="${upmsSystems}">
 						<li>
-							<a class="waves-effect switch-systems" href="javascript:;" systemid="${upmsSystem.systemId}" systemtitle="${upmsSystem.title}"><i class="${upmsSystem.icon}"></i> ${upmsSystem.title}</a>
+							<a class="waves-effect switch-systems" href="javascript:;" systemid="${upmsSystem.systemId}" systemname="${upmsSystem.name}" systemtitle="${upmsSystem.title}"><i class="${upmsSystem.icon}"></i> ${upmsSystem.title}</a>
 						</li>
 						</c:forEach>
 					</ul>
@@ -196,6 +204,7 @@
 <script src="${basePath}/resources/zheng-ui/plugins/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js"></script>
 <script src="${basePath}/resources/zheng-ui/plugins/BootstrapMenu.min.js"></script>
 <script src="${basePath}/resources/zheng-ui/plugins/device.min.js"></script>
+<script src="${basePath}/resources/zheng-ui/plugins/jquery.cookie.js"></script>
 <script src="${basePath}/resources/zheng-ui/js/admin.js"></script>
 <script src="${basePath}/resources/zheng-ui/plugins/fullPage/jquery.fullPage.min.js"></script>
 <script src="${basePath}/resources/zheng-ui/plugins/fullPage/jquery.jdirk.min.js"></script>

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

@@ -20,6 +20,14 @@
 			<label for="name">名称</label>
 			<input id="name" type="text" class="form-control" name="name" maxlength="20">
 		</div>
+		<div class="form-group">
+			<label for="theme">主题</label>
+			<input id="theme" type="text" class="form-control" name="theme" maxlength="50">
+		</div>
+		<div class="form-group">
+			<label for="banner">背景图</label>
+			<input id="banner" type="text" class="form-control" name="banner" maxlength="50">
+		</div>
 		<div class="form-group">
 			<label for="description">描述</label>
 			<input id="description" type="text" class="form-control" name="description" maxlength="300">

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

@@ -20,6 +20,14 @@
 			<label for="name">名称</label>
 			<input id="name" type="text" class="form-control" name="name" maxlength="20" value="${system.name}">
 		</div>
+		<div class="form-group">
+			<label for="theme">主题</label>
+			<input id="theme" type="text" class="form-control" name="theme" maxlength="50" value="${system.theme}">
+		</div>
+		<div class="form-group">
+			<label for="banner">背景图</label>
+			<input id="banner" type="text" class="form-control" name="banner" maxlength="50" value="${system.banner}">
+		</div>
 		<div class="form-group">
 			<label for="description">描述</label>
 			<input id="description" type="text" class="form-control" name="description" maxlength="300" value="${system.description}">