From ca8423bd7f41b8121dd5e9ee98120d7d1159097e Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 8 Sep 2015 02:26:51 +0300 Subject: [PATCH] fix undefined variable, bootrapified operator files , edited styleshits --- css/index_interface2.css | 449 +--------------------------- css/tabber_interface2.css | 2 +- index_interface2.php | 387 ++++++++++++------------ js/headerexpand_interface2.js | 19 +- js/headerexpandmanual_interface2.js | 8 +- status_interface2.php | 20 +- waitnextcase_interface2.php | 17 +- 7 files changed, 236 insertions(+), 666 deletions(-) diff --git a/css/index_interface2.css b/css/index_interface2.css index d18e1d94..0ab309d7 100644 --- a/css/index_interface2.css +++ b/css/index_interface2.css @@ -1,9 +1,3 @@ -/** RESET **/ -* { - margin: 0; - padding: 0; -} - html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; @@ -16,6 +10,11 @@ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pr vertical-align: baseline; } +body { + text-align: justify; + font-family: Tahoma, Arial, Helvetica, sans-serif; +} + .clear { clear:both; font-size:0; @@ -23,303 +22,12 @@ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pr overflow:hidden; } -body { - margin: 0px; - padding: 0; - background: #FFFFFF; - text-align: justify; - font-family: Tahoma, Arial, Helvetica, sans-serif; -} - - -#wrapper_e { -} -.full_height_wrapper{ - margin: 0px; - padding: 0; - text-align: justify; - height:285px; - font-family: Tahoma, Arial, Helvetica, sans-serif; - min-width:1024px; -} -.half_height_wrapper{ - margin: 0px; - padding: 0; - text-align: justify; - height:94px; - font-family: Tahoma, Arial, Helvetica, sans-serif; - min-width:1024px; -} - -#top_page { -} -#top_page_in_e { -} - -.full_height_top_page{ - height: 207px; -} -.half_height_top_page{ - height: 56px; -} - -.full_height{ - margin: 0px; - padding: 0; - background: #FFF; - text-align: justify; - font-family: Tahoma, Arial, Helvetica, sans-serif; - height: 271px; - padding-top:14px; -} -.half_height{ - margin: 0px; - padding: 0; - background: #FFF; - text-align: justify; - font-family: Tahoma, Arial, Helvetica, sans-serif; - height: 80px; - padding-top:14px; -} - - -#header_line { - margin: 16px 0px 0px 12px; - padding: 0; - text-align: justify; - font-family: Tahoma, Arial, Helvetica, sans-serif; - height: 24px; -} - - -#menu_left_e { -} -.menu_full_height { - padding: 0; - height: 137px; - width:145px; - display:block; - float:left; - padding:9px 22px 0px 44px; - padding-left:44px; - padding-top:9px; - list-style:none; -} - -.menu_half_height { - padding: 0; - height: 47px; - list-style:none; - width:145px; - display:block; - float:left; - padding:9px 22px 0px 44px; - padding-left:44px; - padding-top:9px; -} - -#menu_left li { - list-style: none; -} - -#item_1 a{ - background: url(images/btn_field.jpg) no-repeat left top; - list-style: none; - display: inline; - float: left; - width: 220px; - height: 40px; - color:#9f9f9f; - text-decoration:none; - padding:8px 0px 0px 18px; - border:none; -} - -#item_1 a:hover{ - list-style: none; - display: inline; - float: left; - width: 220px; - height: 40px; - text-decoration:none; - color:#49b848; -} - -#item_2_e a{ -} - -.item_2_full_height a{ - background: url(images/btn_field.jpg) no-repeat left top; - list-style: none; - display: inline; - float: left; - width: 220px; - height: 36px; - text-decoration:none; - color:#9f9f9f; - padding:8px 0px 0px 18px; - border:none; -} -.item_2_half_height a{ - float: left; - width: 220px; - height: 1px; - text-decoration:none; - color:#b8b8ba; - display:none; -} -.item_2_full_height a:hover{ -list-style: none; - display: inline; - float: left; - width: 220px; - height: 36px; - text-decoration:none; - color:#05b0f7; - background: url(images/btn_field.jpg) no-repeat left top; -} - -#item_2_e a:hover{ -} -.item_2_half_height { - float: left; - width: 220px; - height: 1px; - display:none; -} - -#item_3_e a{ -} -.item_3_half_height { - float: left; - width: 220px; - height: 1px; - display:none; -} -.item_3_full_height a{ - background: url(images/btn_field.jpg) no-repeat left top; - list-style: none; - display: inline; - float: left; - width: 220px; - height: 36px; - text-decoration:none; - color:#9f9f9f; - padding:8px 0px 0px 18px; - border:none; -} -.item_3_half_height a{ -} -.item_3_full_height a:hover{ - list-style: none; - display: inline; - float: left; - width: 220px; - height: 36px; - text-decoration:none; - color:#ff3506; -} - -#item_3_e a:hover{ -} - -#info_e { -} - -.info_full_height{ - margin: 0px; - padding: 0; - background: #CCC; - border: 1px solid #e9e9eb; - text-align: justify; - font-family: Tahoma, Arial, Helvetica, sans-serif; - display:block; - float:left; - height: 137px; - width:214px; - padding-right:115px; -} -.info_half_height{ - margin: 0px; - padding: 0; - background: #CCC; - border: 1px solid #e9e9eb; - text-align: justify; - font-family: Tahoma, Arial, Helvetica, sans-serif; - display:block; - float:left; - height: 56px; - width:214px; - padding-right:115px; -} - - - -a:active { - /* border: 4px inset;*/ -} - - -#arrow_up_e { -} - -.arrow_up_full_height { - margin: 0 auto; - padding: 0; - background: #EEE; - background: url(images/arrow_up.png) no-repeat left top; - text-align: justify; - font-family: Tahoma, Arial, Helvetica, sans-serif; - height: 20px; - width:20px; - position:absolute; - left:480px; - top:270px; -} - -.arrow_up_half_height { - display:none; -} - -#arrow_down_e { -} - -.arrow_down_full_height { - display:none; -} -.arrow_down_half_height { - margin: 0 auto; - padding: 0; - background: #EEE; - background: url(images/arrow_down.jpg) no-repeat left top; - text-align: justify; - font-family: Tahoma, Arial, Helvetica, sans-serif; - height: 20px; - width:20px; - left:480px; - top:80px; - position:absolute; -} - -#bottom_page { - margin: 0px; - padding: 0; - background: #CCC; - text-align: justify; - font-family: Tahoma, Arial, Helvetica, sans-serif; - height: 100%; -} - .headerexpand { position: absolute; - height: 20px; - bottom: 0px; - right: 20%; -} -#headerexpandimage { - height: 15px; + left: 41%; } + .box { margin: 18px; } @@ -329,160 +37,19 @@ a:active { .offline { background: #FF0000; } -a { - /*padding: 3px 0.5em; - margin-left: 3px; - border: 1px solid #778; - background: #DDE; - text-decoration: none; - color: black;*/ -} -a:active { - /* border: 4px inset;*/ -} -.header { - position : absolute; - width : 50%; - height : 30%; - top : 30%; - right : 0; - bottom : auto; - left : 0; - /*max-height:136px;*/ -} -#calllist { - position : absolute; - width : 50%; - height : 28%; - top : 2%; - left : 48%; - right : 1%; - /*max-height:180px;*/ - bottom : auto; -} -#qstatus { - position : absolute; - width : 30%; - height : 30%; - top : 2%; - right : 2%; - left: 17%; - bottom : auto; - /*max-height:38%;*/ -} -#casefunctions { - position : absolute; - width : 12%; - height : 30%; - top : 0; - right : 0; - left: 0; - font-size:18px; - padding:1%; - - bottom : auto; -} -#casefunctions li { - list-style:none; -} -#content { - position : absolute; - top : 31%; - left : 0.5%; - right :0.5%; - bottom : auto; - width : 99%; - height : 69%; -} + .embeddedobject { width:100%; height:100%; position:absolute; } #main-qstatus { - width:95%; - /*max-height:116px;*/ - position:absolute; - left:3%; - top:1%; - height:90%; border: 2px solid #e9e9eb; border-radius: 15px; -moz-border-radius: 15px; - -} - -#main-casenotes{ -height:85%; -} -#main-contactdetails{ -/*height:85%;*/ -} -#main-calllist{ -/*height:85%;*/ -} -#main-appointmentlist{ -height:85%; -} -#main-projectinfo{ -height:85%; -} - -.wait_wrapper{ -margin: 0 auto; -position:absolute; -top:40%; -height:60%; -width:260px; -left:40%; -list-style:none; } -.wait_li_1 a{ - background: url(images/btn_field.jpg) no-repeat left top; - list-style: none; - display: inline; - float: left; - width: 220px; - height: 40px; - color:#9f9f9f; - text-decoration:none; - padding:8px 0px 0px 18px; - border:none; - margin-bottom: 20px; -} -.wait_li_1 a:hover{ - list-style: none; - display: inline; - float: left; - width: 220px; - height: 40px; - text-decoration:none; - color:#49b848; -} -.wait_li_2 a{ - background: url(images/btn_field.jpg) no-repeat left top; - list-style: none; - display: inline; - float: left; - width: 220px; - height: 40px; - color:#9f9f9f; - text-decoration:none; - padding:8px 0px 0px 18px; - border:none; -} - -.wait_li_2 a:hover{ - list-style: none; - display: inline; - float: left; - width: 220px; - height: 40px; - text-decoration:none; - color:#ff3506; -} diff --git a/css/tabber_interface2.css b/css/tabber_interface2.css index fcb58b4f..7c6638e5 100644 --- a/css/tabber_interface2.css +++ b/css/tabber_interface2.css @@ -84,7 +84,7 @@ ul.tabbernav li.tabberactive a:hover Add style only after the tabber interface is set up (.tabberlive) --------------------------------------------------*/ .tabberlive .tabbertab { - position:absolute; + /*position:absolute;*/ border: 2px solid #e9e9eb; border-bottom-left-radius: 15px; -moz-border-radius-bottomleft: 15px; diff --git a/index_interface2.php b/index_interface2.php index 1baa7e8e..8b361e6f 100644 --- a/index_interface2.php +++ b/index_interface2.php @@ -200,7 +200,7 @@ else if (HEADER_EXPANDER_MANUAL) } -xhtml_head(T_("Case"), $body, array("include/bootstrap/css/bootstrap.min.css","css/index_interface2.css","css/tabber_interface2.css","include/jquery-ui/jquery-ui.min.css") , $js); +xhtml_head(T_("Case"), $body, array("include/bootstrap/css/bootstrap.min.css","include/bootstrap/css/bootstrap-theme.min.css","include/font-awesome/css/font-awesome.css","css/index_interface2.css","css/tabber_interface2.css","include/jquery-ui/jquery-ui.min.css"),$js,false,false, false,false,false); print $script; $case_id = get_case_id($operator_id,true); @@ -217,212 +217,215 @@ $ref = $scr['referral']; $availability = is_using_availability($case_id); ?> -
- -
+
+
-
- -
<?php  echo T_('/>
-
+
+ +
+
+ +
+ + +
+ + + +
+ +
+ +
+ +
'>
+ +
+ +
+ + +
"> +

+
+
+ + + +
"> +

+
+
+ + + +
"> +

+
+
+ + + +
"> +

+
+
+ + + +
" id="tab-shifts"> +

+
+
+ + + +
"> +

+
+
+ + + +
"> +

+
+
+ + + +
"> +

+
+
+ + + +
"> +

+
+
+ -
+ +
"> +

+
+
+ + +
+ +
+ +
-
- - -
"> -

-
-
- - - -
"> -

-
-
- - - -
"> -

-
-
- - - - -
"> -

-
-
- - - - -
" id="tab-shifts"> -

-
-
- - - - -
"> -

-
-
- - - - -
"> -

-
-
- - - -
"> -

-
-
- - - -
"> -

-
-
- - - - -
"> -

-
-
- - - -
- - -
- - - -
-GetRow($sql); - - if (!empty($rs)) - { - $contact_phone_id = $rs['contact_phone_id']; - - if (!isset($rs['respondent_id'])) - { - $sql = "SELECT respondent_id - FROM respondent - WHERE case_id = $case_id"; - - $respondent_id = $db->GetOne($sql); - } - else - { - $respondent_id = $rs['respondent_id']; - } - $call_id = get_call($operator_id,$respondent_id,$contact_phone_id,true); - } -} +
-if (!is_respondent_selection($operator_id)) - $data = get_limesurvey_url($operator_id); -else - $data = get_respondentselection_url($operator_id,true,true); //use second interface + + if (!$call_id) + { + if ($appointment) + { + //create a call on the appointment number + $sql = "SELECT cp.*, a.respondent_id + FROM contact_phone as cp, appointment as a + WHERE cp.case_id = '$case_id' + AND a.appointment_id = '$appointment' + AND a.contact_phone_id = cp.contact_phone_id"; + } + else + { + //create a call on the first available number by priority + $sql = "SELECT c. * + FROM contact_phone AS c + LEFT JOIN ( + SELECT contact_phone.contact_phone_id + FROM contact_phone + LEFT JOIN `call` ON ( call.contact_phone_id = contact_phone.contact_phone_id ) + LEFT JOIN outcome ON ( call.outcome_id = outcome.outcome_id ) + WHERE contact_phone.case_id = '$case_id' + AND outcome.tryagain =0 + ) AS l ON l.contact_phone_id = c.contact_phone_id + LEFT JOIN + ( + SELECT contact_phone_id + FROM `call` + WHERE call_attempt_id = '$ca' + AND outcome_id NOT IN (15,18) + ) as ca on ca.contact_phone_id = c.contact_phone_id + WHERE c.case_id = '$case_id' + AND l.contact_phone_id IS NULL + AND ca.contact_phone_id IS NULL + order by c.priority ASC"; + + + } + $rs = $db->GetRow($sql); + + if (!empty($rs)) + { + $contact_phone_id = $rs['contact_phone_id']; + + if (!isset($rs['respondent_id'])) + { + $sql = "SELECT respondent_id + FROM respondent + WHERE case_id = $case_id"; + + $respondent_id = $db->GetOne($sql); + } + else + { + $respondent_id = $rs['respondent_id']; + } + $call_id = get_call($operator_id,$respondent_id,$contact_phone_id,true); + } + } + + if (!is_respondent_selection($operator_id)) + $data = get_limesurvey_url($operator_id); + else + $data = get_respondentselection_url($operator_id,true,true); //use second interface + + xhtml_object($data,"main-content", "embeddedobject content"); + + ?> + + +
HasFailedTrans()){ print "

FAILED AT END of index

"; exit();} $db->CompleteTrans(); diff --git a/js/headerexpand_interface2.js b/js/headerexpand_interface2.js index f911ab92..5954e1f8 100644 --- a/js/headerexpand_interface2.js +++ b/js/headerexpand_interface2.js @@ -1,20 +1,17 @@ function headerexpand() { - $(".header").css("height","38%"); - $(".content").css("height","60%"); - $(".content").css("top","40%"); + $(".headerexpand").css("top","35%"); + $(".content").css("height","63%"); + $(".content").css("top","37%"); $(".box:not(.important)").css("display",""); -// $(".item_2_half_height").removeClass("item_2_half_height").addClass("item_2_full_height"); - $(".item_3_half_height").removeClass("item_3_half_height").addClass("item_3_full_height"); + } function headercontract() { - $(".header").css("height","13%"); - $(".content").css("height","85%"); - $(".content").css("top","15%"); + $(".headerexpand").css("top","18%"); + $(".content").css("height","80%"); + $(".content").css("top","20%"); $(".box:not(.important)").css("display","none"); -// $(".item_2_full_height").removeClass("item_2_full_height").addClass("item_2_half_height"); - $(".item_3_full_height").removeClass("item_3_full_height").addClass("item_3_half_height"); - + } diff --git a/js/headerexpandmanual_interface2.js b/js/headerexpandmanual_interface2.js index 05efaa9a..77b2df40 100644 --- a/js/headerexpandmanual_interface2.js +++ b/js/headerexpandmanual_interface2.js @@ -6,20 +6,20 @@ $(document).ready(function(){ function headerforcecontract() { - $("#headerexpandimage").attr('src',"./images/arrow-down-2.jpg"); + $("#headerexpandimage").attr('class',"fa fa-lg fa-fw fa-toggle-down "); headercontract(); } function headertogglemanual() { - if ($("#headerexpandimage").attr('src') == './images/arrow-up-2.jpg') + if ($("#headerexpandimage").attr('class') == 'fa fa-lg fa-fw fa-toggle-up') { - $("#headerexpandimage").attr('src',"./images/arrow-down-2.jpg"); + $("#headerexpandimage").attr('class',"fa fa-lg fa-fw fa-toggle-down"); headercontract(); } else { - $("#headerexpandimage").attr('src',"./images/arrow-up-2.jpg"); + $("#headerexpandimage").attr('class',"fa fa-lg fa-fw fa-toggle-up"); headerexpand(); } diff --git a/status_interface2.php b/status_interface2.php index c5ba8858..78c675ed 100644 --- a/status_interface2.php +++ b/status_interface2.php @@ -215,18 +215,20 @@ if ($ca) //Display all available numbers for this case as a list of radio buttons //By default, the selected radio button should have a "call" started for it //When then next one clicked, it should bring up call screen if no outcome otherwise start new call - print "
"; + //print "
";print "
"; foreach($rs as $r) { - print "
"; - print ""; - print ""; - print "

"; + print "
+

+   + +

+
"; } - print "
"; + } else print "
" . T_("No more numbers to call") . "
"; diff --git a/waitnextcase_interface2.php b/waitnextcase_interface2.php index 9e97c434..cffd1f25 100644 --- a/waitnextcase_interface2.php +++ b/waitnextcase_interface2.php @@ -46,7 +46,7 @@ include ("auth-interviewer.php"); */ include_once("functions/functions.xhtml.php"); -xhtml_head(T_("Standby"),false,array("include/bootstrap/css/bootstrap.min.css","css/index_interface2.css"), array(), false, 300); +xhtml_head(T_("Standby"),false,array("include/bootstrap/css/bootstrap.min.css","include/bootstrap/css/bootstrap-theme.min.css","include/font-awesome/css/font-awesome.css","css/index_interface2.css"), array(), false, 300); if (isset($_GET['auto'])) { @@ -91,7 +91,7 @@ if (empty($rs)) else { - print "
"; + print "
"; print "

" . T_("Assigned questionnaires:") . ""; /* if (isset($_GET['auto'])) { @@ -191,13 +191,14 @@ else } ?> -

-
    - 0 or $new_samples['count_samples'] > 0){ ?> -
  • +
    + + 0) or (isset($new_samples['count_samples']) && $new_samples['count_samples'] > 0)){ ?> + +
    -
  • -
+ +