diff --git a/call.php b/call.php index 117cb013..0a801be3 100644 --- a/call.php +++ b/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();'"); } diff --git a/js/popup.js b/js/popup.js index 3759bb53..2e17092b 100644 --- a/js/popup.js +++ b/js/popup.js @@ -1,6 +1,33 @@ -var newwindow; -function poptastic(url) -{ - newwindow=window.open(url,'name','height=600,width=350,resizable=yes,scrollbars=yes,toolbar=no,status=no'); - if (window.focus) {newwindow.focus()} -} +function poptastic(url, title) +{ + 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('').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(); +} diff --git a/js/window.js b/js/window.js index 802b4297..aa99fa48 100644 --- a/js/window.js +++ b/js/window.js @@ -1,4 +1,4 @@ -function LinkUp(element) +function LinkUp(element) { var number = document.getElementById(element).selectedIndex; location.href = document.getElementById(element).options[number].value; @@ -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; diff --git a/rs_answeringmachine.php b/rs_answeringmachine.php index 6ec806ba..db67f6bd 100644 --- a/rs_answeringmachine.php +++ b/rs_answeringmachine.php @@ -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 "
" . T_("Do not leave a message, please hang up") . "
"; ?> -echo T_("End call with outcome: Business answering machine"); ?>
+echo T_("End call with outcome: Business answering machine"); ?>
if ($leavemessage) { ?> -echo T_("End call with outcome: Answering machine Message left"); ?>
+echo T_("End call with outcome: Answering machine Message left"); ?>
} ?> -echo T_("End call with outcome: Answering machine No message left"); ?>
+echo T_("End call with outcome: Answering machine No message left"); ?>
diff --git a/rs_business.php b/rs_business.php index 78819e50..26150287 100644 --- a/rs_business.php +++ b/rs_business.php @@ -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")); + ?>echo T_("Sorry to bother you, I have called the wrong number")?>
-echo T_("End call with outcome: Business number"); ?>
+echo T_("End call with outcome: Business number"); ?>
diff --git a/rs_callback.php b/rs_callback.php index 2cd0ffdd..1b807428 100644 --- a/rs_callback.php +++ b/rs_callback.php @@ -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 "" . T_("You are: ") . round(limesurvey_percent_complete ?>
echo T_("Yes - Continue where we left off"); ?>
-echo T_("End call with outcome: Refusal by respondent"); ?>
+echo T_("End call with outcome: Refusal by respondent"); ?>
diff --git a/rs_intro.php b/rs_intro.php index fa12b537..ad32e0d4 100644 --- a/rs_intro.php +++ b/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) ?>echo T_("Business number"); ?>
echo T_("Answering machine"); ?>
-echo T_("End call with outcome: No answer (ring out or busy) "); ?>
-echo T_("End call with outcome: Accidental hang up"); ?>
-echo T_("End call with outcome: Refusal by unknown person"); ?>
-echo T_("End call with outcome: Refusal by respondent"); ?>
-echo T_("End call with outcome: No eligible respondent (person never available on this number)"); ?>
- -echo T_("End call with outcome: Out of sample (already completed in another mode)"); ?>
+echo T_("End call with outcome: No answer (ring out or busy) "); ?>
+echo T_("End call with outcome: Accidental hang up"); ?>
+echo T_("End call with outcome: Refusal by unknown person"); ?>
+echo T_("End call with outcome: Refusal by respondent"); ?>
+echo T_("End call with outcome: No eligible respondent (person never available on this number)"); ?>
+ +echo T_("End call with outcome: Out of sample (already completed in another mode)"); ?>
xhtml_foot(); diff --git a/rs_project_end.php b/rs_project_end.php index 972327f7..6b8cfe5d 100644 --- a/rs_project_end.php +++ b/rs_project_end.php @@ -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 "" . template_replace($r['rs_project_end'],$operator_id,$case_id) . "
"; ?> -echo T_("End call with outcome: Complete"); ?>
+echo T_("End call with outcome: Complete"); ?>
xhtml_foot(); diff --git a/rs_project_intro.php b/rs_project_intro.php index 2dc3bae5..9d13fee0 100644 --- a/rs_project_intro.php +++ b/rs_project_intro.php @@ -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 "" . template_replace($r['rs_project_intro'],$operator_i
-echo T_("End call with outcome: Refusal by respondent"); ?>
-echo T_("End call with outcome: No eligible respondent (person not available on this number)"); ?>
-echo T_("End call with outcome: Out of sample (already completed in another mode)"); ?>
+echo T_("End call with outcome: Refusal by respondent"); ?>
+echo T_("End call with outcome: No eligible respondent (person not available on this number)"); ?>
+echo T_("End call with outcome: Out of sample (already completed in another mode)"); ?>
diff --git a/rs_quota_end.php b/rs_quota_end.php index c543c1df..af2d9070 100644 --- a/rs_quota_end.php +++ b/rs_quota_end.php @@ -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 "" . template_replace($_GET['message'],$operator_id,$case_id) . "
"; ?> - + xhtml_foot();