--- Webpacus/root/editor/editor.js 2005/11/27 00:50:27 170 +++ Webpacus/root/editor/editor.js 2005/11/27 01:42:33 172 @@ -79,23 +79,29 @@ function edit_template() { $('div_css').style.visibility = "hidden"; + $('div_css').style.zIndex = 1; Element.removeClassName('a_css', 'tab_selected'); Element.addClassName('a_template', 'tab_selected'); $('div_template').style.visibility = "visible"; + $('div_template').style.zIndex = 2; Logger.debug("switched to template editor"); var c = $('template_content'); if (c) c.focus(); + Logger.debug('zIndex template:'+$('div_template').style.zIndex+' css:'+$('div_css').style.zIndex); return false; } function edit_css() { $('div_template').style.visibility = "hidden"; + $('div_template').style.zIndex = 1; Element.removeClassName('a_template', 'tab_selected'); Element.addClassName('a_css', 'tab_selected'); $('div_css').style.visibility = "visible"; + $('div_css').style.zIndex = 2; Logger.debug("switched to CSS editor"); var c = $('css_content'); if (c) c.focus(); + Logger.debug('zIndex template:'+$('div_template').style.zIndex+' css:'+$('div_css').style.zIndex); return false; } @@ -129,13 +135,14 @@ return; } + show_working(); + var args = '?template_filename='+template_filename; new Ajax.Updater( 'div_template', url+'template'+args, { asynchronous: 1, onLoading: function(request) { loading.template = 1; - show_working(); Logger.info('load_template.onLoading: '+template_filename); }, onLoaded: function(request) { @@ -154,11 +161,12 @@ return; } + show_working(); + new Ajax.Updater( 'div_css', url+'css', { asynchronous: 1, onLoading: function(request) { loading.css = 1; - show_working(); Logger.info('load_css.onLoading: '+css_filename); }, onLoaded: function(request) { @@ -170,7 +178,11 @@ }; function reload_css() { - Logger.error('reload_css is not yet implemented!'); + + css_rnd++; + Logger.info('loading user.css?'+css_rnd); + $('user_css_link').href = 'user.css?'+css_rnd; + return false; }