public function __construct() { $this->_objectId = 'stickers_id'; $this->_blockGroup = 'stickers'; $this->_controller = 'adminhtml_stickers'; parent::__construct(); $url = 'stickers'; parent::addButton('back', array('label' => Mage::helper('adminhtml')->__('Back'), 'onclick' => 'setLocation(\'' . $this->getUrl("*/*/" . $url . "/") . '\')', 'class' => 'back'), -1); if ($this->_isAllowedAction('save')) { $this->_updateButton('save', 'label', Mage::helper('adminhtml')->__('Save')); $this->_addButton('saveandcontinue', array('label' => Mage::helper('adminhtml')->__('Save And Continue Edit'), 'onclick' => 'saveAndContinueEdit()', 'class' => 'save'), -100); } else { $this->_removeButton('save'); } if ($this->_isAllowedAction('delete')) { $this->_updateButton('delete', 'label', Mage::helper('adminhtml')->__('Delete')); } else { $this->_removeButton('delete'); } $this->_formScripts[] = "\n function toggleEditor() {\n if (tinyMCE.getInstanceById('content') == null) {\n tinyMCE.execCommand('mceAddControl', false, 'content');\n } else {\n tinyMCE.execCommand('mceRemoveControl', false, 'content');\n }\n }\n\n function saveAndContinueEdit(){\n editForm.submit(\$('edit_form').action+'back/edit/');\n }\n "; }