Browse Source

后台热点管理

tony.qu 9 years ago
parent
commit
a5ee49300e

+ 21 - 28
src/main/java/com/cloudcross/ssp/web/back/main/ap/PlaceController.java

@@ -1,6 +1,7 @@
 package com.cloudcross.ssp.web.back.main.ap;
 
 import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -66,15 +67,13 @@ public class PlaceController extends SimpleController {
 		//查找所有的数聚场景
 		List<PlaceClassInformation> placeClassInformationList = placeClassInformationService.findAll();
 		
-		//所有的数聚子场景
-		List<Place> allplaceList = placeService.findAll();
-		
+		model.addAttribute("pager", pager);
 		model.addAttribute("placeList", placeList);
 		model.addAttribute("placeClassInformationList", placeClassInformationList);
-		model.addAttribute("allplaceList", allplaceList);
 		return page("unclassfiedPlaceName");
 	}
 	
+	
 	/**
 	 * 将待分类数聚子场景添加到数聚场景里面
 	 * @param placeId 数聚子场景的id组成的字符串,格式为"1-2-3"
@@ -86,6 +85,7 @@ public class PlaceController extends SimpleController {
 		//判断传递过来的参数是不是为空
 		if(null == placeId || "".equals(placeId) || null == placeClassId) {
 			System.out.println("传入的参数有错");
+			return redirect(page("unclassfiedPlaceName"));
 		} else {
 			String[] placeIdString = placeId.split("-");
 			
@@ -97,13 +97,11 @@ public class PlaceController extends SimpleController {
 				placeClassService.add(placeClass);
 			}
 			
-			
+			return redirect(page("unclassfiedPlaceName"));
 		}
-		
-		
-		return redirect(page("unclassfiedPlaceName"));
 	}
 	
+
 	/**
 	 * 得到所有的数聚子场景
 	 * @param placeId
@@ -146,7 +144,7 @@ public class PlaceController extends SimpleController {
 	 * @param page
 	 * @return
 	 */
