Skip to content

Commit

Permalink
Merge pull request #38 from collective/simahawk-latest-plone-release
Browse files Browse the repository at this point in the history
fix main.js when data.context do not exist
  • Loading branch information
hvelarde committed Jul 10, 2015
2 parents 98becff + 750a48e commit d9723c3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/collective/upload/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,12 @@ $(document).ready(function() {
// //in the latest version we have a method formData who actually is
// // doing this...=)
$('#fileupload').bind('fileuploadsubmit', function (e, data) {
var inputs = data.context.find(':input');
var inputs;
if(data.context){
inputs = data.context.find(':input');
}else{
inputs = data.form.find(':input');
}
if (inputs.filter('[required][value=""]').first().focus().length) {
return false;
}
Expand Down

0 comments on commit d9723c3

Please sign in to comment.