Commit 424f5be22baf1a754113cb686d13b72cfb466c22

Authored by 张宗朋
1 parent cfef9d7e

jsp

src/main/webapp/pages/live/live_add.jsp
... ... @@ -42,7 +42,7 @@
42 42 </section>
43 43 <!-- Main content -->
44 44 <section class="content">
45   - <form id="create_form" enctype="multipart/form-data" method="post">
  45 + <form id="create_form" enctype="multipart/form-data" method="post" >
46 46 <div class="row">
47 47 <!-- right column -->
48 48 <div class="col-md-12">
... ... @@ -93,8 +93,8 @@
93 93 <div class="box box-warning">
94 94 <div class="box-body">
95 95 <div class="form-group">
96   - <select class="form-control" name="t_default_video_id"
97   - id="t_default_video_id">
  96 + <select class="form-control" name="live_room_id"
  97 + id="live_room_id">
98 98 <c:forEach var="item" items="${tRooms}"
99 99 varStatus="stat">
100 100 <option id="t_room_id_${item.id}" ${item.id==tLive.t_room_id ? 'selected="selected"':''} value="${item.id}">${item.name}</option>
... ... @@ -113,9 +113,8 @@
113 113 </div>
114 114 </div>
115 115 <div class="box-footer">
116   - <button type="button" id="t_activity_save_btn"
117   - name="t_activity_save_btn" onclick="toSubmit();"
118   - class="btn btn-success">
  116 + <button type="submit" id="t_activity_save_btn"
  117 + name="t_activity_save_btn" class="btn btn-success">
