Skip to content

Commit

Permalink
Merge pull request #50 from qSebastiaNp/master
Browse files Browse the repository at this point in the history
Fixes issue #45, maybe also #42
  • Loading branch information
johnitvn committed Feb 16, 2016
2 parents c15bdd0 + 9e603d0 commit 5100474
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
17 changes: 5 additions & 12 deletions src/assets/ModalRemote.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,13 @@ function ModalRemote(modalId) {
// Test if browser supports FormData which handles uploads
if (window.FormData) {
data = new FormData($('#ModalRemoteConfirmForm')[0]);
data.append('pks', selectedIds.join());
if (typeof selectedIds !== 'undefined' && selectedIds)
data.append('pks', selectedIds.join());
} else {
// Fallback to serialize
data = $('#ModalRemoteConfirmForm');
data.pks = selectedIds;
if (typeof selectedIds !== 'undefined' && selectedIds)
data.pks = selectedIds;
data = data.serializeArray();
}

Expand All @@ -340,15 +342,6 @@ function ModalRemote(modalId) {
}
);

// Close the user input form
$(this.footer).append('</form>');

if ($(this.content).find("form")[0] !== undefined) {
this.setupFormSubmit(
$(this.content).find("form")[0],
$(this.footer).find('[type="submit"]')[0]
);
}
}

/**
Expand Down Expand Up @@ -393,4 +386,4 @@ function ModalRemote(modalId) {
);
}
}
} // End of Object
} // End of Object
2 changes: 1 addition & 1 deletion src/assets/ModalRemote.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5100474

Please sign in to comment.