elfinder.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function ($, undefined, Backend, Table, Form, Template) {
  2. });
  3. define('elFinderConfig', {
  4. // elFinder options (REQUIRED)
  5. // Documentation for client options:
  6. // https://github.com/Studio-42/elFinder/wiki/Client-configuration-options
  7. defaultOpts: {
  8. url: 'php/connector.minimal.php' // connector URL (REQUIRED)
  9. , commandsOptions: {
  10. edit: {
  11. extraOptions: {
  12. // set API key to enable Creative Cloud image editor
  13. // see https://console.adobe.io/
  14. creativeCloudApiKey: '',
  15. // browsing manager URL for CKEditor, TinyMCE
  16. // uses self location with the empty value
  17. managerUrl: ''
  18. }
  19. }
  20. , quicklook: {
  21. // to enable preview with Google Docs Viewer
  22. googleDocsMimes: ['application/pdf', 'image/tiff', 'application/vnd.ms-office', 'application/msword', 'application/vnd.ms-word', 'application/vnd.ms-excel', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']
  23. }
  24. }
  25. // bootCalback calls at before elFinder boot up
  26. , bootCallback: function (fm, extraObj) {
  27. /* any bind functions etc. */
  28. fm.bind('init', function () {
  29. // any your code
  30. });
  31. // for example set document.title dynamically.
  32. var title = document.title;
  33. fm.bind('open', function () {
  34. var path = '',
  35. cwd = fm.cwd();
  36. if (cwd) {
  37. path = fm.path(cwd.hash) || null;
  38. }
  39. document.title = path ? path + ':' + title : title;
  40. }).bind('destroy', function () {
  41. document.title = title;
  42. });
  43. }
  44. },
  45. managers: {
  46. // 'DOM Element ID': { /* elFinder options of this DOM Element */ }
  47. 'elfinder': {}
  48. }
  49. });