Hi Ignacio, Your demo sgagility works well under chrome, but under ie9, there isn't any file sent to the controller. In fact, the progress bar doesn't start (it appears but stays at 0%) and then, an update is sent to the controller (file missing => error no update specified in params)
Finished for today, it's past midnight here and it's time to sleep... Arnaud. 2012/9/26 Arnaud Doyen <[email protected]> > Forget about less issues, I still have the issue with the cloneNode using > the old-part (and then, requesting old image which has been deleted since > updated) > > > 2012/9/26 Arnaud Doyen <[email protected]> > >> Hi, >> >> I have little less bugs with that issue. >> - I have added the jquery malsup form in the assets, but since it's >> already in hobo-jquery-ui, this gave me this issue with cloneNode. >> Now, I have no error returned by server log anymore. >> >> But, strangely, the dialog still doesn't close when I do that : >> <do field="photo" part="photo"> >> <view size="normal"/> >> <% buttons = [ ["Save", "hjq_dialog_box.submitAndClose"], >> ["Cancel", "hjq_dialog_box.close"] ] %> >> <dialog-box id="new-photo" buttons="&buttons"> >> <form with="&this_parent" id="formlet-photo" class="dialog" >> update="photo" multipart errors-ok> >> <do field="photo"> >> <label><%= this_field_name %></label> >> <input/> >> </do> >> </form> >> </dialog-box> >> <dialog-open-button dialog="#new-photo">Cliquer pour >> éditer</dialog-open-button> >> </do> >> When I click on save. The image is well uploaded, the part is well >> updated (in chrome, but not under IE when it asks me to save the js >> returned) but the dialog is not closed. >> >> I'll check the debug in chrome to see if some js error appears. >> >> 2012/9/26 Arnaud Doyen <[email protected]> >> >>> At start, I tried with formlet, but these one are not working with ajax >>> multipart file upload. >>> Maybe adding this ability to formlet should already be a good thing ? >>> (if it's possible) >>> >>> I hope to find any solution for that. >>> Thanks Ignacio for your demo app. I'll have a look at it. >>> >>> Regards, >>> Arnaud. >>> >>> 2012/9/26 Bryan Larsen <[email protected]> >>> >>>> There appears to be a bug with multipart forms inside of parts -- >>>> things are being multiply quoted. Looking into it. >>>> >>>> Bryan >>>> >>>> On Wed, Sep 26, 2012 at 1:22 PM, Ignacio Huerta <[email protected]> >>>> wrote: >>>> > Hi Arnaud, >>>> > >>>> > I haven't tested Hobo's ajax file upload support so I can't help you >>>> > much. What I can offer is a Hobo 1.4 demo app working with jquery file >>>> > upload. It might help a bit: >>>> > >>>> > http://blueimp.github.com/jQuery-File-Upload/ >>>> > >>>> > https://github.com/suyccom/sgagility (check out projects#show) >>>> > >>>> > Regards, >>>> > Ignacio >>>> > >>>> > El 25/09/12 23:27, Arnaud Doyen escribió: >>>> >> Hi, >>>> >> >>>> >> I tried ajax file upload with some images and I discover an issue >>>> >> with IE9 (yes, again...). In, fact, this is this issue: >>>> >> >>>> http://stackoverflow.com/questions/9230779/ie9-prompts-user-on-submission-of-hidden-iframe >>>> >> >>>> >> >>>> >> >>>> > IE9 doesn't like the content-type of the json rendered. >>>> >> >>>> >> Then, it asks me if I want to open the js file like I tried to >>>> >> download a file. >>>> >> >>>> >> Also, I have this declared in application.dryml : <def tag="input" >>>> >> for="Paperclip::Attachment" attrs="size"> <% size||="thumb" %> <if >>>> >> test="&this.exists?"> <view size="&size"/> </if> <%= >>>> >> file_field_tag param_name_for_this, attributes %> </def> >>>> >> >>>> >> <def tag="view" for="Paperclip::Attachment" attrs="size"> <%= >>>> >> image_tag this.url size %> </def> >>>> >> >>>> >> (Yes, I tried to use <view merge-attrs/> in the input tag but this >>>> >> seems not working). >>>> >> >>>> >> And in the view: <do part="photo"> <form update="photo" multipart> >>>> >> <input:photo size="normal"/> <div class="actions"> <submit >>>> >> label="#{ht 'ad.actions.save', :default=>['Save']}"/> </div> >>>> >> </form> </do> Then, the image is shown in the input tag. The goal >>>> >> is to upload the photo and then, update the part so that the photo >>>> >> is changed directly. >>>> >> >>>> >> While uploading a photo, the part is quite well upadted but I >>>> >> receive an error because it tries to download also the old image. >>>> >> I debugged that with chrome and the need for this old image is >>>> >> coming from the javascript jquery.js from jquery-rails: clone = >>>> >> elem.cloneNode( true ); (around line 6084). >>>> >> >>>> >> I can live with the second issue since ajax file upload is not >>>> >> often used, but it's better it works with IE9. I think I can >>>> >> correct this issue while modifying the controller. >>>> >> >>>> >> I'll do that tomorrow, since it's already late here... >>>> >> >>>> >> Best regards, Arnaud. >>>> >> >>>> >> -- You received this message because you are subscribed to the >>>> >> Google Groups "Hobo Users" group. To post to this group, send >>>> >> email to [email protected]. To unsubscribe from this >>>> >> group, send email to [email protected]. For >>>> >> more options, visit this group at >>>> >> http://groups.google.com/group/hobousers?hl=en. >>>> > >>>> > -- >>>> > Ignacio Huerta Arteche >>>> > http://www.ihuerta.net >>>> > Teléfono: 0034 645 70 77 35 >>>> > Email realizado con software libre >>>> > >>>> > -- >>>> > You received this message because you are subscribed to the Google >>>> Groups "Hobo Users" group. >>>> > To post to this group, send email to [email protected]. >>>> > To unsubscribe from this group, send email to >>>> [email protected]. >>>> > For more options, visit this group at >>>> http://groups.google.com/group/hobousers?hl=en. >>>> > >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Hobo Users" group. >>>> To post to this group, send email to [email protected]. >>>> To unsubscribe from this group, send email to >>>> [email protected]. >>>> For more options, visit this group at >>>> http://groups.google.com/group/hobousers?hl=en. >>>> >>>> >>> >> > -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
