File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 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" />
You can’t perform that action at this time.
0 commit comments