345 lines
12 KiB
PHP
345 lines
12 KiB
PHP
<?php
|
|
|
|
echo( $this->Config_model->conf_csscouleurprojets());
|
|
$mem_date_debut=$this->Config_model->conf_getFiltreData($this->session->id,'list_projet','date_debut','',0,0);
|
|
$mem_date_fin=$this->Config_model->conf_getFiltreData($this->session->id,'list_projet','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>
|
|
<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>
|
|
Projets
|
|
<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> Projets</h2>
|
|
<h2>
|
|
|
|
<div class="onoffswitch-align-right">
|
|
<?php
|
|
$mem_check="";
|
|
if ($this->Config_model->conf_getFiltreData($this->session->id,'list_projet','mem_listactive',1,0,1)==0)
|
|
$mem_check="checked";
|
|
?>
|
|
<span class="onoffswitch-title"> Non actif</span>
|
|
<span class="onoffswitch">
|
|
<input type="checkbox" class="onoffswitch-checkbox" id="inline" <?php echo($mem_check)?>>
|
|
<label class="onoffswitch-label" for="inline">
|
|
<span class="onoffswitch-inner" data-swchon-text="ON" data-swchoff-text="OFF"></span>
|
|
<span class="onoffswitch-switch"></span>
|
|
</label>
|
|
</span>
|
|
</div></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 class="emp" 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_select=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_projet','mem_select_1',0,0);?>;;
|
|
var mem_selectb=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_projet','mem_select_3',0,0);?>;;
|
|
var mem_selectc=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_projet','mem_select_5',0,0);?>;;
|
|
|
|
var mem_selectd=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_projet','mem_select_6',0,0);?>;;
|
|
|
|
var mem_listactive=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_projet','mem_listactive',1,0);?>;
|
|
mem_excel=0;
|
|
var mem_trie=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_projet','mem_trie','null',0,0);?>;;
|
|
$(document).ready(function() {
|
|
$("body").on("click", ".emp a", function(){
|
|
|
|
memid=$(this).attr("id") ;
|
|
if (event.target.id=='excel'){
|
|
var x = $(this).attr("data-id");
|
|
|
|
createPagination(0,1,x);
|
|
|
|
|
|
}
|
|
});
|
|
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);
|
|
});
|
|
|
|
mem_selectd=0;
|
|
|
|
$("body").on("click", "a", function(){
|
|
if (event.target.id=='trie'){
|
|
var dataId = $(this).attr("data-id");
|
|
|
|
mem_trie=dataId;
|
|
createPagination(0,1)
|
|
}
|
|
});
|
|
mem_select=0;
|
|
$("body").on("change", ".filtre_1", function(){
|
|
var optionSelected = $("option:selected", this);
|
|
mem_select = this.value;
|
|
createPagination(0,1)
|
|
});
|
|
$("body").on("keyup", "input.filtre_2", function(e){
|
|
if(e.which == 13) {
|
|
createPagination(0,2)
|
|
}
|
|
});
|
|
|
|
mem_selectc=0;
|
|
$("body").on("change", ".filtre_5", function(){
|
|
var optionSelected = $("option:selected", this);
|
|
mem_selectc = this.value;
|
|
createPagination(0,1)
|
|
});
|
|
|
|
$("body").on("keyup", "input.filtre_6", function(e){
|
|
if(e.which == 13) {
|
|
createPagination(0,4)
|
|
}
|
|
});
|
|
|
|
mem_selectd=0;
|
|
$("body").on("change", ".filtre_4", function(){
|
|
var optionSelected = $("option:selected", this);
|
|
mem_selectd = this.value;
|
|
createPagination(0,1)
|
|
});
|
|
|
|
|
|
mem_selectb=0;
|
|
$("body").on("change", ".filtre_3", function(){
|
|
var optionSelected = $("option:selected", this);
|
|
mem_selectb = this.value;
|
|
createPagination(0,1)
|
|
});
|
|
|
|
|
|
|
|
(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();
|
|
|
|
|
|
|
|
|
|
|
|
if (mem_select!=0)
|
|
|
|
mem_filtre_1=mem_select;
|
|
else
|
|
mem_filtre_1='null';
|
|
|
|
if (mem_selectb!=0)
|
|
|
|
mem_filtre_3=mem_selectb;
|
|
else
|
|
mem_filtre_3='null';
|
|
if (mem_selectc!=0)
|
|
|
|
mem_filtre_5=mem_selectc;
|
|
else
|
|
mem_filtre_5='null';
|
|
|
|
if (typeof $('input.filtre_2').val()!=='undefined' )
|
|
mem_filtre_2=$('input.filtre_2').val().trim();
|
|
else
|
|
mem_filtre_2=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_projet','mem_select_2','null',0,0);?>;
|
|
|
|
if (mem_filtre_2=="")
|
|
mem_filtre_2="null";
|
|
|
|
|
|
|
|
|
|
if (typeof $('input.filtre_6').val()!=='undefined' )
|
|
mem_filtre_6=$('input.filtre_6').val().trim();
|
|
else
|
|
mem_filtre_6=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_projet','mem_select_6','null',0,0);?>;
|
|
|
|
if (mem_filtre_6=="")
|
|
mem_filtre_6="null";
|
|
|
|
|
|
|
|
|
|
if (mem_selectd!=0)
|
|
|
|
mem_filtre_4=mem_selectd;
|
|
else
|
|
mem_filtre_4='null';
|
|
|
|
|
|
|
|
|
|
|
|
test='<?=base_url()?>index.php/Projets/loadData_list/'+pageNum+'/'+mem_filtre_1+'/'+mem_filtre_2+'/'+mem_filtre_3+'/'+mem_filtre_4+'/'+mem_trie+'/'+mem_listactive+'/'+excel+'/'+mem_filtre_5+'/'+mem_debut+'/'+mem_fin+'/'+mem_filtre_6;
|
|
//alert(test);
|
|
$.ajax({
|
|
url: '<?=base_url()?>index.php/Projets/loadData_list/'+pageNum+'/'+mem_filtre_1+'/'+mem_filtre_2+'/'+mem_filtre_3+'/'+mem_filtre_4+'/'+mem_trie+'/'+mem_listactive+'/'+excel+'/'+mem_filtre_5+'/'+mem_debut+'/'+mem_fin+'/'+mem_filtre_6,
|
|
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);
|
|
|
|
$('input.filtre_'+nofiltre).focusTextToEnd();
|
|
if(excel!=0)
|
|
{
|
|
|
|
location.replace('/data/projets.xls' );
|
|
}
|
|
}
|
|
});
|
|
}
|
|
// 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>
|