up_my_video.html
4.96 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<include file="public/layout"/>
<style type="text/css">
.select {
height: 31px;line-height: 31px;width: 180px;vertical-align: top
}
.title_div{ height: 60px; border-bottom: 1px gainsboro solid; line-height: 60px; padding: 0 20px}
.title_div span{width: 80px; display:inline-block; height: 59px; text-align: center;
font-weight: bold; color: #666 }
.title_div span.on{ border-bottom: 2px blue solid; }
.sear_div{text-align: right; padding: 10px; }
.result{ padding: 0 10px; margin-top: 10px}
.item_div{border: 1px solid gainsboro; display: inline-block; position: relative;
margin-left: 20px; margin-bottom: 10px;
width: 270px; height: 60px;}
.item_div img{ width: 40px; height: 40px; margin: 10px; margin-right: 40px}
.item_div.on{
border: 1px solid blue;
}
.box_div{
display: inline-block; vertical-align: top; margin-top: 10px;
max-width: 100px;
overflow: hidden;
}
.fr_div{text-align: right; float: right; margin-right: 10px}
.box_div p{ margin-bottom: 15px}
body{min-width: 600px}
.bottom-btn{position: absolute; right: 20px; bottom: 20px;width: 400px;text-align: right }
.item_div img.sele_gou{width: 20px;height: 20px; position: absolute; right: 0; bottom: 0; margin: 0; display: none }
.item_div.on img.sele_gou{display: block}
.mlayerbox{
display: none;width: 100%;text-align: center; margin-top:20px ;
}
.input_btn{
vertical-align: top;
letter-spacing: normal;
display: inline-block;
*display: inline;
padding-right: 8px;
margin-left: 8px;
margin-right: -1px;
*zoom: 1;
cursor: pointer;
}
.input_btn div {
font-size: 12px;
line-height: 24px;
color: #ff3c3c;
background-color: #FFFFFF;
height: 24px;
padding: 2px 7px;
border: solid 1px #ff3c3c;
border-radius: 4px;
}
.eli_p{ overflow: hidden; text-overflow: ellipsis;white-space:nowrap;}
</style>
<body>
<!--标题-->
<div class="title_div">
<span onclick="go_url(1)" <if condition="ACTION_NAME=='up_my_video'"> class="on" </if>>我的视频</span>
<span onclick="go_url(2)" <if condition="ACTION_NAME=='up_load_video'"> class="on" </if>>本地上传</span>
</div>
<!--按钮搜索层-->
<div class="sear_div">
<div class="flexigrid">
<select name="group_id" id="group_id" class="select" onkeydown="strkeydown(event, this, 'submitBtn')">
<option value="">选择分组</option>
<foreach name="grpList" item="v" key="k">
<option value="{$v['id']}">{$v['gpname']}</option>
</foreach>
</select>
<div class="sDiv2">
<input size="30" name="keywords" value="{$keywords}"class="qsbox" id="keywords" placeholder="搜索视频" type="text">
<input id="submitBtn" class="btn" value="搜索" type="submit" onclick="search_video()">
</div>
</div>
</div>
<!--显示层-->
<div class="result"></div>
<!-- 确认提交-->
<div class="ncap-form-default bottom-btn">
<div class="bot">
<a href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" id="sumbbtn" onClick="ajax_submit_form()">确认</a>
</div>
</div>
</body>
<script>
//--上传的视频--
var sele_url="";
var sele_img="";
var sele_id="";
var cur_page=1;
function set_sele(ob) {
sele_url=$(ob).attr("video_url");
sele_img= $(ob).attr("video_img");
sele_id= $(ob).attr("video_id");
$(ob).addClass("on").siblings().removeClass("on");
}
//--确认选择图片,并返回视频路径和图片路径--
function ajax_submit_form() {
if(sele_url==""){ layer.msg('请选择图片', {icon: 1});}
javascript:window.parent.call_back_video(sele_url,sele_img,sele_id);
}
function go_url(ind) {
if(ind==1){
window.location.href="/index.php/admin/Uploadify/up_my_video"
}else {
window.location.href="/index.php//admin/Uploadify/up_load_video"
}
}
// 点击分页触发的事件
$(".pagination a").click(function () {
cur_page = $(this).data('p');
ajax_get_table(cur_page);
});
$(document).ready(function () {
ajax_get_table(cur_page);
});
//ajax获取列表
function ajax_get_table(p) {
var groupid=$("#group_id").val();
var keywords=$("#keywords").val();
var op=layer.msg('加载中...', {icon: 16,shade: [0.5, '#f5f5f5'],scrollbar: false,offset: '10px', time:100000}) ;
$.ajax({
url: "/index.php?m=Admin&c=Uploadify&a=up_my_video&is_ajax=1&p=" + p,
data:{groupid:groupid,keywords:keywords},
success: function (v) {
$(".result").html(v);
layer.close(op);
}
});
}
//--弹起新增分组--
function add_group() {
layer.open({
type: 1,
title: ["新增分组", 'font-size:14px;'],
skin: 'layui-layer-rim', //加上边框
area: ['350px', '120px'], //宽高
content: $('.mlayerbox'),
});
}
//搜索视频
function search_video() {
g_cur_page=1;
ajax_get_table(g_cur_page);
}
</script>
</html>