From 089144d986a64d9634dfd44a58f8cab969b5fe4c Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 19 Nov 2013 23:22:33 +0000 Subject: [PATCH] Avoid adding CSS files again if they're already in the header --- phpgwapi/js/jsapi/egw_files.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/phpgwapi/js/jsapi/egw_files.js b/phpgwapi/js/jsapi/egw_files.js index 3b765b93b5..24f8d44e08 100644 --- a/phpgwapi/js/jsapi/egw_files.js +++ b/phpgwapi/js/jsapi/egw_files.js @@ -105,7 +105,10 @@ egw.extend('files', egw.MODULE_WND_LOCAL, function(_app, _wnd) // Get the head node and append the newly created "link" node // to it. var head = _wnd.document.getElementsByTagName('head')[0]; - head.appendChild(cssnode); + if(jQuery('link[href="'+_cssFile+'"]',head).length == 0) + { + head.appendChild(cssnode); + } } } }