protected function _beforeToHtml() { if ($this->getRequest()->isXmlHttpRequest() || $this->getRequest()->getParam('isAjax')) { $this->js->addRequireJs(['jQuery' => 'jquery'], <<<JS EbayListingOtherGridObj.afterInitPage(); JS ); } return parent::_beforeToHtml(); }
protected function _beforeToHtml() { $this->js->addOnReadyJs(<<<JS \$\$('#listingOtherMappingGrid div.grid th').each(function(el) { el.style.padding = '2px 4px'; }); \$\$('#listingOtherMappingGrid div.grid td').each(function(el) { el.style.padding = '2px 4px'; }); JS ); return parent::_beforeToHtml(); }