protected function _prepareLayout() { parent::_prepareLayout(); $this->setChild('attributes_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('ampgrid')->__('Grid Attribute Columns'), 'onclick' => 'pAttribute.showConfig();', 'class' => 'task'))); if (Mage::helper('ampgrid/mode')->isMulti()) { $this->setChild('saveall_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('ampgrid')->__('Save'), 'onclick' => 'peditGrid.saveAll();', 'class' => 'save disabled', 'id' => 'ampgrid_saveall_button'))); } $this->_gridAttributes = Mage::helper('ampgrid')->prepareGridAttributesCollection(); return $this; }
protected function _prepareLayout() { parent::_prepareLayout(); $this->setExportVisibility('true'); $url = $this->getUrl('ampgrid/adminhtml_attribute/index'); $this->setChild('attributes_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('ampgrid')->__('Grid Attribute Columns'), 'onclick' => sprintf("pAttribute.showConfig('%s');", $url), 'class' => 'task'))); if (Mage::getStoreConfig('ampgrid/general/sorting')) { $this->setChild('sortcolumns_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('ampgrid')->__('Sort Columns'), 'onclick' => 'pgridSortable.init();', 'class' => 'task', 'id' => 'pgridSortable_button'))); } if (Mage::helper('ampgrid/mode')->isMulti()) { $this->setChild('saveall_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('ampgrid')->__('Save'), 'onclick' => 'peditGrid.saveAll();', 'class' => 'save disabled', 'id' => 'ampgrid_saveall_button'))); } //export old setting from system.xml if (!Mage::getStoreConfig('ampgrid/general/exported_columns_from_system')) { Mage::helper('ampgrid')->exportOdlColumnSettings(); } $this->_gridAttributes = Mage::helper('ampgrid')->prepareGridAttributesCollection(); return $this; }