#100 - remove tricky js force box check
This commit is contained in:
parent
aeb5bf63c9
commit
dbecda87bd
3 changed files with 56 additions and 24 deletions
|
|
@ -1,31 +1,31 @@
|
|||
// Users
|
||||
|
||||
const startObserving = (domNode, selector) => {
|
||||
const observer = new MutationObserver(mutations => {
|
||||
mutations.forEach(function (mutation) {
|
||||
// console.log(Array.from(mutation.addedNodes));
|
||||
// const startObserving = (domNode, selector) => {
|
||||
// const observer = new MutationObserver(mutations => {
|
||||
// mutations.forEach(function (mutation) {
|
||||
// // console.log(Array.from(mutation.addedNodes));
|
||||
|
||||
const elementAdded = Array.from(mutation.addedNodes).some(
|
||||
element => {
|
||||
return document.querySelector(selector);
|
||||
},
|
||||
);
|
||||
// const elementAdded = Array.from(mutation.addedNodes).some(
|
||||
// element => {
|
||||
// return document.querySelector(selector);
|
||||
// },
|
||||
// );
|
||||
|
||||
if (elementAdded) {
|
||||
// Select Client as default user role instead of Admin
|
||||
document.querySelector('input[value="client"]').checked = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
// if (elementAdded) {
|
||||
// // Select Client as default user role instead of Admin
|
||||
// document.querySelector('input[value="client"]').checked = true;
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
|
||||
observer.observe(domNode, {
|
||||
childList: true,
|
||||
attributes: true,
|
||||
characterData: true,
|
||||
subtree: true,
|
||||
});
|
||||
// observer.observe(domNode, {
|
||||
// childList: true,
|
||||
// attributes: true,
|
||||
// characterData: true,
|
||||
// subtree: true,
|
||||
// });
|
||||
|
||||
return observer;
|
||||
};
|
||||
// return observer;
|
||||
// };
|
||||
|
||||
startObserving(document.body, '.k-users-view .k-dialog');
|
||||
// startObserving(document.body, '.k-users-view .k-dialog');
|
||||
|
|
|
|||
11
public/site/blueprints/users/0_client.yml
Normal file
11
public/site/blueprints/users/0_client.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
title: Client
|
||||
description: Ne peut pas accéder au Panel, peut accéder aux Projets auxquels il est assigné côté front.
|
||||
permissions:
|
||||
access:
|
||||
panel: false
|
||||
|
||||
fields:
|
||||
projects:
|
||||
label: Projets
|
||||
type: pages
|
||||
query: page('projects').children
|
||||
21
public/site/blueprints/users/1_pochet.yml
Normal file
21
public/site/blueprints/users/1_pochet.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
title: Interne Pochet
|
||||
description: Peux accéder au Panel mais pas aux Utilisateurs, peut accéder aux Projets auxquels il est assigné par un Admin.
|
||||
home: /panel/pages/projects
|
||||
permissions:
|
||||
access:
|
||||
users: false
|
||||
|
||||
fields:
|
||||
job:
|
||||
label: Métier
|
||||
type: select
|
||||
options:
|
||||
- Project Manager
|
||||
- Sales Manager
|
||||
default: Project Panager
|
||||
width: 1/4
|
||||
projects:
|
||||
label: Projets
|
||||
type: pages
|
||||
query: page('projects').children
|
||||
width: 3/4
|
||||
Loading…
Add table
Add a link
Reference in a new issue