This repository was archived by the owner on Oct 1, 2019. It is now read-only.
Open
Conversation
Member
Author
|
Hey @Sinthoras, see ffec797 of how to fix the problem, we discussed in irc earlier today! :) All the file_asset forms need a bit of styling, though. @Sinthoras, mind to care about this? |
This should be all that is needed for the wikipedia integration. It’s now possible to search for new images and add them as FileAsset records. This is mostly a rewrite of the old code and is IMHO much more clean and more tested.
Wikipedia::Page.image_urls returns nil, if no results are found. But we want to assign an empty list in this case. This allows the partials to be rendered properly.
calling find with an empty string will raise a TypeError, so we need to check for it.
wasn’t loaded in manifest file, before
There is now a gem for this thing, done by Tors Dalid. Thanks to him for creating it :) See [1](https://github.com/tors/jquery-fileupload-rails) for more information.
Not needed any longer. File upload is horribly broken, so I throw out most things related and implement it more easy from scratch
All this stuff isn’t needed, for now. May be it can be re-added, when we want to support mass-import of files. But I don’t see that feature right now.
This brings some changes to make file-upload work much better because it uses rails form helpers instead of some self-hacked stuff. Should be a much better approach, now.
* remove jquery.fileupload stuff, this isn’t needed any longer * add some styling
We should make it work without this, before integrating all this again. I don’t know if it’s worth the effort to keep this dependency. May be, plain file-upload just does the trick for us.
To allow the form builder code to add the multipart option to the form, the file input field must be created using the original form object. This propagates the form object into the local_file_form partial and makes use of it to create the field. Makes file upload finally work again.
Member
Author
|
I cherry-picked a few commits into master, already, because they have nothing to do with this pull request. I also did a rebase, so some hashes changed. Remember to do a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this is the work to fix #1