Browse Source

将头部文件中的js代码提出来

ying.rong 9 years ago
parent
commit
9211f48a25

+ 2 - 29
src/main/webapp/WEB-INF/pages/advertiser/main/public-head.ftl

@@ -1,4 +1,5 @@
 <#assign sec=JspTaglibs["http://www.springframework.org/security/tags"]>
+<script type="text/javascript" src="${ctx}/assets/js/advertiser/public-head.js"></script>
 <div id="headDiv">	
 	<div id="logoa">
 		<img class="logo1" src="${ctx}/assets/images/datacross.png">		
@@ -49,32 +50,4 @@
 		<input type="hidden" id="sessionadvertiserName" value="${advertiserName!}"/>
 		<input type="hidden" id="sessionoperatorId" value="${userSession.operatorId!}"/>
 	</div>    		
-</div>	
-<script type="text/javascript">
-	$(function(){
-	
-		var path = window.location.pathname;
-		if(path.indexOf("dashboard") != -1){
-			$("#menu a:first").addClass("menu_change");
-		};
-		if((path.indexOf("ad/advertiser") != -1)
-				||(path.indexOf("ad/order") != -1)
-				||(path.indexOf("ad/target") != -1)){
-			$("#menu a:eq(1)").addClass("menu_change");
-		};
-		if(path.indexOf("report") != -1){
-			$("#menu a:eq(2)").addClass("menu_change");
-		};
-		if(path.indexOf("banner-template") != -1){
-			$("#menu a:eq(3)").addClass("menu_change");
-		};
-		if(path.indexOf("adv-balance") != -1){
-			$("#menu a:eq(4)").addClass("menu_change");
-		};
-		if(path.indexOf("authority") != -1){
-			$("#menu a:eq(5)").addClass("menu_change");
-		};
-		
-	});
-	
-</script>
+</div>	

+ 2 - 30
src/main/webapp/WEB-INF/pages/back/main/public-head.ftl

@@ -1,4 +1,5 @@
 <#assign sec=JspTaglibs["http://www.springframework.org/security/tags"]>
+<script type="text/javascript" src="${ctx}/assets/js/back/public-head.js"></script>
 <div id="headDiv">	
     <div id="logoa">
 	<img class="logo1" src="${ctx}/assets/images/datacross.png">		
@@ -49,33 +50,4 @@
 		<input type="hidden" id="sessionagentId" value="${userSession.agentId!}"/>
 		<input type="hidden" id="sessionoperatorId" value="${userSession.operatorId!}"/>
 	</div>    		
-</div>	   	
-<script type="text/javascript">
-	$(function(){
-		var path = window.location.pathname;
-		if(path.indexOf("dashboard") != -1){
-			$("#menu a:first").addClass("menu_change");
-		};
-		if(path.indexOf("ad/report") != -1){
-			$("#menu a:eq(1)").addClass("menu_change");
-		};
-		if(path.indexOf("ad/operator") != -1){
-			$("#menu a:eq(2)").addClass("menu_change");
-		};
-		if(path.indexOf("audit") != -1){
-			$("#menu a:eq(3)").addClass("menu_change");
-		};
-		if(path.indexOf("finance") != -1){
-			$("#menu a:eq(4)").addClass("menu_change");
-		};
-		if(path.indexOf("client-account") != -1){
-			$("#menu a:eq(5)").addClass("menu_change");
-		};
-		if((path.indexOf("ap/apmac") != -1) || (path.indexOf("ap/place") != -1)){
-			$("#menu a:eq(6)").addClass("menu_change");
-		};
-		if(path.indexOf("authority") != -1){
-			$("#menu a:eq(7)").addClass("menu_change");
-		};
-	});
-</script>
+</div>	   	

+ 2 - 27
src/main/webapp/WEB-INF/pages/operator/main/public-head.ftl

@@ -1,4 +1,5 @@
 <#assign sec=JspTaglibs["http://www.springframework.org/security/tags"]>
+<script type="text/javascript" src="${ctx}/assets/js/operator/public-head.js"></script>
 <div id="headDiv">	
 	 <div id="logoa">
 	<img class="logo1" src="${ctx}/assets/images/datacross.png">		
