8 |
|
|
9 |
var css_rnd = 0; |
var css_rnd = 0; |
10 |
|
|
|
function iwfRequest( url, div ) { |
|
|
Logger.info('iwfRequest('+url+','+div+')'); |
|
|
return; |
|
|
} |
|
|
|
|
11 |
function update_status(text) { |
function update_status(text) { |
12 |
var el = $('div_record_nr'); |
var el = $('div_record_nr'); |
13 |
if (el) el.innerHTML = text; |
if (el) el.innerHTML = text; |
21 |
return; |
return; |
22 |
} |
} |
23 |
|
|
24 |
|
show_working(); |
25 |
|
$('record_nr').disabled = 'true'; |
26 |
|
|
27 |
if (nr == 1) { |
if (nr == 1) { |
28 |
Element.addClassName('a_left_arr', 'nav_disable'); |
Element.addClassName('a_left_arr', 'nav_disable'); |
29 |
} else { |
} else { |
36 |
asynchronous: 1, |
asynchronous: 1, |
37 |
onLoading: function(request) { |
onLoading: function(request) { |
38 |
loading.record = 1; |
loading.record = 1; |
|
update_status(nr+'...'); |
|
39 |
Logger.info('load_rec.onLoading: '+nr); |
Logger.info('load_rec.onLoading: '+nr); |
40 |
}, |
}, |
41 |
onLoaded: function(request) { |
onLoaded: function(request) { |
42 |
loading.record = 0; |
loading.record = 0; |
43 |
update_status('# '+nr); |
hide_working(); |
44 |
|
$('record_nr').value = nr; |
45 |
|
$('record_nr').disabled = ''; |
46 |
|
rec = nr; |
47 |
Logger.info('load_rec.onLoaded: '+nr); |
Logger.info('load_rec.onLoaded: '+nr); |
48 |
} |
} |
49 |
} ) ; |
} ) ; |
51 |
} |
} |
52 |
|
|
53 |
function inc_rec() { |
function inc_rec() { |
54 |
|
show_working(); |
55 |
rec++; |
rec++; |
56 |
load_rec(rec); |
load_rec(rec); |
57 |
|
hide_working(); |
58 |
return false; |
return false; |
59 |
} |
} |
60 |
|
|
61 |
function dec_rec() { |
function dec_rec() { |
62 |
if (rec > 1) { |
if (rec > 1) { |
63 |
|
show_working(); |
64 |
rec--; |
rec--; |
65 |
load_rec(rec); |
load_rec(rec); |
66 |
|
hide_working(); |
67 |
} |
} |
68 |
return false; |
return false; |
69 |
} |
} |
70 |
|
|
71 |
function reload_rec() { |
function reload_rec() { |
72 |
|
show_working(); |
73 |
load_rec(rec); |
load_rec(rec); |
74 |
|
hide_working(); |
75 |
return false; |
return false; |
76 |
} |
} |
77 |
|
|
102 |
function switch_template(new_template_filename) { |
function switch_template(new_template_filename) { |
103 |
|
|
104 |
Logger.info('switch_template to '+new_template_filename); |
Logger.info('switch_template to '+new_template_filename); |
105 |
|
show_working(); |
106 |
|
|
107 |
Logger.debug('load template editor'); |
Logger.debug('load template editor'); |
108 |
template_filename = new_template_filename; |
template_filename = new_template_filename; |
111 |
Logger.debug('refresh record'); |
Logger.debug('refresh record'); |
112 |
load_rec(rec); |
load_rec(rec); |
113 |
|
|
114 |
|
hide_working(); |
115 |
|
|
116 |
return false; |
return false; |
117 |
} |
} |
118 |
|
|
135 |
asynchronous: 1, |
asynchronous: 1, |
136 |
onLoading: function(request) { |
onLoading: function(request) { |
137 |
loading.template = 1; |
loading.template = 1; |
138 |
|
show_working(); |
139 |
Logger.info('load_template.onLoading: '+template_filename); |
Logger.info('load_template.onLoading: '+template_filename); |
140 |
}, |
}, |
141 |
onLoaded: function(request) { |
onLoaded: function(request) { |
142 |
loading.template = 0; |
loading.template = 0; |
143 |
Position.clone('div_template', 'div_css'); |
Position.clone('div_template', 'div_css'); |
144 |
|
hide_working(); |
145 |
Logger.info('load_template.onLoaded: '+template_filename); |
Logger.info('load_template.onLoaded: '+template_filename); |
146 |
} |
} |
147 |
} ) ; |
} ) ; |
158 |
asynchronous: 1, |
asynchronous: 1, |
159 |
onLoading: function(request) { |
onLoading: function(request) { |
160 |
loading.css = 1; |
loading.css = 1; |
161 |
|
show_working(); |
162 |
Logger.info('load_css.onLoading: '+css_filename); |
Logger.info('load_css.onLoading: '+css_filename); |
163 |
}, |
}, |
164 |
onLoaded: function(request) { |
onLoaded: function(request) { |
165 |
loading.css = 0; |
loading.css = 0; |
166 |
|
hide_working(); |
167 |
Logger.info('load_css.onLoaded: '+css_filename); |
Logger.info('load_css.onLoaded: '+css_filename); |
168 |
} |
} |
169 |
} ) ; |
} ) ; |
170 |
}; |
}; |
171 |
|
|
172 |
function init_page() { |
function reload_css() { |
173 |
|
Logger.error('reload_css is not yet implemented!'); |
174 |
|
return false; |
175 |
|
} |
176 |
|
|
177 |
// Element.hide('div_css'); |
var working_count = 0; |
|
// Element.show('div_template'); |
|
178 |
|
|
179 |
// Position.clone('div_template', 'div_css'); |
function show_working() { |
180 |
|
working_count++; |
181 |
|
if (working_count > 1) Element.show('working'); |
182 |
|
Logger.debug('show_working, count = '+working_count); |
183 |
|
} |
184 |
|
|
185 |
|
function hide_working() { |
186 |
|
working_count--; |
187 |
|
if (working_count < 1) Element.hide('working'); |
188 |
|
Logger.debug('hide_working, count = '+working_count); |
189 |
|
} |
190 |
|
|
191 |
|
function init_page() { |
192 |
|
|
193 |
|
show_working(); |
194 |
|
|
195 |
edit_template(); |
edit_template(); |
196 |
|
|
200 |
// load template editor and record |
// load template editor and record |
201 |
switch_template(template_filename); |
switch_template(template_filename); |
202 |
|
|
203 |
|
hide_working(); |
204 |
|
|
205 |
} |
} |
206 |
|
|