<%@page import="com.yeshi.buwan.domain.VideoType"%>
|
<%@page import="com.yeshi.buwan.domain.recommend.CategoryRecommendVideo"%>
|
<%@page import="net.sf.json.JSONObject"%>
|
<%@page import="com.yeshi.buwan.util.VideoTypeUtil"%>
|
<%@page import="com.yeshi.buwan.domain.DetailSystem"%>
|
<%@page import="com.yeshi.buwan.domain.VideoIntersection"%>
|
<%@page import="com.yeshi.buwan.util.TimeUtil"%>
|
<%@page import="java.util.concurrent.TimeUnit"%>
|
<%@page import="com.yeshi.buwan.web.tag.PageEntity"%>
|
<%@page import="com.yeshi.buwan.util.StringUtil"%>
|
<%@page import="com.yeshi.buwan.domain.VideoInfo"%>
|
<%@page import="com.yeshi.buwan.domain.SystemInfo"%>
|
<%@ page language="java" import="java.util.*"%>
|
<%@ page contentType="text/html; charset=UTF-8"%>
|
<%@ page pageEncoding="UTF-8"%><%@ taglib prefix="page" uri="/pagelib"%>
|
<!doctype html>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<title>修改分类</title>
|
<link rel="stylesheet" href="/BuWan/css/gongyong.css" type="text/css" />
|
<link rel="stylesheet" href="/BuWan/css/hottype_add.css" type="text/css" />
|
<LINK rel=stylesheet href="/BuWan/js/jquery-ui-1.11.4/jquery-ui.css" />
|
<script type="text/javascript" src="/BuWan/js/jquery.min.js"></script>
|
<script type="text/javascript" src="/BuWan/js/check.js"></script>
|
<script type="text/javascript" src="/BuWan/js/jquery.js"></script>
|
<script type="text/javascript"
|
src="/BuWan/js/jquery-ui-1.11.4/jquery-ui.js"></script>
|
<script type="text/javascript">
|
$(function() {
|
var searchdialog = $("#searchdialog").dialog(
|
{
|
autoOpen : false,
|
modal : true,
|
height : 750,
|
width : 600,
|
buttons : {
|
"确定" : function() {
|
var result = $(
|
"input[name='rbsearchresult']:checked")
|
.attr("value");
|
|
var resultObject = $.parseJSON(result);
|
$("#searchcontent").val(resultObject.Name);
|
$("#videoContent").html(
|
resultObject.Id + ":" + resultObject.Name);
|
$("#videoid").val(resultObject.Id);
|
searchdialog.dialog("close");
|
},
|
"取消" : function() {
|
searchdialog.dialog("close");
|
}
|
}
|
});
|
//搜索接口
|
|
function search(content) {
|
$("#search").val("获取结果中...");
|
$
|
.ajax({
|
url : encodeURI("/BuWan/VideoServlet?type=searchVideo&name="
|
+ content),//encodeURI
|
cache : false,
|
success : function(data) {
|
// $(this).addClass("done");
|
$("#search").val("搜索");
|
$("#searchresult").empty();
|
$("#searchresult")
|
.append(
|
"<tr><td>ID</td><td>图片</td><td>名称</td><td>创建时间</td></tr>");
|
var jsonData = eval(data);
|
$
|
.each(
|
jsonData,
|
function(index, objVal) { //遍历对象数组,index是数组的索引号,objVal是遍历的一个对象。
|
//val["属性"]可取到对应的属性值。
|
//组装json去空格
|
var trans = jQuery
|
.trim(
|
"{\"Id\":\""
|
+ objVal["Id"]
|
+ "\",\"Name\":\""
|
+ objVal["Name"]
|
+ "\"}")
|
.replace(/\s+/g, "");
|
$("#searchresult")
|
.append(
|
"<tr><td>"
|
+ objVal["Id"]
|
+ "</td><td><img src="+objVal["Picture"]+" style=\"width:100px\"></td>"
|
+ "<td>"
|
+ objVal["Name"]
|
+ "</td><td>"
|
+ objVal["Createtime"]
|
+ "</td><td><input name=\"rbsearchresult\" type=\"radio\" value="
|
+ trans
|
+ "></td></tr>");
|
});
|
searchdialog.dialog("open");
|
}
|
});
|
}
|
|
$("#search").click(
|
function() {
|
if ($("#searchcontent").val() == undefined
|
|| $("#searchcontent").val() == ""
|
|| $("#searchcontent").val() == null) {
|
} else {
|
search($("#searchcontent").val());
|
}
|
});
|
|
$("#chooseVideo").click(function() {
|
searchdialog.dialog("open");
|
});
|
|
});
|
</script>
|
<!-- 输入框 -->
|
|
<script type="text/javascript">
|
function searchSubmit() {
|
window.location = "banQuanVideoList.action?key=" + $("#key").val()
|
+ "&detailsystem=" + $("#detailsystem").val();
|
}
|
</script>
|
</head>
|
|
<%
|
CategoryRecommendVideo categoryRecommendVideo = (CategoryRecommendVideo) request
|
.getAttribute("categoryRecommendVideo");
|
List<VideoType> videoTypeList = (List<VideoType>) request.getAttribute("videoTypeList");
|
%>
|
|
<body>
|
|
<div id="searchdialog" title="搜索结果" style="display: none;">
|
<div style="display: block">
|
<input type="text" id="searchcontent"> <input type="button"
|
id="search" value="搜索">
|
</div>
|
<table id="searchresult"></table>
|
</div>
|
|
<form action="updateCategoryRecommendVideo.action">
|
|
<input type="hidden" value="<%=categoryRecommendVideo.getId()%>"
|
name="id">
|
<div class="div_bj">
|
<div class="div_ban">大区推荐Banner修改</div>
|
<div class="div_rdtg"></div>
|
|
|
<div class="nr0">
|
|
<div class="div_002">
|
<div class="text_001">图片:</div>
|
<div>
|
<div class="bs-docs-example">
|
|
<img alt=""
|
src="<%=StringUtil.getAbsoluteUrl(request, categoryRecommendVideo.getPicture())%>"
|
style="width: 200px;"> <input type="text" name="picture"
|
class="wbk" value="<%=categoryRecommendVideo.getPicture()%>">
|
</div>
|
</div>
|
</div>
|
|
|
<div class="div_002">
|
<div class="text_001">简要介绍:</div>
|
<div>
|
<div class="bs-docs-example">
|
<input type="text" name="desc" class="wbk"
|
value="<%=categoryRecommendVideo.getDesc()%>">
|
</div>
|
</div>
|
</div>
|
|
<div class="div_002">
|
<div class="text_001">排序值:</div>
|
<div>
|
<div class="bs-docs-example">
|
<input type="text" name="orderby" class="wbk"
|
value="<%=categoryRecommendVideo.getOrderby()%>">
|
</div>
|
</div>
|
</div>
|
|
<div class="div_002">
|
<div class="text_001">视频分类:</div>
|
<div>
|
<select name="videotype">
|
<%
|
for (VideoType vt : videoTypeList) {
|
if (vt.getId() != categoryRecommendVideo.getVideoType().getId())
|
out.print("<option value=" + vt.getId() + ">" + vt.getName() + "</option>");
|
else
|
out.print("<option value=" + vt.getId() + " selected='selected'>" + vt.getName() + "</option>");
|
|
}
|
%>
|
|
</select>
|
</div>
|
</div>
|
|
|
<div class="div_002">
|
<div class="text_001">视频:</div>
|
<div>
|
<label id="videoContent"><%=categoryRecommendVideo.getVideoInfo().getId() + "\n"
|
+ categoryRecommendVideo.getVideoInfo().getName()%></label> <br> <input
|
type="hidden" id="videoid" name="videoid"
|
value="<%=categoryRecommendVideo.getVideoInfo().getId()%>">
|
<input type="button" id="chooseVideo" value="选择">
|
</div>
|
</div>
|
|
<div class="div_002">
|
<div class="text_001">备注:</div>
|
<div>
|
<div class="bs-docs-example">
|
<textarea rows="5" cols="50" name="beizhu"><%=categoryRecommendVideo.getBeizhu()%></textarea>
|
</div>
|
</div>
|
</div>
|
|
|
<div class="div_002">
|
<div>
|
<input type="submit" class="submit_blue" value="确定"
|
onclick="submitAdd()" /> <input type="button"
|
class="submit_blue" value="取消" />
|
</div>
|
</div>
|
</div>
|
</div>
|
</form>
|
</body>
|
<script type="text/javascript" src="/BuWan/js/countheight.js">
|
|
</script>
|
|
</html>
|