imce.js.inc

  1. cis7 sites/all/modules/ulmus/imce/inc/imce.js.inc
  2. cle7 sites/all/modules/ulmus/imce/inc/imce.js.inc
  3. ecd7 sites/all/modules/ulmus/imce/inc/imce.js.inc
  4. elmsmedia7 sites/all/modules/ulmus/imce/inc/imce.js.inc
  5. harmony7 sites/all/modules/ulmus/imce/inc/imce.js.inc
  6. icor7 sites/all/modules/ulmus/imce/inc/imce.js.inc
  7. meedjum_blog7 sites/all/modules/ulmus/imce/inc/imce.js.inc
  8. mooc7 sites/all/modules/ulmus/imce/inc/imce.js.inc

Handles ajax file operations.

Functions

Namesort descending Description
imce_js_delete Ajax operation: delete
imce_js_navigate Ajax operation: navigate
imce_js_resize Ajax operation: resize
imce_js_thumb Ajax operation: thumbnails
imce_js_upload Ajax operation: upload
imce_process_fileop Process file operations form

File

sites/all/modules/ulmus/imce/inc/imce.js.inc
View source
  1. <?php
  2. /**
  3. * @file
  4. * Handles ajax file operations.
  5. */
  6. /**
  7. * Ajax operation: navigate
  8. */
  9. function imce_js_navigate(&$imce) {
  10. return array(
  11. 'files' => theme('imce_file_list', array('imce_ref' => array('imce' => &$imce))),
  12. 'dirsize' => format_size($imce['dirsize']),
  13. 'subdirectories' => array_map('rawurlencode', $imce['subdirectories']),
  14. 'perm' => $imce['perm']
  15. );
  16. }
  17. /**
  18. * Ajax operation: upload
  19. */
  20. function imce_js_upload(&$imce) {
  21. if ($imce['perm']['upload']) {
  22. $_POST['op'] = t('Upload');
  23. drupal_get_form('imce_upload_form', array('imce' => &$imce));
  24. return array('added' => isset($imce['added']) ? $imce['added'] : NULL, 'dirsize' => format_size($imce['dirsize']));
  25. }
  26. }
  27. /**
  28. * Ajax operation: thumbnails
  29. */
  30. function imce_js_thumb(&$imce) {
  31. if ($imce['perm']['thumb']) {
  32. $_POST['op'] = t('Create thumbnails');
  33. return imce_process_fileop($imce);
  34. }
  35. }
  36. /**
  37. * Ajax operation: delete
  38. */
  39. function imce_js_delete(&$imce) {
  40. if ($imce['perm']['delete']) {
  41. $_POST['op'] = t('Delete');
  42. return imce_process_fileop($imce);
  43. }
  44. }
  45. /**
  46. * Ajax operation: resize
  47. */
  48. function imce_js_resize(&$imce) {
  49. if ($imce['perm']['resize']) {
  50. $_POST['op'] = t('Resize');
  51. return imce_process_fileop($imce);
  52. }
  53. }
  54. /**
  55. * Process file operations form
  56. */
  57. function imce_process_fileop(&$imce) {
  58. drupal_get_form('imce_fileop_form', array('imce' => &$imce));
  59. return array('added' => isset($imce['added']) ? $imce['added'] : NULL, 'removed' => isset($imce['removed']) ? $imce['removed'] : NULL, 'dirsize' => format_size($imce['dirsize']));
  60. }
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.