Example #1
0
 /**
  * Main Constructor
  *
  * @access  public
  * @param   $gadget
  * @param   $name
  * @param   string  $value
  * @param   string  $label
  * @return  void
  */
 function Jaws_Widgets_TextArea($gadget, $name, $value = '', $label = '')
 {
     $this->_Name = $name;
     $this->_Value = $value;
     $this->_Gadget = $gadget;
     $this->_ToolbarControl =& Piwi::CreateWidget('Toolbar');
     $this->_ToolbarControl->SetID('toolbar_' . $name);
     $this->TextArea =& Piwi::CreateWidget('TextArea', $name, $value);
     $this->TextArea->SetClass('xx-large');
     $this->_Label =& Piwi::CreateWidget('Label', $label, $this->TextArea);
     $this->_Container =& Piwi::CreateWidget('Division');
     $this->_Container->SetClass('jaws_editor');
     $this->_Container->AddFile('include/Jaws/Resources/TextArea.js');
     parent::init();
     $this->setID($name);
 }
Example #2
0
File: TinyMCE.php Project: uda/jaws
 /**
  * Main Constructor
  *
  * @access  public
  * @param   string  $gadget
  * @param   string  $name
  * @param   string  $value
  * @param   string  $label
  * @return  void
  */
 function Jaws_Widgets_TinyMCE($gadget, $name, $value = '', $label = '')
 {
     require_once JAWS_PATH . 'include/Jaws/String.php';
     //$value = Jaws_String::AutoParagraph($value);
     $value = str_replace('<', '<', $value);
     $value = str_replace('>', '>', $value);
     $this->_Name = $name;
     $this->_Value = $value;
     $this->_Gadget = $gadget;
     if (JAWS_SCRIPT == 'admin') {
         $this->toolbars[] = $GLOBALS['app']->Registry->fetch('editor_tinymce_backend_toolbar', 'Settings');
     } else {
         $this->toolbars[] = $GLOBALS['app']->Registry->fetch('editor_tinymce_frontend_toolbar', 'Settings');
     }
     $this->TextArea =& Piwi::CreateWidget('TextArea', $name, $this->_Value, '', '14');
     $this->_Label =& Piwi::CreateWidget('Label', $label, $this->TextArea);
     $this->setClass($name);
     $this->_Container =& Piwi::CreateWidget('Division');
     $this->_Container->SetClass('jaws_editor');
     parent::init();
 }