public function getSettings($settings = array())
 {
     $settings = array('icon_map' => $this->getIconMap(), 'icon_path' => $this->getParam('filemanager.icon_path', 'media/jce/icons'), 'icon_format' => $this->getParam('filemanager.icon_format', '{$name}.png'), 'date_format' => $this->getParam('filemanager.date_format', '%d/%m/%Y, %H:%M'), 'text_alert' => $this->getParam('filemanager.text_alert', 1), 'replace_text' => $this->getParam('filemanager.replace_text', 1), 'googledocs' => array('enable' => $this->getParam('filemanager.googledocs_enable', 1), 'type' => $this->getParam('filemanager.googledocs_type', ''), 'width' => $this->getParam('filemanager.googledocs_width', '100%'), 'height' => $this->getParam('filemanager.googledocs_height', '100%')));
     return parent::getSettings($settings);
 }
Пример #2
0
    /**
     * Get the File Browser instance
     * @access public
     * @return object WFBrowserExtension
     */
    public function getBrowser() {        
        if (!isset(self::$browser)) {
            self::$browser = new WFFileBrowser($this->getProperties());
        }

        return self::$browser;
    }
Пример #3
0
 /**
  * Display the plugin
  */
 public function display()
 {
     // Add actions before initialising parent
     if ($this->getParam('allow_save', 1)) {
         $browser = $this->getBrowser();
         $browser->addAction('save', array('action' => 'createTemplate', 'title' => WFText::_('WF_TEMPLATEMANAGER_CREATE')));
     }
     parent::display();
     $document = WFDocument::getInstance();
     $document->addScript(array('templatemanager'), 'plugins');
     $document->addStyleSheet(array('templatemanager'), 'plugins');
     $settings = $this->getSettings();
     $document->addScriptDeclaration('TemplateManager.settings=' . json_encode($settings) . ';');
 }
Пример #4
0
 /**
  * Display the plugin
  * @access public
  */
 public function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     $settings = $this->getSettings();
     $document->addScript(array('browser'), 'plugins');
     if ($document->get('standalone') == 1) {
         $document->addScript(array('browser'), 'component');
         $element = JRequest::getCmd('element', JRequest::getCmd('fieldid', ''));
         $options = array('plugin' => array('root' => JURI::root(), 'site' => JURI::base(true) . '/'), 'manager' => $settings, 'element' => $element);
         $document->addScriptDeclaration('jQuery(document).ready(function($){$.WFBrowserWidget.init(' . json_encode($options) . ');});');
     } else {
         $document->addScriptDeclaration('BrowserDialog.settings=' . json_encode($settings) . ';');
     }
 }
Пример #5
0
    public function getSettings() {
        $params = $this->getParams();

        $settings = array(
            // Plugin parameters
            'media_types' => $this->get('filetypes', $this->get('_filetypes')),
            'defaults' => $this->getDefaults()
        );

        return parent::getSettings($settings);
    }
Пример #6
0
 public function getDefaults($defaults = array())
 {
     $params = $this->getParams(array('key' => 'imgmanager_ext'));
     $defaults = array('upload_resize' => $params->get('upload_resize', 1), 'upload_resize_state' => $params->get('upload_resize_state', 0), 'upload_resize_width' => $params->get('resize_width', 640), 'upload_resize_height' => $params->get('resize_height', 480), 'resize_quality' => $params->get('resize_quality', 100), 'upload_thumbnail' => $params->get('upload_thumbnail', 1), 'upload_thumbnail_state' => $params->get('upload_thumbnail_state', 0), 'upload_thumbnail_crop' => $params->get('upload_thumbnail_crop', 0), 'thumbnail_width' => $params->get('thumbnail_width', 120), 'thumbnail_height' => $params->get('thumbnail_height', 90), 'thumbnail_quality' => $params->get('thumbnail_quality', 80));
     return parent::getDefaults($defaults);
 }
Пример #7
0
 /**
  * @see WFMediaManager::getSettings()
  */
 function getSettings()
 {
     return parent::getSettings();
 }
 /**
  * Get default parameters
  * @return string parameters
  */
 function getDefaults()
 {
     return parent::getDefaults(array());
 }
Пример #9
0
 /**
  * Get default parameters
  * @return string parameters
  */
 public function getDefaults($defaults = array())
 {
     return parent::getDefaults($defaults);
 }
 function getSettings()
 {
     $settings = array('icon_map' => $this->getIconMap(), 'icon_path' => $this->getParam('filemanager.icon_path', 'media/jce/icons'), 'icon_format' => $this->getParam('filemanager.icon_format', '{$name}.png'), 'date_format' => $this->getParam('filemanager.date_format', '%d/%m/%Y, %H:%M'), 'text_alert' => $this->getParam('filemanager.text_alert', 1));
     return parent::getSettings($settings);
 }