File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,13 +66,15 @@ if (typeof(tinymce) != 'undefined') {
6666
6767 onsubmit : function ( e ) {
6868 // Insert content when the window form is submitted
69- console . log ( 'on submit' , e ) ;
70- console . log ( 'on ed.target' , ed . target ) ;
71- console . log ( 'on e.data.value' , e . data . id ) ;
72-
7369 editor . selection . select ( ed . target ) ;
7470 editor . selection . setContent ( '[affilinet_widget id=' + e . data . id + ']' ) ;
7571 ed . stopImmediatePropagation ( ) ;
72+ ed . stopPropagation ( ) ;
73+ ed . preventDefault ( ) ;
74+ console . log ( 'stoped' )
75+ this . hide ( )
76+
77+ return false
7678 }
7779
7880 } ) ;
@@ -106,10 +108,11 @@ if (typeof(tinymce) != 'undefined') {
106108 elem . onclick = function ( ) {
107109 editor . insertContent ( '[affilinet_widget id=' + elem . value . toString ( ) + ']' ) ;
108110 }
111+ } ) ;
109112
110113
111- } ) ;
112114
115+ console . log ( menu ) ;
113116 editor . addButton ( 'affilinet_product_widgets_mce_button' , {
114117 icon : true ,
115118 image : affilinet_product_widgets_mce_variables . image_path + 'affilinet_icon.png' ,
You can’t perform that action at this time.
0 commit comments