the possible fix for #58

pull/68/head
Henrique Dias 2016-03-13 07:57:21 +00:00
parent b57bcb6b0e
commit c4431b1ee5
2 changed files with 8 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -77,6 +77,12 @@ $(document).on('page:editor', function() {
}
});
var submitActor = null;
$('#content').on('click', 'form input[type=submit]', function(event) {
submitActor = this;
});
// Submites any form in the page in JSON format
$('#content').on('submit', 'form', function(event) {
event.preventDefault();
@ -89,7 +95,7 @@ $(document).on('page:editor', function() {
editor.fadeIn();
}
var button = $(this).find("input[type=submit]:focus");
var button = $(submitActor);
var data = {
content: $(this).serializeJSON(),
contentType: button.data("type"),