Wachter callback snellere queryfilter lege records

This commit is contained in:
Monique
2022-10-17 21:14:09 +02:00
parent 3d715f6b87
commit 41023560d8
2 changed files with 58 additions and 15 deletions
+30 -6
View File
@@ -1,6 +1,7 @@
$(function(){
ls.initGebruikersModel = function(){
var timer;
function fAddOrgs(p){
var dit =this;
@@ -91,7 +92,7 @@ ls.initGebruikersModel = function(){
}
function fAddOtherUser(p){
this.id = p.id ; //userid
this.id = p.id ; //userid
this.fullname = p.fullname;
this.autorisatienivoid = ko.observable(10);
}
@@ -342,18 +343,41 @@ ls.initGebruikersModel = function(){
self.selectedOrg(this);
self.fGetGebruikers();
},
fPopCopy : function(){
var self= ls.GebruikersModel;
$.post("index.php/shared/users/getotherusers/" + self.selectedOrg().id, function(data){
showAjaxLoader();
self.fGetOtherUsers(function(){self.fOpenPopUp()})
},
fGetOtherUsers: function(callback){
var self= ls.GebruikersModel;
$.post("index.php/shared/users/getotherusers/" + self.selectedOrg().id, function (data) {
self.otherUsers.removeAll();
if (data){
$.each(data, function(i,p){
if (data) {
$.each(data, function (i, p) {
self.otherUsers.push(new fAddOtherUser(p));
}); // each
}
},'json');
$("#modCopyUser").modal('show');
if (typeof callback == "function") callback()
hideAjaxLoader();
}, 'json');
},
fOpenPopUp: function(){
var self= ls.GebruikersModel;
$("#modCopyUser").modal('show');
},
fSaveCopyUser :function(){
var self= ls.GebruikersModel;
var submitData={ userid : self.copyUser().id,