fixed app.css loading to work with minifying of css

This commit is contained in:
Ralf Becker 2013-12-19 03:46:38 +00:00
parent b29317711a
commit 5b6172c354

View File

@ -48,15 +48,15 @@
var calendar_window = egw_appWindow('calendar'); var calendar_window = egw_appWindow('calendar');
// include template specific app.css // include template specific app.css
var link_tags = calendar_window.document.getElementsByTagName('link'); var link_tags = calendar_window.document.getElementsByTagName('link');
var cal_app_css = /\/calendar\/templates\/[^/]+\/app.css/; var cal_app_css = /calendar\/templates\/[^/]+\/app.css/;
for(var i=0; i < link_tags.length; i++) for(var i=0; i < link_tags.length; i++)
// include template specific app.css // include template specific app.css
{ {
var href = link_tags[i].href; var href = cal_app_css.exec(link_tags[i].href);
if (cal_app_css.test(href)) if (href)
{ {
//alert('loading into top window: '+href); //alert('loading into top window: '+href);
egw(calendar_window.top).includeCSS(href); egw(calendar_window.top).includeCSS(egw_webserverUrl+'/'+href[0]);
return true; return true;
} }
} }