uqlibrary/fez — pull request #17 by msammarco (2014-09-25 01:59:06+00:00)
Title: Javascript fix for saving records with attachments on enter

When starting a new record we see that a enter metadata record page can not save after uploading attachments using the SWFUploader and the open access selection permission. The workaround is to create the record then edit the record, where this isn't an issue, or use a different permission.

So there are few things happening here.
*** swfuploader.js ***
- (Line 416 - uploaderAddEventListeners()) The event listener is never added when 'Saves' happen. They have a workflow button value of workflow_button_-1. I've tweaked the regex to include this.
- (Line 277 - swfuploaderQueueComplete()) The last workflowbuttonclicked value comes out as undefined when set by uploaderAddEventListeners. It doesn't look like null is ever set to this variable
*** validation.js ***
- (Line 761) Looks like a form submission was added to make sure the form was always submitted when the swfuploaderQueueComplete() function errors out of the undefined test above. This is no longer needed since the form now is submitted in swfuploaderQueueComplete()
- (Line 750) There's some UQ specific language in there which I've come across