1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 06:07:32 +02:00

Merge pull request #3254 from SimSync/fix_3051

fixes #3051 broken image links
This commit is contained in:
Cameron
2018-07-04 17:47:15 -07:00
committed by GitHub
2 changed files with 12 additions and 0 deletions

View File

@@ -41,6 +41,10 @@ e107::js('core', 'plupload/plupload.full.js', 'jquery', 2);
e107::css('core', 'plupload/jquery.plupload.queue/css/jquery.plupload.queue.css', 'jquery');
e107::js('core', 'plupload/jquery.plupload.queue/jquery.plupload.queue.min.js', 'jquery', 2);
e107::js('core', 'core/mediaManager.js',"jquery",5);
// issue #3051 Preview url is wrong when target page is a plugin
// Using this variable to check for the plugins directory and replace with empty space in case of...
// see mediaManager.js (line ~399ff)
e107::js('inline', 'var e107_plugins_directory = "' . str_replace('../', '', e_PLUGIN) . '";');
e107::wysiwyg(true);
/*
* CLOSE - GO TO MAIN SCREEN

View File

@@ -395,6 +395,14 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
{
preview = $htmlHolder.val();
}
// issue #3051 Preview url is wrong when target page is a plugin
var s = new RegExp('/' + e107_plugins_directory + '[\\w]+/', 'gmi');
if (window.top.document.URL.match(s))
{
preview = preview.replace(e107_plugins_directory, '');
}
}
$('div#' + target + "_prev", window.top.document).html(preview); // set new value