Ejemplo n.º 1
0
 /**
  * Display the plugin
  */
 function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     $settings = $this->getSettings();
     if ($document->get('standalone') == 1) {
         $document->addScript(array('browser'), 'component');
         // load the language file
         if (is_file(WF_EDITOR . DS . 'tiny_mce' . DS . 'langs' . DS . $this->getLanguage() . '_dlg.js')) {
             $document->addScript(array('langs/' . $this->getLanguage() . '_dlg.js'), 'tiny_mce');
         } else {
             $document->addScript(array('langs/en_dlg.js'), 'tiny_mce');
         }
         $options = array('plugin' => array('root' => JURI::root(), 'site' => JURI::base(true) . '/'), 'manager' => $settings);
         // add element
         if (JRequest::getCmd('element')) {
             $options['element'] = JRequest::getCmd('element');
         }
         $document->addScriptDeclaration('jQuery(document).ready(function($){$.WFBrowserWidget.init(' . json_encode($options) . ');});');
         $document->addStyleSheet(array('dialog'), 'libraries');
     } else {
         $document->addScript(array('browser'), 'plugins');
         $document->addScriptDeclaration('BrowserDialog.settings=' . json_encode($settings) . ';');
     }
 }
Ejemplo n.º 2
0
 function display()
 {
     // Load css
     $document = WFDocument::getInstance();
     $document->addStyleSheet(array('flexicontentlinks'), 'extensions/links/flexicontentlinks/css');
     // убрать?
 }
Ejemplo n.º 3
0
 public function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     // get all popups extensions
     $popups = parent::loadExtensions('popups');
     $config = $this->getProperties();
     if ($config) {
         // Create global config
         $document->addScriptDeclaration('WFExtensions.Popups.setConfig(' . json_encode($config) . ');');
     }
     // Create an instance of each popup and check if enabled
     foreach ($popups as $name) {
         $popup = $this->getPopupExtension($name);
         if ($popup->isEnabled()) {
             $this->addPopup($name);
             $params = $popup->getParams();
             if (!empty($params)) {
                 $document->addScriptDeclaration('WFExtensions.Popups.setParams("' . $name . '",' . json_encode($params) . ');');
             }
         }
     }
     $tabs = WFTabs::getInstance();
     // Add popup tab and assign popups reference to document
     if (count($this->getPopups())) {
         $tabs->addTab('popups', 1);
         $tabs->getPanel('popups')->assign('popups', $this);
     }
 }
Ejemplo n.º 4
0
Archivo: link.php Proyecto: 01J/topm
 public function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     $document->addScript(array('link'), 'extensions.search.js');
     $document->addStylesheet(array('link'), 'extensions.search.css');
 }
Ejemplo n.º 5
0
 public function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     $document->addScript(array('clipboard'), 'plugins');
     $document->addStyleSheet(array('clipboard'), 'plugins');
 }
Ejemplo n.º 6
0
    /**
     * Display the plugin
     */
    public function display() {
        parent::display();

        $document = WFDocument::getInstance();

        $document->addScript(array('mediamanager'), 'plugins');
        $document->addStyleSheet(array('mediamanager'), 'plugins');

        $settings = $this->getSettings();

        $document->addScriptDeclaration('MediaManagerDialog.settings=' . json_encode($settings) . ';');

        $tabs = WFTabs::getInstance(array('base_path' => WF_EDITOR_PLUGIN));

        // Add tabs
        $tabs->addTab('file', 1, array('plugin' => $this));
        $tabs->addTab('media', $this->getParam('tabs_media', 1), array('plugin' => $this));
        $tabs->addTab('advanced', $this->getParam('tabs_advanced', 1));

        // Load Popups instance
        $popups = WFPopupsExtension::getInstance(array(
            // map src value to popup link href
            'map' => array('href' => 'src'),
            'default'   => $this->getParam('mediamanager.popups.default', '')
                ));

        $popups->display();

        // Load Media Player instance
        $mediaplayer = $this->getMediaPlayer();
        $mediaplayer->display();

        // Load video aggregators (Youtube, Vimeo etc)
        $this->loadAggregators();
    }
