tussenopslag
This commit is contained in:
@@ -4,8 +4,13 @@ $(function(){
|
||||
var timeout;
|
||||
|
||||
function fAddModule(p){
|
||||
this.sysnr = p.sysnr;
|
||||
this.naam = p.naam;
|
||||
this.sysnr = p.sysnr;
|
||||
this.cluster = p.cluster
|
||||
this.instrument = p.instrument;
|
||||
this.inSOP = ko.observable(p.insop === 'T');
|
||||
this.sopnaam = ko.observable(p.sopnaam);
|
||||
this.blokjesnaam = ko.observable(p.blokjesnaam);
|
||||
|
||||
}
|
||||
|
||||
if (mh.InstrumentenCPModel !== undefined){
|
||||
@@ -14,7 +19,7 @@ $(function(){
|
||||
else {
|
||||
mh.InstrumentenCPModel = {
|
||||
modules : ko.observableArray([]),
|
||||
selectedModule : ko.observable(''),
|
||||
|
||||
|
||||
initBindings :function(){
|
||||
var self = mh.InstrumentenCPModel;
|
||||
@@ -23,14 +28,14 @@ $(function(){
|
||||
ko.applyBindings(mh.InstrumentenCPModel, document.getElementById("pagInstrumentenCompactSop"));
|
||||
}
|
||||
|
||||
$.post("index.php/monpas/beheer/getmodules", function(result){
|
||||
$.post("index.php/monpas/beheer/getallmodules", 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');
|
||||
@@ -39,8 +44,26 @@ $(function(){
|
||||
|
||||
},
|
||||
|
||||
fToggleInSop: function(){
|
||||
var self = mh.InstrumentenCPModel;
|
||||
this.inSOP(!this.inSOP);
|
||||
},
|
||||
|
||||
fChangeSopnaam: function(){
|
||||
var self = mh.InstrumentenCPModel;
|
||||
},
|
||||
|
||||
|
||||
fChangeBlokjesnaam: function(){
|
||||
var self = mh.InstrumentenCPModel;
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} ; // definition van model
|
||||
mh.InstrumentenCPModel().initBindings();
|
||||
mh.InstrumentenCPModel.initBindings();
|
||||
} // else
|
||||
}// function initInstrumentenCPModel
|
||||
});
|
||||
Reference in New Issue
Block a user