public function get() { $_oFormatSectionsetsByTab = new AmazonAutoLinks_AdminPageFramework_Form_View___Format_SectionsetsByTab($this->aStructure['sectionsets'], $this->aStructure['fieldsets'], $this->aArguments['nested_depth']); $_aOutput = array(); foreach ($_oFormatSectionsetsByTab->getTabs() as $_sSectionTabSlug) { $_aOutput[] = $this->_getFormOutput($_oFormatSectionsetsByTab->getSectionsets($_sSectionTabSlug), $_oFormatSectionsetsByTab->getFieldsets($_sSectionTabSlug), $_sSectionTabSlug, $this->aCallbacks); } $_oDebugInfo = new AmazonAutoLinks_AdminPageFramework_Form_View___DebugInfo($this->aArguments['structure_type'], $this->oMsg); $_sOutput = implode(PHP_EOL, $_aOutput); $_sElementID = "amazon-auto-links-sectionsets-" . uniqid(); return $this->_getSpinnerOutput($_sOutput) . "<div id='{$_sElementID}' class='amazon-auto-links-sctionsets amazon-auto-links-form-js-on'>" . $_sOutput . AmazonAutoLinks_AdminPageFramework_Form_View___Script_SectionTab::getEnabler() . $_oDebugInfo->get() . "</div>"; }
public static function getEnabler() { if (self::$_bLoadedTabEnablerScript) { return ''; } self::$_bLoadedTabEnablerScript = true; new self(); $_sScript = <<<JAVASCRIPTS jQuery( document ).ready( function() { // the parent element of the ul tag; The ul element holds li tags of titles. jQuery( '.amazon-auto-links-section-tabs-contents' ).createTabs(); }); JAVASCRIPTS; return "<script type='text/javascript' class='amazon-auto-links-section-tabs-script'>" . '/* <![CDATA[ */' . $_sScript . '/* ]]> */' . "</script>"; }