Example #1
0
 /**
  * Retrieve additional html and put it at the end of element html
  *
  * @return string
  */
 protected function _getToggleButtonHtml($visible = true)
 {
     $html = '';
     if ($this->getIsWysiwygEnabled()) {
         $disabled = $this->getDisabled() || $this->getReadonly();
         $html .= '  ';
         $html .= Mage::getSingleton('core/layout')->createBlock('adminhtml/widget_button', '', array('label' => Mage::helper('catalog')->__('Full WYSIWYG Editor'), 'type' => 'button', 'disabled' => $disabled, 'class' => $disabled ? 'disabled btn-wysiwyg' : 'btn-wysiwyg', 'onclick' => 'wysiwyg' . $this->getHtmlId() . '.save();catalogWysiwygEditor.open(\'' . Mage::helper('adminhtml')->getUrl('*/*/wysiwyg') . '\', \'' . $this->getHtmlId() . '\')'))->toHtml();
         //            $html .= Mage::getSingleton('core/layout')
         //                ->createBlock('adminhtml/widget_button', '', array(
         //                    'label'   => Mage::helper('catalog')->__('Switch to Preview'),
         //                    'type'    => 'button',
         //                    'disabled' => $disabled,
         //                    'class' => ($disabled) ? 'disabled btn-wysiwyg' : 'btn-wysiwyg',
         //                    'onclick' => 'catalogWysiwygEditor.open(\''.Mage::helper('adminhtml')->getUrl('*/*/wysiwyg').'\', \''.$this->getHtmlId().'\')'
         //                ))->toHtml() . '  ';
         //
         //            $html .= Mage::getSingleton('core/layout')
         //                ->createBlock('adminhtml/widget_button', '', array(
         //                    'label'   => Mage::helper('catalog')->__('Switch to Code View'),
         //                    'type'    => 'button',
         //                    'disabled' => $disabled,
         //                    'class' => ($disabled) ? 'disabled btn-wysiwyg' : 'btn-wysiwyg',
         //                    'onclick' => 'catalogWysiwygEditor.open(\''.Mage::helper('adminhtml')->getUrl('*/*/wysiwyg').'\', \''.$this->getHtmlId().'\')'
         //                ))->toHtml();
     }
     $html .= parent::_getToggleButtonHtml($visible);
     return $html;
 }