diff --git a/ci4/app/Language/es/MaquinasPapelImpresion.php b/ci4/app/Language/es/MaquinasPapelImpresion.php
index 65f6e453..281f6933 100644
--- a/ci4/app/Language/es/MaquinasPapelImpresion.php
+++ b/ci4/app/Language/es/MaquinasPapelImpresion.php
@@ -6,6 +6,6 @@ return [
'papel_impresion_maquinas' => 'Papeles impresion',
'activo' => 'Activo',
'gramaje_duplicado' => 'No se pueden seleccionar dos papeles con el mismo gramaje',
- 'sureToChangeRotativaTitle' => 'Está seguro de cambiar esta opción?',
+ 'sureToChangeRotativaTitle' => '¿Está seguro de cambiar esta opción?',
'sureToChangeRotativaText' => 'Está operación no se puede deshacer y cambiará la lista de papeles.',
];
\ No newline at end of file
diff --git a/ci4/app/Language/es/PapelImpresion.php b/ci4/app/Language/es/PapelImpresion.php
index aae90965..c730654d 100644
--- a/ci4/app/Language/es/PapelImpresion.php
+++ b/ci4/app/Language/es/PapelImpresion.php
@@ -37,7 +37,7 @@ return [
'consumo_tintas_rotativas' => 'Consumo tintas rotativas',
'maquinas_papel' => 'Máquinas seleccionadas',
- 'sureToChangeRotativaTitle' => 'Está seguro de cambiar esta opción?',
+ 'sureToChangeRotativaTitle' => '¿Está seguro de cambiar esta opción?',
'sureToChangeRotativaText' => 'Está operación no se puede deshacer, cambiará la lista de máquinas y el consumo de tintas.',
'validation' => [
diff --git a/ci4/app/Views/themes/_commonPartialsBs/_modalConfirmDialog.php b/ci4/app/Views/themes/_commonPartialsBs/_modalConfirmDialog.php
new file mode 100644
index 00000000..e2b6d8c3
--- /dev/null
+++ b/ci4/app/Views/themes/_commonPartialsBs/_modalConfirmDialog.php
@@ -0,0 +1,45 @@
+
+
+
+= $this->section('additionalInlineJs') ?>
+
+
+function asyncConfirmDialog(title, msg, yesCallbackFn, noCallbackFn) {
+ var $confirmDialog = $("#modalConfirmYesNo");
+ $confirmDialog.modal('show');
+ $("#labelTitleConfirmDialog").html(title);
+ $("#labelMsgConfirmDialog").html(msg);
+ $("#btnYesConfirmDialog").off('click').click(function () {
+ yesCallbackFn();
+ $confirmDialog.modal("hide");
+ });
+ $("#btnNoConfirmDialog").off('click').click(function () {
+ noCallbackFn();
+ $confirmDialog.modal("hide");
+ });
+ }
+
+= $this->endSection() ?>
+
+
diff --git a/ci4/app/Views/themes/_commonPartialsBs/_modalDialog.php b/ci4/app/Views/themes/_commonPartialsBs/_modalDialog.php
deleted file mode 100644
index d04b309d..00000000
--- a/ci4/app/Views/themes/_commonPartialsBs/_modalDialog.php
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
-
-= $this->section('additionalInlineJs') ?>
-
-function popAlert(message, alertClass, alertIcon){
- var htmlString = `
- `;
- $(window).scrollTop(0);
- $('#sk-alert').hide().empty().html(htmlString).fadeIn("slow", function(){
- setTimeout(function(){
- $('#sk-alert').fadeOut("slow");
- }, 5000);
- });
-}
-
-function popSuccessAlert(successMsg){
- popAlert(successMsg, "alert-success", "ti-check");
-}
-
-function popWarningAlert(warningMsg){
- popAlert(warningMsg, "alert-warning", "ti-bell");
-}
-
-function popErrorAlert(errorMsg){
- popAlert(errorMsg, "alert-danger", "ti-ban");
-}
-
-
- popSuccessAlert(`= $successMessage ?>`);
-
-
-
- popWarningAlert(`= $warningMessage ?>`);
-
-
-
- popErrorAlert(`= $errorMessage ?>`);
-
-
-= $this->endSection() ?>
-
-
diff --git a/ci4/app/Views/themes/backend/vuexy/form/configuracion/maquinas/viewMaquinaForm.php b/ci4/app/Views/themes/backend/vuexy/form/configuracion/maquinas/viewMaquinaForm.php
index df27a19a..f6dfb40d 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/configuracion/maquinas/viewMaquinaForm.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/configuracion/maquinas/viewMaquinaForm.php
@@ -98,10 +98,15 @@
+
+ = view("themes/_commonPartialsBs/_modalConfirmDialog") ?>
+
+
+
= $this->endSection() ?>
@@ -141,73 +146,37 @@
});
$('#isRotativa').on("click",function(el){
-
- AsyncConfirmYesNo('title', 'msg', MyYesFunction, MyNoFunction);
-
- /*Swal.fire({
- title: '= lang('MaquinasPapelImpresion.sureToChangeRotativaTitle') ?>',
- text: '= lang('MaquinasPapelImpresion.sureToChangeRotativaText') ?>',
- icon: 'warning',
- showCancelButton: true,
- confirmButtonColor: '#3085d6',
- confirmButtonText: '= lang('Basic.global.yes') ?>',
- cancelButtonText: '= lang('Basic.global.Cancel') ?>',
- cancelButtonColor: '#d33'
- })
- .then((result) => {
- if (result.value) {
-
- if($(this).is(':checked')){
- isRotativa.watch = 1;
- $("#datosRotativa").show();
- }else{
- document.getElementById("precioTintaNegro").value = null;
- document.getElementById("precioTintaColor").value = null;
- document.getElementById("velocidadCorte").value = null;
- document.getElementById("precioHoraCorte").value = null;
- document.getElementById("metrosxminuto").value = null;
- $("#datosRotativa").hide();
- isRotativa.watch = 0;
- }
-
- theTable2.clearPipeline();
- theTable2.draw();
- yeniden(response.= csrf_token() ?>);
- }
- });
- */
+ asyncConfirmDialog('= lang('MaquinasPapelImpresion.sureToChangeRotativaTitle') ?>',
+ '= lang('MaquinasPapelImpresion.sureToChangeRotativaText') ?>', yesCallback, noCallback);
});
- function AsyncConfirmYesNo(title, msg, yesFn, noFn) {
- var $confirm = $("#modalConfirmYesNo");
- $confirm.modal('show');
- $("#lblTitleConfirmYesNo").html(title);
- $("#lblMsgConfirmYesNo").html(msg);
- $("#btnYesConfirmYesNo").off('click').click(function () {
- yesFn();
- $confirm.modal("hide");
- });
- $("#btnNoConfirmYesNo").off('click').click(function () {
- noFn();
- $confirm.modal("hide");
- });
+ function yesCallback() {
+ if($('#isRotativa').is(':checked')){
+ isRotativa.watch = 1;
+ $("#datosRotativa").show();
+ }else{
+ document.getElementById("precioTintaNegro").value = 0;
+ document.getElementById("precioTintaColor").value = 0;
+ document.getElementById("velocidadCorte").value = 0;
+ document.getElementById("precioHoraCorte").value = 0;
+ document.getElementById("metrosxminuto").value = 0;
+ $("#datosRotativa").hide();
+ isRotativa.watch = 0;
+ }
+ theTable2.clearPipeline();
+ theTable2.draw();
+ //yeniden(response.= csrf_token() ?>); esto da error JJO?
}
- function MyYesFunction() {
- alert("Time to get off your workstation!");
- $("#lblTestResult").html("You are hungry");
- }
- function MyNoFunction() {
- alert("Well... just continue working.");
- $("#lblTestResult").html("You are not hungry");
+ function noCallback() {
+ // Toggle behaviour
+ $('#isRotativa').prop("checked", !$('#isRotativa').prop("checked"));
}
$('#isPadre').on("click",function(el){
if($(this).is(':checked')){
-
$("#selectVariante").show();
}else{
-
$("#padreId").select2('val', -1);
$("#selectVariante").hide();
}