/[webpac2]/Webpacus/root/editor/editor.js
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /Webpacus/root/editor/editor.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 166 by dpavlin, Sat Nov 26 20:21:59 2005 UTC revision 167 by dpavlin, Sat Nov 26 21:11:41 2005 UTC
# Line 102  function switch_template(template_name) Line 102  function switch_template(template_name)
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    
# Line 126  function load_template( template ) { Line 124  function load_template( template ) {
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    
# Line 147  function load_css(css_file) { Line 145  function load_css(css_file) {
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  };  };

Legend:
Removed from v.166  
changed lines
  Added in v.167

  ViewVC Help
Powered by ViewVC 1.1.26