Opened 10 years ago

Closed 9 years ago

#10195 closed enhancement (fixed)

[patch] [cla] Additional form elements for FileInputAuto & FileInputBlind

Reported by: Ian Fouls Owned by: dante
Priority: high Milestone: 1.5
Component: Dojox Version: 1.4.0b
Keywords: Cc:
Blocked By: Blocking:

Description

Please see the attached file for modification to FileInputAuto? & FileInputBlind?. This provides a callback to append additional DOM elements to the form before submission via the iframe.

This is done out of frustration with the FileIploader? not working in a dialog, please see ticket #9996. I need to get some code out the door that works!!!

Attachments (2)

FileInputAuto.js (6.5 KB) - added by Ian Fouls 10 years ago.
FileInputAuto.js.patch (336 bytes) - added by Ian Fouls 10 years ago.

Download all attachments as: .zip

Change History (9)

Changed 10 years ago by Ian Fouls

Attachment: FileInputAuto.js added

comment:1 Changed 10 years ago by Adam Peller

Component: GeneralDojox
Owner: changed from anonymous to dante

We cannot accept patches without a CLA. Patch format is preferred.

Changed 10 years ago by Ian Fouls

Attachment: FileInputAuto.js.patch added

comment:2 Changed 10 years ago by Ian Fouls

Patch file attached, CLA has been in place for some time.

comment:3 Changed 10 years ago by bill

Summary: Additional form elements for FileInputAuto & FileInputBlind[patch] [cla] Additional form elements for FileInputAuto & FileInputBlind

comment:4 Changed 10 years ago by dante

would it make more sense to have a generic mixin for content:{} object, so that you may simply specify a pre-send callback like:

new FileInputBlah({
   onBeforeSend: function(){
       return {};
   }
});

then, internally FileInputBlah? would just:

dojo.io.iframe.send({ form: this._form, content: this.onBeforeSend() });

it seems actually using the formnode (which is technically private) to clone inputs etc would be harder/more expensive than just being able to specify a function which will return the intended data to mix into content: param

comment:5 Changed 10 years ago by dante

Milestone: tbd1.5
Status: newassigned

comment:6 Changed 10 years ago by Ian Fouls

Agreed, your solution is far more elegant, I needed to get some code out to a customer and I've already overrrun deadlines by some considerable amount. With neither FileImput? or FileUploader? working (at least a day lost here!!!) I needed a quick method of resolving the problem.

comment:7 Changed 9 years ago by dante

Resolution: fixed
Status: assignedclosed

(In [21599]) fixes #10195 - adding in and documenting onBeforeSend

Note: See TracTickets for help on using tickets.