semantics.html
4.98 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{% load hash %}
{% load jsonify %}
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-impromptu.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/semantics_core.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/semantics_connections.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/semantics_examples.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/semantics_frames.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/semantics_lexical_units.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/semantics_roles.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/semantics_schemas.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/semantics_view.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/semantics_preferences.js"></script>
<link rel="stylesheet" href="{{ STATIC_URL }}css/jquery-impromptu.min.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/semantics.css"/>
<script>
{% if js_vars %}
{% for name,var in js_vars.iteritems %}
var {{ name }} = {{ var|jsonify }};
{% endfor %}
{% endif %}
$(document).ready( function() {
createHSplitter();
createVTopSplitter();
{% if can_modify %}
createVBottomSplitter();
{% endif %}
$.getJSON(ajax_units, {lemma_id: {{ lemma.id }}}, function(data){
memorizeLexicalUnits(data.lexical_units);
basicLexicalUnitsData(data.informations);
});
$.getJSON(ajax_roles, function(data){
memorizeRoles(data.roles_display, data.roles_full);
$.getJSON(ajax_opinions, {lemma_id: {{ lemma.id }}}, function(data){
memorizeOpinions(data.opinions);
$.getJSON(ajax_frames, {lemma_id: {{ lemma.id }}}, function(data){
getFrames(data.frames_display);
displayFrames();
memorizeConnections(data.connections.connected, data.connections.connected_reverse);
alternationCounts(data.alternations);
$("#semantic-frames-count").empty();
$("#semantic-frames-count").append(data.frames_count);
});
$.getJSON(ajax_connected, {lemma_id: {{ lemma.id }}}, function(data){
getConnected(data.entries);
});
});
});
$.getJSON(ajax_relations, function(data){
memorizeRelations(data.relations);
});
$.getJSON(ajax_schemas, {lemma_id: {{ lemma.id }}}, function(data){
memorizeRanks(data.ranks);
displaySchemas(data.lemma, data.schemas_display);
$.getJSON(ajax_examples, {lemma_id: {{ lemma.id }}}, function(data){
memorizeExamples(data.examples, true)
});
});
{% if can_modify%}
prepareControl();
{% endif %}
getPredefinedSelections();
});
</script>
<div id="semantics-hsplit">
<div id="semantics-hsplit-top" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
<div id="semantics-vsplit-top">
<div id="frames">
</div>
<div id="schemas">
</div>
</div>
</div>
<div id="semantics-hsplit-bottom" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
<div id="semantics-vsplit-bottom">
{% if can_modify %}
<div id="control" class="semantics-control-tabs" style="overflow: auto;">
<ul>
<li><a href="#select_meanings">Znaczenia</a></li>
<li><a href="#select_creating">Tworzenie</a></li>
<li><a href="#select_connected">Powiązane</a></li>
</ul>
<div id="select_meanings">
<button type="button" onclick="openMeaningsMenu()" id="create">Modyfikuj</button>
</div>
<div id="select_creating">
<button type="button" onclick="createFrame()" id="create_frame">Nowa rama</button>
<button type="button" onclick="removeFromFrame()" id="delete" disabled="True">Usuń</button>
<br/>
<button type="button" onclick="changeLexicalUnits()" id="change_lus" disabled="True">Zmień jednostki</button>
<button type="button" onclick="changeOpinion()" id="change_opinion" disabled="True">Ustaw ocenę</button>
<br/>
<button type="button" onclick="assignRole()" id="assign_role" disabled="True">Zmień rolę</button>
<button type="button" onclick="addSelectivePreference()" id="add_preference" disabled="True">Dodaj preferencje</button>
<br/>
<button type="button" onclick="saveFrames()" id="save_frames">Zapisz</button>
</div>
<div id="select_connected" style="overflow: auto;">
<button type="button" onclick="shareFrame()" id="share_frames">Kopiuj</button>
</div>
</div>
{% endif %}
<div id="semantics-examples" style="overflow: auto;">
</div>
</div>
</div>
</div>