Commit befde78daa598f0301163d3c781a112bc9e5dcf7

Authored by 王言钊
1 parent 75914104

活动管理优化1

src/main/resources/templates/page/activity.html
@@ -95,7 +95,7 @@ @@ -95,7 +95,7 @@
95 <div class="box-body"> 95 <div class="box-body">
96 <div class="btn-group margin-bottom " style="padding: 0; width: 98%; float: right;"> 96 <div class="btn-group margin-bottom " style="padding: 0; width: 98%; float: right;">
97 <div class="columns columns-right btn-group "> 97 <div class="columns columns-right btn-group ">
98 - <button class="btn btn-success" onclick="javascript:add(0)" type="button" 98 + <button class="btn btn-success" onclick="javascript:add()" type="button"
99 name="refresh" title="添加" id="email_addS">添加 99 name="refresh" title="添加" id="email_addS">添加
100 </button> 100 </button>
101 </div> 101 </div>
@@ -116,12 +116,11 @@ @@ -116,12 +116,11 @@
116 <label for="sp_id" class="control-label cb-toolbar" 116 <label for="sp_id" class="control-label cb-toolbar"
117 style="font-size: 15px; top: 8px; font-weight: 100;">是否审核:</label> 117 style="font-size: 15px; top: 8px; font-weight: 100;">是否审核:</label>
118 <div class="col-sm-7" style="padding: 0;"> 118 <div class="col-sm-7" style="padding: 0;">
119 -  
120 <select class="form-control" id="exempt_from_trial_query" 119 <select class="form-control" id="exempt_from_trial_query"
121 name="exempt_from_trial"> 120 name="exempt_from_trial">
122 - <option value="" name="-全部审免类型-" th:selected="selected">-全部审核类型-</option>  
123 - <option value="0" name="未审核">未审免</option>  
124 - <option value="1" name="已经审核">已经审免</option> 121 + <option value="" th:selected="selected">--全部审免类型--</option>
  122 + <option value="0" name="未审核" th:selected="${shyActivity.exempt_from_trial}==0" >未审免</option>
  123 + <option value="1" name="已经审核" th:selected="${shyActivity.exempt_from_trial}==1" >已经审免</option>
125 </select> 124 </select>
126 </div> 125 </div>
127 </div> 126 </div>
@@ -337,10 +336,10 @@ @@ -337,10 +336,10 @@
337 <div class="modal-body"> 336 <div class="modal-body">
338 <form action="/activity/add" method="post" id="editWrite1"> 337 <form action="/activity/add" method="post" id="editWrite1">
339 <input type="text" name="redirect_url" value="" class="hide" id="redirect_url1"/> 338 <input type="text" name="redirect_url" value="" class="hide" id="redirect_url1"/>
340 - <div class="form-group hide">  
341 - <label class="control-label col-sm-3" style="font-size: 15px;">Id:</label> 339 + <div class="form-group">
  340 + <label class="control-label col-sm-3" style="font-size: 15px;">活动ID:</label>
342 <div class="col-sm-9" style="margin-top: -5px;margin-bottom: 20px;"> 341 <div class="col-sm-9" style="margin-top: -5px;margin-bottom: 20px;">
343 - <input class="form-control" style="width:30%;" type="text" value="" id="id1" name="id"> 342 + <input class="form-control" style="width:40%;" type="text" value="" id="id1" name="id">
344 </div> 343 </div>
345 </div> 344 </div>
346 <div class="form-group"> 345 <div class="form-group">
@@ -351,14 +350,6 @@ @@ -351,14 +350,6 @@
351 </div> 350 </div>
352 </div> 351 </div>
353 352
354 - <div class="form-group">  
355 - <label class="control-label col-sm-3" style="font-size: 15px;">审核类型:</label>  
356 - <div class="col-sm-9" style="margin-top: -5px;margin-bottom: 20px;">  
357 - <input class="form-control" style="width:40%;" type="text" value="0"  
358 - id="exempt_from_trial1"  
359 - name="exempt_from_trial">  
360 - </div>  
361 - </div>  
362 353
363 </form> 354 </form>
364 </div> 355 </div>
@@ -375,9 +366,9 @@ @@ -375,9 +366,9 @@
375 <script> 366 <script>
376 // 添加事件 367 // 添加事件
377 function submitAdd() { 368 function submitAdd() {
  369 + var id1 = $("#id1").val();
378 var activity1 = $("#activity1").val(); 370 var activity1 = $("#activity1").val();
379 - var exempt_from_trial1 = $("#exempt_from_trial1").val();  
380 - $.post("/activity/add?activity=" + activity1 + "&exempt_from_trial=" + exempt_from_trial1, function (data) { 371 + $.post("/activity/add?id=" + id1 + "&activity=" + activity1, function (data) {
381 if (data.errorCode == 0) { 372 if (data.errorCode == 0) {
382 alert(data.errorMessage); 373 alert(data.errorMessage);
383 location.href = location.href; 374 location.href = location.href;
@@ -416,12 +407,10 @@ @@ -416,12 +407,10 @@
416 } 407 }
417 408
418 //打开添加窗口 409 //打开添加窗口
419 - function add(exempt_from_trial) {  
420 - $("#id1").val("");  
421 - $("#activity1").val(""); 410 + function add() {
  411 + $("#id1").val();
  412 + $("#activity1").val();
422 $("#activity1").removeAttr("readonly"); 413 $("#activity1").removeAttr("readonly");
423 - $("#exempt_from_trial1").val(exempt_from_trial);  
424 - $("#exempt_from_trial1").attr("readonly", "true");  
425 $(".write_check input").prop("checked", false); 414 $(".write_check input").prop("checked", false);
426 $("#redirect_url1").val(location.pathname + location.search); 415 $("#redirect_url1").val(location.pathname + location.search);
427 $("#myModalLabel1").text("添加活动名称"); 416 $("#myModalLabel1").text("添加活动名称");
src/main/resources/templates/page/video.html
@@ -146,10 +146,7 @@ @@ -146,10 +146,7 @@
146 th:value="${activitys.id}" 146 th:value="${activitys.id}"
147 th:text="${activitys.activity}"> 147 th:text="${activitys.activity}">
148 </option> 148 </option>
149 -  
150 </select> 149 </select>
151 -  
152 - <!--< input class="form-control" name="video_priority" type="text" id="video_priority">-->  
153 </div> 150 </div>
154 </div> 151 </div>
155 </div> 152 </div>