When editing a wiki page and adding or removing an attachment, any changes you may have made to the wiki text get lost.
I'd suggest we make the add & delete attachments into ajax calls. (Another option would be submit the wiki text form too and controller would handle both types of changes at once). Ajax would be a nice direction towards someday allowing drag/drop of images into a markdown editor and auto-attach and insert [[img src=...]]
for you.
Closed #878.
ib/7998
This is great. Some thoughts to polish it up even more:
def attach
, not doing the redirect when AJAX is good. Can you do that when deleting an attachment too?onsubmit
attributes in HTML isn't the best way to set up JS event handlers. Could you change it to jquery's.on('submit')
? That will also mean you don't need to pass onsubmit strings through the templates. Just have an appropriate selector to find the form for the.on
call.Closed #883.
ib/7998a