diff --git a/application/views/monpas/pages/instrumentencp.php b/application/views/monpas/pages/instrumentencp.php new file mode 100644 index 0000000..78439d8 --- /dev/null +++ b/application/views/monpas/pages/instrumentencp.php @@ -0,0 +1,248 @@ +
\ No newline at end of file diff --git a/public/js/monpas/models/instrumentencpmodel.js b/public/js/monpas/models/instrumentencpmodel.js new file mode 100644 index 0000000..3f0792e --- /dev/null +++ b/public/js/monpas/models/instrumentencpmodel.js @@ -0,0 +1,46 @@ +$(function(){ + + mh.initInstrumentenCPModel = function(){ + var timeout; + + function fAddModule(p){ + this.sysnr = p.sysnr; + this.naam = p.naam; + } + + if (mh.InstrumentenCPModel !== undefined){ + mh.InstrumentenCPModel.initModel(); + } + else { + ls.InstrumentenCPModel = { + modules : ko.observableArray([]), + selectedModule : ko.observable(''), + + initBindings :function(){ + var self = ls.VersiesModel; + + if (!ko.dataFor(document.getElementById('pagInstrumentenCompactSop')) ) { + ko.applyBindings(ls.VersiesModel, document.getElementById("pagInstrumentenCompactSop")); + } + + $.post("index.php/monpas/beheer/getmodules", function(result){ + self.modules.removeAll(); + + if (result){ + $.each(result, function(i,p){ + self.modules.push(new fAddModule(p)); + }); + self.selectedModule(self.modules[0]); + }; // if rsult + self.initModel(); + },'json'); + }, + initModel: function(){ + + }, + + } ; // definition van model + mh.initInstrumentenCPModel().initBindings(); + }; // else + }// function initVersiesModel +}); \ No newline at end of file