docview.js 578 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * Ajax delete doc.
  3. *
  4. * @param string $link
  5. * @param int $replaceID
  6. * @param string $notice
  7. * @access public
  8. * @return void
  9. */
  10. function ajaxDeleteDoc(link, replaceID, notice)
  11. {
  12. if(confirm(notice))
  13. {
  14. $.get(link, function(data)
  15. {
  16. location.href = JSON.parse(data).locate;
  17. })
  18. }
  19. }
  20. /**
  21. * Delete a file.
  22. *
  23. * @param int $fileID
  24. * @access public
  25. * @return void
  26. */
  27. function deleteFile(fileID)
  28. {
  29. if(!fileID) return;
  30. hiddenwin.location.href = createLink('file', 'delete', 'fileID=' + fileID);
  31. }