File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change 88 localStorage . setItem ( 'target_input' , $ ( this ) . data ( 'input' ) ) ;
99 localStorage . setItem ( 'target_preview' , $ ( this ) . data ( 'preview' ) ) ;
1010 window . open ( route_prefix + '?type=' + type , 'FileManager' , 'width=900,height=600' ) ;
11+ window . SetUrl = function ( url , file_path ) {
12+ //set the value of the desired input to image url
13+ var target_input = $ ( '#' + localStorage . getItem ( 'target_input' ) ) ;
14+ target_input . val ( file_path ) . trigger ( 'change' ) ;
15+
16+ //set or change the preview image src
17+ var target_preview = $ ( '#' + localStorage . getItem ( 'target_preview' ) ) ;
18+ target_preview . attr ( 'src' , url ) . trigger ( 'change' ) ;
19+ } ;
1120 return false ;
1221 } ) ;
1322 }
1423
1524} ) ( jQuery ) ;
16-
17-
18- function SetUrl ( url , file_path ) {
19- //set the value of the desired input to image url
20- var target_input = $ ( '#' + localStorage . getItem ( 'target_input' ) ) ;
21- target_input . val ( file_path ) ;
22-
23- //set or change the preview image src
24- var target_preview = $ ( '#' + localStorage . getItem ( 'target_preview' ) ) ;
25- target_preview . attr ( 'src' , url ) ;
26- }
You can’t perform that action at this time.
0 commit comments