2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Allow for titles not to appear where they don't need to be

This commit is contained in:
Adam Zammit
2015-08-04 10:32:49 +10:00
parent f11f231b70
commit c097d61e42
8 changed files with 20 additions and 16 deletions

View File

@@ -188,7 +188,7 @@ if (isset($_POST['submit']))
$js = "js/window.js"; $js = "js/window.js";
if (browser_ie()) $js = "js/window_ie6.js"; if (browser_ie()) $js = "js/window_ie6.js";
xhtml_head(T_("Call"),true,array("css/call.css"),array($js),$btext); xhtml_head(T_("Call"),true,array("css/call.css"),array($js),$btext,false,false,false,false);
} }
} }
else if (isset($_POST['outcome'])) else if (isset($_POST['outcome']))
@@ -208,7 +208,7 @@ if (isset($_POST['submit']))
$js = "js/window.js"; $js = "js/window.js";
if (browser_ie()) $js = "js/window_ie6.js"; if (browser_ie()) $js = "js/window_ie6.js";
xhtml_head(T_("Call"),true,array("css/call.css"),array($js),"onload='toggleRec(\"$newtext\",\"record.php?start=start\",\"offline\"); openParentObject(\"main-content\",\"" . get_respondentselection_url($operator_id) . "\"); parent.closePopup();'"); xhtml_head(T_("Call"),true,array("css/call.css"),array($js),"onload='toggleRec(\"$newtext\",\"record.php?start=start\",\"offline\"); openParentObject(\"main-content\",\"" . get_respondentselection_url($operator_id) . "\"); parent.closePopup();'",false,false,false,false);
} }
else else
{ {
@@ -224,7 +224,7 @@ if (isset($_POST['submit']))
$newtext = T_("Start REC"); $newtext = T_("Start REC");
$js = "js/window.js"; $js = "js/window.js";
if (browser_ie()) $js = "js/window_ie6.js"; if (browser_ie()) $js = "js/window_ie6.js";
xhtml_head(T_("Call"),true,array("css/call.css"),array($js),"onload='toggleRec(\"$newtext\",\"record.php?start=start\",\"offline\"); openParentObject(\"main-content\",\"" . get_respondentselection_url($operator_id) . "\"); parent.closePopup();'"); xhtml_head(T_("Call"),true,array("css/call.css"),array($js),"onload='toggleRec(\"$newtext\",\"record.php?start=start\",\"offline\"); openParentObject(\"main-content\",\"" . get_respondentselection_url($operator_id) . "\"); parent.closePopup();'",false,false,false,false);
} }
@@ -255,7 +255,7 @@ if (isset($_GET['newstate']))
$js = "js/window.js"; $js = "js/window.js";
if (browser_ie()) $js = "js/window_ie6.js"; if (browser_ie()) $js = "js/window_ie6.js";
xhtml_head(T_("Call"),true,array("css/call.css"),array($js,"include/jquery/jquery-1.4.2.min.js")); xhtml_head(T_("Call"),true,array("css/call.css"),array($js,"include/jquery/jquery-1.4.2.min.js"),false,false,false,false,false);
$state = is_on_call($operator_id); $state = is_on_call($operator_id);
switch($state) switch($state)

View File

@@ -40,17 +40,19 @@
* @param string $bodytext Space in the body element: good for onload='top.close()' to close validly * @param string $bodytext Space in the body element: good for onload='top.close()' to close validly
* @param bool|int $refresh False or 0 for no refresh otherwise the number of seconds to refresh * @param bool|int $refresh False or 0 for no refresh otherwise the number of seconds to refresh
* @param bool $clearrefresh False if we want to pass on any GET request in header, True to clear * @param bool $clearrefresh False if we want to pass on any GET request in header, True to clear
* @param bool|string $subtitle False if we want no subtitle otherwise display a subtitle
* @param bool $displayinnertitle Whether to display the inner title or not
* *
* @see xhtml_foot() * @see xhtml_foot()
*/ */
function xhtml_head($title="",$body=true,$css=false,$javascript=false,$bodytext=false,$refresh=false,$clearrefresh=false,$subtitle=false) function xhtml_head($title="",$body=true,$css=false,$javascript=false,$bodytext=false,$refresh=false,$clearrefresh=false,$subtitle=false,$displayinnertitle=true)
{ {
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
?> ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title><?php if (empty($title)) print "CATI"; else print "CATI: $title"; ?></title> <head><title><?php if (empty($title)) print "queXS"; else print "queXS: $title"; ?></title>
<?php <?php
if ($css) if ($css)
foreach ($css as $c) print "<link rel='stylesheet' href='$c' type='text/css'></link>"; foreach ($css as $c) print "<link rel='stylesheet' href='$c' type='text/css'></link>";
@@ -70,7 +72,10 @@ print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
</head> </head>
<?php <?php
if ($bodytext) print "<body $bodytext>"; else print "<body>"; if ($bodytext) print "<body $bodytext>"; else print "<body>";
if ($displayinnertitle)
{
print "<h1 class='header text-primary'>" . "$title" . "&emsp;&emsp;<small class='text-capitalize'>" . "$subtitle" . "</small></h1>"; print "<h1 class='header text-primary'>" . "$title" . "&emsp;&emsp;<small class='text-capitalize'>" . "$subtitle" . "</small></h1>";
}
/* Let's print header that equals to menu item and page title !!!, move previous headers to "subtitles"*/ /* Let's print header that equals to menu item and page title !!!, move previous headers to "subtitles"*/
} }

