Commit 849eccfcbf2d1998c2ec4826131de2a4351e4cff
1 parent
52060057
Usunięcie problemów z usuwaniem ram
Showing
3 changed files
with
22 additions
and
21 deletions
semantics/static/js/semantics_connections.js
1 | var connected = {}; // dictionaries of connections and disconnections between frames and schemas | 1 | var connected = {}; // dictionaries of connections and disconnections between frames and schemas |
2 | var connected_reverse = {}; | 2 | var connected_reverse = {}; |
3 | 3 | ||
4 | +function getConnected(frame_id) { /* TODO */ | ||
5 | + return []; | ||
6 | +} | ||
7 | + | ||
8 | +function removeFrameConnections(frame_id) { /* TODO */ | ||
9 | + return; | ||
10 | +} | ||
11 | + | ||
12 | + | ||
4 | function memorizeConnections(arguments_connected, frames_connection){ | 13 | function memorizeConnections(arguments_connected, frames_connection){ |
5 | connected = arguments_connected; | 14 | connected = arguments_connected; |
6 | connected_reverse = frames_connection; | 15 | connected_reverse = frames_connection; |
semantics/static/js/semantics_frames.js
@@ -4,23 +4,6 @@ var free_complement_id = -1; | @@ -4,23 +4,6 @@ var free_complement_id = -1; | ||
4 | var free_frame_id = -1; | 4 | var free_frame_id = -1; |
5 | var free_preference_id = -1; | 5 | var free_preference_id = -1; |
6 | var semantic_opinion_vals = []; | 6 | var semantic_opinion_vals = []; |
7 | -var connected_entries = [] | ||
8 | - | ||
9 | - | ||
10 | -function getConnected(frames_display) { | ||
11 | - var i, j; | ||
12 | - for (i = 0; i < frames_display.length; i++) { | ||
13 | - lexical_units_num.push(frames_display[i].lexical_units); | ||
14 | - lexical_units_frames[i] = []; | ||
15 | - | ||
16 | - var frames = frames_display[i].frames; | ||
17 | - for (j = 0; j < frames.length; j++) { | ||
18 | - frame_content[frames[j].frame_id] = frames[j]; | ||
19 | - frame_localization[frames[j].frame_id] = {"units": i, "position": j}; | ||
20 | - lexical_units_frames[i].push(frames[j].frame_id); | ||
21 | - } | ||
22 | - } | ||
23 | -} | ||
24 | 7 | ||
25 | function selectedFrame() { | 8 | function selectedFrame() { |
26 | return "frame_" + highlighted_id + "_"; | 9 | return "frame_" + highlighted_id + "_"; |
semantics/static/js/semantics_view.js
@@ -818,7 +818,7 @@ function removeFromFrame() { | @@ -818,7 +818,7 @@ function removeFromFrame() { | ||
818 | // highlighted_id = "26" | 818 | // highlighted_id = "26" |
819 | 819 | ||
820 | removeFrame(highlighted_id); | 820 | removeFrame(highlighted_id); |
821 | - | 821 | + |
822 | frameClick("frame_" + highlighted_id + "_"); | 822 | frameClick("frame_" + highlighted_id + "_"); |
823 | displayFrames(); | 823 | displayFrames(); |
824 | 824 | ||
@@ -936,7 +936,10 @@ function frameClick(clicked_id) { | @@ -936,7 +936,10 @@ function frameClick(clicked_id) { | ||
936 | } else { | 936 | } else { |
937 | if (clicked_id.split('_').length == 3) { // frame click | 937 | if (clicked_id.split('_').length == 3) { // frame click |
938 | var frame_id = clicked_id.split('_')[1]; | 938 | var frame_id = clicked_id.split('_')[1]; |
939 | - var local = frame_content[frame_id].local; | 939 | + var local = true; |
940 | + if (frame_content[frame_id] != null){ | ||
941 | + local = frame_content[frame_id].local; | ||
942 | + } | ||
940 | 943 | ||
941 | if (highlighted_id != "") { | 944 | if (highlighted_id != "") { |
942 | deselect(); | 945 | deselect(); |
@@ -972,7 +975,10 @@ function frameClick(clicked_id) { | @@ -972,7 +975,10 @@ function frameClick(clicked_id) { | ||
972 | } | 975 | } |
973 | } else if (clicked_id.split('_')[4] == 'lemma') { // part of lemma click | 976 | } else if (clicked_id.split('_')[4] == 'lemma') { // part of lemma click |
974 | frame_id = clicked_id.split('_')[1] | 977 | frame_id = clicked_id.split('_')[1] |
975 | - var local = frame_content[frame_id].local; | 978 | + var local = true; |
979 | + if (frame_content[frame_id] != null){ | ||
980 | + local = frame_content[frame_id].local; | ||
981 | + } | ||
976 | 982 | ||
977 | if (highlighted_id != "") { | 983 | if (highlighted_id != "") { |
978 | deselect(); | 984 | deselect(); |
@@ -1010,7 +1016,10 @@ function frameClick(clicked_id) { | @@ -1010,7 +1016,10 @@ function frameClick(clicked_id) { | ||
1010 | } | 1016 | } |
1011 | } else { // argument click | 1017 | } else { // argument click |
1012 | frame_id = clicked_id.split('_')[1] | 1018 | frame_id = clicked_id.split('_')[1] |
1013 | - var local = frame_content[frame_id].local; | 1019 | + var local = true; |
1020 | + if (frame_content[frame_id] != null){ | ||
1021 | + local = frame_content[frame_id].local; | ||
1022 | + } | ||
1014 | 1023 | ||
1015 | if (highlighted_id != "") { | 1024 | if (highlighted_id != "") { |
1016 | deselect(); | 1025 | deselect(); |