moveextfiles.ui.js 889 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. $(function()
  2. {
  3. $('.extfiles').css('height', window.innerHeight - (result == 'success' ? 300 : 180));
  4. });
  5. /**
  6. * Click all checkbox.
  7. *
  8. * @param event $event
  9. * @access public
  10. * @return void
  11. */
  12. function checkAllClick(event)
  13. {
  14. var checked = $(event.target).prop('checked');
  15. $("[name^='files']").prop('checked', checked);
  16. }
  17. /**
  18. * Click file checkbox.
  19. *
  20. * @param event $event
  21. * @access public
  22. * @return void
  23. */
  24. function checkFileClick(event)
  25. {
  26. if($(event.target).prop('checked'))
  27. {
  28. $('#checkAll').prop('checked', $("[name^='files']:checked").length == $("[name^='files']").length);
  29. }
  30. else
  31. {
  32. $('#checkAll').prop('checked', false);
  33. }
  34. }
  35. window.submit = function()
  36. {
  37. const formUrl = $('#moveExtFileForm').attr('action');
  38. const formData = new FormData($("#moveExtFileForm")[0]);
  39. postAndLoadPage(formUrl, formData);
  40. }