Ejemplo n.º 7
0
 /**
  * Constructor activating the default information of the class
  *
  * @access protected
  */
 function __construct()
 {
     parent::__construct();
     $document =& WFDocument::getInstance();
     // Load Extensions Object
     $document->addScript(array('extensions'));
 }
Ejemplo n.º 8
0
 function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     $document->addScript(array('paste'), 'plugins');
     $document->addStyleSheet(array('paste'), 'plugins');
 }
Ejemplo n.º 9
0
 public function display()
 {
     $document = WFDocument::getInstance();
     $view = $this->getView();
     $view->addTemplatePath(WF_EDITOR_PLUGIN . '/tmpl');
     $document->setTitle(WFText::_('WF_' . strtoupper($this->getName() . '_TITLE')));
     $theme = $this->getParam('source.theme', 'textmate');
     //$editor = 'codemirror';
     $document->addScript(array('tiny_mce_popup'), 'tiny_mce');
     $document->addScript(array('editor', 'format'), 'plugins');
     $document->addStyleSheet(array('editor'), 'plugins');
     $document->addScript(array('codemirror-compressed'), 'jce.tiny_mce.plugins.source.js.codemirror');
     $document->addStyleSheet(array('codemirror', 'theme/' . $theme), 'jce.tiny_mce.plugins.source.css.codemirror');
     /*switch ($editor) {
                 case 'ace':
                     $document->addScript(array('ace', 'mode-html'), 'jce.tiny_mce.plugins.source.js.ace');
                     
                     if ($theme != 'textmate') {
                         $document->addScript(array('theme-' . $theme), 'jce.tiny_mce.plugins.source.js.ace');
                     }
                     break;
                 case 'codemirror':
                     $document->addScript(array('codemirror-compressed'), 'jce.tiny_mce.plugins.source.js.codemirror');
                     $document->addStyleSheet(array('codemirror', 'theme/' . $theme), 'jce.tiny_mce.plugins.source.css.codemirror');
     
                     break;
             }*/
 }
Ejemplo n.º 10
0
    /**
     * Display the plugin
     * @access public
     */
    public function display() {
        parent::display();

        $document = WFDocument::getInstance();
        $settings = $this->getSettings();

        if ($document->get('standalone') == 1) {
            $document->addScript(array('browser'), 'component');
            
            $element = JRequest::getCmd('element', '');

            $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) . ');});');

            $document->addStyleSheet(array(
                'dialog'
                    ), 'libraries');
        } else {
            $document->addScript(array('browser'), 'plugins');
            $document->addScriptDeclaration('BrowserDialog.settings=' . json_encode($settings) . ';');
        }
    }
Ejemplo n.º 11
0
 public function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     $document->addScript(array('link.full'), 'libraries');
     foreach ($this->extensions as $extension) {
         $extension->display();
     }
 }
Ejemplo n.º 12
0
 /**
  * Constructor activating the default information of the class
  *
  * @access	protected
  */
 function __construct($options = array())
 {
     // only if enabled
     if (self::isEnabled()) {
         $document = WFDocument::getInstance();
         $document->addScript('window', 'extensions/popups/window/js');
         $document->addStyleSheet('window', 'extensions/popups/window/css');
     }
 }
Ejemplo n.º 13
0
 /**
  * Constructor activating the default information of the class
  *
  * @access	protected
  */
 public function __construct()
 {
     if (self::isEnabled()) {
         $scripts = array();
         $document = WFDocument::getInstance();
         $document->addScript('widgetkit', 'extensions/popups/widgetkit/js');
         $document->addStyleSheet('widgetkit', 'extensions/popups/widgetkit/css');
     }
 }
