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

Show images after used url_prefix #1453

Merged
merged 2 commits into from
Feb 5, 2020
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions extension/ezjscore/classes/ezjscajaxcontent.php
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,10 @@ function ( &$element, $key )
(string)$element, 'UTF-8'
);
}
if( $key === 'url' )
{
eZURI::transformURI( $element, true );
}
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ var eZOEPopupUtils = {
{
tag = document.createElement("span");
tag.className = 'image_preview';
var previewUrl = ed.settings.ez_root_url + encodeURI( n.data_map[ n.image_attributes[imageIndex] ].content[eZOEPopupUtils.settings.browseImageAlias].url )
var previewUrl = encodeURI( n.data_map[ n.image_attributes[imageIndex] ].content[eZOEPopupUtils.settings.browseImageAlias].url )
tag.innerHTML += ' <a href="#">' + ed.getLang('preview.preview_desc') + '<img src="' + previewUrl + '" /></a>';
td.appendChild( tag );
hasImage = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ tinyMCEPopup.onInit.add( eZOEPopupUtils.BIND( eZOEPopupUtils.init, window, {
else
{
var imageAtr = eZOEPopupUtils.embedObject['data_map'][ imageAttributes[0] ], imageSizeObj = imageAtr['content'][ args['alt'] ];
args['src'] = ed.settings.ez_root_url + imageSizeObj['url'];
args['src'] = imageSizeObj['url'];
args['title'] = eZOEPopupUtils.safeHtml( imageAtr['alternative_text'] || eZOEPopupUtils.embedObject['name'] );
args['width'] = imageSizeObj['width'];
args['height'] = imageSizeObj['height'];
Expand Down Expand Up @@ -153,7 +153,7 @@ function loadImageSize( e, el )
}
else if ( attribObj[size] )
{
previewImageNode.attr( 'src', eds.ez_root_url + attribObj[size]['url'] );
previewImageNode.attr( 'src', attribObj[size]['url'] );
tinyMCEPopup.resizeToInnerSize();
}
else
Expand All @@ -165,7 +165,7 @@ function loadImageSize( e, el )
{
var size = jQuery('#embed_size_source').val(), imageAttributes = eZOEPopupUtils.embedObject['image_attributes'];
eZOEPopupUtils.embedObject['data_map'][ imageAttributes[0] ]['content'][ size ] = data['content']['data_map'][ imageAttributes[0] ]['content'][ size ];
previewImageNode.attr( 'src', eds.ez_root_url + eZOEPopupUtils.embedObject['data_map'][ imageAttributes[0] ]['content'][ size ]['url'] );
previewImageNode.attr( 'src', eZOEPopupUtils.embedObject['data_map'][ imageAttributes[0] ]['content'][ size ]['url'] );
}
});
}
Expand Down
3 changes: 2 additions & 1 deletion extension/ezoe/ezxmltext/handlers/input/ezoexmlinput.php
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,8 @@ function inputTagXML( &$tag, $currentSectionLevel, $tdSectionLevel = null )
if ( $content->hasAttribute( $size ) )
{
$imageAlias = $content->imageAlias( $size );
$srcString = $URL . '/' . $imageAlias['url'];
eZURI::transformURI( $imageAlias['url'], true );
$srcString = $imageAlias['url'];
$imageWidth = $imageAlias['width'];
$imageHeight = $imageAlias['height'];
break;
Expand Down