123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- <%@ page contentType="text/html;charset=UTF-8" %>
- <%@ include file="/webpage/include/taglib.jsp"%>
- <html>
- <head>
- <title>视频管理</title>
- <meta name="decorator" content="ani"/>
- <style>
- .contents {
- width: 950px;
- }
- </style>
- <!-- SUMMERNOTE -->
- <%@include file="/webpage/include/ueditor.jsp" %>
- <script type="text/javascript">
- var contents = null;
- function save() {
- var isValidate = jp.validateForm('#inputForm');//校验表单
- contents = editor.getContent();
- if($("#cover").val()== ''){
- alert("请上传封面图片!");
- return false;
- };
- if(contents == ''){
- alert("内容不能为空!");
- return false;
- };
- $("#contents").val(contents);
- if(!isValidate){
- return false;
- }else{
- jp.loading();
- jp.post("${ctx}/base/eduVideoNews/save",$('#inputForm').serialize(),function(data){
- if(data.success){
- jp.getParent().refresh();
- var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
- parent.layer.close(dialogIndex);
- jp.success(data.msg)
- }else{
- jp.error(data.msg);
- }
- })
- }
- }
- function preview(id){//预览
- jp.openViewDialog('预览', "${ctx}/base/eduVideoNews/form?typeId=${eduVideoNews.typeId}&isPreview=1&id=" + id, '800px', '550px');
- }
- </script>
- </head>
- <body class="bg-white">
- <form:form id="inputForm" modelAttribute="eduVideoNews" class="form-horizontal">
- <form:hidden path="id"/>
- <form:hidden path="typeId"/>
- <table class="table table-bordered">
- <tbody>
- <tr>
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>标题:</label></td>
- <td class="width-35" colspan="3">
- <form:input path="title" htmlEscape="false" class="form-control required"/>
- </td>
- </tr>
- <tr>
- <c:choose>
- <c:when test="${eduVideoNews.typeId !='2'}">
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>上传视频:</label></td>
- <td class="width-35">
- <sys:fileUpload path="url1" required="required" value="${eduVideoNews.url1}" type="video" uploadPath="/base/eduVideoNews/video" />
- <a href="#" onclick="preview('${eduVideoNews.id}')">视频预览</a>
- </td>
- </c:when>
- <c:otherwise>
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>直播源:</label></td>
- <td class="width-35">
- <form:input path="url1" htmlEscape="false" class="form-control required "/>
- </td>
- </c:otherwise>
- </c:choose>
- <td class="width-15 active" rowspan="2"><label class="pull-right"><font color="red">*</font>封面图片:</label></td>
- <td class="width-35" rowspan="2">
- <c:choose>
- <c:when test="${eduVideoNews.oprType ==null || eduVideoNews.oprType ==''}">
- <sys:fileUpload path="cover" fileNumLimit="1" allowedExtensions="jpeg,jpg,png,bmp" value="${eduVideoNews.cover}" type="images" uploadPath="/base/eduVideoNews/image" required="required"/>
- </c:when>
- <c:otherwise>
- <img src="${eduVideoNews.cover}" width="230" height="100">
- </c:otherwise>
- </c:choose>
- </td>
- </tr>
- <tr>
- <%--<td class="width-15 active"><label class="pull-right">视频路径:</label></td>
- <td class="width-35">
- <sys:fileUpload path="url2" value="${eduVideoNews.url2}" type="file" uploadPath="/base/eduVideoNews"/>
- </td>--%>
- <%--<td class="width-15 active"><label class="pull-right">视频路径:</label></td>
- <td class="width-35">
- <sys:fileUpload path="url3" value="${eduVideoNews.url3}" type="file" uploadPath="/base/eduVideoNews"/>
- </td>--%>
- <td class="width-15 active"><label class="pull-right">来源:</label></td>
- <td class="width-35">
- <form:input path="source" htmlEscape="false" class="form-control "/>
- </td>
- </tr>
- <%--<tr>
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>是否推荐:</label></td>
- <td class="width-35">
- <form:radiobutton path="isTop" value="1" label="否"/>
- <form:radiobutton path="isTop" value="" label="是"/>
- </td>
- </tr>--%>
- <tr>
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>积分:</label></td>
- <td class="width-35">
- <form:input path="score" htmlEscape="false" maxlength="10" min="0.1" class="form-control required number"/>
- </td>
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>积分类型:</label></td>
- <td class="width-35">
- <form:radiobutton path="scoreType" value="1" label="进入得分"/>
- <form:radiobutton path="scoreType" value="2" label="观看得分"/>
- </td>
- </tr>
- <tr>
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>内容:</label></td>
- <td class="width-35" colspan="3">
- <div class="contents">
- <script id="container" name="contents" type="text/plain">${fns:unescapeHtml(eduVideoNews.contents)}</script>
- <script type="text/javascript">
- var editor = UE.getEditor('container');
- editor.ready(function() {
- editor.setHeight(310);
- });
- </script>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </form:form>
- </body>
- </html>
|