Ejemplo n.º 14
0
 /**
  * Constructor activating the default information of the class
  *
  * @access	protected
  */
 function __construct($options = array())
 {
     if (self::isEnabled()) {
         $scripts = array();
         $document = WFDocument::getInstance();
         $document->addScript('rokbox', 'extensions/popups/rokbox/js');
         $document->addStyleSheet('rokbox', 'extensions/popups/rokbox/css');
     }
 }
Ejemplo n.º 15
0
 public function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     $document->addScript(array('colorpicker'), 'libraries');
     $document->addScript(array('colorpicker'), 'plugins');
     $document->addStyleSheet(array('colorpicker'), 'plugins');
     $document->addScriptDeclaration('ColorPicker.settings=' . json_encode($this->getSettings()) . ';');
 }
Ejemplo n.º 16
0
 function display()
 {
     $document =& WFDocument::getInstance();
     $document->addScript(array('tree'));
     $document->addStyleSheet(array('tree'));
     foreach ($this->extensions as $extension) {
         $extension->display();
     }
 }
Ejemplo n.º 17
0
 /**
  * Display the plugin
  */
 public function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     $document->addScript(array('pagebreak'), 'plugins');
     //$document->addStyleSheet(array('pagebreak'), 'plugins');
     $tabs = WFTabs::getInstance(array('base_path' => WF_EDITOR_PLUGIN));
     // Add tabs
     $tabs->addTab('pagebreak');
 }
Ejemplo n.º 18
0
 public function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     if ($this->isEnabled() && $this->get('name')) {
         $document->addScript(array('mediaplayer/' . $this->get('name') . '/js/' . $this->get('name')), 'extensions');
         $document->addStyleSheet(array('mediaplayer/' . $this->get('name') . '/css/' . $this->get('name')), 'extensions');
         $document->addScriptDeclaration('WFExtensions.MediaPlayer.init(' . json_encode($this->getProperties()) . ')');
     }
 }
Ejemplo n.º 19
0
 /**
  * Display the browser
  * @access public
  */
 public function display()
 {
     //parent::display();
     // Get the Document instance
     $document = WFDocument::getInstance();
     $document->addScript(array('manager.full'), 'libraries');
     $document->addStyleSheet(array('manager'), 'libraries');
     // file browser options
     $document->addScriptDeclaration('WFFileBrowser.settings=' . json_encode($this->getSettings()) . ';');
 }
Ejemplo n.º 20
0
 function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     $document->addScript(array('fullpage'), 'plugins');
     $document->addStyleSheet(array('fullpage'), 'plugins');
     $tabs = WFTabs::getInstance(array('base_path' => WF_EDITOR_PLUGIN));
     $tabs->addTab('meta');
     $tabs->addTab('appearance');
 }
Ejemplo n.º 21
0
 public function display()
 {
     $document = WFDocument::getInstance();
     $view = $this->getView();
     $view->addTemplatePath(WF_EDITOR_PLUGIN . DS . 'tmpl');
     $document->setTitle(WFText::_('WF_' . strtoupper($this->getName() . '_TITLE')));
     $document->addScript(array('codemirror'), 'jce.tiny_mce.plugins.source.js.codemirror');
     $document->addScript(array('editor'), 'plugins');
     $document->addStyleSheet(array('codemirror'), 'jce.tiny_mce.plugins.source.css.codemirror');
     $document->addStyleSheet(array('editor'), 'plugins');
 }
Ejemplo n.º 22
0
 public function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     $document->addScript(array('tree'), 'libraries');
     $document->addScript(array('link'), 'extensions.browser.js');
     $document->addStyleSheet(array('tree'), 'libraries');
     foreach ($this->extensions as $extension) {
         $extension->display();
     }
 }
