|
<?php require_once 'phpmoko/ui/Div.php'; require_once 'phpmoko/ui/ListPanel.php'; include_once 'phpmoko/ui/VerticalPanel.php'; require_once 'phpmoko/utils/AsynchronousFileUpload.php';
class ModuleDemo implements WebModule { function getWidget() { $vPanel = new VerticalPanel();
// Added the button $link = new Div(); $link->setId('uploadfile'); $vPanel->add($link);
// Added the list for show the files added $list = new ListPanel(); $list->setNumericActive(true); $list->setId('listFiles'); $vPanel->add($list); // Added the Handler for Asynchronous File Upload $fileUpload = new AsynchronousFileUpload(); $fileUpload->setListPanel($list); $fileUpload->setWidgetHandler($link); $fileUpload->setUploadScript('upload-empty.php'); $fileUpload->setTextButton("Upload a file"); $fileUpload->setTextCancel("Cancel"); $fileUpload->setTextDropFiles("Drop files here to upload"); $fileUpload->setTextFailed("Failed"); $vPanel->add($fileUpload);
return $vPanel; } } ?>
|
|