@@ -48,30 +49,4 @@
 		<input type="hidden" id="sessionadvertiserName" value="${advertiserName!}"/>
 		<input type="hidden" id="sessionoperatorId" value="${userSession.operatorId!}"/>
 	</div>    		
-</div>
-<script type="text/javascript">
-	$(function(){
-		var path = window.location.pathname;
-		if(path.indexOf("dashboard") != -1){
-			$("#menu a:first").addClass("menu_change");
-		};
-		if(path.indexOf("zone") != -1){
-			$("#menu a:eq(1)").addClass("menu_change");
-		};
-		if(path.indexOf("report") != -1){
-			$("#menu a:eq(2)").addClass("menu_change");
-		};
-		if(path.indexOf("banner-audit") != -1){
-			$("#menu a:eq(3)").addClass("menu_change");
-		};
-		if(path.indexOf("financial") != -1){
-			$("#menu a:eq(4)").addClass("menu_change");
-		};
-		if((path.indexOf("ap/apmac") != -1) || (path.indexOf("ap/apgroup") != -1)){
-			$("#menu a:eq(5)").addClass("menu_change");
-		};
-		if(path.indexOf("authority") != -1){
-			$("#menu a:eq(6)").addClass("menu_change");
-		};
-	});
-</script>
+</div>

+ 0 - 318
src/main/webapp/assets/css/zone_advertiser.css

