20 |
|
|
21 |
function load_rec(nr) { |
function load_rec(nr) { |
22 |
Logger.debug('load_rec '+nr); |
Logger.debug('load_rec '+nr); |
23 |
|
|
24 |
|
if (loading.record) { |
25 |
|
Logger.info('loading of record '+nr+' skipped, load in progress'); |
26 |
|
return; |
27 |
|
} |
28 |
|
|
29 |
if (nr == 1) { |
if (nr == 1) { |
30 |
Element.hide('a_left_arr'); |
Element.addClassName('a_left_arr', 'nav_disable'); |
31 |
} else { |
} else { |
32 |
Element.show('a_left_arr'); |
Element.removeClassName('a_left_arr', 'nav_disable'); |
33 |
} |
} |
34 |
update_status(nr+'...'); |
|
35 |
iwfRequest( url+'/xml/?template='+template_filename+'&rec='+nr, 'div_record' ); |
var args = '?mfn='+nr+'&template_filename='+template_filename; |
36 |
new Effect.Opacity('div_record', { from: 1.0, to: 0.7, duration: 0.3 }); |
|
37 |
|
new Ajax.Updater( 'div_record', url+'record'+args, { |
38 |
|
asynchronous: 1, |
39 |
|
onLoading: function(request) { |
40 |
|
loading.record = 1; |
41 |
|
update_status(nr+'...'); |
42 |
|
Logger.info('load_rec.onLoading: '+nr); |
43 |
|
}, |
44 |
|
onLoaded: function(request) { |
45 |
|
loading.record = 0; |
46 |
|
update_status('# '+nr); |
47 |
|
Logger.info('load_rec.onLoaded: '+nr); |
48 |
|
} |
49 |
|
} ) ; |
50 |
|
|
51 |
} |
} |
52 |
|
|
53 |
function inc_rec() { |
function inc_rec() { |
77 |
Element.addClassName('a_template', 'tab_selected'); |
Element.addClassName('a_template', 'tab_selected'); |
78 |
$('div_template').style.visibility = "visible"; |
$('div_template').style.visibility = "visible"; |
79 |
Logger.debug("switched to template editor"); |
Logger.debug("switched to template editor"); |
80 |
$('template_content').focus(); |
var c = $('template_content'); |
81 |
|
if (c) c.focus(); |
82 |
return false; |
return false; |
83 |
} |
} |
84 |
|
|
88 |
Element.addClassName('a_css', 'tab_selected'); |
Element.addClassName('a_css', 'tab_selected'); |
89 |
$('div_css').style.visibility = "visible"; |
$('div_css').style.visibility = "visible"; |
90 |
Logger.debug("switched to CSS editor"); |
Logger.debug("switched to CSS editor"); |
91 |
$('css_content').focus(); |
var c = $('css_content'); |
92 |
|
if (c) c.focus(); |
93 |
return false; |
return false; |
94 |
} |
} |
95 |
|
|
110 |
var loading = { |
var loading = { |
111 |
template: 0, |
template: 0, |
112 |
css: 0, |
css: 0, |
113 |
|
record: 0, |
114 |
} |
} |
115 |
|
|
116 |
function load_template( template ) { |
function load_template( template ) { |
120 |
return; |
return; |
121 |
} |
} |
122 |
|
|
123 |
new Ajax.Updater( 'div_template', url+'template', { |
var args = '?template_filename='+template_filename; |
124 |
|
|
125 |
|
new Ajax.Updater( 'div_template', url+'template'+args, { |
126 |
asynchronous: 1, |
asynchronous: 1, |
127 |
onLoading: function(request) { |
onLoading: function(request) { |
128 |
loading.template = 1; |
loading.template = 1; |
163 |
|
|
164 |
// Position.clone('div_template', 'div_css'); |
// Position.clone('div_template', 'div_css'); |
165 |
|
|
166 |
|
edit_template(); |
167 |
|
|
168 |
// load css editor |
// load css editor |
169 |
load_css(); |
load_css(); |
170 |
|
|