102 |
|
|
103 |
Logger.debug('refresh record'); |
Logger.debug('refresh record'); |
104 |
load_rec(rec); |
load_rec(rec); |
|
|
|
|
Logger.debug('refresh template list'); |
|
|
iwfRequest( url+'/template_list/?template='+template_filename, 'div_template_list' ); |
|
105 |
} |
} |
106 |
|
|
107 |
var loading = { |
var loading = { |
108 |
template: 0, |
template: 0, |
109 |
css: 0, |
css: 0, |
110 |
record: 0, |
record: 0, |
111 |
|
template_list: 0, |
112 |
} |
} |
113 |
|
|
114 |
function load_template( template ) { |
function load_template( template_filename ) { |
115 |
|
|
116 |
if (loading.template) { |
if (loading.template) { |
117 |
Logger.info('loading of template '+name+' skipped, load in progress'); |
Logger.info('loading of template '+template_filename+' skipped, load in progress'); |
118 |
return; |
return; |
119 |
} |
} |
120 |
|
|
124 |
asynchronous: 1, |
asynchronous: 1, |
125 |
onLoading: function(request) { |
onLoading: function(request) { |
126 |
loading.template = 1; |
loading.template = 1; |
127 |
Logger.info('load_template.onLoading: '+template); |
Logger.info('load_template.onLoading: '+template_filename); |
128 |
}, |
}, |
129 |
onLoaded: function(request) { |
onLoaded: function(request) { |
130 |
loading.template = 0; |
loading.template = 0; |
131 |
Position.clone('div_template', 'div_css'); |
Position.clone('div_template', 'div_css'); |
132 |
Logger.info('load_template.onLoaded: '+template); |
Logger.info('load_template.onLoaded: '+template_filename); |
133 |
} |
} |
134 |
} ) ; |
} ) ; |
135 |
} |
} |
136 |
|
|
137 |
function load_css(css_file) { |
function load_css(css_filename) { |
138 |
|
|
139 |
if (loading.css) { |
if (loading.css) { |
140 |
Logger.info('loading of css '+name+' skipped, load in progress'); |
Logger.info('loading of css '+css_filename+' skipped, load in progress'); |
141 |
return; |
return; |
142 |
} |
} |
143 |
|
|
145 |
asynchronous: 1, |
asynchronous: 1, |
146 |
onLoading: function(request) { |
onLoading: function(request) { |
147 |
loading.css = 1; |
loading.css = 1; |
148 |
Logger.info('load_css.onLoading: '+css_file); |
Logger.info('load_css.onLoading: '+css_filename); |
149 |
}, |
}, |
150 |
onLoaded: function(request) { |
onLoaded: function(request) { |
151 |
loading.css = 0; |
loading.css = 0; |
152 |
Logger.info('load_css.onLoaded: '+css_file); |
Logger.info('load_css.onLoaded: '+css_filename); |
153 |
} |
} |
154 |
} ) ; |
} ) ; |
155 |
}; |
}; |