f431b84e by prami

Notification for inactive campaing: Added error message

1 parent 89ebf718
...@@ -916,17 +916,23 @@ function updateDialerState(objstr,key,val,key2,val2) ...@@ -916,17 +916,23 @@ function updateDialerState(objstr,key,val,key2,val2)
916 doAjax('dialer?action=previewnext&client='+client,datastr,'dialersearchresults', 'ajax_manualdial2','singlefail','POST', 916 doAjax('dialer?action=previewnext&client='+client,datastr,'dialersearchresults', 'ajax_manualdial2','singlefail','POST',
917 function(retstr){ 917 function(retstr){
918 if(retstr.responseText == "false"){ 918 if(retstr.responseText == "false"){
919 919 var newCampaign = '';
920 $("#tcampaign_select option").each(function(){ 920 $("#tcampaign_select option").each(function(){
921 var opt = $(this).val(); 921 var opt = $(this).val();
922 if(opt == client){ 922 if(opt == client){
923 $(this).remove(); 923 $(this).remove();
924 }else{
925 newCampaign = opt;
924 } 926 }
925 }); 927 });
926 var errorModel = $('#showInacitveClientErrMess'); 928 var errorModel = $('#showInacitveClientErrMess');
927 errorModel.find('.modal-body').text("Your current campaign "+client +' is no more active.'); 929 var html = "Your current campaign <span class='text-uppercase' ><strong>"+client +"</strong></span> is no more active. <br>";
928 errorModel.modal('show'); 930 console.log("newCampaign ====>"+newCampaign);
929 //$('#showInacitveClientErrMess').modal('show'); 931 if (newCampaign != '') {
932 html = html + "Now you have assigned new campaign <span class='text-uppercase' ><strong>"+ newCampaign +"</strong></span>";
933 }
934 errorModel.find('.modal-body').html(html);
935 errorModel.modal({backdrop: 'static', keyboard: false, show: true});
930 936
931 campaignSelect(); 937 campaignSelect();
932 } 938 }
......
...@@ -82,7 +82,9 @@ $("#topuserdropmenu > li").hover(function() { ...@@ -82,7 +82,9 @@ $("#topuserdropmenu > li").hover(function() {
82 }); 82 });
83 83
84 $( document ).ready(function() { 84 $( document ).ready(function() {
85 85 $('#closemodal').click(function() {
86 $('#showInacitveClientErrMess').modal('hide');
87 });
86 }); 88 });
87 89
88 </script> 90 </script>
...@@ -209,8 +211,8 @@ function createSearchRecordDiv(divid) ...@@ -209,8 +211,8 @@ function createSearchRecordDiv(divid)
209 <div class="modal" id="showInacitveClientErrMess"> 211 <div class="modal" id="showInacitveClientErrMess">
210 <div class="modal-dialog" > 212 <div class="modal-dialog" >
211 <div class="modal-content"> 213 <div class="modal-content">
212 <div class="modal-header"> 214 <div class="modal-header"> Notification
213 <button type="button" class="close" id="errorClose" aria-hidden="true">&times;</button> 215 <button type="button" class="close" id="closemodal" aria-hidden="true">&times;</button>
214 </div> 216 </div>
215 <div class="modal-body"> 217 <div class="modal-body">
216 </div> 218 </div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!