Guest User

Untitled

a guest
Oct 20th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. <select class="form-control" name="status" id="${imageId}">
  2. <option value="APPROVED">Approved</option>
  3. <option value="REJECTED">Rejected</option>
  4. <option value="PENDING">Pending</option>
  5. </select>
  6. Reason : <span style="float: right;">
  7. <select class="form-control" name="status">
  8. <option value="Animal" id="animal">Animal</option>
  9. <option value="Bad" id="bad">Bad</option>
  10. <option value="Baby" id="baby">Baby</option>
  11. <option value="Celebrity" id="celebrity">Celebrity</option>
  12. <option value="Flower" id="flower">Flower</option>
  13. <option value="God" id="god">God</option>
  14. <option value="Good" id="good">Good</option>
  15. <option value="Others" id="others">Others</option>
  16. </select>
  17. </span>
  18.  
  19. $('#allPhotoFormBtn').on(
  20. "click",
  21. function(event) {
  22. event.preventDefault();
  23. var allCheckBox = document.querySelectorAll('.status');
  24. var data = [];
  25. $(allCheckBox).each(
  26. function(index) {
  27. if ($(this).is(':checked')) {
  28. var status = $(
  29. $(this).parent().parent().prev())
  30. .val();
  31. data.push($(this).val().replace("status=",
  32. "status=" + status));
  33. }
  34. });
  35. $.ajax({
  36. url : "/curation/updateAll",
  37. data : {
  38. 'data' : data.join(',')
  39. },
  40. type : "POST",
  41. success : function(response) {
  42. if (response)
  43. location.reload();
  44. },
  45. error : function(rs) {
  46. console.log(rs);
  47. }
  48. })
  49. });
Add Comment
Please, Sign In to add comment