Source for file filebrowser.act.php

Documentation is available at filebrowser.act.php

  1. <?php
  2. /**
  3. * @package polyphony.AbstractActions
  4. *
  5. * @copyright Copyright &copy; 2005, Middlebury College
  6. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  7. *
  8. * @version $Id: filebrowser.act.php,v 1.2 2007/09/19 14:04:55 adamfranco Exp $
  9. */
  10.  
  11. /**
  12. * This class is the most simple abstraction of an action. It provides a structure
  13. * for common methods
  14. *
  15. * @package polyphony.AbstractActions
  16. *
  17. * @copyright Copyright &copy; 2005, Middlebury College
  18. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  19. *
  20. * @version $Id: filebrowser.act.php,v 1.2 2007/09/19 14:04:55 adamfranco Exp $
  21. * @since 4/28/05
  22. */
  23. class filebrowserAction
  24. extends Action
  25. {
  26. /**
  27. * Check Authorizations
  28. *
  29. * @return boolean
  30. * @access public
  31. * @since 4/26/05
  32. */
  33. function isAuthorizedToExecute () {
  34. return true;
  35. }
  36. /**
  37. * Return the heading text for this action, or an empty string.
  38. *
  39. * @return string
  40. * @access public
  41. * @since 4/26/05
  42. */
  43. function getHeadingText () {
  44. return _('File Browser');
  45. }
  46. /**
  47. * Execute this action.
  48. *
  49. * @return mixed
  50. * @access public
  51. * @since 4/25/05
  52. */
  53. function execute () {
  54. $title = $this->getHeadingText();
  55. $nodeId = RequestContext::value('node');
  56. $POLYPHONY_PATH = POLYPHONY_PATH;
  57. $MYPATH = MYPATH;
  58. print <<<END
  59.  
  60.  
  61. <html>
  62. <head>
  63. <title>$title</title>
  64.  
  65. END;
  66. require(POLYPHONY_DIR."/main/library/Harmoni.js.inc.php");
  67.  
  68. print <<< END
  69. <script type='text/javascript' src='$POLYPHONY_PATH/javascript/CenteredPanel.js'></script>
  70. <script type='text/javascript' src='$POLYPHONY_PATH/javascript/TabbedContent.js'></script>
  71. <script type='text/javascript' src='$POLYPHONY_PATH/javascript/prototype.js'></script>
  72. <script type='text/javascript' src='$POLYPHONY_PATH/javascript/js_quicktags.js'></script>
  73. <script type='text/javascript' src='$MYPATH/javascript/MediaLibrary.js'></script>
  74. <link rel='stylesheet' type='text/css' href='$MYPATH/javascript/MediaLibrary.css'/>
  75. <script type='text/javascript'>
  76. // <![CDATA[
  77. MediaLibrary.prototype.onClose = function () {
  78. window.close();
  79. }
  80. // ]]>
  81. </script>
  82. </head>
  83. <body onload="this.onUse = function (mediaFile) { window.opener.SetUrl(mediaFile.getUrl());}; MediaLibrary.run('$nodeId', this); ">
  84. </body>
  85. </html>
  86.  
  87.  
  88. END;
  89. exit;
  90. }
  91. }

Documentation generated on Wed, 19 Sep 2007 10:23:08 -0400 by phpDocumentor 1.3.0RC3