Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private moveUp(competence: Models.Competence) {
- var id = this.getIdinParentChilds(competence);
- if (id > 0) {
- var childs = competence.parent.children;
- childs.splice(id, 1);
- var comp = new Models.Competence(competence.id, competence.description, competence.parent, competence.children);
- comp.edit = true;
- childs.splice(id - 1, 0, comp);
- }
- }
- private moveDown(competence: Models.Competence) {
- var childs = competence.parent.children;
- var id = this.getIdinParentChilds(competence);
- if (id < childs.length - 1) {
- childs.splice(id, 1);
- childs.splice(id + 1, 0, competence);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement