Campaign wise table creation and calling
Showing
9 changed files
with
148 additions
and
31 deletions
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
| ... | @@ -61,7 +61,7 @@ kstychCall['supcomntid']=''; | ... | @@ -61,7 +61,7 @@ kstychCall['supcomntid']=''; |
| 61 | kstychCall['userdata']={}; | 61 | kstychCall['userdata']={}; |
| 62 | kstychCall['previewcrmid']=''; | 62 | kstychCall['previewcrmid']=''; |
| 63 | kstychCall['callWrapupTime']=180; | 63 | kstychCall['callWrapupTime']=180; |
| 64 | kstychCall['prograssiveDelay']=10; | 64 | kstychCall['prograssiveDelay']=20; |
| 65 | kstychCall['ts_now']=0; | 65 | kstychCall['ts_now']=0; |
| 66 | 66 | ||
| 67 | kstychCall['bttc_day']=''; | 67 | kstychCall['bttc_day']=''; |
| ... | @@ -560,6 +560,7 @@ function saveCloseDialerCall(flag) | ... | @@ -560,6 +560,7 @@ function saveCloseDialerCall(flag) |
| 560 | kstychCall['userstatus']=$('#dialer_userstatus').val(); | 560 | kstychCall['userstatus']=$('#dialer_userstatus').val(); |
| 561 | kstychCall['usersubstatus']=$('#dialer_usersubstatus').val(); | 561 | kstychCall['usersubstatus']=$('#dialer_usersubstatus').val(); |
| 562 | kstychCall['usercallback']=$('#dialer_usercallback').val(); | 562 | kstychCall['usercallback']=$('#dialer_usercallback').val(); |
| 563 | kstychCall['userappointment']=$('#dialer_appointment').val(); | ||
| 563 | kstychCall["attempt"]=$('#attempt').val();//attempt dropdown value insert | 564 | kstychCall["attempt"]=$('#attempt').val();//attempt dropdown value insert |
| 564 | 565 | ||
| 565 | //kstychCall['userremarks']=$('#dialer_userremarks').val(); | 566 | //kstychCall['userremarks']=$('#dialer_userremarks').val(); |
| ... | @@ -595,8 +596,12 @@ console.log(fullRem); | ... | @@ -595,8 +596,12 @@ console.log(fullRem); |
| 595 | { | 596 | { |
| 596 | kstychCall['userstatus']="AUTOWRAPUP"; | 597 | kstychCall['userstatus']="AUTOWRAPUP"; |
| 597 | kstychCall['usersubstatus']="AUTOWRAPUP"; | 598 | kstychCall['usersubstatus']="AUTOWRAPUP"; |
| 599 | |||
| 600 | |||
| 598 | $('#dialer_usercallback').val(""); | 601 | $('#dialer_usercallback').val(""); |
| 599 | kstychCall['usercallback']=""; | 602 | kstychCall['usercallback']=""; |
| 603 | $('#dialer_appointment').val(""); | ||
| 604 | kstychCall['userappointment']=""; | ||
| 600 | kstychCall['userremarks']=""; | 605 | kstychCall['userremarks']=""; |
| 601 | kstychCall['userflag']=""; | 606 | kstychCall['userflag']=""; |
| 602 | } | 607 | } |
| ... | @@ -606,6 +611,8 @@ console.log(fullRem); | ... | @@ -606,6 +611,8 @@ console.log(fullRem); |
| 606 | kstychCall['usersubstatus']="REDIAL"; | 611 | kstychCall['usersubstatus']="REDIAL"; |
| 607 | $('#dialer_usercallback').val(""); | 612 | $('#dialer_usercallback').val(""); |
| 608 | kstychCall['usercallback']=""; | 613 | kstychCall['usercallback']=""; |
| 614 | $('#dialer_appointment').val(""); | ||
| 615 | kstychCall['userappointment']=""; | ||
| 609 | kstychCall['userremarks']=""; | 616 | kstychCall['userremarks']=""; |
| 610 | kstychCall['userflag']=""; | 617 | kstychCall['userflag']=""; |
| 611 | 618 | ||
| ... | @@ -616,11 +623,13 @@ console.log(fullRem); | ... | @@ -616,11 +623,13 @@ console.log(fullRem); |
| 616 | kstychCall['userstatus']="NORECORD"; | 623 | kstychCall['userstatus']="NORECORD"; |
| 617 | kstychCall['usersubstatus']="NORECORD"; | 624 | kstychCall['usersubstatus']="NORECORD"; |
| 618 | kstychCall['usercallback']=""; | 625 | kstychCall['usercallback']=""; |
| 626 | kstychCall['userappointment']=""; | ||
| 619 | kstychCall['userremarks']=""; | 627 | kstychCall['userremarks']=""; |
| 620 | kstychCall['userflag']=""; | 628 | kstychCall['userflag']=""; |
| 621 | kstychCall["attempt"]=""; | 629 | kstychCall["attempt"]=""; |
| 622 | 630 | ||
| 623 | $('#dialer_usercallback').val(""); | 631 | $('#dialer_usercallback').val(""); |
| 632 | $('#dialer_appointment').val(""); | ||
| 624 | } | 633 | } |
| 625 | else | 634 | else |
| 626 | { | 635 | { |
| ... | @@ -677,6 +686,40 @@ console.log(fullRem); | ... | @@ -677,6 +686,40 @@ console.log(fullRem); |
| 677 | simpleNotification('error','topRight',"Please select Callback Time date within 9AM and 7PM"); | 686 | simpleNotification('error','topRight',"Please select Callback Time date within 9AM and 7PM"); |
| 678 | return; | 687 | return; |
| 679 | } | 688 | } |
| 689 | |||
| 690 | if(kstychCall['usersubstatus'].toLowerCase().indexOf("appointment")>-1||kstychCall['userstatus'].toLowerCase().indexOf("appointment")>-1) | ||
| 691 | { | ||
| 692 | if($('#dialer_appointment').val()=="") | ||
| 693 | { | ||
| 694 | //console.log("followup"); | ||
| 695 | simpleNotification('error','topRight',"Please select Appointment Date within one month in future"); | ||
| 696 | return; | ||
| 697 | } | ||
| 698 | } | ||
| 699 | else | ||
| 700 | { | ||
| 701 | if($('#dialer_appointment').val()!="") | ||
| 702 | { | ||
| 703 | simpleNotification('error','topRight',"You Cannot input Appointment date time in this Disposition"); | ||
| 704 | return; | ||
| 705 | } | ||
| 706 | } | ||
| 707 | |||
| 708 | var date3 = new Date($('#dialer_appointment').val()); | ||
| 709 | var diff = date3.getTime() - date1.getTime(); | ||
| 710 | if(diff<0||diff>30*24*60*60*1000) | ||
| 711 | { | ||
| 712 | simpleNotification('error','topRight',"Please select Appointment date within one month in future"); | ||
| 713 | return; | ||
| 714 | } | ||
| 715 | var hours = date3.getHours(); | ||
| 716 | var mins = date3.getMinutes(); | ||
| 717 | var fullhour=hours+(mins/60); | ||
| 718 | if(fullhour<9||fullhour>19) | ||
| 719 | { | ||
| 720 | simpleNotification('error','topRight',"Please select Appointment Time date within 9AM and 7PM"); | ||
| 721 | return; | ||
| 722 | } | ||
| 680 | 723 | ||
| 681 | } | 724 | } |
| 682 | 725 | ||
| ... | @@ -780,6 +823,8 @@ function showWrapUp() | ... | @@ -780,6 +823,8 @@ function showWrapUp() |
| 780 | kstychCall['usersubstatus']="WRAPUP"; | 823 | kstychCall['usersubstatus']="WRAPUP"; |
| 781 | $('#dialer_usercallback').val(""); | 824 | $('#dialer_usercallback').val(""); |
| 782 | kstychCall['usercallback']=""; | 825 | kstychCall['usercallback']=""; |
| 826 | kstychCall['usercallback']=""; | ||
| 827 | $('#dialer_appointment').val(""); | ||
| 783 | kstychCall['userremarks']=""; | 828 | kstychCall['userremarks']=""; |
| 784 | kstychCall['userflag']=""; | 829 | kstychCall['userflag']=""; |
| 785 | 830 | ||
| ... | @@ -812,9 +857,12 @@ function resetDialer() | ... | @@ -812,9 +857,12 @@ function resetDialer() |
| 812 | 857 | ||
| 813 | var dialerResetForceState=kstychDialer['mDialerState']; | 858 | var dialerResetForceState=kstychDialer['mDialerState']; |
| 814 | var dialerResetForceSubState=kstychDialer['mDialerSubState']; | 859 | var dialerResetForceSubState=kstychDialer['mDialerSubState']; |
| 815 | 860 | if(dialerResetForceSubState != "Predictive"){ | |
| 816 | dialerResetForceState="Progressive";//Hardcoded TODO change to config | 861 | dialerResetForceState="Progressive";//Hardcoded TODO change to config |
| 817 | dialerResetForceSubState=""; | 862 | dialerResetForceSubState=""; |
| 863 | } | ||
| 864 | //dialerResetForceState="Progressive";//Hardcoded TODO change to config | ||
| 865 | //dialerResetForceSubState=""; | ||
| 818 | 866 | ||
| 819 | if(kstychCall['userstatus']=="AUTOWRAPUP") | 867 | if(kstychCall['userstatus']=="AUTOWRAPUP") |
| 820 | { | 868 | { |
| ... | @@ -876,9 +924,19 @@ function resetCallArray() | ... | @@ -876,9 +924,19 @@ function resetCallArray() |
| 876 | 924 | ||
| 877 | kSetDData('C','previewcrmid',""); | 925 | kSetDData('C','previewcrmid',""); |
| 878 | kSetDData('C','callWrapupTime',180); | 926 | kSetDData('C','callWrapupTime',180); |
| 879 | kSetDData('C','prograssiveDelay',10); | 927 | kSetDData('C','prograssiveDelay',20); |
| 928 | |||
| 929 | } | ||
| 930 | |||
| 931 | function savedialermode(client) | ||
| 932 | { | ||
| 933 | var datastr="kstychCall="+JSON.stringify(kstychCall); | ||
| 934 | datastr+="&kstychDialer="+JSON.stringify(kstychDialer); | ||
| 935 | |||
| 936 | doAjax("dialer?action=usersel&client="+client,datastr,"","","singlefail","POST"); | ||
| 880 | } | 937 | } |
| 881 | 938 | ||
| 939 | |||
| 882 | function updateDialerState(objstr,key,val,key2,val2) | 940 | function updateDialerState(objstr,key,val,key2,val2) |
| 883 | { | 941 | { |
| 884 | if(objstr=="dialer") | 942 | if(objstr=="dialer") |
| ... | @@ -889,6 +947,9 @@ function updateDialerState(objstr,key,val,key2,val2) | ... | @@ -889,6 +947,9 @@ function updateDialerState(objstr,key,val,key2,val2) |
| 889 | { | 947 | { |
| 890 | if(!key2||key2=="")kSetDData("D","mDialerSubState",""); | 948 | if(!key2||key2=="")kSetDData("D","mDialerSubState",""); |
| 891 | 949 | ||
| 950 | $("#transferCallBtn").removeClass("show").addClass("hide"); | ||
| 951 | $("#transferHangBtn").removeClass("hide").addClass("show"); | ||
| 952 | |||
| 892 | if(val=="Paused") | 953 | if(val=="Paused") |
| 893 | { | 954 | { |
| 894 | resetCallArray(); | 955 | resetCallArray(); |
| ... | @@ -934,6 +995,8 @@ function updateDialerState(objstr,key,val,key2,val2) | ... | @@ -934,6 +995,8 @@ function updateDialerState(objstr,key,val,key2,val2) |
| 934 | 995 | ||
| 935 | updateDialerState(); | 996 | updateDialerState(); |
| 936 | }); | 997 | }); |
| 998 | //if(val2=="Predictive") | ||
| 999 | savedialermode(client); | ||
| 937 | } | 1000 | } |
| 938 | } | 1001 | } |
| 939 | if(objstr=="call") | 1002 | if(objstr=="call") |
| ... | @@ -1637,6 +1700,14 @@ recursiveDTMF(); | ... | @@ -1637,6 +1700,14 @@ recursiveDTMF(); |
| 1637 | charLen=0; | 1700 | charLen=0; |
| 1638 | } | 1701 | } |
| 1639 | 1702 | ||
| 1703 | function sendTHDTMFs(){ | ||
| 1704 | dtmfVal = "*2"; | ||
| 1705 | if(validateDTMF(dtmfVal) == false){simpleNotification("error","topRight", "Invalid DTMF");return;} | ||
| 1706 | |||
| 1707 | recursiveDTMF(); | ||
| 1708 | charLen=0; | ||
| 1709 | } | ||
| 1710 | |||
| 1640 | function recursiveDTMF() { | 1711 | function recursiveDTMF() { |
| 1641 | setTimeout(function(){ | 1712 | setTimeout(function(){ |
| 1642 | var dtmfKey = dtmfVal.charAt(charLen); | 1713 | var dtmfKey = dtmfVal.charAt(charLen); | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -40,6 +40,7 @@ $searchkey3=trim(Input::get('maintextsearch_3_span')); | ... | @@ -40,6 +40,7 @@ $searchkey3=trim(Input::get('maintextsearch_3_span')); |
| 40 | $searchstr4=trim(Input::get('maintextsearch_4_txt')); | 40 | $searchstr4=trim(Input::get('maintextsearch_4_txt')); |
| 41 | $searchkey4=trim(Input::get('maintextsearch_4_span')); | 41 | $searchkey4=trim(Input::get('maintextsearch_4_span')); |
| 42 | 42 | ||
| 43 | $client=trim(Input::get('client')); | ||
| 43 | 44 | ||
| 44 | $uids=array(); | 45 | $uids=array(); |
| 45 | 46 | ||
| ... | @@ -66,12 +67,13 @@ if($searchstr1!="") | ... | @@ -66,12 +67,13 @@ if($searchstr1!="") |
| 66 | { | 67 | { |
| 67 | $matchkeys=array(); | 68 | $matchkeys=array(); |
| 68 | $prematchstr="";if(!empty($uids))$prematchstr="where id in (".implode(",",$uids).")"; | 69 | $prematchstr="";if(!empty($uids))$prematchstr="where id in (".implode(",",$uids).")"; |
| 69 | 70 | Log::info($client.'--->number 1'); | |
| 70 | $res=$wakka->LoadAll("select distinct $key from records $prematchstr"); | 71 | if($client!='')$records='records_'.$client;else $records='records'; |
| 72 | $res=$wakka->LoadAll("select distinct $key from $records $prematchstr"); | ||
| 71 | foreach($res as $tres)if($tres[$key]!=''&&stristr($tres[$key],$searchstr1))$matchkeys[]="'".$tres[$key]."'"; | 73 | foreach($res as $tres)if($tres[$key]!=''&&stristr($tres[$key],$searchstr1))$matchkeys[]="'".$tres[$key]."'"; |
| 72 | 74 | ||
| 73 | $prematchstr2="";if(!empty($uids))$prematchstr2="and id in (".implode(",",$uids).")"; | 75 | $prematchstr2="";if(!empty($uids))$prematchstr2="and id in (".implode(",",$uids).")"; |
| 74 | if(!empty($matchkeys))$tusers=$wakka->getPersonIDs("$key in (".implode(",",$matchkeys).") $prematchstr2"); | 76 | if(!empty($matchkeys))$tusers=$wakka->getPersonIDs("$key in (".implode(",",$matchkeys).") $prematchstr2",$client); |
| 75 | $uids=array();foreach($tusers as $tuser)if(isset($tuser['id']))$uids[]=$tuser['id']+0; | 77 | $uids=array();foreach($tusers as $tuser)if(isset($tuser['id']))$uids[]=$tuser['id']+0; |
| 76 | } | 78 | } |
| 77 | } | 79 | } |
| ... | @@ -182,8 +184,11 @@ if($searchstr4!="") | ... | @@ -182,8 +184,11 @@ if($searchstr4!="") |
| 182 | foreach($oclientlst as $tclnt)if($tclnt!=""){$roclientstr[]="'$tclnt'";} | 184 | foreach($oclientlst as $tclnt)if($tclnt!=""){$roclientstr[]="'$tclnt'";} |
| 183 | } | 185 | } |
| 184 | if(!empty($roclientstr))$roclientstr="and client in (".implode(",",$roclientstr).")";else $roclientstr=""; | 186 | if(!empty($roclientstr))$roclientstr="and client in (".implode(",",$roclientstr).")";else $roclientstr=""; |
| 187 | //$client=Input::get("client"); | ||
| 188 | Log::info($client."-->ABC---"); | ||
| 189 | Log::info($uids); | ||
| 185 | 190 | ||
| 186 | if(!empty($uids))$users=$wakka->getPersons("id in (".implode(",",$uids).") $roclientstr limit 200"); | 191 | if(!empty($uids))$users=$wakka->getPersons("id in (".implode(",",$uids).") $roclientstr limit 10;",$client); |
| 187 | 192 | ||
| 188 | if(!empty($users)) | 193 | if(!empty($users)) |
| 189 | { | 194 | { | ... | ... |
| ... | @@ -5,11 +5,9 @@ $wakka->setUserTimezone(); | ... | @@ -5,11 +5,9 @@ $wakka->setUserTimezone(); |
| 5 | $themehome=$wakka->GetThemePath('/'); | 5 | $themehome=$wakka->GetThemePath('/'); |
| 6 | $varid=Input::get('varid'); | 6 | $varid=Input::get('varid'); |
| 7 | $bkvarid=Input::get('bkvarid'); | 7 | $bkvarid=Input::get('bkvarid'); |
| 8 | |||
| 9 | $edituser=0;$noreaduser=0;$oldbkrec=0; | 8 | $edituser=0;$noreaduser=0;$oldbkrec=0; |
| 10 | $isuser=$wakka->GetUser()?1:0; | 9 | $isuser=$wakka->GetUser()?1:0; |
| 11 | $recruitdata=array(); | 10 | $recruitdata=array(); |
| 12 | |||
| 13 | if($varid=="0") | 11 | if($varid=="0") |
| 14 | { | 12 | { |
| 15 | return; | 13 | return; |
| ... | @@ -72,9 +70,9 @@ if($varid!=""||$isuser) | ... | @@ -72,9 +70,9 @@ if($varid!=""||$isuser) |
| 72 | } | 70 | } |
| 73 | else | 71 | else |
| 74 | { | 72 | { |
| 75 | 73 | ||
| 76 | $varid=intval($varid); | 74 | $varid=intval($varid); |
| 77 | $recruitdata=$wakka->getPerson($varid); | 75 | $recruitdata=$wakka->getPerson($varid,""); |
| 78 | } | 76 | } |
| 79 | 77 | ||
| 80 | 78 | ... | ... |
| ... | @@ -85,6 +85,7 @@ $(document).ready(function(){ | ... | @@ -85,6 +85,7 @@ $(document).ready(function(){ |
| 85 | { | 85 | { |
| 86 | //doAjax('social/{!!Auth::user()->id!!}','show=wizard','welcome_wizard_body','ajax_wizard_show','singlefail','GET'); | 86 | //doAjax('social/{!!Auth::user()->id!!}','show=wizard','welcome_wizard_body','ajax_wizard_show','singlefail','GET'); |
| 87 | } | 87 | } |
| 88 | $('#transferButton').popover({title: "<b>Transfer Current Call</b>", content: '<div class="input-group"><input type="text" class="form-control" placeholder="Number" id=transfercalltxt><span class="input-group-btn"><button class="btn btn-default" type="button" onclick="transfercallconf();return false;" id="transferCallBtn"><i class="glyphicon glyphicon-transfer"></i></button><button class="btn btn-danger hide" type="button" onclick="sendTHDTMFs();return false;" id="transferHangBtn">×</button></span></div>', html: true, placement: "bottom"}); | ||
| 88 | }); | 89 | }); |
| 89 | 90 | ||
| 90 | function hrmsSearch() | 91 | function hrmsSearch() |
| ... | @@ -198,35 +199,39 @@ function createSearchRecordDiv(divid) | ... | @@ -198,35 +199,39 @@ function createSearchRecordDiv(divid) |
| 198 | 199 | ||
| 199 | <?php | 200 | <?php |
| 200 | $userdialmode=Auth::user()->dialmode_assign; | 201 | $userdialmode=Auth::user()->dialmode_assign; |
| 202 | $client=Auth::user()->sel_campaign; | ||
| 201 | $userdialmode=explode(",",$userdialmode); | 203 | $userdialmode=explode(",",$userdialmode); |
| 202 | //print_r($userdialmode); | 204 | //print_r($userdialmode); |
| 203 | if(in_array('Progressive',$userdialmode)) | 205 | if(in_array('Progressive',$userdialmode)) |
| 204 | { ?> | 206 | { ?> |
| 205 | <li><a href="#" onclick='updateDialerState("dialer","mDialerState","Progressive");return false;'><b>Progressive</b></a></li> | 207 | <li><a href="#" onclick='updateDialerState("dialer","mDialerState","Progressive");savedialermode(<?php echo $client; ?>);return false;'><b>Progressive</b></a></li> |
| 206 | <?php | 208 | <?php |
| 207 | } | 209 | } |
| 208 | if(in_array('Manual',$userdialmode)){?> | 210 | if(in_array('Manual',$userdialmode)){?> |
| 209 | 211 | ||
| 210 | 212 | ||
| 211 | <li id=dialerManualAllowLI><a href="#" onclick='updateDialerState("dialer","mDialerState","Manual");return false;'><b>Manual</b></a></li> | 213 | <li id=dialerManualAllowLI><a href="#" onclick='updateDialerState("dialer","mDialerState","Manual");savedialermode();return false;'><b>Manual</b></a></li> |
| 212 | 214 | ||
| 213 | 215 | ||
| 214 | <?php } if(in_array('Incoming',$userdialmode)){ ?> | 216 | <?php } if(in_array('Incoming',$userdialmode)){ ?> |
| 215 | <li style='background:#36bc9b'><a href="#" onclick='updateDialerState("dialer","mDialerState","Ready","mDialerSubState","Incoming");return false;'><b>Incoming</b></a></li> | 217 | <li style='background:#36bc9b'><a href="#" onclick='updateDialerState("dialer","mDialerState","Ready","mDialerSubState","Incoming");savedialermode();return false;'><b>Incoming</b></a></li> |
| 218 | |||
| 219 | <?php } if(in_array('Predictive',$userdialmode)){?> | ||
| 220 | <li style='background:#68cc9e'><a href="#" onclick='updateDialerState("dialer","mDialerState","Ready","mDialerSubState","Predictive");savedialermode();return false;'><b>Predictive</b></a></li> | ||
| 216 | <?php } ?> | 221 | <?php } ?> |
| 217 | <!--<li><a href="#" onclick='updateDialerState("dialer","mDialerState","DialNext");return false;'><b>DialNext</b></a></li>--> | 222 | <!--<li><a href="#" onclick='updateDialerState("dialer","mDialerState","DialNext");return false;'><b>DialNext</b></a></li>--> |
| 218 | 223 | ||
| 219 | <li><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","Manual");return false;'><b>Paused</b></a></li> | 224 | <li><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","Manual");savedialermode();return false;'><b>Paused</b></a></li> |
| 220 | 225 | ||
| 221 | 226 | ||
| 222 | <li style='background:#ccc'><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","AgentBriefing");return false;'><b>AgentBriefing</b></a></li> | 227 | <li style='background:#ccc'><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","AgentBriefing");savedialermode();return false;'><b>AgentBriefing</b></a></li> |
| 223 | <li style='background:#ccc'><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","TeamMeeting");return false;'><b>TeamMeeting</b></a></li> | 228 | <li style='background:#ccc'><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","TeamMeeting");savedialermode();return false;'><b>TeamMeeting</b></a></li> |
| 224 | <li style='background:#ccc'><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","QualityFeedback");return false;'><b>QualityFeedback</b></a></li> | 229 | <li style='background:#ccc'><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","QualityFeedback");savedialermode();return false;'><b>QualityFeedback</b></a></li> |
| 225 | <li style='background:#ccc'><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","LunchBreak");return false;'><b>LunchBreak</b></a></li> | 230 | <li style='background:#ccc'><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","LunchBreak");savedialermode();return false;'><b>LunchBreak</b></a></li> |
| 226 | <li style='background:#ccc'><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","TeaBreak");return false;'><b>TeaBreak</b></a></li> | 231 | <li style='background:#ccc'><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","TeaBreak");savedialermode();return false;'><b>TeaBreak</b></a></li> |
| 227 | <li style='background:#ccc'><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","UtilityBreak");return false;'><b>UtilityBreak</b></a></li> | 232 | <li style='background:#ccc'><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","UtilityBreak");savedialermode();return false;'><b>UtilityBreak</b></a></li> |
| 228 | <li style='background:#ccc'><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","FloorAnnouncements");return false;'><b>FloorAnnouncements</b></a></li> | 233 | <li style='background:#ccc'><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","FloorAnnouncements");savedialermode();return false;'><b>FloorAnnouncements</b></a></li> |
| 229 | <li style='background:#ccc'><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","DownTime");return false;'><b>DownTime</b></a></li> | 234 | <li style='background:#ccc'><a href="#" onclick='updateDialerState("dialer","mDialerState","Paused","mDialerSubState","DownTime");savedialermode();return false;'><b>DownTime</b></a></li> |
| 230 | 235 | ||
| 231 | 236 | ||
| 232 | </ul> | 237 | </ul> |
| ... | @@ -234,9 +239,7 @@ function createSearchRecordDiv(divid) | ... | @@ -234,9 +239,7 @@ function createSearchRecordDiv(divid) |
| 234 | </div> | 239 | </div> |
| 235 | 240 | ||
| 236 | <input class="form-control" id="manualdialnumber_txt" style='width:200px' type="text" /> | 241 | <input class="form-control" id="manualdialnumber_txt" style='width:200px' type="text" /> |
| 237 | |||
| 238 | <span class="input-group-addon btn btn-default" id=manualdial_btn dialaction=dialnext onclick='updateDialerState("action",$(this).attr("dialaction"),$("#manualdialnumber_txt").val());'></span> | 242 | <span class="input-group-addon btn btn-default" id=manualdial_btn dialaction=dialnext onclick='updateDialerState("action",$(this).attr("dialaction"),$("#manualdialnumber_txt").val());'></span> |
| 239 | |||
| 240 | </div> | 243 | </div> |
| 241 | 244 | ||
| 242 | 245 | ||
| ... | @@ -255,12 +258,13 @@ function createSearchRecordDiv(divid) | ... | @@ -255,12 +258,13 @@ function createSearchRecordDiv(divid) |
| 255 | <i class='fa fa-fw fa-phone'></i> <span id=spandialer_num onclick='dialerDispNumberClick();return false;'></span> | 258 | <i class='fa fa-fw fa-phone'></i> <span id=spandialer_num onclick='dialerDispNumberClick();return false;'></span> |
| 256 | </a> | 259 | </a> |
| 257 | </div> | 260 | </div> |
| 258 | |||
| 259 | <div id=dialerToggleViewDiv style='float:right;margin-right:20px;'> | 261 | <div id=dialerToggleViewDiv style='float:right;margin-right:20px;'> |
| 260 | 262 | <?php if(Auth::user()->id=='1'){ ?> | |
| 263 | <button class="btn btn-circle btn-default" id="transferButton"><i class="glyphicon glyphicon-transfer"></i></button> | ||
| 264 | <?php } ?> | ||
| 261 | <button class="btn btn-circle btn-default" ><i class="fa fa-phone"></i></button> | 265 | <button class="btn btn-circle btn-default" ><i class="fa fa-phone"></i></button> |
| 262 | <i class="fa fa-long-arrow-left"></i> | 266 | <i class="fa fa-long-arrow-left"></i> |
| 263 | 267 | ||
| 264 | <div class="dropdown dropdown-icons" id=connections_div_dtmf> | 268 | <div class="dropdown dropdown-icons" id=connections_div_dtmf> |
| 265 | <a data-toggle="dropdown" href="#" class="btn btn-stroke btn-success btn-circle dropdown-toggle"><i class="fa fa-th"></i> </a> | 269 | <a data-toggle="dropdown" href="#" class="btn btn-stroke btn-success btn-circle dropdown-toggle"><i class="fa fa-th"></i> </a> |
| 266 | <ul class="dropdown-menu"> | 270 | <ul class="dropdown-menu"> |
| ... | @@ -365,12 +369,51 @@ function createSearchRecordDiv(divid) | ... | @@ -365,12 +369,51 @@ function createSearchRecordDiv(divid) |
| 365 | $("#topdialerconfcall").hide(); | 369 | $("#topdialerconfcall").hide(); |
| 366 | 370 | ||
| 367 | } | 371 | } |
| 372 | |||
| 373 | function transfercallconf() | ||
| 374 | { | ||
| 375 | var confnumber=$("#transfercalltxt").val(); | ||
| 376 | if(confnumber==''||confnumber.length<2) | ||
| 377 | { | ||
| 378 | simpleNotification('error','topRight',"Empty Number"); | ||
| 379 | return; | ||
| 380 | } | ||
| 381 | if(!kcallHasConnection(kstychCall['callnumber'])||kstychCall['ts_Dispo']>1) | ||
| 382 | { | ||
| 383 | simpleNotification('error','topRight',"No call to transfer"); | ||
| 384 | return; | ||
| 385 | } | ||
| 386 | |||
| 387 | $("#transferCallBtn").removeClass("show").addClass("hide"); | ||
| 388 | $("#transferHangBtn").removeClass("hide").addClass("show"); | ||
| 389 | |||
| 390 | var datastr="kstychCall="+JSON.stringify(kstychCall); | ||
| 391 | datastr+="&kstychDialer="+JSON.stringify(kstychDialer); | ||
| 392 | //kcallNewConnection(confnumber); | ||
| 393 | doAjax('dialer?action=transfercall&confnumber='+confnumber,datastr,'__fake__div__', 'ajax_confdial','singlefail','POST', function(retstr){ | ||
| 394 | if(retstr.responseText.indexOf('Error')<0) | ||
| 395 | { | ||
| 396 | // kcallSetConnection(confnumber,'callid',retstr.responseText); | ||
| 397 | // kcallSetConnection(confnumber,'ts_Call',getNowTS()); | ||
| 398 | |||
| 399 | updateDialerState(); | ||
| 400 | } | ||
| 401 | else | ||
| 402 | { | ||
| 403 | simpleNotification('error','topRight',retstr.responseText); | ||
| 404 | } | ||
| 405 | }); | ||
| 406 | |||
| 407 | $("#topdialerconfcall").hide(); | ||
| 408 | |||
| 409 | } | ||
| 410 | |||
| 368 | </script> | 411 | </script> |
| 369 | </div> | 412 | </div> |
| 370 | </div> | 413 | </div> |
| 371 | </div> | 414 | </div> |
| 372 | <div style='clear:both'></div> | 415 | <div style='clear:both'></div> |
| 373 | 416 | ||
| 374 | </div> | 417 | </div> |
| 375 | <div class="modal-body" id=kDialer_modal_body> | 418 | <div class="modal-body" id=kDialer_modal_body> |
| 376 | <div id=dialerToggleViewMainDiv style=''> | 419 | <div id=dialerToggleViewMainDiv style=''> | ... | ... |
-
Please register or sign in to post a comment