/** * Standard init function of a module. * * @return void */ function init() { global $BACK_PATH, $BE_USER; // Setting module configuration: $this->MCONF = $GLOBALS['MCONF']; // Initialize Document Template object: $this->doc = t3lib_div::makeInstance('template'); $this->doc->backPath = $BACK_PATH; $this->doc->setModuleTemplate('templates/ws.html'); // JavaScript $this->doc->JScode = $this->doc->wrapScriptTags(' script_ended = 0; function jumpToUrl(URL) { // window.location.href = URL; } function expandCollapse(rowNumber) { elementId = "wl_" + rowNumber; element = document.getElementById(elementId); image = document.getElementById("spanw1_" + rowNumber); if (element.style) { if (element.style.display == "none") { element.style.display = "table-row"; image.className = "t3-icon t3-icon-actions t3-icon-actions-view t3-icon-view-table-collapse"; } else { element.style.display = "none"; image.className = "t3-icon t3-icon-actions t3-icon-actions-view t3-icon-view-table-expand"; } } } '); $this->doc->form = '<form action="index.php" method="post" name="pageform">'; // Setting up the context sensitive menu: $this->doc->getContextMenuCode(); // Add JS for dynamic tabs: $this->doc->JScode .= $this->doc->getDynTabMenuJScode(); // Setting publish access permission for workspace: $this->publishAccess = $BE_USER->workspacePublishAccess($BE_USER->workspace); // Parent initialization: parent::init(); }