summaryrefslogtreecommitdiff
path: root/elm/DocEdit.elm
AgeCommit message (Collapse)AuthorFilesLines
2019-12-10Elm: Add Redirect response + fix redirect to last post on replyYorhel1-1/+1
Fixes https://vndb.org/t2520/14#334 - I originally had some trouble to do this because `load` doesn't actually reload the page if you're just changing the hash. The `reload` following it handles that now. The Redirect response is just cleanup, there's several places that could benefit form it.
2019-12-08Fix json_api() URL matching + move URL parameters to POST bodyYorhel1-5/+4
For more consistency. Only exception right now is the password reset form, which still has parameters in the URL. Didn't convert it as that code doesn't use the elm_form() framework at the moment.
2019-12-06Add link to d9#3 to quick reply box + allow customizing TextPreview headerYorhel1-6/+6
2019-12-01v2rw: Convert thread display + poll votingYorhel1-1/+1
I did not reimplement the 'poll_recast' and 'poll_preview' settings, these actions are now always permitted. Updated CSS a little bit to highlight the linked post and fix the double border at the bottom. The nice thing about the sql_visible_threads() function I wrote earlier is that is can also be used for access control on a single thread. More code re-use. \o/
2019-11-27Elm: Use fieldset to disable the form while loadingYorhel1-1/+1
I wasn't able to do this while the .maintabs used floats.
2019-10-21Elm: Add text preview framework + BBCode preview in formsYorhel1-30/+10
2019-10-02v2rw: Convert user preferences formYorhel1-25/+18
And add a small 'formField' function to shrink the Elm form generation code a bit.
2019-09-25v2rw: Add Elm & db_edit framework + Convert doc page editingYorhel1-0/+134
Most of this is copied from v3. I did improve on a few aspects: - db_edit() and db_entry() use VNDB::Schema rather than dynamically querying the DB. This has the minor advantage of a faster startup. - The Elm code generator now writes to multiple files, this avoids the namespace pollution seen in v3's Lib.Gen and makes the dependency graph a bit more lean (i.e. faster incremental builds). - The Elm code generator doesn't update the timestamp of files that haven't been modified. This also speeds up incremental builds, the elm compiler can now skip rebuilding unmodified files. - The Elm API response generator code now uses plain functions rather than code references and all possible responses are now defined in Elm.pm. Turns out most API responses were used from more than a single place, so it makes sense to have them centrally defined. The doc page preview function is also much nicer; I'd like to apply this to all BBCode textareas as well. (Elm.pm itself is ugly as hell though. And we will prolly need some HTML form generation functions in Elm to make that part less verbose)