/**
  * Constructor.
  */
 function __construct($id, $page)
 {
     parent::__construct($id, $page);
     $this->containerClass = 'PhocoaDialog';
     $this->moduleView = NULL;
     $this->deferModuleViewLoading = false;
     $this->cacheModuleView = false;
     $this->inline = false;
     $this->yuiloader()->addModule('phocoaDialog', 'js', NULL, WFWebApplication::webDirPath(WFWebApplication::WWW_DIR_FRAMEWORK) . '/js/yahoo-phocoa-min.js', array('connection', 'container', 'dragdrop', 'selector'), NULL, NULL, NULL);
     $this->yuiloader()->yuiRequire("phocoaDialog");
 }
Ejemplo n.º 2
0
 public function localYUI()
 {
     return WFWebApplication::webDirPath(WFWebApplication::WWW_DIR_FRAMEWORK) . '/yui/';
 }
Ejemplo n.º 3
0
 /**
  *  Get a relative URL path to the public www dir for graphics for this widget.
  *
  *  @return string The URL to directory containing www items for this widget.
  */
 function getWidgetWWWDir()
 {
     return WFWebApplication::webDirPath(WFWebApplication::WWW_DIR_FRAMEWORK) . '/widgets/' . get_class($this);
 }
Ejemplo n.º 4
0
    function render($blockContent = NULL)
    {
        // craft a WFRPC that we can insert into the form stream to have our callback fire
        $rpc = WFRPC::RPC()->setInvocationPath($this->page->module()->invocation()->invocationPath())->setTarget('#page#' . $this->id)->setAction('handleUploadedFile')->setForm($this)->setIsAjax(true);
        return '
<applet name="postlet" code="Main.class" archive="' . $this->getWidgetWWWDir() . '/postlet.jar" width="305" height="200" mayscript="mayscript">
    <param name = "uploadparametername"      value = "' . $this->id . '" />
    <param name = "additionalformparameters" value = "' . http_build_query($rpc->rpcAsParameters($this), '', '&amp;') . '" />

    ' . ($this->dropimage ? '<param name = "dropimage"       value = "' . $this->baseurl . $this->dropimage . '"/>' : NULL) . '
    ' . ($this->dropimageupload ? '<param name = "dropimageupload"       value = "' . $this->baseurl . $this->dropimageupload . '"/>' : NULL) . '

    <param name = "maxthreads"      value = "' . $this->maxthreads . '" />
    <param name = "destination"     value = "' . $this->baseurl . '/' . $this->page->module()->invocation()->invocationPath() . '" />
    ' . ($this->backgroundcolour ? '<param name = "backgroundcolour" value = "' . $this->backgroundcolour . '" />' : NULL) . '
    ' . ($this->tableheaderbackgroundcolour ? '<param name = "tableheaderbackgroundcolour" value = "' . $this->tableheaderbackgroundcolour . '" />' : NULL) . '
    ' . ($this->tableheadercolour ? '<param name = "tableheadercolour" value = "' . $this->tableheadercolour . '" />' : NULL) . '
    <param name = "warnmessage" value = "' . ($this->warnmessage ? 'true' : 'false') . '" />
    <param name = "autoupload" value = "' . ($this->autoupload ? 'true' : 'false') . '" />
    <param name = "helpbutton" value = "' . ($this->helpbutton ? 'true' : 'false') . '" />
    <param name = "removebutton" value = "' . ($this->removebutton ? 'true' : 'false') . '" />
    <param name = "addbutton" value = "' . ($this->addbutton ? 'true' : 'false') . '" />
    <param name = "uploadbutton" value = "' . ($this->uploadbutton ? 'true' : 'false') . '" />
    <param name = "fileextensions" value = "JPEG Image Files,jpg,jpeg" />
    ' . ($this->endpage ? '<param name = "endpage" value = "' . $this->baseurl . $this->endpage . '" />' : NULL) . '
</applet>
<script type="text/javascript" src="' . WFWebApplication::webDirPath(WFWebApplication::WWW_DIR_FRAMEWORK) . '/js/embeddedcontent_min.js" defer="defer"></script>
        ';
    }
Ejemplo n.º 5
0
 function render($blockContent = NULL)
 {
     if ($this->hidden) {
         return NULL;
     } else {
         if ($this->enableDragDropTree) {
             $this->yuiloader()->addModule('treeviewdd', 'js', NULL, WFWebApplication::webDirPath(WFWebApplication::WWW_DIR_FRAMEWORK) . '/js/yahoo-treeviewdd.js', array('treeview', 'dragdrop'), NULL, NULL, NULL);
             $this->yuiloader()->yuiRequire('treeviewdd');
         }
         // set up basic HTML
         $html = parent::render($blockContent);
         $html .= "<div id=\"{$this->id}_status\" style=\"display: none;\"></div><div id=\"{$this->id}\"></div>\n";
         return $html;
     }
 }