Skip to content

Commit 097f05a

Browse files
committed
Merge branch 'develop' into main
2 parents 55b374d + fe10ddb commit 097f05a

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

app/controller/window/HelpWindow.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Ext.define('EdiromOnline.controller.window.HelpWindow', {
2424
'window.HelpWindow'
2525
],
2626

27+
backendPath: '@backend.path@',
28+
backendURL: '@backend.url@',
29+
2730
init: function() {
2831
this.control({
2932
'helpWindow': {
@@ -46,7 +49,15 @@ Ext.define('EdiromOnline.controller.window.HelpWindow', {
4649
idPrefix: win.id
4750
},
4851
Ext.bind(function(response){
49-
win.setContent(response.responseText);
52+
53+
var windowContent = response.responseText;
54+
55+
// replace image paths (relative backendPath to absolute backendURL)
56+
var replacee = new RegExp('src="' + me.backendPath.replace(/\/, '\/'/g), "g");
57+
windowContent = windowContent.replace(replacee, 'src="' + me.backendURL);
58+
59+
// set window content
60+
win.setContent(windowContent);
5061
}, me)
5162
);
5263
}

build.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
<copy file="${build.dir}/app.js" tofile="${build.dir}/app-temp.js" preservelastmodified="true">
4848
<filterset begintoken="@" endtoken="@">
4949
<filter token="backend.url" value="${backend.url}"/>
50+
<filter token="backend.path" value="${backend.path}"/>
5051
</filterset>
5152
</copy>
5253
<copy file="${build.dir}/app-temp.js" tofile="${build.dir}/app.js" overwrite="true" preservelastmodified="true"/>

0 commit comments

Comments
 (0)