diff --git a/main/inc/lib/javascript/skills.js b/main/inc/lib/javascript/skills.js index e8f28175de..11b0d86c26 100644 --- a/main/inc/lib/javascript/skills.js +++ b/main/inc/lib/javascript/skills.js @@ -1,6 +1,27 @@ /* For licensing terms, see /license.txt */ var debug = 1; +var skills = []; //current window divs +var parents = []; //list of parents normally there should be only 2 +var first_parent = ''; +var duration_value = 500; +//Setting the parent by default +var parents = ['block_1']; + +function clean_values() { + skills = []; //current window divs + parents = ['block_1']; + first_parent = ''; + + //Reseting jsplumb + jsPlumb.reset(); + //Deletes all windows + $('.skill_root').remove(); + $('.skill_child').remove(); + + open_block('block_1', 0, 1); +} + //Admin/normal arrows var editEndpointOptions = { @@ -60,17 +81,10 @@ function open_parent(parent_id, id) { $('.skill_child').each( function(){ normal_width = $(this).width(); return true; - }); - - - + }); load_parent(numeric_parent_id, numeric_id); } -function open_block_student(id) { - open_block(id, 1) -} - /* * When clicking a children block @param string block id i.e "block_1" diff --git a/main/template/default/skill/skill_tree.tpl b/main/template/default/skill/skill_tree.tpl index e571789720..fc704d4c97 100644 --- a/main/template/default/skill/skill_tree.tpl +++ b/main/template/default/skill/skill_tree.tpl @@ -19,13 +19,8 @@ body {