upload.vm
4.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
$page.setTitle("视频管理")
<script type="text/javascript" src="$ebusinessContent.getURI("vendor/crypto1/crypto/crypto.js")"></script>
<script type="text/javascript" src="$ebusinessContent.getURI("vendor/crypto1/hmac/hmac.js")"></script>
<script type="text/javascript" src="$ebusinessContent.getURI("vendor/crypto1/sha1/sha1.js")"></script>
<script type="text/javascript" src="$ebusinessContent.getURI("vendor/base64/base64.js")"></script>
<script type="text/javascript" src="$ebusinessContent.getURI("vendor/plupload-2.1.2/js/plupload.full.min.js")"></script>
#*<div class="xn-breadcrumb xn-width auto clearfix " ng-init="schoolId = '$pUser.schoolId'">
<ul class="breadcrumb">
<li><a class="icon icon-home_page" href="$backendLink.setTarget("index")"></a></li>
<li><a href="$backendLink.setTarget("video/index.htm")">视频</a> </li>
<li class="active">上传</li>
</ul>
</div>*#
<div class=" xn-width auto xn-main xn-commodity-page clearfix" ng-controller="VideoUploadController" >
<!--搜索部分-->
<div class="xn-search clearfix">
<form class="form-horizontal clearfix xn-form" name="searchForm" xn-form-validate novalidate role="form">
<div class="col-sm-12 top">
<div class="col-sm-5 buttons col-sm-offset-7">
<button class="btn btn-primary search" ng-click="upload()" ng-show="videos.length > 0">上传</button>
<button id="pickfiles" name="pickfiles" class="btn btn-normal add">增加</button>
<button class="btn btn-normal add" ng-if="show=='list'" ng-click="changeList()">已上传视频</button>
<button class="btn btn-normal add" ng-if="show=='online'" ng-click="changeList()">上传列表</button>
</div>
</div>
</form>
</div>
<span id="ossfile">
你的浏览器不支持flash,Silverlight或者HTML5!
</span>
<div class="" id="container" >
<table class="table table-bordered">
<thead>
<tr>
<th class="xn-text-center xn-col-sm-8">视频名称</th>
<th class="xn-text-center xn-col-sm-3 xn-center">格式</th>
<th class="xn-text-center xn-col-sm-6 xn-center">文件大小</th>
<th class="xn-text-center xn-col-sm-10 xn-center">状态</th>
</tr>
</thead>
<tbody id="tbody">
<tr ng-repeat="video in videos">
<td>{{video.fileName}}</td>
<td class="xn-center">{{video.type}}</td>
<td class="xn-center">{{video.size | fileSize}}</td>
<td class="xn-text-center" ng-show="video.percent">
{{video.status | videoStatusType}}【{{video.percent}}%】
</td>
<td class="xn-text-center" ng-show="!video.percent">
{{video.status | videoStatusType}}
</td>
</tr>
</tbody>
</table>
<span id="console"></span>
<div class="clearfix"></div>
<div class="f-left mt-20 mb-10">共{{list.totalCount}}个</div>
<div class="f-left mt-20 mb-10 ml-10">总大小:{{list.totalSize }}</div>
<div class="f-left mt-20 mb-10 ml-10" ng-show="list.sha > 0">计算SHA中:{{list.sha}}</div>
<div class="f-left mt-20 mb-10 ml-10" ng-show="list.wait > 0">等待上传:{{list.wait}}</div>
<div id="uploading" class="f-left mt-20 mb-10 ml-10" ng-show="list.uploading > 0">上传中:{{list.uploading}}</div>
<div class="f-left mt-20 mb-10 ml-10" ng-show="list.fail > 0">失败数量:{{list.fail}}</div>
<div class="f-left mt-20 mb-10 ml-10" ng-show="list.done > 0">完成数量:{{list.done}}</div>
</div>
</div>
<script type="text/javascript">
window.onbeforeunload = function checkLeave(e) {
var status = $("#uploading").css("display");
console.log(status);
if(status != "none") {
var evt = e ? e : (window.event ? window.event : null);
if (evt) {
evt.returnValue = "您的视频还在上传中,确认离开吗?";
}
}
};
</script>