@@ -1,318 +0,0 @@
-
-.space{
-	height:5px;
-	padding:55px;
-	color:white
-	width:100%;
-	
-}
-.star{
-	color:#4bb4eb;
-}
-
-body{
-	color:#4C637B;
-}
-#created_ops .add_all, #created_ops .clear_all{
-	margin-left:9px;
-	width: 90px;
-	height: 35px;
-	color:#36AEEA!important;
-  	font-size:12px;
-  	border:1px solid #36AEEA;
-   	border-radius:5px!important;
-	cursor: pointer;
-	background-color: #ffffff;
-}
-#created_ops .choose_ops label.label1{	
-	width: 90px;
-	height: 35px;
-	line-height:35px;
-	text-align: center;
-	color:#4C637B;
-}
-
-#created_ops .opsdiv_control{
-	margin-top:-30px;
-	margin-left:100px;
-}
-#created_ops .choose_ops label.invalid{
-	margin-left:5px;
-	color: red;
-}
-#created_ops .choose_ops input[type="radio"],input[type="checkbox"]{
-	display: none;
-}
-
-#created_ops .choose_ops .scene_control input[type="checkbox"] + label{
-	margin-top:10px;
-	
-}
-#created_ops .choose_ops input[type="radio"] + label{
-	display: inline-block;	
-	border:solid #d5dee8 1px;
-	margin-left:10px;
-	cursor: pointer;
-}
-
-#created_ops .choose_ops input[type="radio"]:checked + label{
-	background-color: #4C637B;
-	color: #fff;
-}
-
-#created_ops .choose_ops input[type="checkbox"] + label{
-	display: inline-block;	
-	border:solid #d5dee8 1px;
-	margin-left:20px;
-	cursor: pointer;
-}
-
-#created_ops .choose_ops input[type="checkbox"]:checked + label{
-	background-color: #4C637B;
-	color: #fff;
-}
-
-.input_control{
-	margin-left: 20px;
-	width: 296px;
-	height: 41px;
-	margin-top:10px;
-	text-align: center;
-	color:#4C637B;
-}
-
-.invalid{
-	color:red;
-	margin-left:5px;
-	position:relative;
-	top:5px;		
-}
-
-span.help_inline{
-	height:30px;
-	line-height:30px;
-	margin-left:10px;
-}
-
-.choose_ops ul{
-	width:530px;
-	border-top: solid #d5dee8 1px;
-	border-left: solid #d5dee8 1px;
-	float:left;			
-}
-
-#all_industry span,#all_industry li,#blacklist span,#blacklist li{
-	float:left;
-	width: 19.81%;
-	height: 35px;
-	line-height: 35px;
-	text-align: center;
-	border-right:solid #d5dee8 1px;
-	border-bottom:solid #d5dee8 1px;
-
-}
-
-#all_industry span.ul_title,#blacklist span.ul_title{
-	width: 530px;
-	height: 60px;
-	line-height: 60px;
-	text-align: center;
-	padding:0px;
-}
-
-#all_industry{
-	margin-left:100px;
-}
-
-#all_industry li{
-	cursor: pointer;
-}
-
-#blacklist{
-	margin-left:20px;	
-}
-
-#blacklist  input.movedel,#web_blacklist  input.movedel{
-	float: right;
-	border:none;
-	width: 20px;
-	height: 20px;
-	background-image: url(../images/delete.png);
-	cursor: pointer;	
-}
-
-#ops_lastul{
-	clear: both;
-	position: relative;
-	top:25px;
-}
-
-#ops_lastul input{
-	position: relative;
-    left:0px;
-    color:#4C637B; 
-   
-}
-#ops_lastul input.input_control{
-	height:41px;
-}
-
-
-#web_blacklist{
-	margin: 25px 20px 20px 110px;
-	width: 88%;	
-	height:auto;
-}
-
-#web_blacklist li{
-	width:19.9%;
-	height: 35px;
-	line-height: 35px;
-	float: left;
-	text-align: center;
-	border-right:solid #d5dee8 1px;
-	border-bottom:solid #d5dee8 1px;
-}
-
-#creat_okbutton{
-	clear:both;
-	height:80px;
-	vertical-align: bottom;
-	margin-left: 100px;
-	padding-top:20px;
-}
-
-#creat_okbutton .saveinfo{
-	width: 119px;
-	height: 38px;
-	border: none;
-	border-radius: 5px;
-	color: #fff;
-	background:#67ba2f;	
-	cursor: pointer;	
-}
-
-#creat_okbutton .cancelinfo{
-	width: 119px;
-	height: 38px;
-	border: none;
-	border-radius: 5px;
-	color: #fff;
-	background: #36aeea;
-	margin-left: 18px;
-	cursor: pointer;
-}
-
-#handler{
-	margin:20px 0 20px 1px;
-	height:14px;
-	line-height:14px;
-}
-#handler ul .active1{
-	float:left;
-}
-#handler ul .size1{
-	float:left;
-}
-#handler ul .size2{
-	float:left;
-	margin:0px 10px 0px 10px;
-}
-#handler ul .divider2{
-	float:left;
-	margin:0px 10px 0px 10px;
-}
-
-#handler li a{
-	text-decoration: none;
-	color:#0088CC;
-	font-size:14px;
-}
-
-#created_ops .choose_ops{
-    line-height: 30px;
-    margin-bottom:20px;
-}
-
-#created_ops .choose_ops input[type="text"]{
-	border: 1px solid #d5dadf;
-    border-radius: 5px !important;
-    font-size: 12px;
-    height: 25px;
-    line-height: 25px;
-    padding-left: 20px;
-    width: 300px;
-    margin-left:10px;
-}
-.file {
-    position: relative;
-    display: inline-block;
-   	color:#36AEEA!important;
-   	font-size:12px;
- 	border:1px solid #36AEEA;
-   	border-radius:5px!important;
-    color: #36aeea;
-    text-decoration: none;
-    text-indent: 0;
-    line-height: 32px;
-    width:90px;
-    text-align: center;
-    top:-40px;
-    left:100px;
-    cursor: pointer;
-
- }
- .file:hover{
- 	text-decoration: none;
- }
-
-#uploadfilestr{
-	width:50px;
-	height:30px;
-	border: 1px solid #36aeea;
-    background-color: #36aeea;
-    color:#ffffff;
-}
-
-#enlarge_images{
-	position:absolute;
-	display:none;
-	z-index:9999;
-	border:5px solid #f4f4f4;
-}
-#choose_ops_name{
-	clear: both; 
-	margin-left: 0px; 
-	padding-top: 15px;
-}
-#picture{
-	clear: both; 
-	float: left; 
-	margin-top: -35px; 
-	margin-left: 90px;
-}
-#pull{
-	margin-left:230px;
-	margin-top:-50px;
-	position: absolute;
-}
-#style_A{
-	display:inline-block;
-	margin-left:13px;
-}
-#fileurl_a{
-	clear: both; 
-	margin-left: 15px;
-}
-#click{
-	display:inline-block;
-}
-#imgspan_pic{
-	position: absolute; 
-	margin-left: 500px; 
-	margin-top: -60px;
-}
-#filepicture_picture{
-	margin-left: 70px; 
-	margin-top: -35px;
-}

