Edit D:\AVA\AVAStandard\AVA.ResourcesPlatform.WebUI\Themes\ShiXun\Control\My\MySubjectSTVideo.ascx
??<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MySubjectSTVideo.ascx.cs" Inherits="AVA.ResourcesPlatform.WebUI.Control.My.MySubjectSTVideo" %> <%--<%= new MySubjectUserNavTopInstance(this) { Local= MySubjectUserNavTopItem.????????? }.ToHtml()%>--%> <div class="flat"> <div class="head"> <span class="title"> <%=new HtmlSpan(this.Subject.Name) { TextLength=40,Suffix="...",Title=this.Subject.Name }%>??<%= this.Query.RecordCount %>???????????</span> </div> <div class="dataControl body"> <div class="toggle-grid-btn-group pull-right"> <div> <a href="#list" title="???" class="ico grid-toggle-btn on" data-target="#MySubjectSTVideoData"></a> <a href="#grid" title="???" class="ico list-toggle-btn " data-target="#MySubjectSTVideoData"></a> <script> $(function () { $("#MySubjectSTVideoData").find(".title-text").hide(); $(".grid-toggle-btn").on("click", function (e) { $(e.target).addClass("on"); $(".list-toggle-btn").removeClass("on"); $($(e.target).attr("data-target")).find(".min-video-photo").show().parent().find(".title-text").hide(); }); $(".list-toggle-btn").on("click", function (e) { $(e.target).addClass("on"); $(".grid-toggle-btn").removeClass("on"); $target = $($(e.target).attr("data-target")); $target.find(".min-video-photo").hide().parent().find(".title-text").show(); }); }); </script> </div> </div> <form id="frmSubjectSTVideoSearch" method="post" action="<%= WebUrl.Proxy() %>" style="margin-bottom: 5px; margin-top: 5px;"> ????? <%= new HtmlText("Name", this.Name) { Width = 120 }%> ????? <%= new HtmlSelect("ParentCategory", "Name", "Guid", "Guid") { Option = this.ListCategory }.InsertOption("::???::", "", 0)%> <%= new HtmlHidden("Key","MySubjectSTVideo") %> <%= new HtmlHidden("ParentSubject",this.Subject.Guid) %> <%= new HtmlSubmit("???") %> <%= new HtmlReset("???") { Class="btn"}%> </form> </div> <script> var listWeike = {}; </script> <div id="MySubjectSTVideoData" class="data"> <% //??????????????? bool isSTTime = false; if (this.Subject.Examine == (int)AVA.ResourcesPlatform.Model.Pub.SubjectExamineEnum.?????? && this.Subject.Status == (int)AVA.ResourcesPlatform.Model.Pub.SubjectStatusEnum.??? && this.Subject.CutoffTime <= DateTime.Now && this.Subject.EndTime >= DateTime.Now) { isSTTime = true; } if (this.Subject.Status != (int)AVA.ResourcesPlatform.Model.Pub.SubjectStatusEnum.???) { %> <div class="alert"> <div class="alert-body"> ???<%= Enum.GetName(typeof( AVA.ResourcesPlatform.Model.Pub.SubjectStatusEnum),this.Subject.Status) %> </div> </div> <%} else {%> <div class="alert"> <div class="alert-body" id="CountDown"> ????????? </div> <script type="text/javascript"> function ShowCountDown(year, month, day, divname) { var now = new Date(); var endDate = new Date(year, month - 1, day); var leftTime = endDate.getTime() - now.getTime(); var leftsecond = parseInt(leftTime / 1000); var day1 = Math.floor(leftsecond / (60 * 60 * 24)); var hour = Math.floor((leftsecond - day1 * 24 * 60 * 60) / 3600); var minute = Math.floor((leftsecond - day1 * 24 * 60 * 60 - hour * 3600) / 60); var second = Math.floor(leftsecond - day1 * 24 * 60 * 60 - hour * 3600 - minute * 60); var cc = document.getElementById(divname); cc.innerHTML = "??????????????" + day1 + "??" + hour + "???" + minute + "??" + second + "??"; } window.setInterval(function () { ShowCountDown('<%=this.Subject.EndTime.Year %>', ' <%=this.Subject.EndTime.Month %>', '<%= this.Subject.EndTime.Day %>', 'CountDown'); }, 1000); </script> </div> <% } %> <table cellspacing="0" cellpadding="0" width="100%"> <tbody> <tr id="dataHead" class="dataHead"> <td valign="middle" class="sel" style="width: 20px;"> <input type="checkbox" class="trselall" /> </td> <td valign="middle">??? </td> <td valign="middle" class="disabled">??? </td> <%-- <td valign="middle" class="disabled">??? </td> <td valign="middle" class="disabled">??? </td>--%> <%--<td valign="middle" class="disabled">??? </td>--%> <td valign="middle" class="disabled">??? </td> </tr> <!--??? ????? ????? ?? ??????? ????? ????????? ????????? class="firstLine lastLine"--> <%--????????????????????????????--%> <% for (int i = 0; i <= this.ListSTUserVideo.Count - 1; i++) { var subjectVideo = this.ListSTUserVideo[i]; var subject = this.ListSTUserVideo[i].ParentSubjectVideo.ParentSubject; var video = this.ListSTUserVideo[i].ParentSubjectVideo.ParentVideo; %> <script> // just ajax get video.url listWeike["<%= video.Guid %>"] = { nrurl: "<%--<%= CreateInstance.VideoDao.GetResourcePath(video).VideoShow %>--%> ", hdurl: "<%--<%= CreateInstance.VideoDao.GetResourcePath(video).HighDefinition %>--%> ", <%-- nrurl: "<%= Request.WebPath()+"/upload/Video/test/test.mp4"%>", hdurl: "<%= Request.WebPath()+"/upload/Video/test/test.mp4"%>",--%> guid: "<%= video.Guid %>", weburl: "<%= WebUrl.VideoPlay(video.Guid) %>", image: "<%= SettingGroup.VideoCoverL(video) %>", name: "<%= video.Name%> " }; </script> <tr class='<%= i == 0 ? "firstLine" : "" %> <%= i == this.ListSTUserVideo.Count - 1 ? "lastLine" : "" %>'> <td class="sel"> <%= new HtmlCheckBox() { Value = SetKey(subjectVideo.Guid, subjectVideo.Version), Class = "trsel", Title = DefineEnum.???_????.Define() }%> </td> <td class="v"> <div class="min-video-photo"> <a data-toggle="modal" class="open-playerDialog" data-target="#videoplayerModal" data-guid="<%= video.Guid %>" style="cursor: pointer;"> <%= new HtmlImg(SettingGroup.VideoCover(video), video.Name+"????????") { OnErrorImg=SettingGroup.DefaultImg} %> </a> </div> <div class="title-text"> <a data-toggle="modal" class="open-playerDialog" data-target="#videoplayerModal" data-guid="<%= video.Guid %>" style="cursor: pointer;"> <%--<%= video.Name %> --%></a> </div> </td> <td> <p> <a data-toggle="modal" class="open-playerDialog" data-target="#videoplayerModal" data-guid="<%= video.Guid %>" style="cursor: pointer;"><%= video.Name %></a> </p> </td> <td><%--????????<%= CreateInstance.STVideoScoreDao.VideoScoreCount(subject,video) %> / <%= subject._ListSTUser.Count %> <br />--%> <% if (CreateInstance.STVideoScoreDao.VideoScore(subject, video,this.User) == 0) { %> <span style="color: red">?????</span> <% } else { %> ?????<%=CreateInstance.STVideoScoreDao.VideoSTUserScore(subject, video,this.User) %>??<br /> <%--<%= new MySubjectSTVideoTotalInstance(this) { Video = video}.ToHtml()%>--%> <% } %> </td> </tr> <% } %> </tbody> </table> </div> <div id="videoplayerModal" class="modal big-modal hide fade " tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="width: 80%; margin-left: -40%;"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="font-size:36px;">?</button> <h3><a href="#" id="myModalLabel">Modal header</a><i class="icon-info-sign" style="vertical-align: middle; margin-top: -5px;"></i> <span style="font-size: 16px; margin-left: 20px; color: red;">?????????????????????????????????????????</span> <span style="float:right;margin-right:20px;"><input type="button" value="???" onclick="CheckScoreItem(this)" /></span> <span style="float:right;margin-right:20px;"><input type="button" value="???" onclick="ClearScoreItem(this)" style="display:none" id="CleaScoreItem" /></span> <span style="font-size: 16px; margin-right: 20px; color: red;float:right" id="scoreItemTotal"></span> </h3> </div> <div class="modal-body"> <div style="float: left; width: 50%; position: relative;" id="playerWrapper"> <ul class="nav-pills " style="width:68px;" id="content_navs_ul"> <li class="active"><a href="#videoPlayer-pane" data-toggle="tab">???</a></li> <li><a href="#videoAttachement-pane" data-toggle="tab">???</a></li> <li><a href="#VideoInfo-pane" data-toggle="tab">???</a></li> <li><a href="#STUserComments-pane" data-toggle="tab">???</a></li> </ul> <div class="pill-content" id="playerContent"> <div class="pill-pane active" id="videoPlayer-pane"> <div class="" id="JWPlayer"> </div> </div> <div class="pill-pane " id="videoAttachement-pane"> <div class="no-accordion" id="videoAttachementWrapper"> ???????? </div> </div> <div class="pill-pane" id="videoSWPatternWrapper-pane"> <div class="" id="videoSWPatternWrapper"> </div> </div> <div class="pill-pane" id="VideoInfo-pane"> <div class="no-accordion" id="VideoInfo"> ???????? </div> </div> <div class="pill-pane" id="STUserComments-pane"> <div class="" id="STUserComments"> </div> </div> </div> <script> </script> </div> <div style="margin-left: 50%; overflow: scroll" id="socrePanel"> <ul class="nav-pills hidden" style="list-style: none;"> <li class="active"><a href="#socreItemWrapper-pane" data-toggle="tab">?????</a></li> </ul> <div class="pill-content"> <div class="pill-pane active" id="socreItemWrapper-pane"> <div class="hor-tabs mini-tabs" id="socreItemWrapper" style="height:1500px;"> </div> </div> </div> </div> </div> <div class="modal-footer hidden"> <a class="btn" id="preVideo"><</a><a class="btn" id="nextVideo">></a> <%-- <button class="btn" data-dismiss="modal" aria-hidden="true">???</button> <button class="btn btn-primary">Save changes</button>--%> </div> </div> <script type="text/javascript" src='<%= Request.WebPath()+"/Tools/JWPlayer/jwplayer.js" %>'></script> <script> var nextNpreviewBtnClick = false; $(document).on("hidden", "#videoplayerModal", function () { if (!nextNpreviewBtnClick) { location.reload(); } nextNpreviewBtnClick = false; }); $(window).on("resize", function (e) { resizeModal(e); }); $(document).on("ready", function (e) { resizeModal(e); }); var resizeModal = function (e) { var w = $(window).width(), h = $(window).height(); $(".modal-body").css("height", $(window).height() * .8 - $(".modal-header").height() - $(".modal-footer").height()); $("#videoplayerModal").width($(window).width() * .95) .css("margin-left", -$("#videoplayerModal").width() / 2) .css("margin-top", -$("#videoplayerModal").height() / 2); } var content_navs = ["#videoAttachement-pane", "#videoPlayer-pane", "#videoSWPatternWrapper-pane", "#VideoInfo-pane", "#STUserComments-pane"], currentPage = '#videoPlayer-pane', defaultPage = '#videoPlayer-pane', PLAYERSHOWSTATUS = true, PAGEANIMATED = true, jp, orignW, orignH, smallW, smallH, PLAYERCONTENT = '#videoPlayer-pane'; $(document).on("ready", function () { orignW = $("#videoplayerModal").width() * 0.5-10; orignH = orignW * 9 / 16; $("#playerWrapper").height(orignH); smallW = 300; smallH = smallW * 9 / 16; $(content_navs).each(function (idx, ele) { $(ele).height(orignH); }); // togglePlayer togglePage $("#content_navs_ul li a").on("click", function (e) { var target = $(e.target).attr("href"); if (target != currentPage) { var isPlayerClick = (target == PLAYERCONTENT) ? true : false; // togglePlayer position if (isPlayerClick) { PAGEANIMATED = false; //$(PLAYERCONTENT).css("position", "relative"); $(PLAYERCONTENT).animate({ height: orignH, left: "-=" + (orignW - smallW) }, 800, function () { $('#JWPlayer_wrapper').animate({ width: orignW, height: orignH }, 400, function () { PAGEANIMATED = true; PLAYERSHOWSTATUS = true; }); //$('#content_navs_ul').animate({ // top: "-=" + smallH //}, 'fast'); }); } else { if (PLAYERSHOWSTATUS) { PAGEANIMATED = false; //$("#content_navs_ul").animate({ // top: "+=" + smallH //}, 'fast', function () { $("#JWPlayer_wrapper").animate({ width: smallW, height: smallH }, 400, function () { //$(PLAYERCONTENT).css("position", "absolute"); $(PLAYERCONTENT).animate({ height: smallH, left: "+=" + (orignW - smallW) }, 800, function () { PAGEANIMATED = true; PLAYERSHOWSTATUS = false; }) }) //}) } } } // toggle page }); $('#content_navs_ul li a[data-toggle="tab"]').on('shown', function (e) { //e.target // activated tab //e.relatedTarget // previous tab if (e.target != e.relatedTarget) { currentPage = $(e.target).attr("href"); var previousPage = $(e.relatedTarget).attr("href"); if (previousPage == PLAYERCONTENT) { $(PLAYERCONTENT).show(); } } }); $(document).on("hidden", '#socreItemWrapper', function (e) { e.stopPropagation(); }); $("#videoplayerModal").appendTo("body"); var aArray = $('.open-playerDialog'); if ($('.min-video-photo').length == 1) { $("#videoplayerModal .modal-foot").hide(); } $("#socrePanel").height($(".modal-body").height()); var currentIdx = -1; $("#nextVideo").on("click", function (e) { e.preventDefault(); nextNpreviewBtnClick = true; $("#videoplayerModal").trigger("hidden"); if (currentIdx != -1) { if (currentIdx != aArray.length - 1) { $(aArray[currentIdx + 1]).trigger("click"); } if (currentIdx + 1 == aArray.length - 1) { //$(e.target).toggleClass("hidden"); } } }); $("#preVideo").on("click", function (e) { e.preventDefault(); nextNpreviewBtnClick = true; $("#videoplayerModal").trigger("hidden"); if (currentIdx != -1) { if (currentIdx != 0) { $(aArray[currentIdx - 1]).trigger("click"); } if (currentIdx - 1 == 0) { // $(e.target).toggleClass("hidden"); } } }); $(document).on("click", ".open-playerDialog", function (e) { e.preventDefault(); currentIdx = $(aArray).index($(e.target)); LoadFrameAjax(this); }); function LoadFrameAjax(target) { var myBookId = $(target).data('guid'); $.ajax( { cache: false, type: "POST", url: Global.Site + "/Ajax.aspx?AVA.ResourcesPlatform.Ajax.ClientAjax.PVHistoryAdd", data: "PKId=" + myBookId + "&PVTarget=video&PVType=1", async: true, dataType: 'json', success: function (result) { }, beforeSend: function () { }, complete: function () { }, error: function (XMLHttpRequest, textStatus, errorThrown) { } }); var prams = "SubjectGuid=<%= this.Subject.Guid %>&VideoGuid=" + myBookId; Global.HtmlControl("<%= ControlPath("/SubjectPlay/SubjectPlaySTScoreItem_acrrodion")%>", prams, null, function (json) { if (json != null) { $("#socreItemWrapper").html(json.Html); } }); //???????? Global.HtmlControl("<%= ControlPath("/My/MySubjectSTVideoTotal")%>", prams, null, function (json) { if (json != null) { $("#scoreItemTotal").html(json.Html); } }); var prams1 = "VideoGuid=" + myBookId; Global.HtmlControl("<%= ControlPath("/VideoPlay/VideoPlaySWPattern")%>", prams1, null, function (json) { if (json != null) { $("#videoSWPatternWrapper").html(json.Html); } }); // ?????? = 2, //?????? = 3, //??? = 4, var prams1 = "VideoGuid=" + myBookId + "&Type=2"; Global.HtmlControl("<%= ControlPath("/VideoPlay/VideoPlayAttachment")%>", prams1, null, function (json) { if (json != null) { $("#videoAttachementWrapper").html(json.Html); setTimeout(function () { $("#videoAttachementWrapper #attachmentList .active a").trigger("click"); }, 30); } }); var prams1 = "VideoGuid=" + myBookId + "&Type=4"; Global.HtmlControl("<%= ControlPath("/VideoPlay/VideoPlayAttachment")%>", prams1, null, function (json) { if (json != null) { $("#VideoInfo").html(json.Html); setTimeout(function () { $("#VideoInfo #attachmentList .active a").trigger("click"); }, 30); } }); // Global.HtmlControl("<%= ControlPath("/SubjectPlay/SubjectVideoInfo")%>", prams1, null, function (json) { // if (json != null) { // $("#VideoInfo").html(json.Html); // } // }); Global.HtmlControl("<%= ControlPath("/SubjectPlay/SubjectPlayVideoScoreCommon")%>", prams, null, function (json) { if (json != null) { $("#STUserComments").html(json.Html); } }); var video = listWeike[myBookId]; $("#videoplayerModal #myModalLabel").html(video.name).attr("href", video.weburl); //jwplayer("JWPlayer").load([{ // file: video.nrurl, // image: video.image //}]); //jwplayer("JWPlayer").play(); var w = orignW, h = orignH; if (currentPage !== PLAYERCONTENT) { w = smallW; h = smallH; } else { w = orignW; h = orignH; } var hdurl = ""; var nrurlPrams = "VideoGuid=" + video.guid + "&UrlType=1"; //console.log(nrurlPrams); Global.HtmlControl("<%= ControlPath("/My/MySubjectSTVideoUrl")%>", nrurlPrams, null, function (json) { if (json != null) { video.nrurl = json.Html; //video.nrurl =" <%= Request.WebPath()+"/upload/Video/test/test.mp4"%>"; //console.log(video, json); jwplayer("JWPlayer").setup({ flashplayer: '<%= Request.WebPath()+"/Tools/JWPlayer/AvaPlayer.swf" %>', controlbar: 'bottom', autostart: false, repeat: 'always', // streamer: "start", file: video.nrurl, image: video.image, height: h, width: w, plugins: { viral: { onpause: false, oncomplete: false, allowmenu: false } } }); jwplayer("JWPlayer").play(); } }); } }); </script> <script type="text/javascript"> $("#MySubjectSTVideoData .trselall").click(function () { if (this.checked == true) { $("#MySubjectSTVideoData .trsel").attr("checked", "checked"); } else { $("#MySubjectSTVideoData .trsel").removeAttr("checked"); } }) function SelectMySubjectSTVideoAll() { var bool = $("#MySubjectSTVideoData .trselall").attr("checked"); bool = !bool; if (bool == true) { $("#MySubjectSTVideoData .trsel").attr("checked", "checked"); $("#MySubjectSTVideoData .trselall").attr("checked", "checked"); } else { $("#MySubjectSTVideoData .trsel").removeAttr("checked"); $("#MySubjectSTVideoData .trselall").removeAttr("checked"); } } </script> <div> <a onclick="SelectMySubjectSTVideoAll(); return false;" href="#">???? - ???</a> </div> <%= new PagerAjaxInstance(this) { RecordCount = this.Query.RecordCount, PageSize = this.Query.PageSize, PageIndex = this.Query.PageIndex, PageJsFn = WebUrl.MySubjectSTVideo(this.Subject.Guid, int.MaxValue,this.CategoryGuid, this.Name) }.ToHtml()%> </div>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de