browser.class.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. /**
  3. * "Media Browser" controller
  4. */
  5. class MediaBrowserManagerController extends modManagerController
  6. {
  7. /**
  8. * @inherit
  9. */
  10. public function checkPermissions()
  11. {
  12. return $this->modx->hasPermission('file_manager');
  13. }
  14. /**
  15. * Register custom CSS/JS for the page
  16. *
  17. * @return void
  18. */
  19. public function loadCustomCssJs()
  20. {
  21. // $mgrUrl = $this->modx->getOption('manager_url', null, MODX_MANAGER_URL);
  22. // $this->addJavascript($mgrUrl . 'assets/modext/widgets/media/browser.js');
  23. $this->addHtml(
  24. <<<HTML
  25. <script type="text/javascript">
  26. // <![CDATA[
  27. Ext.onReady(function() {
  28. Ext.getCmp('modx-layout').hideLeftbar(true, false);
  29. MODx.add('modx-media-view');
  30. });
  31. // ]]>
  32. </script>
  33. HTML
  34. );
  35. }
  36. /**
  37. * @inherit
  38. */
  39. public function process(array $scriptProperties = array())
  40. {
  41. return array();
  42. }
  43. /**
  44. * @inherit
  45. */
  46. public function getPageTitle()
  47. {
  48. return $this->modx->lexicon('modx_browser');
  49. }
  50. /**
  51. * @inherit
  52. */
  53. public function getTemplateFile()
  54. {
  55. return '';
  56. }
  57. /**
  58. * @inherit
  59. */
  60. public function getLanguageTopics()
  61. {
  62. return array('file');
  63. }
  64. }