Commit 62121257 authored by Ryan Blair's avatar Ryan Blair
Browse files

move closer to 'just in time' loaded Tigra Calendar and CKEditor

parent 32da82f8
......@@ -39,7 +39,6 @@ class oslStructure
$str .= "<head>\n\n";
$str .= " <!-- Link to stylesheets. -->\n";
$str .= " <link href=\"css/general.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
$str .= " <link href=\"scripts/tigra/calendar.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
$str .= " <!-- Output meta data. -->\n";
$str .= " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n";
$str .= " <!-- Disable robots. -->\n";
......@@ -52,9 +51,7 @@ class oslStructure
$str .= " <title>".oslApp::getAppInfo("appName")." Logbook</title>\n";
$str .= " <!-- Call general Javascripts. -->\n";
$str .= " <script type=\"text/javascript\" src=\"scripts/ajax.js\"></script>\n";
$str .= " <script type=\"text/javascript\" src=\"scripts/ckeditor/ckeditor.js\"></script>\n";
$str .= " <script type=\"text/javascript\" src=\"scripts/standardFunctions.js\"></script>\n";
$str .= " <script type=\"text/javascript\" src=\"scripts/tigra/calendar_eu.js\"></script>\n";
$str .= " <!-- Call specific Javascripts. -->\n";
$str .= " <script type=\"text/javascript\" src=\"scripts/editSection.js\"></script>\n";
$str .= " <script type=\"text/javascript\" src=\"scripts/redirect.js\"></script>\n";
......@@ -708,11 +705,16 @@ class oslStructure
// Output ckeditor.
static function getCkEditor($default,$tabs)
{
$cke = "";
// Get the script name.
$loc = str_replace("iframeSrc.php","",$_SERVER["SCRIPT_NAME"]);
$loc = str_replace("iframeSrc.php","",$_SERVER["SCRIPT_NAME"]);
// Add number of tabs required.
$tabStr = oslStructure::getRequiredTabs($tabs);
$tabStr = oslStructure::getRequiredTabs($tabs);
// Set default textarea.
$cke .= "$tabstr <script type=\"text/javascript\" src=\"scripts/ckeditor/ckeditor.js\"></script>\n";
$cke .= "$tabStr <textarea class=\"ckeditorTA\" id=\"editor1\" name=\"editor1\">$default</textarea>\n";
$cke .= "$tabStr <script type=\"text/javascript\">\n";
// Invoke ckeditor.
......@@ -730,10 +732,15 @@ class oslStructure
// Get Tigra calendar.
static function getTigraCalendar($tabs,$frm,$input)
{
$str = "";
// Add number of tabs required.
$tabStr = oslStructure::getRequiredTabs($tabs);
$tabStr = oslStructure::getRequiredTabs($tabs);
// Initialise calendar instance.
$str = "$tabStr<script language=\"JavaScript\">\n";
$str .= "$tabStr<link href=\"scripts/tigra/calendar.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
$str .= "$tabStr<script type=\"text/javascript\" src=\"scripts/tigra/calendar_eu.js\"></script>\n";
$str .= "$tabStr<script language=\"JavaScript\">\n";
$str .= "$tabStr new tcal ({\n";
$str .= "$tabStr 'formname': '$frm',\n";
$str .= "$tabStr 'controlname': '$input'\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment