webhook / webhook-cms

The CMS layer for Webhook.com
http://www.webhook.com
MIT License
178 stars 41 forks source link

File Upload Drag n' Drop logic rewrite #220

Open LtSquigs opened 9 years ago

LtSquigs commented 9 years ago

Right now all of this logic is done through direct editing of the template, which causes problems with the image modal because its now bound to localized text, and it also makes some of the text in the modals un-localizable. We should change this logic:

https://github.com/webhook/webhook-cms/blob/master/app/components/file-upload.js#L67-96

To instead of directly using addClass, removeClass, and text, it should set some variables on the view so these can be handled in the respective image-upload.hbs and file-upload.hbs files. This should also let us make the "Drop FIles" and "Select from Desktop" strings localizable.