119 118 <i class="fa fa-save "></i> 保存
120 119 </button>
121 120 </div>
... ... @@ -135,21 +134,6 @@
135 134  
136 135 <script type="text/javascript">
137 136  
138   - $(document).on('ready', function() {
139   - $("#input-22").fileinput({
140   - previewFileType: "image",
141   - browseClass: "btn btn-success",
142   - browseLabel: "Pick Image",
143   - browseIcon: "<i class=\"glyphicon glyphicon-picture\"></i> ",
144   - removeClass: "btn btn-danger",
145   - removeLabel: "Delete",
146   - removeIcon: "<i class=\"glyphicon glyphicon-trash\"></i> ",
147   - uploadClass: "btn btn-info",
148   - uploadLabel: "Upload",
149   - uploadIcon: "<i class=\"glyphicon glyphicon-upload\"></i> "
150   - });
151   - });
152   -
153 137  
154 138 $(function () {
155 139 //Money Euro
... ... @@ -320,14 +304,49 @@
320 304 alert("已清空草稿箱")
321 305 }
322 306  
  307 + $(document).on('ready', function() {
  308 + $("#input-22").fileinput({
  309 + previewFileType : "image",
  310 + browseClass : "btn btn-success",
  311 + browseLabel : "Pick Image",
  312 + browseIcon : "<i class=\"glyphicon glyphicon-picture\"></i> ",
  313 + removeClass : "btn btn-danger",
  314 + removeLabel : "Delete",
  315 + removeIcon : "<i class=\"glyphicon glyphicon-trash\"></i> ",
  316 + uploadClass : "btn btn-info",
  317 + uploadLabel : "Upload",
  318 + uploadIcon : "<i class=\"glyphicon glyphicon-upload\"></i> "
  319 + });
  320 +
  321 + $(function() {
  322 + $('#create_form').ajaxForm({
  323 + type : 'post',
  324 + url : '../live/save',
  325 + enctype : 'multipart/form-data',
  326 + beforeSubmit : function() {
  327 + return true;
  328 + },
  329 + error : function(XMLHttpRequest, textStatus, errorThrown) {
  330 + alert("错误");
  331 + },
  332 + success : function(result) {
  333 + location.href = '../live/list/1';
  334 + }
  335 + });
  336 + });
  337 + });
323 338  
324   - $(function() {
  339 + /* $(function() {
325 340 $('#create_form').ajaxForm({
326 341 type : 'post',
327 342 url : '../live/save',
328 343 enctype : 'multipart/form-data',
329 344 beforeSubmit : function() {
330   - return true;
  345 + var cms_column_ref_id=$("#input-22").val();
  346 + if(cms_column_ref_id==''){
  347 + alert("请输入栏目名称,点击获取,然后选择!");
  348 + return false;
  349 + }
331 350 },
332 351 error : function(XMLHttpRequest, textStatus, errorThrown) {
333 352 alert("错误");
... ... @@ -337,7 +356,7 @@
337 356 }
338 357 });
339 358 });
340   -
  359 + */
341 360  
342 361 </script>
343 362 </body>
... ...
src/main/webapp/pages/live/live_management.jsp
... ... @@ -66,23 +66,33 @@
66 66 <c:forEach var="item" items="${tLive.recordList}"
67 67 varStatus="stat">
68 68 <tr>
69   - <td><a href="${BASE}/activity/preview/${item.id}">${item.title}</a>
  69 + <td><a href="${BASE}/live/preview/${item.id}">${item.title}</a>
70 70 </td>
71 71 <td><fmt:formatDate value="${item.start_time}"
72 72 pattern="yyyy-MM-dd HH:mm" /></td>
73 73 <td>${item.end_time}</td>
74 74 <td>
75   -
  75 + <c:if test="${item.t_status_id==0}">
  76 + <span class="badge bg-green">未开始</span>
  77 + </c:if> <c:if test="${item.t_status_id==1}">
  78 + <span class="badge bg-red">直播中</span>
  79 + </c:if> <c:if test="${item.t_status_id==2}">
  80 + <span class="badge">直播结束</span>
  81 + </c:if> <c:if test="${item.t_status_id==3}">
  82 + <span class="badge">回放同步中</span>
  83 + </c:if> <c:if test="${item.t_status_id==4}">
  84 + <span class="badge">同步完成</span>
  85 + </c:if>
76 86 </td>
77 87 <td>
78 88 <button class="btn btn-default btn-sm"
79   - onclick="t_activity_edit(${item.id});">
  89 + onclick="t_live_edit(${item.id});">
80 90 <i class="fa fa-edit"></i>
81 91 </button>
82 92 </td>
83 93 <td>
84 94 <button class="btn btn-danger btn-sm"
85   - onclick="t_activity_delete(${item.id});">
  95 + onclick="t_live_delete(${item.id});">
86 96 <i class="fa fa-close"></i>
87 97 </button>
88 98 </td>
... ...
src/main/webapp/pages/room/room_add.jsp
... ... @@ -100,7 +100,7 @@
100 100 $(function() {
101 101 $('#create_form').ajaxForm({
102 102 type : 'post',
103   - url : '../live/save',
  103 + url : '../room/add',
104 104 enctype : 'multipart/form-data',
105 105 beforeSubmit : function() {
106 106 return true;
... ... @@ -109,7 +109,7 @@
109 109 alert("错误");
110 110 },
111 111 success : function(result) {
112   - location.href = '../live/list/1';
  112 + location.href = '../room/list/1';
113 113 }
114 114 });
115 115 });
... ...
src/main/webapp/pages/room/room_management.jsp
... ... @@ -58,13 +58,13 @@
58 58 <td>${item.stream_name}</td>
59 59 <td>
60 60 <button class="btn btn-default btn-sm"
61   - onclick="t_channel_edit(${item.id});">
  61 + onclick="t_room_edit(${item.id});">
62 62 <i class="fa fa-edit"></i>
63 63 </button>
64 64 </td>
65 65 <td>
66 66 <button class="btn btn-danger btn-sm"
67   - onclick="t_channel_delete(${item.id});">
  67 + onclick="t_room_delete(${item.id});">
68 68 <i class="fa fa-close"></i>
69 69 </button>
70 70 </td>
... ...