Files
crm-ms1/application/views/tache/list.php
2026-05-27 11:44:10 -04:00

297 lines
9.5 KiB
PHP

<?php
$page='liste';
echo( $this->Config_model->conf_csscouleurprojets());
echo( $this->Config_model->conf_csscouleurtaches());
?>
<div id="content">
<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>
Tâches
<span>>
</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">
</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">
<span class="onoffswitch-title"> Non actif</span>
<?php
$mem_check="";
if ($this->Config_model->conf_getFiltreData($this->session->id,'list_tache','mem_listactive',1,0,1)==0)
$mem_check="checked";
?>
<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 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 -->
<?php
$page='liste';
include('inc/popupevent.php');
?>
<!-- ==========================CONTENT ENDS HERE ========================== -->
<script type='text/javascript'>
var mem_select_1=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_tache','mem_select_1',0,0,0);?>;
var mem_select_2=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_tache','mem_select_2',0,0,1);?>;
var mem_select_3=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_tache','mem_select_3',0,0,1);?>;
var mem_select_4=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_tache','mem_select_4',0,0,1);?>;
var mem_listactive=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_tache','mem_listactive',1,0,1);?>;
var mem_trie=<?php echo $this->Config_model->conf_getFiltreData($this->session->id,'list_tache','mem_trie','null',0,0);?>;
$(document).ready(function() {
<?php
include('inc/popupevent_script_list.php');
?>
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
}
createPagination(0,1);
});
$("body").on("click", "a", function(){
memid=$(this).attr("id") ;
if (event.target.id=='excel'){
var x = $(this).attr("data-id");
createPagination(0,1,1);
}
if (event.target.id=='trie'){
var dataId = $(this).attr("data-id")
mem_trie=dataId;
createPagination(0,1)
}
if (event.target.id=='tache'){
var section = $(this).data('section');
var section_id = $(this).data('section_id')
var section = $(this).data('section')
var id = $(this).data('id')
$.ajax({
url: '<?=base_url()?>index.php/projets/form_tache/'+id+'/'+section+'/'+section_id+'/list' ,
type: 'get',
dataType: 'json',
success: function(responseData){
$('#tacheform').html(responseData) ;
}
});
$('#myModal').modal('show');
var section = $(this).data('section');
var id = $(this).data('id');
}
});
$("body").on("change", ".filtre_2", function(){
var optionSelected = $("option:selected", this);
mem_select_2 = this.value;
createPagination(0,1)
});
$("body").on("change", ".filtre_4", function(){
var optionSelected = $("option:selected", this);
mem_select_4 = this.value;
createPagination(0,1)
});
$("body").on("change", ".filtre_1", function(){
var optionSelected = $("option:selected", this);
mem_select_1 = this.value;
createPagination(0,1)
});
$("body").on("change", ".filtre_3", function(){
var optionSelected = $("option:selected", this);
mem_select_3 = 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){
if (mem_select_2!=0)
mem_filtre_2=mem_select_2;
else
mem_filtre_2='null';
if (mem_select_4!=0)
mem_filtre_4=mem_select_4;
else
mem_filtre_4='null';
if (mem_select_3!=0)
mem_filtre_3=mem_select_3;
else
mem_filtre_3='null';
if (mem_select_1!=0)
mem_filtre_1=mem_select_1;
else
mem_filtre_1='null';
// test='<?=base_url()?>index.php/Projets/loadData_list_taches/'+pageNum+'/'+mem_filtre_1+'/'+mem_filtre_2+'/'+mem_filtre_3+'/'+mem_filtre_4+'/'+mem_trie+'/'+mem_listactive ;
// alert(test);
$.ajax({
url: '<?=base_url()?>index.php/Projets/loadData_list_taches/'+pageNum+'/'+mem_filtre_1+'/'+mem_filtre_2+'/'+mem_filtre_3+'/'+mem_filtre_4+'/'+mem_trie+'/'+mem_listactive+'/'+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);
$('input.filtre_'+nofiltre).focusTextToEnd();
if(excel!=0)
{
location.replace('/data/taches.xls' );
}
}
});
}
});
</script>