From 1d83a075c756f41de40688c5ac1050827e93f3e8 Mon Sep 17 00:00:00 2001 From: ChristianSchmidt1981 Date: Wed, 29 Apr 2015 11:08:18 +0200 Subject: [PATCH 1/3] test --- index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 769f5578..9a8ad3bc 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,5 @@ - + + From fe76f8a25ca06adc67f0a2b524f069f872d1eebd Mon Sep 17 00:00:00 2001 From: ChristianSchmidt1981 Date: Wed, 29 Apr 2015 11:08:33 +0200 Subject: [PATCH 2/3] rollback --- index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.html b/index.html index 9a8ad3bc..769f5578 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,4 @@ - - + From 1edf788fe17bbdc4433c2b84976f77ec610db01d Mon Sep 17 00:00:00 2001 From: cschmidt Date: Wed, 29 Apr 2015 12:23:01 +0200 Subject: [PATCH 3/3] move ./ into the configuration. now we can make this dynamic for implementation in symfony2 (example) --- scripts/filemanager.config.js.default | 1 + scripts/filemanager.js | 65 +++++++++++++-------------- 2 files changed, 31 insertions(+), 35 deletions(-) diff --git a/scripts/filemanager.config.js.default b/scripts/filemanager.config.js.default index ce5f6c46..ee796ee1 100644 --- a/scripts/filemanager.config.js.default +++ b/scripts/filemanager.config.js.default @@ -18,6 +18,7 @@ "chars_only_latin": true, "dateFormat": "d M Y H:i", "serverRoot": true, + "assetBaseUrl": "./", "fileRoot": false, "baseUrl": false, "logger": false, diff --git a/scripts/filemanager.js b/scripts/filemanager.js index 7a4947d9..545bc3ff 100644 --- a/scripts/filemanager.js +++ b/scripts/filemanager.js @@ -28,12 +28,12 @@ $.urlParam = function(name){ var loadConfigFile = function (type) { var json = null; type = (typeof type === "undefined") ? "user" : type; - - if(type == 'user') { - var url = './scripts/filemanager.config.js'; - } else { - var url = './scripts/filemanager.config.js.default'; - } + + if(type == 'user') { + var url = './scripts/filemanager.config.js'; + } else { + var url = './scripts/filemanager.config.js.default'; + } $.ajax({ 'async': false, @@ -66,11 +66,12 @@ HEAD_included_files = new Array(); * if not already included */ loadCSS = function(href) { + var sCompleteHref = config.options.assetBaseUrl + href; // we check if already included - if($.inArray(href, HEAD_included_files) == -1) { - var cssLink = $(""); + if($.inArray(sCompleteHref, HEAD_included_files) == -1) { + var cssLink = $(""); $("head").append(cssLink); - HEAD_included_files.push(href); + HEAD_included_files.push(sCompleteHref); } }; @@ -79,11 +80,12 @@ loadCSS = function(href) { * if not already included */ loadJS = function(src) { + var sCompleteHref = config.options.assetBaseUrl + src; // we check if already included - if($.inArray(src, HEAD_included_files) == -1) { - var jsLink = $("