View File

@@ -142,7 +142,7 @@ else if (HEADER_EXPANDER_MANUAL)
$js[] = "js/headerexpandmanual.js"; $js[] = "js/headerexpandmanual.js";
} }
xhtml_head(T_("queXS"), $body, array("css/index.css","css/tabber.css","include/jquery-ui/jquery-ui.min.css") , $js); xhtml_head(T_("queXS"), $body, array("css/index.css","css/tabber.css","include/jquery-ui/jquery-ui.min.css") , $js,false,false,false,false,false);
print $script; print $script;
$case_id = get_case_id($operator_id,true); $case_id = get_case_id($operator_id,true);

View File

@@ -53,7 +53,7 @@ $js = false;
if (AUTO_LOGOUT_MINUTES !== false) if (AUTO_LOGOUT_MINUTES !== false)
$js = array("include/jquery/jquery-1.4.2.min.js","js/childnap.js"); $js = array("include/jquery/jquery-1.4.2.min.js","js/childnap.js");
xhtml_head(T_("Information"),true,false,$js); xhtml_head(T_("Information"),true,false,$js,false,false,false,false,false);
print get_setting("information"); print get_setting("information");

View File

@@ -58,7 +58,7 @@ $js = false;
if (AUTO_LOGOUT_MINUTES !== false) if (AUTO_LOGOUT_MINUTES !== false)
$js = array("include/jquery/jquery-1.4.2.min.js","js/childnap.js"); $js = array("include/jquery/jquery-1.4.2.min.js","js/childnap.js");
xhtml_head(T_("Performance"),true,array("css/table.css"),$js); xhtml_head(T_("Performance"),true,array("css/table.css"),$js,false,false,false,false,false);
$operator_id = get_operator_id(); $operator_id = get_operator_id();
$questionnaire_id = get_questionnaire_id($operator_id); $questionnaire_id = get_questionnaire_id($operator_id);

View File

@@ -58,7 +58,7 @@ $js = false;
if (AUTO_LOGOUT_MINUTES !== false) if (AUTO_LOGOUT_MINUTES !== false)
$js = array("include/jquery/jquery-1.4.2.min.js","js/childnap.js"); $js = array("include/jquery/jquery-1.4.2.min.js","js/childnap.js");
xhtml_head(T_("Project information"),true,false,$js); xhtml_head(T_("Project information"),true,false,$js,false,false,false,false,false);
$operator_id = get_operator_id(); $operator_id = get_operator_id();

View File

@@ -67,8 +67,7 @@ if (AUTO_LOGOUT_MINUTES !== false)
$js[] = "js/childnap.js"; $js[] = "js/childnap.js";
} }
xhtml_head(T_("Respondent Selector"),true,array("css/table.css","css/respondent.css"),$js); xhtml_head(T_("Respondent Selector"),true,array("css/table.css","css/respondent.css"),$js,false,false,false,false,false);
//display the respondents as a drop down list for this call attempt //display the respondents as a drop down list for this call attempt
// display in the operators time // display in the operators time

View File

@@ -74,7 +74,7 @@ if (AUTO_LOGOUT_MINUTES !== false)
$js[] = "js/childnap.js"; $js[] = "js/childnap.js";
} }
xhtml_head(T_("Status"),true,array("css/status.css"),$js,$btext,60); xhtml_head(T_("Status"),true,array("css/status.css"),$js,$btext,60,false,false,false,false);
print "<div class='text'>" . get_operator_time($operator_id,DATE_TIME_FORMAT) ."</div>"; print "<div class='text'>" . get_operator_time($operator_id,DATE_TIME_FORMAT) ."</div>";