Commit 424f5be22baf1a754113cb686d13b72cfb466c22
1 parent
cfef9d7e
jsp
Showing
4 changed files
with
61 additions
and
32 deletions
src/main/webapp/pages/live/live_add.jsp
| @@ -42,7 +42,7 @@ | @@ -42,7 +42,7 @@ | ||
| 42 | </section> | 42 | </section> |
| 43 | <!-- Main content --> | 43 | <!-- Main content --> |
| 44 | <section class="content"> | 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 | <div class="row"> | 46 | <div class="row"> |
| 47 | <!-- right column --> | 47 | <!-- right column --> |
| 48 | <div class="col-md-12"> | 48 | <div class="col-md-12"> |
| @@ -93,8 +93,8 @@ | @@ -93,8 +93,8 @@ | ||
| 93 | <div class="box box-warning"> | 93 | <div class="box box-warning"> |
| 94 | <div class="box-body"> | 94 | <div class="box-body"> |
| 95 | <div class="form-group"> | 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 | <c:forEach var="item" items="${tRooms}" | 98 | <c:forEach var="item" items="${tRooms}" |
| 99 | varStatus="stat"> | 99 | varStatus="stat"> |
| 100 | <option id="t_room_id_${item.id}" ${item.id==tLive.t_room_id ? 'selected="selected"':''} value="${item.id}">${item.name}</option> | 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,9 +113,8 @@ | ||
| 113 | </div> | 113 | </div> |
| 114 | </div> | 114 | </div> |
| 115 | <div class="box-footer"> | 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 | <i class="fa fa-save "></i> 保存 | 118 | <i class="fa fa-save "></i> 保存 |
| 120 | </button> | 119 | </button> |
| 121 | </div> | 120 | </div> |
| @@ -135,21 +134,6 @@ | @@ -135,21 +134,6 @@ | ||
| 135 | 134 | ||
| 136 | <script type="text/javascript"> | 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 | $(function () { | 138 | $(function () { |
| 155 | //Money Euro | 139 | //Money Euro |
| @@ -320,14 +304,49 @@ | @@ -320,14 +304,49 @@ | ||
| 320 | alert("已清空草稿箱") | 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 | $('#create_form').ajaxForm({ | 340 | $('#create_form').ajaxForm({ |
| 326 | type : 'post', | 341 | type : 'post', |
| 327 | url : '../live/save', | 342 | url : '../live/save', |
| 328 | enctype : 'multipart/form-data', | 343 | enctype : 'multipart/form-data', |
| 329 | beforeSubmit : function() { | 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 | error : function(XMLHttpRequest, textStatus, errorThrown) { | 351 | error : function(XMLHttpRequest, textStatus, errorThrown) { |
| 333 | alert("错误"); | 352 | alert("错误"); |
| @@ -337,7 +356,7 @@ | @@ -337,7 +356,7 @@ | ||
| 337 | } | 356 | } |
| 338 | }); | 357 | }); |
| 339 | }); | 358 | }); |
| 340 | - | 359 | + */ |
| 341 | 360 | ||
| 342 | </script> | 361 | </script> |
| 343 | </body> | 362 | </body> |
src/main/webapp/pages/live/live_management.jsp
| @@ -66,23 +66,33 @@ | @@ -66,23 +66,33 @@ | ||
| 66 | <c:forEach var="item" items="${tLive.recordList}" | 66 | <c:forEach var="item" items="${tLive.recordList}" |
| 67 | varStatus="stat"> | 67 | varStatus="stat"> |
| 68 | <tr> | 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 | </td> | 70 | </td> |
| 71 | <td><fmt:formatDate value="${item.start_time}" | 71 | <td><fmt:formatDate value="${item.start_time}" |
| 72 | pattern="yyyy-MM-dd HH:mm" /></td> | 72 | pattern="yyyy-MM-dd HH:mm" /></td> |
| 73 | <td>${item.end_time}</td> | 73 | <td>${item.end_time}</td> |
| 74 | <td> | 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 | </td> | 86 | </td> |
| 77 | <td> | 87 | <td> |
| 78 | <button class="btn btn-default btn-sm" | 88 | <button class="btn btn-default btn-sm" |
| 79 | - onclick="t_activity_edit(${item.id});"> | 89 | + onclick="t_live_edit(${item.id});"> |
| 80 | <i class="fa fa-edit"></i> | 90 | <i class="fa fa-edit"></i> |
| 81 | </button> | 91 | </button> |
| 82 | </td> | 92 | </td> |
| 83 | <td> | 93 | <td> |
| 84 | <button class="btn btn-danger btn-sm" | 94 | <button class="btn btn-danger btn-sm" |
| 85 | - onclick="t_activity_delete(${item.id});"> | 95 | + onclick="t_live_delete(${item.id});"> |
| 86 | <i class="fa fa-close"></i> | 96 | <i class="fa fa-close"></i> |
| 87 | </button> | 97 | </button> |
| 88 | </td> | 98 | </td> |
src/main/webapp/pages/room/room_add.jsp
| @@ -100,7 +100,7 @@ | @@ -100,7 +100,7 @@ | ||
| 100 | $(function() { | 100 | $(function() { |
| 101 | $('#create_form').ajaxForm({ | 101 | $('#create_form').ajaxForm({ |
| 102 | type : 'post', | 102 | type : 'post', |
| 103 | - url : '../live/save', | 103 | + url : '../room/add', |
| 104 | enctype : 'multipart/form-data', | 104 | enctype : 'multipart/form-data', |
| 105 | beforeSubmit : function() { | 105 | beforeSubmit : function() { |
| 106 | return true; | 106 | return true; |
| @@ -109,7 +109,7 @@ | @@ -109,7 +109,7 @@ | ||
| 109 | alert("错误"); | 109 | alert("错误"); |
| 110 | }, | 110 | }, |
| 111 | success : function(result) { | 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,13 +58,13 @@ | ||
| 58 | <td>${item.stream_name}</td> | 58 | <td>${item.stream_name}</td> |
| 59 | <td> | 59 | <td> |
| 60 | <button class="btn btn-default btn-sm" | 60 | <button class="btn btn-default btn-sm" |
| 61 | - onclick="t_channel_edit(${item.id});"> | 61 | + onclick="t_room_edit(${item.id});"> |
| 62 | <i class="fa fa-edit"></i> | 62 | <i class="fa fa-edit"></i> |
| 63 | </button> | 63 | </button> |
| 64 | </td> | 64 | </td> |
| 65 | <td> | 65 | <td> |
| 66 | <button class="btn btn-danger btn-sm" | 66 | <button class="btn btn-danger btn-sm" |
| 67 | - onclick="t_channel_delete(${item.id});"> | 67 | + onclick="t_room_delete(${item.id});"> |
| 68 | <i class="fa fa-close"></i> | 68 | <i class="fa fa-close"></i> |
| 69 | </button> | 69 | </button> |
| 70 | </td> | 70 | </td> |