-	@RequestMapping("place-sort")
+	@RequestMapping("/place-sort")
 	public String placeSort(Model model, @RequestParam HashMap<String, Object> paramMap,
 			@RequestParam(defaultValue = "1") int page) {
 		String place = null;
@@ -171,11 +169,14 @@ public class PlaceController extends SimpleController {
 		
 		paramMap.put("pager", pager1);
 		List<PlaceOperator> placeOperatorList = placeOperatorService.findUnclassfiedPlace(paramMap);
+		List<Place> placeList = placeService.findAll();
 		
 		//将传递过来的搜索参数回传
 		if(null != place) {
 			model.addAttribute("place", place1);
 		}
+		
+		model.addAttribute("placeList", placeList);
 		model.addAttribute("placeOperatorList", placeOperatorList);
 		model.addAllAttributes(paramMap);
 		return page("place-sort");
@@ -194,33 +195,25 @@ public class PlaceController extends SimpleController {
 	
 	/**
 	 * 用户场景分类的保存
-	 * 这里要传递两个变量,一个是t_place_operator的id字符串(变量名为id),另一个就是数聚场景id(变量名叫placeId)
-	 * 注:字符串格式像"1-4-5",就是id以-号划分,当有多个id的时候;
+	 * 这里要传递两个变量,一个是t_place_operator的id数组,另一个就是数聚场景id(变量名叫placeId)
 	 * @param model
-	 * @param paramMap
 	 * @return
 	 */
 	@RequestMapping("/save")
-	public String placeSort(Model model, @RequestParam HashMap<String, Object> paramMap) {
-		Long[] id = null;
-		Long placeId = null;
+	public String placeSort(Model model, @RequestParam Long[] id, @RequestParam Long placeId) {
+		List<Long> idList = new ArrayList<Long>();
 		//当传递过来的是空值或者是空字符串时,则什么也不做
-		if(null == paramMap.get("id") || "".equals(paramMap.get("id"))
-				|| null == paramMap.get("placeId") || "".equals(paramMap.get("placeId"))) {
+		if(null == id || id.length == 0
+				|| null == placeId ) {
 			return redirect(page("place-sort"));
-		} else {
-			String idString = String.valueOf(paramMap.get("id"));
-			String[] idArray = idString.split("-");
-			placeId = Long.parseLong(String.valueOf(paramMap.get("placeId")));
-			id = new Long[idArray.length];
-			
-			for(int i = 0; i < id.length; i++) {
-				id[i] = Long.parseLong(idArray[i]);
-			}
- 		}
+		} 
+		
+		for (int i = 0; i < id.length; i++) {
+			idList.add(id[i]);
+		}
 		
 		Map<String, Object> map = new HashMap<String, Object>();
-		map.put("idList", id);
+		map.put("idList", idList);
 		map.put("placeId", placeId);
 		placeOperatorService.update(map);
 		

+ 13 - 8
src/main/webapp/WEB-INF/pages/back/main/ap/place/place-sort.ftl

@@ -1,5 +1,6 @@
 <@override name="head">
 <title>用户场景定义</title>
+<link rel="stylesheet" href="${ctx}/assets/css/apPlace.css"/>
 <script type="text/javascript" src="${ctx}/assets/js/lib/bootstrap.min.js"></script>
 <script type="text/javascript" src="${ctx}/assets/js/lib/bootbox.js"></script>
 <script type="text/javascript" src="${ctx}/assets/js/common/table.js"></script>
@@ -26,9 +27,9 @@
 				</ul>  
  			</div>
 		 	<div id="place_sort">
-		 		<form id="placeTopform" action="${ctx}/back/main/ap/place/place-sort" method="post">
+		 		<form id="myform" action="${ctx}/back/main/ap/place/place-sort" method="post">
 			 		<div class="place_left">
-						<label class="place_label">待分类媒体场景</label>
+						<label class="place_label">待分类媒体场景</label><span>(此项可多选)</span>
 						<div id="navButtons">
 							<div id="searchValueDiv">
 								<input type="hidden" id="page" name="page" value="${pager.page}"/>
@@ -40,23 +41,26 @@
 							<#if placeOperatorList ??>
 							<#list placeOperatorList as placeoperator>
 							<div class="single_div">
-								<input class="single_div_checkbox" name="place" type="checkbox" value="${placeoperator.id!}"><span class="single_div_span">${placeoperator.name!}</span>
+								<input  name="place" type="checkbox" id="${placeoperator.id!}" value="${placeoperator.id!}">
+								<label class="single_div_span" for="${placeoperator.id!}">${placeoperator.name!}</label>
 							</div>
 							</#list>
 							</#if>
 						</div>
+						<div id="save" class="btn-save">全选</div>
 						<div id="pageDiv-other">
 							<#include "/common/pagination/simple.ftl"/>
 						</div>
 					</div>
-				</from>
+				
 				<div class="place_right">
 					<label class="place_label">子场景</label>
 					<div class="input-checkboxsDiv">
-						<#if placeOperatorList ??>
-						<#list placeOperatorList as placeoperator>
-						<div class="single_div">
-							<input class="single_div_checkbox" name="place" type="checkbox" value="${placeoperator.id!}"><span class="single_div_span">${placeoperator.name!}</span>
+						<#if placeList ??>
+						<#list placeList as place>
+						<div class="single_div_right">
+							<input name="place" type="radio" id="${place.id!}" value="${place.id!}">
+							<label class="single_div_span" for="${place.id!}">${place.name!}</label>
 						</div>
 						</#list>
 						</#if>
@@ -65,6 +69,7 @@
 						<a id="btn-sort-submit" class="btn3" type="button">提交</a>
 					</div>
 				</div>
+				</form>
 			</div>
 		</div>
 	</div>

+ 17 - 16
src/main/webapp/WEB-INF/pages/back/main/ap/place/unclassfiedPlaceName.ftl

@@ -1,5 +1,6 @@
 <@override name="head">
 <title>新增数聚场景</title>
+<link rel="stylesheet" href="${ctx}/assets/css/apPlace.css"/>
 <script type="text/javascript" src="${ctx}/assets/js/lib/bootstrap.min.js"></script>
 <script type="text/javascript" src="${ctx}/assets/js/lib/bootbox.js"></script>
 <script type="text/javascript" src="${ctx}/assets/js/back/apPlace.js"></script>
@@ -24,27 +25,33 @@
 				    <li class="navDiv_currentLi">新增数聚场景</li>
 				</ul>  
  			</div>
- 			<div id="place_top">
+ 			<div id="place_sort">
  				<form id="placeTopform" action="${ctx}/back/main/ap/place/unclassfiedPlaceName" method="post">
 		 			<div class="place_left">
-						<label class="place_label">待分类子场景</label>
+						<label class="place_label">待分类子场景</label><span>(此项可多选)</span>
 						<div class="input-checkboxsDiv">
 							<#if placeList ??>
 							<#list placeList as place>
 							<div class="single_div">
-								<input class="single_div_checkbox" name="place" type="checkbox" value="${place.id!}"><span class="single_div_span">${place.name!}</span>
+								<input name="place" type="checkbox" id="place_${place.id!}" value="${place.id!}">
+								<label class="single_div_span" for="place_${place.id!}">${place.name!}</label>
 							</div>
 							</#list>
 							</#if>
 						</div>
+						<div id="save" class="btn-save">全选</div>
+						<div id="pageDiv-other">
+							<#include "/common/pagination/simple.ftl"/>
+	                    </div>
 					</div>
 					<div class="place_right">
 						<label class="place_label">数据场景</label>
-						<div class="input-radiosDiv">
+						<div class="input-checkboxsDiv">
 							<#if placeClassInformationList ??>
 							<#list placeClassInformationList as placeClass>
-							<div class="single_div">
-								<input class="single_div_radio" name="place" type="radio" value="${placeClass.id!}"><span class="single_div_span">${placeClass.name!}</span>
+							<div class="single_div_right">
+								<input name="placeClass" type="radio" id="placeClass_${placeClass.id!}" value="${placeClass.id!}">
+								<label class="single_div_span" for="placeClass_${placeClass.id!}">${placeClass.name!}</label>
 							</div>
 							</#list>
 							</#if>
@@ -53,7 +60,7 @@
 							<a id="btn-submit" class="btn3" type="button">提交</a>
 						</div>
 					</div>
-				</from>
+				</form>
 			</div>
 			<div id="place_bottom">
 	 			<div id="selectuls">
@@ -72,16 +79,10 @@
 					</ul>
 					<input type="hidden" name="placeClassId" id="placeClassId" value="${placeClassId!}"/>
 				</div>
-				<div class="input-checkboxsDiv">
-					<#if allplaceList ??>
-					<#list allplaceList as place>
-					<div class="single_div">
-						<input class="single_div_checkbox" name="place" type="checkbox" value="${place.id!}"><span class="single_div_span">${place.name!}</span>
-					</div>
-					</#list>
-					</#if>
-				</div>
+				<div class="input-checkboxsDiv_d"></div>
 				<div id="place_btnDiv">
+					<div class="btn-save" id="save_a">全选</div>
+					<div class="btn3" id="del">清空</div>
 					<a id="btn-delete" class="btn3" type="button">删除</a>
 				</div>
 			</div>

+ 185 - 0
src/main/webapp/assets/css/apPlace.css

@@ -0,0 +1,185 @@
+/**** 后台热点管理-新增数据场景 ****/
+#place_top{
+	padding:20px 0;
+	display:inline-block;
+    border-bottom: thin solid #b9c5d9;
+	height:305px;
+	width:100%;
+	float:right;
+	width:45%;
+	height:325px;
+	overflow:auto;
+}
+
+#place_sort{
+	padding:20px 0;
+	display:inline-block;
+	width:100%;
+}
+
+#place_top .place_label,#place_sort .place_label{
+	font-weight: bold;
+	margin-bottom:20px;
+	display: inline-block;
+}
+
+.place_left{
+	float:left;
+	width:52%;
+	height:325px;
+	border-right: thin solid #b9c5d9;
+}
+
+#place_top .place_right{
+	float:right;
+	width:45%;
+	height:325px;
+	overflow:auto;
+}
+
+#place_top .place_left .input-checkboxsDiv,.place_right .input-radiosDiv,#place_bottom .input-checkboxsDiv{
+	clear:both;
+	padding-top:15px;
+}
+
+#place_top .single_div,#place_bottom .single_div,#place_sort .single_div,#place_bottom .single_div{
+	float: left;
+}
+
+#place_top .single_div span.single_div_span,#place_bottom .single_div span.single_div_span,#place_sort .single_div span.single_div_span{
+    margin-left: 5px;
+}
+
+#place_btnDiv{
+	clear:both;
+	float:right;
+	margin:20px;
+}
+
+#place_bottom{
+	display:inline-block;
+	width:100%;
+}
+#place_sort .place_right{
+	float:right;
+	width:45%;
+	margin:0 20px;
+}
+
+#place_sort .place_left .input-checkboxsDiv{
+	clear:both;
+	display: inline-block;
+	width:100%;
+    margin: 0 -10px;
+}
+
+#place_sort #searchValueDiv,#place_sort #pageDiv-other{
+	margin-right:20px;
+}
+
+#place_sort #pageDiv-other{
+	padding-top:20px;
+}
+.input-checkboxsDiv .single_div input[type="checkbox"]{
+	display:none;
+}
+
+.input-checkboxsDiv .single_div input[type="checkbox"]:checked + label {
+    background-color: #4c637b;
+    color: #fff;
+    border:solid #d5dee8 1px;
+}
+.input-checkboxsDiv .single_div input[type="checkbox"] + label {
+    cursor: pointer;
+    display: inline-block;
+    width: 100%;
+	height: 35px;
+	line-height: 35px;
+	text-align: center;
+	border-right:solid #d5dee8 1px;
+	border-bottom:solid #d5dee8 1px;
+}
+.input-checkboxsDiv .single_div_right input[type="radio"]{
+	display:none;
+}
+
+.input-checkboxsDiv .single_div_right input[type="radio"]:checked + label {
+    background-color: #4c637b;
+    color: #fff;
+    border:solid #d5dee8 1px;
+}
+.input-checkboxsDiv .single_div_right input[type="radio"] + label {
+    cursor: pointer;
+    display: inline-block;
+    width: 100%;
+	height: 35px;
+	line-height: 35px;
+	text-align: center;
+	border-right:solid #d5dee8 1px;
+	border-bottom:solid #d5dee8 1px;
+}
+.single_div{
+	float:left;
+	width: 19.99%;
+	height: 35px;
+	line-height: 35px;
+	text-align: center;
+}
+.single_div_right{
+	float:left;
+	width: 20%;
+	height: 35px;
+	line-height: 35px;
+	text-align: center;
+}
+
+.input-checkboxsDiv{
+	border-left:solid #d5dee8 1px;
+	border-top:solid #d5dee8 1px;
+	display: inline-block;
+}
+.btn-save{
+    margin:36px 0 0 -10px;
+}
+/**pic_style**/
+#placeClassIdul_box{
+	margin-bottom:20px;
+}
+.single_div_d{
+	float:left;
+	width:9.99%;
+	height: 35px;
+	line-height: 35px;
+	text-align: center;
+}
+.input-checkboxsDiv_d{
+	border-left:solid #d5dee8 1px;
+	border-top:solid #d5dee8 1px;
+	display: inline-block;
+	clear:both;
+	display: inline-block;
+	width:100%;
+    margin: 0 -10px;
+}
+
+.input-checkboxsDiv_d .single_div_d input[type="checkbox"]{
+	display:none;
+}
+
+.input-checkboxsDiv_d .single_div_d input[type="checkbox"]:checked + label {
+    background:url(../images/cross.png) 98% 6px no-repeat;
+}
+.input-checkboxsDiv_d .single_div_d input[type="checkbox"] + label {
+    cursor: pointer;
+    display: inline-block;
+    width: 100%;
+	height: 35px;
+	line-height: 35px;
+	text-align: center;
+	border-right:solid #d5dee8 1px;
+	border-bottom:solid #d5dee8 1px;
+}
+#save,#del{
+	position:absloute;
+	margin-left:10px;
+}

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

