entry-layout.js
4.76 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
$(function() {
$('#content').height($(window).height() - 20);
$(window).resize(function() {
$('#content').height($(window).height() - 20);
resize_splitters();
});
if ($.fn.splitter) {
$('#content').bind('resize', function(e) {
resize_splitters();
e.stopPropagation();
});
$('#content').bind('resize', function(e) {
e.stopPropagation();
});
}
});
function ShowProgressAnimation() {
$("#wait-dialog").dialog('open');
}
function HideProgressAnimation() {
$("#wait-dialog").dialog('close');
}
function resize_splitters() {
$('#semantics-hsplit').trigger('resize');
}
function createWaitDialog() {
$("#wait-dialog").dialog({ autoOpen: false,
modal : 'true',
closeOnEscape: 'false',
closeText: '',
bgiframe: 'true',
resizable: 'false',
open: function (event, ui) {
$('#wait-dialog').css('overflow', 'hidden');
}});
$(".ui-dialog-titlebar").hide();
}
function refresh_column_headers() {}
function load_content(id) {
initiateFrameFilters();
ShowProgressAnimation();
$('#new_frames').load(ajax_new_frames, 'id='+id, function(data){
window.lemma_id = id;
loadSchemataAndExamples();
createSplitter('framesSplit','new-frame-tables', 'tabs');
if(document.getElementById("lemma_example_show")) {
draw_nkjp_table(document.getElementById("lemma_example_show"), '', window.nkjp_lemma_examples, 'NkjpLemmaTableRow', 'nkjpLemma_')
$("tr.NkjpLemmaTableRow").click(function(){
selectLemmaNkjpTr(this.id)});
}
addPinnedExamplesDialog();
$('#lemma_desc').load(ajax_get_lemma_desc, 'id='+id);
});
$('#semantics').load(ajax_semantics, 'id='+id);
}
function createSplitter(split_id, top_id, bottom_id) {
$('#'+split_id).height($('#content').height() - 50);
if ($.fn.splitter) {
$(window).resize(function() {
$('#'+split_id).height($('#content').height() - 50);
});
$('#'+top_id).bind('resize', function(e) {
e.stopPropagation();
});
$('#'+bottom_id).bind('resize', function(e) {
e.stopPropagation();
});
$('#'+split_id).splitter({
type: "h",
minTop: 200,
minBottom: 50,
sizeBottom: 170,
resizeToWidth: true
});
}
}
var hSplitterId = 'semantics-hsplit';
var topSplitId = 'semantics-hsplit-top';
var bottomSplitId = 'semantics-hsplit-bottom';
var topVSplitterId = 'semantics-vsplit-top';
var bottomVSplitterId = 'semantics-vsplit-bottom';
var topLeftSplitId = 'frames';
var topRightSplitId = 'schemas';
var bottomLeftSplitId = 'control';
function createHSplitter() {
$('#'+hSplitterId).height($('#content').height() - 50);
if ($.fn.splitter) {
$(window).resize(function() {
$('#'+hSplitterId).height($('#content').height() - 50);
});
$('#'+hSplitterId).bind('resize', function(e) {
var resizeEvt;
clearTimeout(resizeEvt);
resizeEvt = setTimeout(function() {
$('#'+topVSplitterId).trigger('resize', $('#'+topLeftSplitId).width());
$('#'+bottomVSplitterId).trigger('resize', $('#'+bottomLeftSplitId).width()+7);
}, 50);
e.stopPropagation();
});
$('#'+topSplitId).bind('resize', function(e) {
$('#'+topVSplitterId).height($('#'+topSplitId).height());
$('#'+topVSplitterId).children().each(function () {
$(this).height($('#'+topSplitId).height() - 7);
});
$('#'+bottomVSplitterId).height($('#'+bottomSplitId).height());
$('#'+bottomVSplitterId).children().each(function () {
$(this).height($('#'+bottomSplitId).height() - 7);
});
e.stopPropagation();
});
$('#'+bottomSplitId).bind('resize', function(e) {
e.stopPropagation();
});
$('#'+hSplitterId).splitter({
type: "h",
minTop: 200,
minBottom: 100,
sizeBottom: 170,
resizeToWidth: true,
outline: true
});
}
}
function createVTopSplitter() {
var w=$('#'+topVSplitterId).width();
$('#'+topVSplitterId).height(2*$('#content').height()/3);
if ($.fn.splitter) {
$('#'+topLeftSplitId).bind('resize', function(e) {
$('#'+topVSplitterId).height($('#'+topSplitId).height());
$('#'+topVSplitterId).children().each(function () {
$(this).height($('#'+topSplitId).height() - 7);
});
$('#'+topRightSplitId).width($('#'+topRightSplitId).width() - 20);
e.stopPropagation();
});
$('#'+topRightSplitId).bind('resize', function(e) {
e.stopPropagation();
});
$('#'+topVSplitterId).splitter({
type: "v",
minLeft: 50,
sizeLeft: w/2,
resizeToWidth: true,
outline: true
});
}
}