Ejemplo n.º 23
0
 /**
  * Display the plugin
  */
 function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     $document->addScript(array('filemanager'), 'plugins');
     $document->addStyleSheet(array('filemanager'), 'plugins');
     $document->addScriptDeclaration('FileManager.settings=' . json_encode($this->getSettings()) . ';');
     $tabs = WFTabs::getInstance(array('base_path' => WF_EDITOR_PLUGIN));
     // Add tabs
     $tabs->addTab('file');
     $tabs->addTab('advanced');
 }
 public function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     // get command, eg: mcePaste, mcePasteText
     $cmd = JRequest::getCmd('cmd', 'paste');
     // remove mce prefix
     $cmd = str_replace('mce', '', $cmd);
     // set title
     $document->setTitle(WFText::_('WF_' . strtoupper($cmd) . '_TITLE'));
     $document->addScript(array('clipboard'), 'plugins');
     $document->addStyleSheet(array('clipboard'), 'plugins');
 }
Ejemplo n.º 25
0
 public function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     $aggregators = $this->getAggregators();
     foreach ($aggregators as $aggregator) {
         $aggregator->display();
         $params = $aggregator->getParams();
         if (!empty($params)) {
             $document->addScriptDeclaration('WFExtensions.Aggregator.setParams("' . $aggregator->getName() . '",' . json_encode($params) . ');');
         }
     }
 }
Ejemplo n.º 26
0
 /**
  * Display the browser
  */
 function display()
 {
     parent::display();
     // Get the Document instance
     $document = WFDocument::getInstance();
     $document->addScript(array('tree', 'upload'), 'libraries');
     $document->addScript(array('plupload.full'), 'jce.libraries.plupload');
     $document->addScript(array('file', 'sort', 'search', 'manager'), 'extensions.browser.js');
     //$document->addStyleSheet(array('files', 'tree', 'upload'), 'libraries');
     $document->addStyleSheet(array('manager'), 'extensions.browser.css');
     // file browser options
     $document->addScriptDeclaration('WFFileBrowser.settings=' . json_encode($this->getSettings()) . ';');
 }
Ejemplo n.º 27
0
 /**
  * Display the plugin
  */
 public function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     $document->addScript(array('searchreplace'), 'plugins');
     $document->addStyleSheet(array('searchreplace'), 'plugins');
     $settings = $this->getSettings();
     $document->addScriptDeclaration('SearchReplaceDialog.settings=' . json_encode($settings) . ';');
     $tabs = WFTabs::getInstance(array('base_path' => WF_EDITOR_PLUGIN));
     // Add tabs
     $tabs->addTab('find');
     $tabs->addTab('replace');
 }
Ejemplo n.º 28
0
Archivo: manager.php Proyecto: 01J/topm
 /**
  * Display the plugin
  * @access public
  */
 public function display()
 {
     $view = $this->getView();
     $browser = $this->getBrowser();
     parent::display();
     $document = WFDocument::getInstance();
     if ($document->get('standalone') == 1 && !JRequest::getWord('element', '')) {
         $browser = $this->getBrowser();
         $browser->removeButton('file', 'insert');
     }
     $browser->display();
     $browser->set('position', $this->getParam('editor.browser_position', 'bottom'));
     $view->assign('browser', $browser);
 }
Ejemplo n.º 29
0
 /**
  * Display the plugin
  */
 function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     $document->setTitle(WFText::_('WF_' . strtoupper($this->getElementName()) . '_TITLE'));
     $document->addScript(array('xhtmlxtras'), 'plugins');
     $document->addStyleSheet(array('xhtmlxtras'), 'plugins');
     $document->addScriptDeclaration('XHTMLXtrasDialog.settings=' . json_encode($this->getSettings()) . ';');
     $tabs = WFTabs::getInstance(array('base_path' => WF_EDITOR_PLUGIN));
     $tabs->addTab('standard');
     if ($this->getElementName() == 'attributes') {
         $tabs->addTab('events');
     }
 }
Ejemplo n.º 30
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) . ';');
 }