<?  global $vis_language;?>
<section id="breadcrumb" class="row m-b m-l-none m-r-none">
	<div class="col-sm-4" id="url_header">
	  <h3 class="m-b-xs text-black"><? echo $vis_language['TXTCOMMCHAT']; ?></h3>
	  <div>
		 <ul class="breadcrumb bg-empty no-border m-b-xxs no-padder">
			<li><a class="link" href="#/home/quick_view/<? echo $vis_language['TXTHOME']; ?>"><? echo $vis_language['TXTHOME']; ?></a></li>
			<li class="active"><? echo $vis_language['TXTCOMMCHAT']; ?></li>
		 </ul>
	  </div>
	</div>
    <div class="col-sm-8 text-right text-left-xs m-t-lg">
		 <div class="btn-group pull-right">
			<a title="<?= $vis_language['TXTFILTERLIST']; ?>" href="javascript:void(0);" class="btn btn-default btn-sm dropdown-toggle" onclick="$('#vis_filter_list').slideToggle();"><i style="font-size:10px;" class="vh vh-filter"></i></a>
	  </div>
	</div>
</section>

<div class="col-lg-12">
   <? include_once(VIS_PATH_TEMPLATE.'livechat_search.php'); // filter list?>
</div>
<div class="col-lg-12" id="vis_livechat_list">
 <? include_once(VIS_PATH_TEMPLATE.'ajax_comm100.php');?>
</div>
<script>
    function vis_change_livechat(e){
        if(e.value==0) $("#vis_livechat_list").hide();
        else $('#vis_livechat_list').visExecution('load_area', {'vis_module':'chat', 'vis_operation':'comm100_list','vis_domain':e.value});
    }
	 function vis_change_commchat_page(e){
        if(e.value==0) $("#vis_livechat_list").hide();
        else $('#vis_livechat_list').visExecution('load_area', {'vis_module':'chat', 'vis_operation':'comm100_list','vis_page':e.value,'vis_domain':<?php echo $vis_domain; ?>});
    }
	function hide_domain()
	{
		$('#live_domain').toggle();
	}
	$('.from_date').datetimepicker({
                    format: "YYYY-MM-DD"
                });
	$('.to_date').datetimepicker({
                    format: "YYYY-MM-DD"
                });
	function vis_livechat_filter()
	{
		$('#url_header').html('<h3 class="m-b-xs text-black"><? echo $vis_language['TXTFILTERS']; ?></h3><div><ul class="breadcrumb bg-empty no-border m-b-xxs no-padder"><li><a class="link" href="#/home/quick_view/<? echo $vis_language['TXTHOME']; ?>"><? echo $vis_language['TXTHOME']; ?></a></li> <li><a class="link" href="#/chat/comm100_list/<? echo $vis_language['TXTCOMMCHAT'];?>/1"><? echo $vis_language['TXTCOMMCHAT'];?></a></li><li class="active"><? echo $vis_language['TXTFILTERRESULT']; ?></li></ul></div>').show();

	    var date_from = $.trim($('#from_date').val());
		var date_to = $.trim($('#to_date').val());
		var field_search = $.trim($('#field_search').val());
		var page_no = $.trim($('#page_no').val());
		var vis_domain = $.trim($('#vis_domain').val());
		//alert(date_from+'>'+date_to+'>'+field_search);
        $('#vis_livechat_list').visExecution('load_area', {'vis_module':'chat', 'vis_operation':'comm100_list','vis_page':page_no,'vis_field_search':field_search,'vis_date_from':date_from,'vis_date_to':date_to,'vis_domain':vis_domain,'vis_filter_enable':1});

	}
</script>