Commit 08e31db2 authored by Tibor Katelbach's avatar Tibor Katelbach

Merge branch 'anatole' into 'master'

sommom

See merge request !8
parents 92d7863c 2c3e4166
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<?php if( $mode != "pdf" ){ ?> <?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> <thead>
<tr> <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> <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 @@ ...@@ -191,7 +191,7 @@
</div> </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> <thead>
<?php <?php
...@@ -254,6 +254,21 @@ ...@@ -254,6 +254,21 @@
placeholders : <?php echo json_encode( $propertiesParams["placeholders"] ); ?> 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() { $(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = { sectionDyf.<?php echo $kunik ?> = {
...@@ -361,7 +376,7 @@ ...@@ -361,7 +376,7 @@
$(".add<?php echo $kunik ?>").off().on("click",function() { $(".add<?php echo $kunik ?>").off().on("click",function() {
tplCtx.id = $(this).data("id"); tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection"); 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 ?> ); dyFObj.openForm( sectionDyf.<?php echo $kunik ?> );
}); });
...@@ -382,6 +397,42 @@ ...@@ -382,6 +397,42 @@
dyFObj.openForm( sectionDyf.<?php echo $kunik ?>Params,null, sectionDyf.<?php echo $kunik ?>ParamsData); 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> </script>
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
?> ?>
<?php if( $mode != "pdf" ){ ?> <?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> <thead>
<tr> <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> <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 @@ ...@@ -213,7 +213,7 @@
</label> </label>
</div> </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> <thead>
<?php <?php
...@@ -293,6 +293,21 @@ ...@@ -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() { $(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = { sectionDyf.<?php echo $kunik ?> = {
...@@ -393,7 +408,7 @@ ...@@ -393,7 +408,7 @@
$(".add<?php echo $kunik ?>").off().on("click",function() { $(".add<?php echo $kunik ?>").off().on("click",function() {
tplCtx.id = $(this).data("id"); tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection"); 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 ?> ); dyFObj.openForm( sectionDyf.<?php echo $kunik ?> );
}); });
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
<?php if( $mode != "pdf" ){ ?> <?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> <thead>
<tr> <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> <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 @@ ...@@ -205,7 +205,7 @@
</label> </label>
</div> </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> <thead>
<?php <?php
...@@ -279,6 +279,21 @@ ...@@ -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() { $(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = { sectionDyf.<?php echo $kunik ?> = {
...@@ -356,8 +371,11 @@ ...@@ -356,8 +371,11 @@
toastr.error('value cannot be empty!'); toastr.error('value cannot be empty!');
else { else {
dataHelper.path2Value( tplCtx, function(params) { 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 @@ ...@@ -372,7 +390,7 @@
$(".add<?php echo $kunik ?>").off().on("click",function() { $(".add<?php echo $kunik ?>").off().on("click",function() {
tplCtx.id = $(this).data("id"); tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection"); 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 ?> ); dyFObj.openForm( sectionDyf.<?php echo $kunik ?> );
}); });
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<?php if( $mode != "pdf" ){ ?> <?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> <thead>
<tr> <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> <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 @@ ...@@ -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() { $(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = { sectionDyf.<?php echo $kunik ?> = {
...@@ -254,8 +269,11 @@ ...@@ -254,8 +269,11 @@
toastr.error('value cannot be empty!'); toastr.error('value cannot be empty!');
else { else {
dataHelper.path2Value( tplCtx, function(params) { 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 @@ ...@@ -270,7 +288,7 @@
$(".add<?php echo $kunik ?>").off().on("click",function() { $(".add<?php echo $kunik ?>").off().on("click",function() {
tplCtx.id = $(this).data("id"); tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection"); 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 ?> ); dyFObj.openForm( sectionDyf.<?php echo $kunik ?> );
}); });
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
<?php if( $mode != "pdf" ){ ?> <?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> <thead>
<tr> <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> <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 @@ ...@@ -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() { $(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = { sectionDyf.<?php echo $kunik ?> = {
...@@ -350,8 +365,11 @@ ...@@ -350,8 +365,11 @@
toastr.error('value cannot be empty!'); toastr.error('value cannot be empty!');
else { else {
dataHelper.path2Value( tplCtx, function(params) { 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 @@ ...@@ -366,7 +384,7 @@
$(".add<?php echo $kunik ?>").off().on("click",function() { $(".add<?php echo $kunik ?>").off().on("click",function() {
tplCtx.id = $(this).data("id"); tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection"); 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 ?> ); dyFObj.openForm( sectionDyf.<?php echo $kunik ?> );
}); });
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<?php if( $mode != "pdf" ){ ?> <?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> <thead>
<tr> <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> <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 @@ ...@@ -166,7 +166,7 @@
</div> </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> <thead>
<?php <?php
...@@ -227,6 +227,21 @@ ...@@ -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() { $(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = { sectionDyf.<?php echo $kunik ?> = {
...@@ -295,8 +310,11 @@ ...@@ -295,8 +310,11 @@
toastr.error('value cannot be empty!'); toastr.error('value cannot be empty!');
else { else {
dataHelper.path2Value( tplCtx, function(params) { 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 @@ ...@@ -311,7 +329,7 @@
$(".add<?php echo $kunik ?>").off().on("click",function() { $(".add<?php echo $kunik ?>").off().on("click",function() {
tplCtx.id = $(this).data("id"); tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection"); 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 ?> ); dyFObj.openForm( sectionDyf.<?php echo $kunik ?> );
}); });
......
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
<?php if( $mode != "pdf" ){ ?> <?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> <thead>
<tr> <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> <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 @@ ...@@ -396,6 +396,21 @@
placeholders : <?php echo json_encode( $propertiesParams["placeholders"] ); ?> 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() { $(document).ready(function() {
sectionDyf.<?php echo $kunik ?> = { sectionDyf.<?php echo $kunik ?> = {
...@@ -477,8 +492,11 @@ ...@@ -477,8 +492,11 @@
toastr.error('value cannot be empty!'); toastr.error('value cannot be empty!');
else { else {
dataHelper.path2Value( tplCtx, function(params) { 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 @@ ...@@ -493,7 +511,7 @@
$(".add<?php echo $kunik ?>").off().on("click",function() { $(".add<?php echo $kunik ?>").off().on("click",function() {
tplCtx.id = $(this).data("id"); tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection"); 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 ?> ); dyFObj.openForm( sectionDyf.<?php echo $kunik ?> );
}); });
......