Commit 2c3e4166 authored by Anatole Rakotoson's avatar Anatole Rakotoson

sommom

parent 7e534537
......@@ -98,7 +98,7 @@
<?php if( $mode != "pdf" ){ ?>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<tr>
<td colspan="<?php if( $mode != "r"){ echo count( $properties)+2 ; } else { echo count( $properties) ;} ?>" ><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn.$editParamsBtn.$editBtnL?></h4>
......@@ -191,7 +191,7 @@
</div>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<?php
......@@ -254,6 +254,21 @@
placeholders : <?php echo json_encode( $propertiesParams["placeholders"] ); ?>
};
var max<?php echo $kunik ?> = 0;
var nextValuekey<?php echo $kunik ?> = 0;
if(notNull(<?php echo $kunik ?>Data)){
$.each(<?php echo $kunik ?>Data, function(ind, val){
if(parseInt(ind) > max<?php echo $kunik ?>){
max<?php echo $kunik ?> = parseInt(ind);
}
});
nextValuekey<?php echo $kunik ?> = max<?php echo $kunik ?> + 1;
}
$(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = {
......@@ -361,7 +376,7 @@
$(".add<?php echo $kunik ?>").off().on("click",function() {
tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection");
tplCtx.path = $(this).data("path")+((notNull(<?php echo $kunik ?>Data) ? <?php echo $kunik ?>Data.length : "0"));
tplCtx.path = $(this).data("path")+nextValuekey<?php echo $kunik ?>;
dyFObj.openForm( sectionDyf.<?php echo $kunik ?> );
});
......@@ -382,6 +397,42 @@
dyFObj.openForm( sectionDyf.<?php echo $kunik ?>Params,null, sectionDyf.<?php echo $kunik ?>ParamsData);
});
$('.deleteLine').off().click( function(){
formId = $(this).data("id");
key = $(this).data("key");
pathLine = $(this).data("path");
collection = $(this).data("collection");
bootbox.dialog({
title: "Confirmez la suppression",
message: "<span class='text-red bold'><i class='fa fa-warning'></i> Cette action sera irréversible</span>",
buttons: [
{
label: "Ok",
className: "btn btn-primary pull-left",
callback: function() {
var formQ = {
value:null,
collection : collection,
id : formId,
path : pathLine
};
dataHelper.path2Value( formQ , function(params) {
$("#"+key).remove();
location.reload();
} );
}
},
{
label: "Annuler",
className: "btn btn-default pull-left",
callback: function() {}
}
]
});
});
});
</script>
......
......@@ -115,7 +115,7 @@
?>
<?php if( $mode != "pdf" ){ ?>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<tr>
<td colspan="<?php if( $mode != "r"){ echo count( $properties)+2 ; } else { echo count( $properties) ;} ?>" ><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn.$editParamsBtn.$editBtnL?></h4>
......@@ -213,7 +213,7 @@
</label>
</div>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<?php
......@@ -293,6 +293,21 @@
};
var max<?php echo $kunik ?> = 0;
var nextValuekey<?php echo $kunik ?> = 0;
if(notNull(<?php echo $kunik ?>Data)){
$.each(<?php echo $kunik ?>Data, function(ind, val){
if(parseInt(ind) > max<?php echo $kunik ?>){
max<?php echo $kunik ?> = parseInt(ind);
}
});
nextValuekey<?php echo $kunik ?> = max<?php echo $kunik ?> + 1;
}
$(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = {
......@@ -393,7 +408,7 @@
$(".add<?php echo $kunik ?>").off().on("click",function() {
tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection");
tplCtx.path = $(this).data("path")+((notNull(<?php echo $kunik ?>Data) ? <?php echo $kunik ?>Data.length : "0"));
tplCtx.path = $(this).data("path")+nextValuekey<?php echo $kunik ?>;
dyFObj.openForm( sectionDyf.<?php echo $kunik ?> );
});
......
......@@ -113,7 +113,7 @@
<?php if( $mode != "pdf" ){ ?>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<tr>
<td colspan="<?php if( $mode != "r"){ echo count( $properties)+2 ; } else { echo count( $properties) ;} ?>" ><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn.$editParamsBtn.$editBtnL?></h4>
......@@ -205,7 +205,7 @@
</label>
</div>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<?php
......@@ -279,6 +279,21 @@
};
var max<?php echo $kunik ?> = 0;
var nextValuekey<?php echo $kunik ?> = 0;
if(notNull(<?php echo $kunik ?>Data)){
$.each(<?php echo $kunik ?>Data, function(ind, val){
if(parseInt(ind) > max<?php echo $kunik ?>){
max<?php echo $kunik ?> = parseInt(ind);
}
});
nextValuekey<?php echo $kunik ?> = max<?php echo $kunik ?> + 1;
}
$(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = {
......@@ -356,8 +371,11 @@
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
location.reload();
$("#ajax-modal").modal('hide');
urlCtrl.loadByHash( location.hash );
} );
}
......@@ -372,7 +390,7 @@
$(".add<?php echo $kunik ?>").off().on("click",function() {
tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection");
tplCtx.path = $(this).data("path")+((notNull(<?php echo $kunik ?>Data) ? <?php echo $kunik ?>Data.length : "0"));
tplCtx.path = $(this).data("path")+nextValuekey<?php echo $kunik ?>;
dyFObj.openForm( sectionDyf.<?php echo $kunik ?> );
});
......
......@@ -82,7 +82,7 @@
<?php if( $mode != "pdf" ){ ?>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<tr>
<td colspan="<?php if( $mode != "r"){ echo count( $properties)+2 ; } else { echo count( $properties) ;} ?>" ><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn.$editParamsBtn.$editBtnL?></h4>
......@@ -187,6 +187,21 @@
};
var max<?php echo $kunik ?> = 0;
var nextValuekey<?php echo $kunik ?> = 0;
if(notNull(<?php echo $kunik ?>Data)){
$.each(<?php echo $kunik ?>Data, function(ind, val){
if(parseInt(ind) > max<?php echo $kunik ?>){
max<?php echo $kunik ?> = parseInt(ind);
}
});
nextValuekey<?php echo $kunik ?> = max<?php echo $kunik ?> + 1;
}
$(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = {
......@@ -254,8 +269,11 @@
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
location.reload();
$("#ajax-modal").modal('hide');
urlCtrl.loadByHash( location.hash );
} );
}
......@@ -270,7 +288,7 @@
$(".add<?php echo $kunik ?>").off().on("click",function() {
tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection");
tplCtx.path = $(this).data("path")+((notNull(<?php echo $kunik ?>Data) ? <?php echo $kunik ?>Data.length : "0"));
tplCtx.path = $(this).data("path")+nextValuekey<?php echo $kunik ?>;
dyFObj.openForm( sectionDyf.<?php echo $kunik ?> );
});
......
......@@ -125,7 +125,7 @@
<?php if( $mode != "pdf" ){ ?>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<tr>
<td colspan="<?php if( $mode != "r"){ echo count( $properties)+2 ; } else { echo count( $properties) ;} ?>" ><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn.$editParamsBtn.$editBtnL?></h4>
......@@ -282,6 +282,21 @@
};
var max<?php echo $kunik ?> = 0;
var nextValuekey<?php echo $kunik ?> = 0;
if(notNull(<?php echo $kunik ?>Data)){
$.each(<?php echo $kunik ?>Data, function(ind, val){
if(parseInt(ind) > max<?php echo $kunik ?>){
max<?php echo $kunik ?> = parseInt(ind);
}
});
nextValuekey<?php echo $kunik ?> = max<?php echo $kunik ?> + 1;
}
$(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = {
......@@ -350,8 +365,11 @@
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
location.reload();
$("#ajax-modal").modal('hide');
urlCtrl.loadByHash( location.hash );
} );
}
......@@ -366,7 +384,7 @@
$(".add<?php echo $kunik ?>").off().on("click",function() {
tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection");
tplCtx.path = $(this).data("path")+((notNull(<?php echo $kunik ?>Data) ? <?php echo $kunik ?>Data.length : "0"));
tplCtx.path = $(this).data("path")+nextValuekey<?php echo $kunik ?>;
dyFObj.openForm( sectionDyf.<?php echo $kunik ?> );
});
......
......@@ -81,7 +81,7 @@
<?php if( $mode != "pdf" ){ ?>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<tr>
<td colspan="<?php if( $mode != "r"){ echo count( $properties)+2 ; } else { echo count( $properties) ;} ?>" ><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn.$editParamsBtn.$editBtnL?></h4>
......@@ -166,7 +166,7 @@
</div>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<?php
......@@ -227,6 +227,21 @@
};
var max<?php echo $kunik ?> = 0;
var nextValuekey<?php echo $kunik ?> = 0;
if(notNull(<?php echo $kunik ?>Data)){
$.each(<?php echo $kunik ?>Data, function(ind, val){
if(parseInt(ind) > max<?php echo $kunik ?>){
max<?php echo $kunik ?> = parseInt(ind);
}
});
nextValuekey<?php echo $kunik ?> = max<?php echo $kunik ?> + 1;
}
$(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = {
......@@ -295,8 +310,11 @@
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
location.reload();
$("#ajax-modal").modal('hide');
urlCtrl.loadByHash( location.hash );
} );
}
......@@ -311,7 +329,7 @@
$(".add<?php echo $kunik ?>").off().on("click",function() {
tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection");
tplCtx.path = $(this).data("path")+((notNull(<?php echo $kunik ?>Data) ? <?php echo $kunik ?>Data.length : "0"));
tplCtx.path = $(this).data("path")+nextValuekey<?php echo $kunik ?>;
dyFObj.openForm( sectionDyf.<?php echo $kunik ?> );
});
......
......@@ -185,7 +185,7 @@
<?php if( $mode != "pdf" ){ ?>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<tr>
<td colspan="<?php if( $mode != "r"){ echo count( $properties)+2 ; } else { echo count( $properties) ;} ?>" ><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn.$editParamsBtn.$editBtnL?></h4>
......@@ -396,6 +396,21 @@
placeholders : <?php echo json_encode( $propertiesParams["placeholders"] ); ?>
};
var max<?php echo $kunik ?> = 0;
var nextValuekey<?php echo $kunik ?> = 0;
if(notNull(<?php echo $kunik ?>Data)){
$.each(<?php echo $kunik ?>Data, function(ind, val){
if(parseInt(ind) > max<?php echo $kunik ?>){
max<?php echo $kunik ?> = parseInt(ind);
}
});
nextValuekey<?php echo $kunik ?> = max<?php echo $kunik ?> + 1;
}
$(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = {
......@@ -477,8 +492,11 @@
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
location.reload();
$("#ajax-modal").modal('hide');
urlCtrl.loadByHash( location.hash );
} );
}
......@@ -493,7 +511,7 @@
$(".add<?php echo $kunik ?>").off().on("click",function() {
tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection");
tplCtx.path = $(this).data("path")+((notNull(<?php echo $kunik ?>Data) ? <?php echo $kunik ?>Data.length : "0"));
tplCtx.path = $(this).data("path")+nextValuekey<?php echo $kunik ?>;
dyFObj.openForm( sectionDyf.<?php echo $kunik ?> );
});
......
......@@ -79,7 +79,7 @@
<?php if( $mode != "pdf" ){ ?>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<tr>
<td colspan="<?php if( $mode != "r"){ echo count( $properties)+2 ; } else { echo count( $properties) ;} ?>" ><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn.$editParamsBtn.$editBtnL?></h4>
......@@ -169,7 +169,7 @@
</div>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<?php
......@@ -238,6 +238,21 @@
};
var max<?php echo $kunik ?> = 0;
var nextValuekey<?php echo $kunik ?> = 0;
if(notNull(<?php echo $kunik ?>Data)){
$.each(<?php echo $kunik ?>Data, function(ind, val){
if(parseInt(ind) > max<?php echo $kunik ?>){
max<?php echo $kunik ?> = parseInt(ind);
}
});
nextValuekey<?php echo $kunik ?> = max<?php echo $kunik ?> + 1;
}
$(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = {
......@@ -310,8 +325,11 @@
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
location.reload();
$("#ajax-modal").modal('hide');
urlCtrl.loadByHash( location.hash );
} );
}
......@@ -326,7 +344,7 @@
$(".add<?php echo $kunik ?>").off().on("click",function() {
tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection");
tplCtx.path = $(this).data("path")+((notNull(<?php echo $kunik ?>Data) ? <?php echo $kunik ?>Data.length : "0"));
tplCtx.path = $(this).data("path")+nextValuekey<?php echo $kunik ?>;
dyFObj.openForm( sectionDyf.<?php echo $kunik ?> );
});
......
......@@ -90,7 +90,7 @@
<?php if( $mode != "pdf" ){ ?>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<tr>
<td colspan="<?php if( $mode != "r"){ echo count( $properties)+2 ; } else { echo count( $properties) ;} ?>" ><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn.$editParamsBtn.$editBtnL?></h4>
......@@ -180,7 +180,7 @@
</div>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<?php
......@@ -248,6 +248,21 @@
};
var max<?php echo $kunik ?> = 0;
var nextValuekey<?php echo $kunik ?> = 0;
if(notNull(<?php echo $kunik ?>Data)){
$.each(<?php echo $kunik ?>Data, function(ind, val){
if(parseInt(ind) > max<?php echo $kunik ?>){
max<?php echo $kunik ?> = parseInt(ind);
}
});
nextValuekey<?php echo $kunik ?> = max<?php echo $kunik ?> + 1;
}
$(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = {
......@@ -316,8 +331,11 @@
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
location.reload();
$("#ajax-modal").modal('hide');
urlCtrl.loadByHash( location.hash );
} );
}
......@@ -332,7 +350,7 @@
$(".add<?php echo $kunik ?>").off().on("click",function() {
tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection");
tplCtx.path = $(this).data("path")+((notNull(<?php echo $kunik ?>Data) ? <?php echo $kunik ?>Data.length : "0"));
tplCtx.path = $(this).data("path")+nextValuekey<?php echo $kunik ?>;
dyFObj.openForm( sectionDyf.<?php echo $kunik ?> );
});
......
......@@ -85,7 +85,7 @@
<?php if( $mode != "pdf" ){ ?>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<tr>
<td colspan="<?php if( $mode != "r"){ echo count( $properties)+2 ; } else { echo count( $properties) ;} ?>" ><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn.$editParamsBtn.$editBtnL?></h4>
......@@ -177,7 +177,7 @@
</label>
</div>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>" style="overflow-x: auto">
<thead>
<?php
......@@ -248,6 +248,21 @@
};
var max<?php echo $kunik ?> = 0;
var nextValuekey<?php echo $kunik ?> = 0;
if(notNull(<?php echo $kunik ?>Data)){
$.each(<?php echo $kunik ?>Data, function(ind, val){
if(parseInt(ind) > max<?php echo $kunik ?>){
max<?php echo $kunik ?> = parseInt(ind);
}
});
nextValuekey<?php echo $kunik ?> = max<?php echo $kunik ?> + 1;
}
$(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = {
......@@ -340,8 +355,11 @@
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
location.reload();
$("#ajax-modal").modal('hide');
urlCtrl.loadByHash( location.hash );
} );
}
......@@ -356,7 +374,7 @@