tussenopslag

This commit is contained in:
Monique
2022-03-28 15:04:41 +02:00
parent 8140d01a53
commit 7031844f7b
2 changed files with 294 additions and 0 deletions
@@ -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
});