/[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 171 by dpavlin, Sun Nov 27 00:50:32 2005 UTC revision 175 by dpavlin, Sun Nov 27 04:45:56 2005 UTC
# Line 6  var rec = null; Line 6  var rec = null;
6  var url = null;  var url = null;
7  var template_filename = null;  var template_filename = null;
8    
9    var pending_js = null;
10    
11  var css_rnd = 0;  var css_rnd = 0;
12    
13  function update_status(text) {  function _ts(text) {
14          var el = $('div_record_nr');          var el = $('div_template_status');
15            if (el) el.innerHTML = text;
16    }
17    
18    function _cs(text) {
19            var el = $('div_css_status');
20          if (el) el.innerHTML = text;          if (el) el.innerHTML = text;
21  }  }
22    
# Line 117  function switch_template(new_template_fi Line 124  function switch_template(new_template_fi
124          Logger.debug('refresh record');          Logger.debug('refresh record');
125          load_rec(rec);          load_rec(rec);
126    
127            edKill('template_content');
128    
129          hide_working();          hide_working();
130    
131          return false;          return false;
# Line 135  function load_template( template_filenam Line 144  function load_template( template_filenam
144                  return;                  return;
145          }          }
146    
147            show_working();
148    
149          var args = '?template_filename='+template_filename;          var args = '?template_filename='+template_filename;
150    
151          new Ajax.Updater( 'div_template',  url+'template'+args, {          new Ajax.Updater( 'div_template',  url+'template'+args, {
152                  asynchronous: 1,                  asynchronous: 1,
153                  onLoading: function(request) {                  onLoading: function(request) {
154                          loading.template = 1;                          loading.template = 1;
                         show_working();  
155                          Logger.info('load_template.onLoading: '+template_filename);                          Logger.info('load_template.onLoading: '+template_filename);
156                  },                  },
157                  onLoaded: function(request) {                  onLoaded: function(request) {
# Line 160  function load_css(css_filename) { Line 170  function load_css(css_filename) {
170                  return;                  return;
171          }          }
172    
173            show_working();
174    
175          new Ajax.Updater( 'div_css',  url+'css', {          new Ajax.Updater( 'div_css',  url+'css', {
176                  asynchronous: 1,                  asynchronous: 1,
177                  onLoading: function(request) {                  onLoading: function(request) {
178                          loading.css = 1;                          loading.css = 1;
                         show_working();  
179                          Logger.info('load_css.onLoading: '+css_filename);                          Logger.info('load_css.onLoading: '+css_filename);
180                  },                  },
181                  onLoaded: function(request) {                  onLoaded: function(request) {
# Line 176  function load_css(css_filename) { Line 187  function load_css(css_filename) {
187  };  };
188    
189  function reload_css() {  function reload_css() {
190          Logger.error('reload_css is not yet implemented!');  
191            css_rnd++;
192            Logger.info('loading user.css?'+css_rnd);
193            $('user_css_link').href = 'css/user.css?'+css_rnd;
194    
195          return false;          return false;
196  }  }
197    

Legend:
Removed from v.171  
changed lines
  Added in v.175

  ViewVC Help
Powered by ViewVC 1.1.26