mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Updated from McMaster branch to not use popup windows (better for Kiosks)
This commit is contained in:
8
call.php
8
call.php
@@ -169,9 +169,9 @@ if (isset($_POST['submit']))
|
||||
$v->dial(get_extension($operator_id),get_call_number($call_id));
|
||||
}
|
||||
if (is_respondent_selection($operator_id))
|
||||
$btext = "onload='openParentObject(\"main-content\",\"rs_intro.php\"); top.close();'";
|
||||
$btext = "onload='openParentObject(\"main-content\",\"rs_intro.php\"); parent.closePopup();'";
|
||||
else
|
||||
$btext = "onload='top.close();'";
|
||||
$btext = "onload='parent.closePopup();'";
|
||||
xhtml_head(T_("Call"),true,array("css/call.css"),array("js/window.js"),$btext);
|
||||
}
|
||||
}
|
||||
@@ -188,7 +188,7 @@ if (isset($_POST['submit']))
|
||||
}
|
||||
//disable recording
|
||||
$newtext = T_("Start REC");
|
||||
xhtml_head(T_("Call"),true,array("css/call.css"),array("js/window.js"),"onload='toggleRec(\"$newtext\",\"record.php?start=start\",\"offline\"); top.close();'");
|
||||
xhtml_head(T_("Call"),true,array("css/call.css"),array("js/window.js"),"onload='toggleRec(\"$newtext\",\"record.php?start=start\",\"offline\"); parent.closePopup();'");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -202,7 +202,7 @@ if (isset($_POST['submit']))
|
||||
}
|
||||
//disable recording
|
||||
$newtext = T_("Start REC");
|
||||
xhtml_head(T_("Call"),true,array("css/call.css"),array("js/window.js"),"onload='toggleRec(\"$newtext\",\"record.php?start=start\",\"offline\"); top.close();'");
|
||||
xhtml_head(T_("Call"),true,array("css/call.css"),array("js/window.js"),"onload='toggleRec(\"$newtext\",\"record.php?start=start\",\"offline\"); parent.closePopup();'");
|
||||
|
||||
}
|
||||
|
||||
|
||||
35
js/popup.js
35
js/popup.js
@@ -1,6 +1,33 @@
|
||||
var newwindow;
|
||||
function poptastic(url)
|
||||
function poptastic(url, title)
|
||||
{
|
||||
newwindow=window.open(url,'name','height=600,width=350,resizable=yes,scrollbars=yes,toolbar=no,status=no');
|
||||
if (window.focus) {newwindow.focus()}
|
||||
var elem = jQuery("#inpage");
|
||||
if (elem.length > 0) {
|
||||
elem = jQuery(elem[0]);
|
||||
if (elem.dialog("option", "title") == title) {
|
||||
if (! elem.dialog("isOpen")) {
|
||||
elem.dialog("open");
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
elem.dialog("close").dialog("destroy").remove();
|
||||
}
|
||||
}
|
||||
jQuery('<iframe id="inpage" src="'+ url +'" />').dialog({
|
||||
autoOpen: true,
|
||||
title: title,
|
||||
height: 700,
|
||||
width: 650,
|
||||
modal: true,
|
||||
autoResize: false,
|
||||
resizable: true,
|
||||
overlay: {
|
||||
opacity: 0.5,
|
||||
background: "white"
|
||||
}
|
||||
}).width(620);
|
||||
}
|
||||
|
||||
function closePopup()
|
||||
{
|
||||
jQuery("#inpage").dialog("close").dialog("destroy").remove();
|
||||
}
|
||||
|
||||
11
js/window.js
11
js/window.js
@@ -6,20 +6,19 @@ function LinkUp(element)
|
||||
|
||||
function openParent(get)
|
||||
{
|
||||
window.opener.top.location.href = 'index.php?' + get;
|
||||
top.close();
|
||||
parent.location.href = 'index.php?' + get;
|
||||
}
|
||||
|
||||
|
||||
function openParentNote(get)
|
||||
{
|
||||
window.opener.top.location.href = 'index.php?note=' + document.getElementById('note').value + '&' + get;
|
||||
top.close();
|
||||
parent.closePopup();
|
||||
parent.location.href = 'index.php?note=' + document.getElementById('note').value + '&' + get;
|
||||
}
|
||||
|
||||
function openParentObject(oid,get)
|
||||
{
|
||||
var a = window.opener.top.document.getElementById(oid);
|
||||
var a = parent.document.getElementById(oid);
|
||||
if (a)
|
||||
{
|
||||
var clone = a.cloneNode(true);
|
||||
@@ -33,7 +32,7 @@ function openParentObject(oid,get)
|
||||
|
||||
function toggleRec(text,link,classes)
|
||||
{
|
||||
var a = window.opener.document.getElementById('reclink');
|
||||
var a = parent.document.getElementById('reclink');
|
||||
if (a)
|
||||
{
|
||||
a.innerHTML = text;
|
||||
|
||||
@@ -54,7 +54,7 @@ $case_id = get_case_id($operator_id);
|
||||
$questionnaire_id = get_questionnaire_id($operator_id);
|
||||
$leavemessage = leave_message($case_id);
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Answering machine"),true,array("css/rs.css"), array("js/popup.js"));
|
||||
xhtml_head(T_("Respondent Selection - Answering machine"),true,array("css/rs.css","include/jquery-ui/css/smoothness/jquery-ui-1.8.2.custom.css"), array("js/popup.js","include/jquery-ui/js/jquery-1.4.2.min.js","include/jquery-ui/js/jquery-ui-1.8.2.custom.min.js"));
|
||||
|
||||
if ($leavemessage)
|
||||
{
|
||||
@@ -71,16 +71,16 @@ else
|
||||
print "<p class='rstext'>" . T_("Do not leave a message, please hang up") . "</p>";
|
||||
|
||||
?>
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=29');"><? echo T_("End call with outcome: Business answering machine"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=29');"><? echo T_("End call with outcome: Business answering machine"); ?></a></p>
|
||||
<?
|
||||
if ($leavemessage)
|
||||
{
|
||||
?>
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=23');"><? echo T_("End call with outcome: Answering machine Message left"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=23');"><? echo T_("End call with outcome: Answering machine Message left"); ?></a></p>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=24');"><? echo T_("End call with outcome: Answering machine No message left"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=24');"><? echo T_("End call with outcome: Answering machine No message left"); ?></a></p>
|
||||
<p class='rsoption'><a href="rs_intro.php"><? echo T_("Go Back"); ?></a></p>
|
||||
<?
|
||||
|
||||
|
||||
@@ -44,12 +44,13 @@ include ("functions/functions.xhtml.php");
|
||||
*/
|
||||
include ("lang.inc.php");
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Business answers"),true,array("css/rs.css"), array("js/popup.js"));
|
||||
xhtml_head(T_("Respondent Selection - Business answers"),true,array("css/rs.css","include/jquery-ui/css/smoothness/jquery-ui-1.8.2.custom.css"), array("js/popup.js","include/jquery-ui/js/jquery-1.4.2.min.js","include/jquery-ui/js/jquery-ui-1.8.2.custom.min.js"));
|
||||
|
||||
|
||||
?>
|
||||
<p class='rstext'><? echo T_("Sorry to bother you, I have called the wrong number")?></p>
|
||||
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=16');"><? echo T_("End call with outcome: Business number"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=16');"><? echo T_("End call with outcome: Business number"); ?></a></p>
|
||||
<p class='rsoption'><a href="rs_intro.php"><? echo T_("Go Back"); ?></a></p>
|
||||
<?
|
||||
|
||||
|
||||
@@ -54,8 +54,7 @@ include ("functions/functions.operator.php");
|
||||
*/
|
||||
include ("functions/functions.limesurvey.php");
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Call back"),true,array("css/rs.css"),array("js/popup.js"));
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Call back"),true,array("css/rs.css","include/jquery-ui/css/smoothness/jquery-ui-1.8.2.custom.css"), array("js/popup.js","include/jquery-ui/js/jquery-1.4.2.min.js","include/jquery-ui/js/jquery-ui-1.8.2.custom.min.js"));
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$case_id = get_case_id($operator_id);
|
||||
@@ -77,7 +76,7 @@ print "<p class='rstext'>" . T_("You are: ") . round(limesurvey_percent_complete
|
||||
?>
|
||||
|
||||
<p class='rsoption'><a href="<? print(get_limesurvey_url($operator_id)); ?>"><? echo T_("Yes - Continue where we left off"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=8');"><? echo T_("End call with outcome: Refusal by respondent"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=8');"><? echo T_("End call with outcome: Refusal by respondent"); ?></a></p>
|
||||
<p class='rsoption'><a href="rs_intro.php"><? echo T_("Go Back"); ?></a></p>
|
||||
<?
|
||||
|
||||
|
||||
16
rs_intro.php
16
rs_intro.php
@@ -55,7 +55,7 @@ include ("functions/functions.operator.php");
|
||||
include ("functions/functions.limesurvey.php");
|
||||
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Introduction"),true,array("css/rs.css"),array("js/popup.js"));
|
||||
xhtml_head(T_("Respondent Selection - Introduction"),true,array("css/rs.css","include/jquery-ui/css/smoothness/jquery-ui-1.8.2.custom.css"), array("js/popup.js","include/jquery-ui/js/jquery-1.4.2.min.js","include/jquery-ui/js/jquery-ui-1.8.2.custom.min.js"));
|
||||
|
||||
//display introduction text
|
||||
|
||||
@@ -89,13 +89,13 @@ if (limesurvey_percent_complete($case_id) == false)
|
||||
?>
|
||||
<p class='rsoption'><a href="rs_business.php"><? echo T_("Business number"); ?></a></p>
|
||||
<p class='rsoption'><a href="rs_answeringmachine.php"><? echo T_("Answering machine"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=2');"><? echo T_("End call with outcome: No answer (ring out or busy) "); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=18');"><? echo T_("End call with outcome: Accidental hang up"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=6');"><? echo T_("End call with outcome: Refusal by unknown person"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=8');"><? echo T_("End call with outcome: Refusal by respondent"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=17');"><? echo T_("End call with outcome: No eligible respondent (person never available on this number)"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=31');"><? echo T_("End call with outcome: Non contact (person not currently available on this number: no appointment made)"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=30');"><? echo T_("End call with outcome: Out of sample (already completed in another mode)"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=2');"><? echo T_("End call with outcome: No answer (ring out or busy) "); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=18');"><? echo T_("End call with outcome: Accidental hang up"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=6');"><? echo T_("End call with outcome: Refusal by unknown person"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=8');"><? echo T_("End call with outcome: Refusal by respondent"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=17');"><? echo T_("End call with outcome: No eligible respondent (person never available on this number)"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=31');"><? echo T_("End call with outcome: Non contact (person not currently available on this number: no appointment made)"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=30');"><? echo T_("End call with outcome: Out of sample (already completed in another mode)"); ?></a></p>
|
||||
<?
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
@@ -50,8 +50,7 @@ include ("functions/functions.xhtml.php");
|
||||
include ("functions/functions.operator.php");
|
||||
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Project End"),true,array("css/rs.css"),array("js/popup.js"));
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Project end"),true,array("css/rs.css","include/jquery-ui/css/smoothness/jquery-ui-1.8.2.custom.css"), array("js/popup.js","include/jquery-ui/js/jquery-1.4.2.min.js","include/jquery-ui/js/jquery-ui-1.8.2.custom.min.js"));
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$case_id = get_case_id($operator_id);
|
||||
@@ -67,7 +66,7 @@ $r = $db->GetRow($sql);
|
||||
print "<p class='rstext'>" . template_replace($r['rs_project_end'],$operator_id,$case_id) . "</p>";
|
||||
|
||||
?>
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=10');"><? echo T_("End call with outcome: Complete"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=10');"><? echo T_("End call with outcome: Complete"); ?></a></p>
|
||||
<?
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
@@ -50,8 +50,7 @@ include ("functions/functions.xhtml.php");
|
||||
include ("functions/functions.operator.php");
|
||||
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Project Introduction"),true,array("css/rs.css"),array("js/popup.js"));
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Project Introduction"),true,array("css/rs.css","include/jquery-ui/css/smoothness/jquery-ui-1.8.2.custom.css"), array("js/popup.js","include/jquery-ui/js/jquery-1.4.2.min.js","include/jquery-ui/js/jquery-ui-1.8.2.custom.min.js"));
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$case_id = get_case_id($operator_id);
|
||||
@@ -73,9 +72,9 @@ print "<p class='rstext'>" . template_replace($r['rs_project_intro'],$operator_i
|
||||
|
||||
<p class='rsoption'><a href="<? print(get_limesurvey_url($operator_id)); ?>"><? echo T_("Yes - Continue"); ?></a></p>
|
||||
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=8');"><? echo T_("End call with outcome: Refusal by respondent"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=17');"><? echo T_("End call with outcome: No eligible respondent (person not available on this number)"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=30');"><? echo T_("End call with outcome: Out of sample (already completed in another mode)"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=8');"><? echo T_("End call with outcome: Refusal by respondent"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=17');"><? echo T_("End call with outcome: No eligible respondent (person not available on this number)"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=30');"><? echo T_("End call with outcome: Out of sample (already completed in another mode)"); ?></a></p>
|
||||
|
||||
<p class='rsoption'><a href="rs_intro.php"><? echo T_("Go Back"); ?></a></p>
|
||||
|
||||
|
||||
@@ -50,8 +50,7 @@ include ("functions/functions.xhtml.php");
|
||||
include ("functions/functions.operator.php");
|
||||
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Project Quota End"),true,array("css/rs.css"),array("js/popup.js"));
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Project Quota End"),true,array("css/rs.css","include/jquery-ui/css/smoothness/jquery-ui-1.8.2.custom.css"), array("js/popup.js","include/jquery-ui/js/jquery-1.4.2.min.js","include/jquery-ui/js/jquery-ui-1.8.2.custom.min.js"));
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$case_id = get_case_id($operator_id);
|
||||
@@ -60,7 +59,7 @@ $questionnaire_id = get_questionnaire_id($operator_id);
|
||||
print "<p class='rstext'>" . template_replace($_GET['message'],$operator_id,$case_id) . "</p>";
|
||||
|
||||
?>
|
||||
<p class='rsoption'><a href="javascript:poptastic('call.php?defaultoutcome=32');"><? echo T_("End call with outcome: Quota filled"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=32');"><? echo T_("End call with outcome: Quota filled"); ?></a></p>
|
||||
<?
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
Reference in New Issue
Block a user