@@ -0,0 +1,318 @@
+
+.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;
+}

+ 61 - 26
src/main/webapp/assets/js/back/apPlace.js

@@ -11,12 +11,10 @@ $(document).ready(function() {
 				return $(span).val();
 			}).toArray().join('-');
 		}else{
-			bootbox.alert("请选择待分类的子场景!");
 			return false;
 		}
 		var placeClassId = $(".place_right input[type='radio']:checked").val();
 		if(placeClassId == undefined || placeClassId == ""){
-			bootbox.alert("请选择对应的数据场景!");
 			return false;
 		}
 		$.post(ctx+"/back/main/ap/place/add",{placeId:placeId,placeClassId:placeClassId},function(data){
@@ -39,16 +37,12 @@ $(document).ready(function() {
 	 		$("#placeClassId").val($(this).attr("value"));
 	 		$("#placeClassIdul_son_ul").hide(); //ul隐藏
 	 		var url = "";var param = null;
-	 		if($("#placeClassId").val() == "-1"){
-	 			url = ctx+"/back/main/ap/place/get-place";
-	 			param = null;
+	 		if($("#placeClassId").val() == -1 || $("#placeClassId").val() == ""){
+	 			$("#place_bottom .input-checkboxsDiv_d").empty();
+	 			return false;
 	 		}else{
-	 			url = ctx+"/back/main/ap/place/placeName";
-	 			param = {
-	 				'placeClassId':$("#placeClassId").val()
-	 			};
+	 			refreshPlaceData();
 	 		}
-	 		refreshPlaceData();
 		});
 		$("#placeClassIdul_box").mouseleave(function(){
 			$('#placeClassIdul_son_ul').hide(); //ul隐藏
@@ -64,7 +58,7 @@ $(document).ready(function() {
 				id.push(parseInt($(this).val()));
 			});
 		}else{
-			bootbox.alert("请选择需要删除的数据子场景!");
+			return false;
 		}
 		$.ajax({
 			async: false, 
@@ -79,28 +73,69 @@ $(document).ready(function() {
 		return false;
 	});
 	
+	$("#btn-sort-submit").click(function(){
+		var checkboxs = $(".place_left input[type='checkbox']:checked");
+		var ids = [];
+		if(checkboxs.length > 0){
+			checkboxs.each(function(){
+				ids.push(parseInt($(this).attr("value")));
+			});
+		}else{
+			return false;
+		}
+		var placeId = $(".place_right input[type='radio']:checked").val();
+		if(placeId == undefined || placeId == ""){
+			return false;
+		}
+		$.ajax({
+			async: false, 
+			traditional: true, 
+            type: "POST",
+             url: ctx+"/back/main/ap/place/save",
+             data:{"id":ids,"placeId":placeId},
+             success: function(data){
+            	 refreshData();
+             }
+		});
+		return false;
+	});
+	
+	
+	
+	$("#save").click(function(){
+		var alllength  = $(".place_left input[type='checkbox']").length;
+		var length  = $(".place_left input[type='checkbox']:checked").length;
+		if(length < alllength){
+			$(".place_left input[type='checkbox']").attr("checked",true);
+		}else{
+			$(".place_left input[type='checkbox']").attr("checked",false);
+		}
+	});
+	
+	$("#save_a").click(function(){
+		$(".input-checkboxsDiv_d input[type='checkbox']").attr("checked",true);
+	});
+	
+	$("#del").click(function(){
+			$(".input-checkboxsDiv_d input[type='checkbox']").attr("checked",false);
+s	});
 	
 });
 
+
+
 function refreshPlaceData(){
-	var url = "";var param = null;
-	if($("#placeClassId").val() == "-1"){
-		url = $("#ctx").val()+"/back/main/ap/place/get-place";
-		param = null;
-	}else{
-		url = $("#ctx").val()+"/back/main/ap/place/placeName";
-		param = {
-			'placeClassId':$("#placeClassId").val()
-		};
-	}
-	$.post(url,param,function(data){
-		$("#place_bottom .input-checkboxsDiv").empty();
+	var param = {
+		'placeClassId':$("#placeClassId").val()
+	};
+	$.post($("#ctx").val()+"/back/main/ap/place/placeName",param,function(data){
+		$("#place_bottom .input-checkboxsDiv_d").empty();
 		var html = "";
 		$.each(data,function(key, val){
-			html += '<div class="single_div">';
-			html += '<input class="single_div_checkbox" name="place" type="checkbox" value='+val.id+'><span class="single_div_span">'+val.name+'</span>';
+			html += '<div class="single_div_d">';
+			html += '<input name="place" type="checkbox" value='+val.id+' id="placeson_'+val.id+'"><label class="single_div_span" for="placeson_'+val.id+'">'+val.name+'</label>';
 			html += '</div>';
 		});
-		$("#place_bottom .input-checkboxsDiv").append(html);
+		$("#place_bottom .input-checkboxsDiv_d").append(html);
 	});
 }

+ 3 - 3
src/main/webapp/assets/js/common/table.js

@@ -4,8 +4,8 @@ $(document).ready(function(){
 	$(".checkboxStyleTd").click(function(){
 	    $(this).toggleClass("checkboxStyle_change");
 	    $(this).parent().parent().toggleClass("trChange");
-	    var checkboxs = $("table tbody").find("td .checkboxStyleTd").length;
-	    var checkbox_change = $("table tbody").find("td .checkboxStyle_change").length;
+	    var checkboxs = $("table.tableFig tbody").find("td .checkboxStyleTd").length;
+	    var checkbox_change = $("table.tableFig tbody").find("td .checkboxStyle_change").length;
 	    if(checkbox_change == checkboxs){
 	    	$(".checkboxStyleTh").addClass("checkboxStyle_change");
 	    }else{
@@ -42,7 +42,7 @@ $(document).ready(function(){
 	});
 	
 	// 分页中超链接跳转
-	$('#myform .pagination ul li a[href]').click(function(){
+	$('#pagecontent .pagination ul li a[href]').click(function(){
 		var _page = $(this).attr('href').substr(1);
 		$('#myform').find('input:hidden[name="page"]').val(_page);
 		refreshData();