/** * Creates a new uploader * * @param string $id a non-visible unique id for this widget. * * @see SwatWidget::__construct() */ public function __construct($id = null) { parent::__construct($id); $this->requires_id = true; $yui = new SwatYUI(array('event', 'animation')); $this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet()); $ajax = new XML_RPCAjax(); $this->html_head_entry_set->addEntrySet($ajax->getHtmlHeadEntrySet()); $this->addJavaScript('packages/pinhole/admin/javascript/pinhole-photo-uploader.js', Pinhole::PACKAGE_ID); $this->addStyleSheet('packages/pinhole/admin/styles/pinhole-photo-uploader.css', Pinhole::PACKAGE_ID); $this->title = Pinhole::_('Upload'); }