303 lines
9.7 KiB
PHP
303 lines
9.7 KiB
PHP
<?php
|
|
|
|
echo( $this->Config_model->conf_csscouleurprojets());
|
|
$mem_date_debut=$this->Config_model->conf_getFiltreData($this->session->id,'list_depart','date_debut','',0,0);
|
|
$mem_date_fin=$this->Config_model->conf_getFiltreData($this->session->id,'list_depart','date_fin','',0,0);
|
|
|
|
?>
|
|
<div id="content">
|
|
|
|
<label >
|
|
<label>Date début</label>
|
|
|
|
|
|
<i class="icon-append fa fa-calendar" aria-hidden="true"></i>
|
|
<input type="text" name="date_debut" value=<?php echo $mem_date_debut ?> id="date_debut" placeholder="" class="" size="">
|
|
</label>
|
|
<label >
|
|
<label>Date fin</label>
|
|
|
|
|
|
<i class="icon-append fa fa-calendar" aria-hidden="true"></i>
|
|
<input type="text" name="date_fin" value=<?php echo $mem_date_fin ?> id="date_fin" placeholder="" class="" size="">
|
|
</label>
|
|
<!--Grid column-->
|
|
|
|
<div class="row">
|
|
<div class="col-xs-12 col-sm-7 col-md-7 col-lg-4">
|
|
<h1 class="page-title txt-color-blueDark">
|
|
<i class="fa fa-table fa-fw "></i>
|
|
Départs
|
|
<span>>
|
|
Liste
|
|
</span>
|
|
</h1>
|
|
|
|
</div>
|
|
<div class="col-xs-12 col-sm-5 col-md-5 col-lg-8">
|
|
<ul id="sparks" class="">
|
|
<li class="sparks-info">
|
|
<h5> Projets actif <span class="txt-color-blue" id="Clients_actif"> </span></h5>
|
|
|
|
</li>
|
|
<li class="sparks-info">
|
|
|
|
</li>
|
|
<li class="sparks-info">
|
|
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- widget grid -->
|
|
<section id="widget-grid" class="">
|
|
|
|
<!-- row -->
|
|
<div class="row">
|
|
|
|
<!-- NEW WIDGET START -->
|
|
<article class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
|
|
|
|
<!-- Widget ID (each widget will need unique ID)-->
|
|
<div class="jarviswidget jarviswidget-color-orange" id="wid-id-0" data-widget-editbutton="false" data-widget-colorbutton="true" data-widget-deletebutton="false" >
|
|
<!-- widget options:
|
|
usage: <div class="jarviswidget" id="wid-id-0" data-widget-editbutton="false">
|
|
|
|
data-widget-colorbutton="false"
|
|
data-widget-editbutton="false"
|
|
data-widget-togglebutton="false"
|
|
data-widget-deletebutton="false"
|
|
data-widget-fullscreenbutton="false"
|
|
data-widget-custombutton="false"
|
|
data-widget-collapsed="true"
|
|
data-widget-sortable="false"
|
|
|
|
-->
|
|
|
|
<header>
|
|
<span class="widget-icon"> <i class="fa fa-table"></i></span>
|
|
<h2> Départs</h2>
|
|
<h2>
|
|
|
|
</h2>
|
|
</header>
|
|
<!-- widget div-->
|
|
<div>
|
|
|
|
<!-- widget edit box -->
|
|
<div class="jarviswidget-editbox">
|
|
<!-- This area used as dropdown edit box -->
|
|
|
|
</div>
|
|
<!-- end widget edit box -->
|
|
|
|
<!-- widget content -->
|
|
<div class="widget-body no-padding">
|
|
|
|
<div id='employeeList'>
|
|
</div>
|
|
<div id='pagination' >
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<!-- end widget content -->
|
|
|
|
</div>
|
|
<!-- end widget div -->
|
|
|
|
</div>
|
|
|
|
</article>
|
|
<!-- WIDGET END -->
|
|
|
|
</div>
|
|
|
|
<!-- end row -->
|
|
|
|
<!-- end row -->
|
|
|
|
</section>
|
|
<!-- end widget grid -->
|
|
|
|
</div>
|
|
|
|
<!-- END MAIN PANEL -->
|
|
|
|
<!-- ==========================CONTENT ENDS HERE ========================== -->
|
|
|
|
<script type='text/javascript'>
|
|
|
|
var mem_listactive=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_depart','mem_listactive',1,0);?>;
|
|
var mem_select=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_depart','mem_select_4',0,0);?>;;
|
|
var mem_selectb=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_depart','mem_select_2',0,0);?>;;
|
|
var mem_trie=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_depart','mem_trie','null',0,0);?>;;
|
|
$(document).ready(function() {
|
|
|
|
createPagination(0);
|
|
$('#pagination').on('click','a',function(e){
|
|
e.preventDefault();
|
|
var pageNum = $(this).attr('data-ci-pagination-page');
|
|
createPagination(pageNum);
|
|
});
|
|
$("#inline").change( function(){
|
|
if(this.checked) {
|
|
mem_listactive=0
|
|
}else{
|
|
mem_listactive=1
|
|
}
|
|
//alert(mem_listactive);
|
|
createPagination(0,1);
|
|
});
|
|
|
|
|
|
|
|
$("body").on("click", "a", function(){
|
|
if (event.target.id=='excel'){
|
|
|
|
createPagination(0,1,1)
|
|
}
|
|
});
|
|
|
|
$("body").on("change", ".filtre_4", function(){
|
|
var optionSelected = $("option:selected", this);
|
|
mem_select = this.value;
|
|
createPagination(0,4)
|
|
});
|
|
$("body").on("change", ".filtre_2", function(){
|
|
var optionSelected = $("option:selected", this);
|
|
mem_selectb = this.value;
|
|
createPagination(0,2)
|
|
});
|
|
|
|
$("body").on("keyup", "input.filtre_2", function(){
|
|
createPagination(0,2)
|
|
});
|
|
$("body").on("keyup", "input.filtre_4", function(){
|
|
createPagination(0,4)
|
|
});
|
|
|
|
|
|
$("body").on("keyup", "input.filtre_1", function(e){
|
|
if(e.which == 13) {
|
|
createPagination(0,1)
|
|
}
|
|
});
|
|
$("body").on("keyup", "input.filtre_3", function(e){
|
|
if(e.which == 13) {
|
|
createPagination(0,3)
|
|
}
|
|
});
|
|
$("body").on("click", "a", function(){
|
|
if (event.target.id=='trie'){
|
|
var dataId = $(this).attr("data-id");
|
|
|
|
mem_trie=dataId;
|
|
createPagination(0,1)
|
|
}
|
|
});
|
|
|
|
mem_selectb=0;
|
|
|
|
|
|
|
|
|
|
(function($){
|
|
$.fn.focusTextToEnd = function(){
|
|
this.focus();
|
|
var $thisVal = this.val();
|
|
this.val('').val($thisVal);
|
|
return this;
|
|
}
|
|
}(jQuery));
|
|
|
|
|
|
|
|
function createPagination(pageNum,nofiltre=1,excel=0){
|
|
|
|
mem_debut=$('#date_debut').val();
|
|
|
|
mem_fin=$('#date_fin').val();
|
|
mem_filtre_2='null';
|
|
mem_filtre_3='null';
|
|
|
|
if (typeof $('input.filtre_1').val()!=='undefined' )
|
|
mem_filtre_1=$('input.filtre_1').val().trim();
|
|
else
|
|
mem_filtre_1=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_depart','mem_select_1','null',0,0);?>;
|
|
if (mem_filtre_1=="")
|
|
mem_filtre_1="null";
|
|
|
|
if (typeof $('input.filtre_3').val()!=='undefined' )
|
|
mem_filtre_3=$('input.filtre_3').val().trim();
|
|
else
|
|
mem_filtre_3=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_depart','mem_select_3','null',0,0);?>;
|
|
|
|
if (mem_filtre_3=="")
|
|
mem_filtre_3="null";
|
|
|
|
|
|
if (mem_select!=0)
|
|
|
|
mem_filtre_4=mem_select;
|
|
else
|
|
mem_filtre_4='null';
|
|
|
|
if (mem_selectb!=0)
|
|
|
|
mem_filtre_2=mem_selectb;
|
|
else
|
|
mem_filtre_2='null';
|
|
|
|
|
|
|
|
// alert('index.php/Projets/loadData_list_depart/'+pageNum+'/'+mem_filtre_1+'/'+mem_filtre_2+'/'+mem_filtre_3+'/'+mem_filtre_4+'/'+mem_trie+'/'+mem_listactive+'/'+mem_debut+'/'+mem_fin+'/'+excel);
|
|
$.ajax({
|
|
url: '<?=base_url()?>index.php/Projets/loadData_list_depart/'+pageNum+'/'+mem_filtre_1+'/'+mem_filtre_2+'/'+mem_filtre_3+'/'+mem_filtre_4+'/'+mem_trie+'/'+mem_listactive+'/'+mem_debut+'/'+mem_fin+'/'+excel,
|
|
type: 'get',
|
|
dataType: 'json',
|
|
success: function(responseData){
|
|
|
|
$('#pagination').html(responseData.pagination);
|
|
$('#employeeList').empty();
|
|
$('#employeeList').html(responseData.empData);
|
|
$('#Clients_actif').empty();
|
|
$('#Clients_actif').html(responseData.recordCount);
|
|
if(excel==1)
|
|
{
|
|
|
|
location.replace('/data/depart.xls' );
|
|
}
|
|
$('input.filtre_'+nofiltre).focusTextToEnd();
|
|
|
|
}
|
|
});
|
|
}
|
|
// START AND FINISH DATE
|
|
$('#date_debut').datepicker({
|
|
dateFormat: 'yy-mm-dd',
|
|
prevText: '<i class="fa fa-chevron-left"></i>',
|
|
nextText: '<i class="fa fa-chevron-right"></i>',
|
|
onSelect: function (selectedDate) {
|
|
$('#date_fin').datepicker('option', 'minDate', selectedDate);
|
|
createPagination(0,1);
|
|
|
|
}
|
|
});
|
|
$('#date_fin').datepicker({
|
|
dateFormat: 'yy-mm-dd',
|
|
prevText: '<i class="fa fa-chevron-left"></i>',
|
|
nextText: '<i class="fa fa-chevron-right"></i>',
|
|
onSelect: function (selectedDate) {
|
|
$('#date_debut').datepicker('option', 'maxDate', selectedDate);
|
|
createPagination(0,1);
|
|
}
|
|
});
|
|
|
|
});
|
|
|
|
|
|
</script>
|
|
<?php
|
|
|
|
?>
|