Merge branch 'fouten/koppelengebruikers' into develop

# Conflicts:
#	application/core/MY_Controller.php
This commit is contained in:
Monique
2022-10-17 21:16:18 +02:00
3 changed files with 61 additions and 17 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,