Exemplo n.º 1
0
 /**
  * Retrive config json
  *
  * @return string
  */
 public function getConfigJson($type = 'links')
 {
     $this->getUploaderConfig()->setFileParameterName($type)->setTarget(Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/downloadable_file/upload', array('type' => $type, '_secure' => true)));
     $this->getMiscConfig()->setReplaceBrowseWithRemove(true);
     return Mage::helper('core')->jsonEncode(parent::getJsonConfig());
 }
Exemplo n.º 2
0
 /**
  * Prepare layout, change button and set front-end element ids mapping
  *
  * @return $this
  */
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->_addElementIdsMapping(array('container' => $this->getHtmlId() . '-new', 'idToReplace' => $this->getHtmlId()));
     return $this;
 }