Skip to content

Commit 5d4057c

Browse files
author
sgotre
committed
fix
1 parent dd0c94d commit 5d4057c

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

trunk/js/affilinet_product_widgets_mce_button.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff 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',

0 commit comments

Comments
 (0)