protected function _beforeToHtml() { $this->jsPhp->addConstants($this->getHelper('Data')->getClassConstants('\\Ess\\M2ePro\\Model\\Ebay\\Listing')); $this->js->add(<<<JS \$('adding_mode') .observe('change', ListingAutoActionObj.categoryAddingMode) .simulate('change'); JS ); parent::_beforeToHtml(); }
protected function _beforeToHtml() { parent::_beforeToHtml(); $this->jsPhp->addConstants($this->getHelper('Data')->getClassConstants('\\Ess\\M2ePro\\Model\\Amazon\\Listing')); $this->js->add(<<<JS ListingAutoActionObj.showCreateNewAsin = {$this->showCreateNewAsin}; \$('adding_mode') .observe('change', ListingAutoActionObj.addingModeChange) .simulate('change'); \$('auto_action_create_asin') .observe('change', ListingAutoActionObj.createAsinChange) .simulate('change'); \$('adding_description_template_id').observe('change', function(el) { var options = \$(el.target).select('.empty'); options.length > 0 && options[0].hide(); }); JS ); return $this; }