338 lines
No EOL
9.4 KiB
JavaScript
338 lines
No EOL
9.4 KiB
JavaScript
/************************************************/
|
|
/* standard javascript for lte */
|
|
/************************************************/
|
|
|
|
/*************************************************/
|
|
/*************************************************/
|
|
/* DOCUMENT READY CR*/
|
|
/*************************************************/
|
|
/*************************************************/
|
|
|
|
function documentReadyScriptCR()
|
|
{
|
|
|
|
|
|
}
|
|
|
|
/************************************************************/
|
|
/************************************************************/
|
|
/* DOCUMENT READY PRIMARY DETAIL*/
|
|
/************************************************************/
|
|
/************************************************************/
|
|
|
|
function documentReadyScript() {
|
|
|
|
|
|
}
|
|
|
|
/************************************************/
|
|
/************************************************/
|
|
/* check fields per pagina dettaglio /*
|
|
/************************************************/
|
|
/************************************************/
|
|
function checkFields()
|
|
|
|
{
|
|
//R per required
|
|
//isNum per numerico
|
|
//isNumKey è una chiave.. uguale a isNum>0 ma cambio il messaggio
|
|
//isNum>x per numerico maggiore di x
|
|
//isNum<x per numerico minore di x
|
|
//isEmail per indirizzo email
|
|
//inRange1:10 per ..
|
|
//3 stringhe
|
|
//1: nome del field
|
|
//2: se '' visualizza il nome del field, altrimenti questo campo
|
|
//3: R/N+''/isNum/isEmail/inRangea:b
|
|
|
|
return Ab.validateForm('descrizione','Descrizione','R');
|
|
}
|
|
|
|
|
|
/************************************************/
|
|
/************************************************/
|
|
/** REPORT MA FORSE NON SERVE */
|
|
/************************************************/
|
|
/************************************************/
|
|
function reportxxx()
|
|
{
|
|
//FACCIO IL SUBMIT
|
|
var f = document.main;
|
|
f.flgReport.value="S";
|
|
//f.action=webApp+"/tr/Pratica.abl";
|
|
f.cmd.value="search";
|
|
Ab.submitAj('main');
|
|
}
|
|
|
|
|
|
/************************************************/
|
|
/************************************************/
|
|
/* TEMPLATE GESTIONE RIGHE */
|
|
/************************************************/
|
|
/************************************************/
|
|
function addRow()
|
|
{
|
|
|
|
var f = document.main;
|
|
f.action=f.actionPage.value;
|
|
if (Ab.validateForm('id_riga','Row','R'))
|
|
{
|
|
f.cmd.value="addRow";
|
|
f.act.value="";
|
|
Ab.submitAj('main');
|
|
}
|
|
}
|
|
|
|
function delRow(l_id)
|
|
{
|
|
if (Ab.confirmDelete())
|
|
{
|
|
var f = document.main;
|
|
f.action=f.actionPage.value;
|
|
// FACCIO IL SUBMIT
|
|
f.cmd.value="delRow";
|
|
f.act.value="";
|
|
f.id_riga.value=l_id;
|
|
Ab.submitAj('main');
|
|
}
|
|
|
|
}
|
|
function modRow(l_id)
|
|
{
|
|
|
|
{
|
|
var f = document.main;
|
|
f.action=f.actionPage.value;
|
|
// FACCIO IL SUBMIT
|
|
f.cmd.value="modRo";
|
|
f.act.value="";
|
|
f.id_riga.value=l_id;
|
|
Ab.submitAj('main');
|
|
}
|
|
|
|
}
|
|
|
|
function checkBoxes()
|
|
/////////////////////////////////////////////
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
function checkBoxesCR()
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************/
|
|
/************************************************/
|
|
/* automator da dettaglio /*
|
|
/************************************************/
|
|
/************************************************/
|
|
function eseguiAutomator() {
|
|
Swal.fire({
|
|
title: "Esegui regola",
|
|
text: "Verra' eseguita la regola del record corrente sul tipo AAA Indefinito. Sei Sicuro?",
|
|
icon: "warning",
|
|
showDenyButton: true,
|
|
showCancelButton: false,
|
|
confirmButtonText: 'Si',
|
|
denyButtonText: 'No',
|
|
cancelButtonText: 'Annulla',
|
|
}).then((result) => {
|
|
/* Read more about isConfirmed, isDenied below */
|
|
if (result.isConfirmed) {
|
|
////////////////////////////////////////////////////////////////////
|
|
$("#main").attr("action", $("#actionPage").val());
|
|
//$("#flgReport").val("S");
|
|
$("#cmd", "#main").val("eseguiAutomator");
|
|
$("#act", "#main").val("");
|
|
$("#cmd2").val("");
|
|
//$("#id_wwwAutomator").val(l_id);
|
|
//$("#pageNumber").val("1");
|
|
Ab.submitAj('main');
|
|
////////////////////////////////////////////////////////////////////
|
|
} else if (result.isDenied) {
|
|
//Swal.fire('Changes are not saved', '', 'info')
|
|
}
|
|
})
|
|
|
|
|
|
}
|
|
/************************************************/
|
|
/************************************************/
|
|
/* automator da CR /*
|
|
/************************************************/
|
|
/************************************************/
|
|
function eseguiAutomatorCR() {
|
|
Swal.fire({
|
|
title: "Esegui regola",
|
|
text: "Verra' eseguita la regola del record corrente sul tipo AAA Indefinito. Sei Sicuro?",
|
|
icon: "warning",
|
|
showDenyButton: true,
|
|
showCancelButton: false,
|
|
confirmButtonText: 'Si',
|
|
denyButtonText: 'No',
|
|
cancelButtonText: 'Annulla',
|
|
}).then((result) => {
|
|
/* Read more about isConfirmed, isDenied below */
|
|
if (result.isConfirmed) {
|
|
////////////////////////////////////////////////////////////////////
|
|
$("#main").attr("action", $("#actionPage").val());
|
|
//$("#flgReport").val("S");
|
|
$("#cmd", "#main").val("eseguiAutomatorCR");
|
|
$("#act", "#main").val("");
|
|
$("#cmd2").val("");
|
|
//$("#id_wwwAutomator").val(l_id);
|
|
//$("#pageNumber").val("1");
|
|
Ab.submitAj('main');
|
|
////////////////////////////////////////////////////////////////////
|
|
} else if (result.isDenied) {
|
|
//Swal.fire('Changes are not saved', '', 'info')
|
|
}
|
|
})
|
|
|
|
|
|
}
|
|
/************************************************/
|
|
/************************************************/
|
|
/* automator da dettaglio /*
|
|
/************************************************/
|
|
/************************************************/
|
|
function eseguiAutomatorFullCR() {
|
|
Swal.fire({
|
|
title: "Esegui tutte le regole",
|
|
text: "Verranno eseguite tutte la regole sul tipo AAA Indefinito!!. Sei Sicuro?",
|
|
icon: "warning",
|
|
showDenyButton: true,
|
|
showCancelButton: false,
|
|
confirmButtonText: 'Si',
|
|
denyButtonText: 'No',
|
|
cancelButtonText: 'Annulla',
|
|
}).then((result) => {
|
|
/* Read more about isConfirmed, isDenied below */
|
|
if (result.isConfirmed) {
|
|
////////////////////////////////////////////////////////////////////
|
|
$("#main").attr("action", $("#actionPage").val());
|
|
//$("#flgReport").val("S");
|
|
$("#cmd", "#main").val("eseguiAutomatorFullCR");
|
|
$("#act", "#main").val("");
|
|
$("#cmd2").val("");
|
|
//$("#id_wwwAutomator").val(l_id);
|
|
//$("#pageNumber").val("1");
|
|
Ab.submitAj('main');
|
|
////////////////////////////////////////////////////////////////////
|
|
} else if (result.isDenied) {
|
|
//Swal.fire('Changes are not saved', '', 'info')
|
|
}
|
|
})
|
|
|
|
|
|
}
|
|
|
|
/************************************************/
|
|
/************************************************/
|
|
/* duplicaAutomator da dettaglio /*
|
|
/************************************************/
|
|
/************************************************/
|
|
function duplicaAutomator() {
|
|
Swal.fire({
|
|
title: "Duplica regola",
|
|
text: "Verra' duplicata la regola del record corrente. Sei Sicuro?",
|
|
icon: "warning",
|
|
showDenyButton: true,
|
|
showCancelButton: false,
|
|
confirmButtonText: 'Si',
|
|
denyButtonText: 'No',
|
|
cancelButtonText: 'Annulla',
|
|
}).then((result) => {
|
|
/* Read more about isConfirmed, isDenied below */
|
|
if (result.isConfirmed) {
|
|
////////////////////////////////////////////////////////////////////
|
|
$("#main").attr("action", $("#actionPage").val());
|
|
//$("#flgReport").val("S");
|
|
$("#cmd", "#main").val("duplicaAutomator");
|
|
$("#act", "#main").val("");
|
|
$("#cmd2").val("");
|
|
//$("#id_wwwAutomator").val(l_id);
|
|
//$("#pageNumber").val("1");
|
|
Ab.submitAj('main');
|
|
////////////////////////////////////////////////////////////////////
|
|
} else if (result.isDenied) {
|
|
//Swal.fire('Changes are not saved', '', 'info')
|
|
}
|
|
})
|
|
|
|
|
|
}
|
|
|
|
/************************************************/
|
|
/************************************************/
|
|
/* SPOSTA SU E GIU DA CR /*
|
|
/************************************************/
|
|
/************************************************/
|
|
function spostaGiuWwwAutomator(l_id)
|
|
{
|
|
|
|
var f = document.main;
|
|
f.action=f.actionPage.value;
|
|
// FACCIO IL SUBMIT
|
|
f.cmd.value="spostaGiu";
|
|
f.act.value="";
|
|
f.id_wwwAutomatorSposta.value=l_id;
|
|
Ab.submitAj('main');
|
|
|
|
}
|
|
function spostaSuWwwAutomator(l_id)
|
|
|
|
{
|
|
|
|
var f = document.main;
|
|
f.action=f.actionPage.value;
|
|
// FACCIO IL SUBMIT
|
|
f.cmd.value="spostaSu";
|
|
f.act.value="";
|
|
f.id_wwwAutomatorSposta.value=l_id;
|
|
Ab.submitAj('main');
|
|
|
|
}
|
|
|
|
|
|
/************************************************/
|
|
/************************************************/
|
|
/* duplicaAutomator da dettaglio /*
|
|
/************************************************/
|
|
/************************************************/
|
|
function ripristinoOrdine() {
|
|
Swal.fire({
|
|
title: "Ripristino Ordine",
|
|
text: "Verra' ripristinato l'ordine per tipo + ordine. Sei Sicuro?",
|
|
icon: "warning",
|
|
showDenyButton: true,
|
|
showCancelButton: false,
|
|
confirmButtonText: 'Si',
|
|
denyButtonText: 'No',
|
|
cancelButtonText: 'Annulla',
|
|
}).then((result) => {
|
|
/* Read more about isConfirmed, isDenied below */
|
|
if (result.isConfirmed) {
|
|
////////////////////////////////////////////////////////////////////
|
|
$("#main").attr("action", $("#actionPage").val());
|
|
//$("#flgReport").val("S");
|
|
$("#cmd", "#main").val("ripristinoOrdine");
|
|
$("#act", "#main").val("");
|
|
$("#cmd2").val("");
|
|
//$("#id_wwwAutomator").val(l_id);
|
|
//$("#pageNumber").val("1");
|
|
Ab.submitAj('main');
|
|
////////////////////////////////////////////////////////////////////
|
|
} else if (result.isDenied) {
|
|
//Swal.fire('Changes are not saved', '', 'info')
|
|
}
|
|
})
|
|
|
|
|
|
} |