/** * Add common javascript files and code */ function addCommonJs() { parent::addCommonJs(); $this->addJsForGrid(); // add button events if exist $this->addButtonHandlers(); }
// add button events if exist $pageObject->addButtonHandlers(); $pageObject->body["begin"] .= "<script type=\"text/javascript\" src=\"include/loadfirst.js\"></script>\r\n"; $pageObject->body["begin"] .= "<script>\r\n"; $pageObject->body["begin"] .= "function importMore(id)\r\n"; $pageObject->body["begin"] .= "{\r\n"; $pageObject->body["begin"] .= "\tif(\$('#importDebugInfoTable'+id).css('display')=='none')\r\n"; $pageObject->body["begin"] .= "\t\t\$('#importDebugInfoTable'+id).show();\r\n"; $pageObject->body["begin"] .= "\telse\r\n"; $pageObject->body["begin"] .= "\t\t\$('#importDebugInfoTable'+id).hide();\r\n"; $pageObject->body["begin"] .= "}\r\n"; $pageObject->body["begin"] .= "</script>\r\n"; $pageObject->body["begin"] .= "<script type=\"text/javascript\" src=\"include/lang/" . getLangFileName(mlang_getcurrentlang()) . ".js\"></script>"; $pageObject->fillSetCntrlMaps(); $pageObject->body['end'] .= '<script>'; $pageObject->body['end'] .= "window.controlsMap = " . my_json_encode($pageObject->controlsHTMLMap) . ";"; $pageObject->body['end'] .= "window.settings = " . my_json_encode($pageObject->jsSettings) . ";"; $pageObject->body['end'] .= '</script>'; $pageObject->body["end"] .= "<script language=\"JavaScript\" src=\"include/runnerJS/RunnerAll.js\"></script>\r\n"; $pageObject->addCommonJs(); $pageObject->body["end"] .= "<script>" . $pageObject->PrepareJS() . "</script>"; $xt->assignbyref("body", $pageObject->body); $xt->assign("importfile_attrs", "id=\"file_ImportFileName" . $pageObject->id . "\" name=\"file_ImportFileName" . $pageObject->id . "\""); $xt->assign("backtolist_attrs", "id=\"backButton" . $pageObject->id . "\""); $xt->assign("importlink_attrs", "id=\"saveButton" . $pageObject->id . "\""); $xt->assign("error_message", $error_message); $xt->display("Readings_import.htm"); ?>
/** * Add js files and scripts * */ function addCommonJs() { // call parent if need RunnerJS API RunnerPage::addCommonJs(); $this->addJsGroupsAndRights(); }