+ 25 - 0
src/main/webapp/assets/js/advertiser/public-head.js

@@ -0,0 +1,25 @@
+$(function(){
+	//更改头部菜单的样式
+	var path = window.location.pathname;
+	if(path.indexOf("dashboard") != -1){
+		$("#menu a:first").addClass("menu_change");
+	};
+	if((path.indexOf("ad/advertiser") != -1)
+			||(path.indexOf("ad/order") != -1)
+			||(path.indexOf("ad/target") != -1)){
+		$("#menu a:eq(1)").addClass("menu_change");
+	};
+	if(path.indexOf("report") != -1){
+		$("#menu a:eq(2)").addClass("menu_change");
+	};
+	if(path.indexOf("banner-template") != -1){
+		$("#menu a:eq(3)").addClass("menu_change");
+	};
+	if(path.indexOf("adv-balance") != -1){
+		$("#menu a:eq(4)").addClass("menu_change");
+	};
+	if(path.indexOf("authority") != -1){
+		$("#menu a:eq(5)").addClass("menu_change");
+	};
+		
+});

+ 29 - 0
src/main/webapp/assets/js/back/public-head.js

@@ -0,0 +1,29 @@
+$(function(){
+	//更改头部菜单的样式
+	var path = window.location.pathname;
+	if(path.indexOf("dashboard") != -1){
+		$("#menu a:first").addClass("menu_change");
+	};
+	if(path.indexOf("ad/report") != -1){
+		$("#menu a:eq(1)").addClass("menu_change");
+	};
+	if(path.indexOf("ad/operator") != -1){
+		$("#menu a:eq(2)").addClass("menu_change");
+	};
+	if(path.indexOf("audit") != -1){
+		$("#menu a:eq(3)").addClass("menu_change");
+	};
+	if(path.indexOf("finance") != -1){
+		$("#menu a:eq(4)").addClass("menu_change");
+	};
+	if(path.indexOf("client-account") != -1){
+		$("#menu a:eq(5)").addClass("menu_change");
+	};
+	if((path.indexOf("ap/apmac") != -1) || (path.indexOf("ap/place") != -1)){
+		$("#menu a:eq(6)").addClass("menu_change");
+	};
+	if(path.indexOf("authority") != -1){
+		$("#menu a:eq(7)").addClass("menu_change");
+	};
+		
+});

+ 26 - 0
src/main/webapp/assets/js/operator/public-head.js

@@ -0,0 +1,26 @@
+$(function(){
+	//更改头部菜单的样式
+	var path = window.location.pathname;
+	if(path.indexOf("dashboard") != -1){
+		$("#menu a:first").addClass("menu_change");
+	};
+	if(path.indexOf("zone") != -1){
+		$("#menu a:eq(1)").addClass("menu_change");
+	};
+	if(path.indexOf("report") != -1){
+		$("#menu a:eq(2)").addClass("menu_change");
+	};
+	if(path.indexOf("banner-audit") != -1){
+		$("#menu a:eq(3)").addClass("menu_change");
+	};
+	if(path.indexOf("financial") != -1){
+		$("#menu a:eq(4)").addClass("menu_change");
+	};
+	if((path.indexOf("ap/apmac") != -1) || (path.indexOf("ap/apgroup") != -1)){
+		$("#menu a:eq(5)").addClass("menu_change");
+	};
+	if(path.indexOf("authority") != -1){
+		$("#menu a:eq(6)").addClass("menu_change");
+	};
+		
+});