Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix image links generated from civicrm in joomla #58 #59

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ $(function() {
}
var cmsPath = window.location.href.substr(0, window.location.href.lastIndexOf('/'));
var imageUrl = cmsPath;
if (cmsPath.indexOf('wp-admin/admin.php') !== -1) {//Fix me CRM.url
imageUrl = cmsPath.replace('wp-admin/admin.php','');//In order to stop image urls get admin in there which causes images not being displayed in email for wordpress
if (cmsPath.indexOf('wp-admin/admin.php') !== -1) {//Fix me CRM.url for Wordpress
imageUrl = cmsPath.replace('wp-admin/admin.php',''); //In order to stop image urls get admin in there which causes images not being displayed in email for wordpress
} else if (cmsPath.indexOf('administrator/') !== -1) { //Fix me CRM.url
imageUrl = cmsPath.replace('administrator/',''); //In order to stop image urls get admin in there which causes images not being displayed in email for joomla
}

var plugins;
// A basic plugin that expose the "viewModel" object as a global variable.
// plugins = [function(vm) {window.viewModel = vm;}];
Expand Down