Loading module/Application/config/formule.config.php +0 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ return [ ], 'may_terminate' => true, ], ], ], ], Loading module/Application/view/application/formule/test-saisir.phtml +60 −3 Original line number Diff line number Diff line Loading @@ -258,7 +258,9 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title); <?= $lf->output('cHeuresComplAPayer') ?> </tr> </table> <button class="enregistrer btn btn-primary">Enregistrer les données et recalculer les HETD</button> <button class="enregistrer btn btn-primary">Enregistrer et recalculer les HETD</button> <button class="exporter btn btn-default">Télécharger</button> <input type="file" id="importbtn" class="importer"> </div> </div> Loading Loading @@ -645,6 +647,11 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title); value = that.variableToValue($(this).data('default'), type); } if ('structureCode' == name) { if (value) that.ajoutStructure($(this), value); console.log(name, value); } $(this).val(value); if ('typeInterventionCode' == name) { Loading Loading @@ -702,6 +709,43 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title); exporter: function () { content = this.getData(); filename = content.libelle; content = JSON.stringify(content); var a = document.createElement('a'); var blob = new Blob([content], {'type': 'text/json'}); a.href = window.URL.createObjectURL(blob); a.download = 'Test de formule ' + filename + '.json'; a.click(); }, importer: function () { var that = this; var input = document.getElementById('importbtn'); var file = input.files[0]; var reader = new FileReader(); // Closure to capture the file information. reader.onload = (function () { return function (e) { var data = JSON.parse(e.target.result); that.setData(data); }; })(file); // Read in the image file as a data URL. reader.readAsText(file); }, changementFormule: function (formuleId) { var formules = this.element.data('formules'); Loading Loading @@ -794,9 +838,11 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title); ajoutStructure: function (element) ajoutStructure: function (element, structure, noPrompt) { var structure = prompt("Ajout d'une nouvelle structure"); if (noPrompt === true) { structure = prompt("Ajout d'une nouvelle structure"); } if (structure && -1 === this.structures.indexOf(structure)) { this.structures.push(structure); Loading @@ -822,6 +868,8 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title); affDebugInfo: function (data) { if (!data) return; var h = ''; h += '<div class="debug-info-table"><table class="table table-bordered table-condensed table-extra-condensed debug-table">'; Loading Loading @@ -914,6 +962,15 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title); that.save(true); }); this.element.find(".exporter").click(function () { that.exporter(); }); this.element.find(".importer").change(function () { that.importer(); }); this.element.find("#affRes").change(function () { switch ($(this).val()) { case 'attendu': Loading Loading
module/Application/config/formule.config.php +0 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ return [ ], 'may_terminate' => true, ], ], ], ], Loading
module/Application/view/application/formule/test-saisir.phtml +60 −3 Original line number Diff line number Diff line Loading @@ -258,7 +258,9 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title); <?= $lf->output('cHeuresComplAPayer') ?> </tr> </table> <button class="enregistrer btn btn-primary">Enregistrer les données et recalculer les HETD</button> <button class="enregistrer btn btn-primary">Enregistrer et recalculer les HETD</button> <button class="exporter btn btn-default">Télécharger</button> <input type="file" id="importbtn" class="importer"> </div> </div> Loading Loading @@ -645,6 +647,11 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title); value = that.variableToValue($(this).data('default'), type); } if ('structureCode' == name) { if (value) that.ajoutStructure($(this), value); console.log(name, value); } $(this).val(value); if ('typeInterventionCode' == name) { Loading Loading @@ -702,6 +709,43 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title); exporter: function () { content = this.getData(); filename = content.libelle; content = JSON.stringify(content); var a = document.createElement('a'); var blob = new Blob([content], {'type': 'text/json'}); a.href = window.URL.createObjectURL(blob); a.download = 'Test de formule ' + filename + '.json'; a.click(); }, importer: function () { var that = this; var input = document.getElementById('importbtn'); var file = input.files[0]; var reader = new FileReader(); // Closure to capture the file information. reader.onload = (function () { return function (e) { var data = JSON.parse(e.target.result); that.setData(data); }; })(file); // Read in the image file as a data URL. reader.readAsText(file); }, changementFormule: function (formuleId) { var formules = this.element.data('formules'); Loading Loading @@ -794,9 +838,11 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title); ajoutStructure: function (element) ajoutStructure: function (element, structure, noPrompt) { var structure = prompt("Ajout d'une nouvelle structure"); if (noPrompt === true) { structure = prompt("Ajout d'une nouvelle structure"); } if (structure && -1 === this.structures.indexOf(structure)) { this.structures.push(structure); Loading @@ -822,6 +868,8 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title); affDebugInfo: function (data) { if (!data) return; var h = ''; h += '<div class="debug-info-table"><table class="table table-bordered table-condensed table-extra-condensed debug-table">'; Loading Loading @@ -914,6 +962,15 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title); that.save(true); }); this.element.find(".exporter").click(function () { that.exporter(); }); this.element.find(".importer").change(function () { that.importer(); }); this.element.find("#affRes").change(function () { switch ($(this).val()) { case 'attendu': Loading