<? global $vis_language;
   $paging_list='';
?>
<section id="breadcrumb" class="row m-b m-l-none m-r-none">
   <div class="col-sm-6" id="url_header">
      <h3 class="m-b-xs text-black"><? echo $operation['view_title']; ?><!--<span id="total_cnt">(<? echo $config_total; ?>)</span>--></h3>
      <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="#/setting/setting_menu/<? echo $vis_language['TXTSETTINGS'];?>"><? echo $vis_language['TXTSETTINGS']; ?></a></li>
         <li class="active"><? echo $operation['view_title']; ?></li>
      </ul>
   </div>
</section>
<div class="col-lg-12">
<? include_once(VIS_PATH_TEMPLATE.'location_search.php');?>
</div>
<div  class="col-lg-12">
	  <input type="hidden" value="" name="vis_filter_enable" id="vis_filter_enable">
      <section class="panel panel-default">
         <div class="table-responsive scroll-x" id="vis_config_list">
            <? include_once(VIS_PATH_TEMPLATE.'location_list.php'); ?>
          </div>
      </section>
</div>
<section class="fullFrame m-n" id="vis_no_record_search" style="display:none;">
</section>
<script src="<?= VIS_PATH_SCRIPT; ?>dropdown_dropup.js"></script>
<script>
function vis_apply_filter(vis_page){
	var vis_page = (vis_page!=undefined && typeof(vis_page)!=undefined && vis_page != '') ? vis_page:'';
	var data = {'vis_filter_enable':'1', 'vis_page':vis_page, 'vis_action': $("#vis_filter_list input, #vis_filter_list select").serialize()};
    $.ajax({
		url: 'index.php?vis_module=setting&vis_operation=view_locations',
		data: data,
		type: "POST",
		dataType: "json",
		success: function(data) {
			$("#total_cnt").html('('+data.total_cnt+')');
			$(".tkt_right_menu").html(data.paging);
			$("#vis_config_list").html(data.list);
			$('#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="#/setting/setting_menu/<? echo $vis_language['TXTSETTINGS'];?>"><? echo $vis_language['TXTSETTINGS'];?></a></li><li><a class="link" href="#/setting/view_location/<? echo $vis_language['TXTLOCATION']; ?>" onclick="location.reload();"><? echo $vis_language['TXTLOCATION']; ?></a></li><li class="active"><? echo $vis_language['TXTFILTERRESULT']; ?></li></ul></div>').show();
			if(data.total_cnt==0){
				$("#vis_no_record_search").show();
				$("#vis_no_record_search").html(data.list);
			}else $("#vis_no_record_search").hide();
            toggle_mass_actions(); // To disable header & footer mass actions on list pages
		},
		error: function(xhr, ajaxOptions, thrownError) {$("#vis_global_msg_div").visInterface("load_global_message", "Error: "+xhr.status+" - "+thrownError);}
	});

}
</script>
