79 |
|
|
80 |
function edit_template() { |
function edit_template() { |
81 |
$('div_css').style.visibility = "hidden"; |
$('div_css').style.visibility = "hidden"; |
82 |
|
$('div_css').style.zIndex = 1; |
83 |
Element.removeClassName('a_css', 'tab_selected'); |
Element.removeClassName('a_css', 'tab_selected'); |
84 |
Element.addClassName('a_template', 'tab_selected'); |
Element.addClassName('a_template', 'tab_selected'); |
85 |
$('div_template').style.visibility = "visible"; |
$('div_template').style.visibility = "visible"; |
86 |
|
$('div_template').style.zIndex = 2; |
87 |
Logger.debug("switched to template editor"); |
Logger.debug("switched to template editor"); |
88 |
var c = $('template_content'); |
var c = $('template_content'); |
89 |
if (c) c.focus(); |
if (c) c.focus(); |
90 |
|
Logger.debug('zIndex template:'+$('div_template').style.zIndex+' css:'+$('div_css').style.zIndex); |
91 |
return false; |
return false; |
92 |
} |
} |
93 |
|
|
94 |
function edit_css() { |
function edit_css() { |
95 |
$('div_template').style.visibility = "hidden"; |
$('div_template').style.visibility = "hidden"; |
96 |
|
$('div_template').style.zIndex = 1; |
97 |
Element.removeClassName('a_template', 'tab_selected'); |
Element.removeClassName('a_template', 'tab_selected'); |
98 |
Element.addClassName('a_css', 'tab_selected'); |
Element.addClassName('a_css', 'tab_selected'); |
99 |
$('div_css').style.visibility = "visible"; |
$('div_css').style.visibility = "visible"; |
100 |
|
$('div_css').style.zIndex = 2; |
101 |
Logger.debug("switched to CSS editor"); |
Logger.debug("switched to CSS editor"); |
102 |
var c = $('css_content'); |
var c = $('css_content'); |
103 |
if (c) c.focus(); |
if (c) c.focus(); |
104 |
|
Logger.debug('zIndex template:'+$('div_template').style.zIndex+' css:'+$('div_css').style.zIndex); |
105 |
return false; |
return false; |
106 |
} |
} |
107 |
|
|
135 |
return; |
return; |
136 |
} |
} |
137 |
|
|
138 |
|
show_working(); |
139 |
|
|
140 |
var args = '?template_filename='+template_filename; |
var args = '?template_filename='+template_filename; |
141 |
|
|
142 |
new Ajax.Updater( 'div_template', url+'template'+args, { |
new Ajax.Updater( 'div_template', url+'template'+args, { |
143 |
asynchronous: 1, |
asynchronous: 1, |
144 |
onLoading: function(request) { |
onLoading: function(request) { |
145 |
loading.template = 1; |
loading.template = 1; |
|
show_working(); |
|
146 |
Logger.info('load_template.onLoading: '+template_filename); |
Logger.info('load_template.onLoading: '+template_filename); |
147 |
}, |
}, |
148 |
onLoaded: function(request) { |
onLoaded: function(request) { |
161 |
return; |
return; |
162 |
} |
} |
163 |
|
|
164 |
|
show_working(); |
165 |
|
|
166 |
new Ajax.Updater( 'div_css', url+'css', { |
new Ajax.Updater( 'div_css', url+'css', { |
167 |
asynchronous: 1, |
asynchronous: 1, |
168 |
onLoading: function(request) { |
onLoading: function(request) { |
169 |
loading.css = 1; |
loading.css = 1; |
|
show_working(); |
|
170 |
Logger.info('load_css.onLoading: '+css_filename); |
Logger.info('load_css.onLoading: '+css_filename); |
171 |
}, |
}, |
172 |
onLoaded: function(request) { |
onLoaded: function(request) { |
178 |
}; |
}; |
179 |
|
|
180 |
function reload_css() { |
function reload_css() { |
181 |
Logger.error('reload_css is not yet implemented!'); |
|
182 |
|
css_rnd++; |
183 |
|
Logger.info('loading user.css?'+css_rnd); |
184 |
|
$('user_css_link').href = 'user.css?'+css_rnd; |
185 |
|
|
186 |
return false; |
return false; |
187 |
} |
} |
188 |
|
|