-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProjectAccessProto.js
More file actions
29 lines (28 loc) · 1.08 KB
/
ProjectAccessProto.js
File metadata and controls
29 lines (28 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function ProjectAccessComponent(){
this.clientComponents = [];
}
ProjectAccessComponent.prototype.addClientComponent = function(clientComponent){
this.clientComponents.push(clientComponent);
}
ProjectAccessComponent.prototype.loadAllClientDropdowns = function(data){
if(data && this.clientComponents.length > 0){
this.clientComponents.forEach(client => {
client.loadClientDropdown(data);
});
}
}
ProjectAccessComponent.prototype.createAddClientDiv = function(){
const addClientDiv = document.createElement('div');
addClientDiv.classList.add('add-client');
const addButton = document.createElement('i');
addButton.classList.add('fa','fa-plus-circle','fa-lg','client-plus');
addButton.onclick = handleClientPlusClickEvent;
addButton.textContent = 'Client';
addClientDiv.appendChild(addButton);
return addClientDiv;
}
ProjectAccessComponent.prototype.createProjectAccessDiv = function(){
const projectAccessDiv = document.createElement('div');
projectAccessDiv.classList.add('project-access');
return projectAccessDiv;
}