f431b84e by prami

Notification for inactive campaing: Added error message

1 parent 89ebf718
......@@ -916,17 +916,23 @@ function updateDialerState(objstr,key,val,key2,val2)
doAjax('dialer?action=previewnext&client='+client,datastr,'dialersearchresults', 'ajax_manualdial2','singlefail','POST',
function(retstr){
if(retstr.responseText == "false"){
var newCampaign = '';
$("#tcampaign_select option").each(function(){
var opt = $(this).val();
if(opt == client){
$(this).remove();
}else{
newCampaign = opt;
}
});
var errorModel = $('#showInacitveClientErrMess');
errorModel.find('.modal-body').text("Your current campaign "+client +' is no more active.');
errorModel.modal('show');
//$('#showInacitveClientErrMess').modal('show');
var html = "Your current campaign <span class='text-uppercase' ><strong>"+client +"</strong></span> is no more active. <br>";
console.log("newCampaign ====>"+newCampaign);
if (newCampaign != '') {
html = html + "Now you have assigned new campaign <span class='text-uppercase' ><strong>"+ newCampaign +"</strong></span>";
}
errorModel.find('.modal-body').html(html);
errorModel.modal({backdrop: 'static', keyboard: false, show: true});
campaignSelect();
}
......
......@@ -82,7 +82,9 @@ $("#topuserdropmenu > li").hover(function() {
});
$( document ).ready(function() {
$('#closemodal').click(function() {
$('#showInacitveClientErrMess').modal('hide');
});
});
</script>
......@@ -209,8 +211,8 @@ function createSearchRecordDiv(divid)
<div class="modal" id="showInacitveClientErrMess">
<div class="modal-dialog" >
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" id="errorClose" aria-hidden="true">&times;</button>
<div class="modal-header"> Notification
<button type="button" class="close" id="closemodal" aria-hidden="true">&times;</button>
</div>
<div class="modal-body">
</div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!