diff --git a/ci4/app/Config/Boot/development.php b/ci4/app/Config/Boot/development.php index ff02768c..05a86125 100644 --- a/ci4/app/Config/Boot/development.php +++ b/ci4/app/Config/Boot/development.php @@ -29,4 +29,4 @@ defined('SHOW_DEBUG_BACKTRACE') || define('SHOW_DEBUG_BACKTRACE', true); | the system. This will control whether Kint is loaded, and a few other | items. It can always be used within your own application too. */ -defined('CI_DEBUG') || define('CI_DEBUG', false); +defined('CI_DEBUG') || define('CI_DEBUG', true); diff --git a/ci4/app/Controllers/Js_loader.php b/ci4/app/Controllers/Js_loader.php new file mode 100644 index 00000000..cd847102 --- /dev/null +++ b/ci4/app/Controllers/Js_loader.php @@ -0,0 +1,31 @@ +response->setHeader('Content-Type', 'text/javascript'); + return view('themes/backend/vuexy/form/presupuestos/cosidotapablanda/comparador.js'); + + } + + +} + \ No newline at end of file diff --git a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php index e8c69017..aef00e6b 100644 --- a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php +++ b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php @@ -172,6 +172,9 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController $this->viewData['boxTitle'] = lang('Basic.global.addNew') . ' ' . lang('Presupuestos.moduleTitleCosidoTB') . ' ' . lang('Basic.global.addNewSuffix'); + /* TEST JS LOADER */ + $this->viewData['global_js_variables'] = array('jsVarTest' => "'Hola Jaime'"); + return $this->displayForm(__METHOD__); } // end function add() diff --git a/ci4/app/Controllers/Presupuestos/Js_loader.php b/ci4/app/Controllers/Presupuestos/Js_loader.php new file mode 100644 index 00000000..150d7c7c --- /dev/null +++ b/ci4/app/Controllers/Presupuestos/Js_loader.php @@ -0,0 +1,26 @@ +load->view('themes/backend/vuexy/form/presupuestos/cosidotapablanda/comparador.js', $data); + $this->output->set_content_type('text/javascript'); + } + + +} + \ No newline at end of file diff --git a/ci4/app/Filters/LoginAuthFilter.php b/ci4/app/Filters/LoginAuthFilter.php index 9be92731..a8cd6ff5 100644 --- a/ci4/app/Filters/LoginAuthFilter.php +++ b/ci4/app/Filters/LoginAuthFilter.php @@ -127,7 +127,7 @@ class LoginAuthFilter implements FilterInterface */ public function whiteListController(){ return [ - '', + 'Js_loader', 'BaseController', 'Home', 'Login', diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/comparador.js b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/comparador.js new file mode 100644 index 00000000..9ac25f81 --- /dev/null +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/comparador.js @@ -0,0 +1,17 @@ +$(function () { + + console.log("Llamada desde JS Loader"); + + console.log("jsVarTest: " + jsVarTest); + + + +}); + + +function test(){ + + console.log("Test from function"); + console.log("jsVarTest desde funcion: " + jsVarTest); + +} diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php index 7755c98b..52586d9b 100644 --- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php @@ -1,6 +1,7 @@ = $this->include("themes/_commonPartialsBs/select2bs5") ?> = $this->include("themes/_commonPartialsBs/sweetalert") ?> = $this->extend('themes/backend/vuexy/main/defaultlayout') ?> + = $this->section("content") ?>