File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
system/wymeditor/plugins/image_upload Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ WYMeditor.editor.prototype.image_upload = function() {
2727 var orig = d . initialize ;
2828 d . initialize = function ( wDialog ) {
2929 orig . call ( this , wDialog ) ;
30- var doc = wDialog . document ;
30+ var wym = this ,
31+ doc = wDialog . document ,
32+ options = wym . _options ;
3133
3234 var oldSubmitLabel = jQuery ( "form#image_upload_form .submit" , doc ) . val ( ) ;
3335 // WYMEditor automatically locks onto any form here, so remove the binding.
@@ -43,8 +45,8 @@ WYMeditor.editor.prototype.image_upload = function() {
4345 if ( response . error ) {
4446 alert ( response . error ) ;
4547 } else {
46- jQuery ( ".wym_src" , doc ) . val ( response . thumbUrl ) ;
47- jQuery ( ".wym_alt" , doc ) . val ( response . original_filename ) ;
48+ jQuery ( options . srcSelector , doc ) . val ( response . thumbUrl ) ;
49+ jQuery ( options . altSelector , doc ) . val ( response . original_filename ) ;
4850 }
4951 jQuery ( "form#image_upload_form .submit" , doc ) . val ( oldSubmitLabel ) ;
5052 }
You can’t perform that action at this time.
0 commit comments