evazion
a8ae4d3f36
Fix #3849 : Forum Button in the topbar has broken css
2018-08-29 14:29:15 -05:00
evazion
4f5cb0ba70
Post#has_artist_tag: fix "artist tag is required" triggering incorrectly.
...
Fixes the "Artist tag is required" upload warning to only trigger when
the source is from a first-party site.
2018-08-28 18:14:21 -05:00
evazion
604bfb0923
Fix #3846 : Subscribed forum posts link to invalid URL in email updates.
...
Test: http://localhost/rails/mailers/user_mailer/forum_notice
2018-08-27 22:04:37 -05:00
evazion
47e26419d3
nav menu: add html ids to secondary nav menu links ( #3844 ).
2018-08-27 20:57:59 -05:00
evazion
4e1d76da81
html: add controller & action attributes to <body> tag ( #3844 ).
2018-08-26 16:02:06 -05:00
evazion
b98bc26397
nav menu: add html ids to main menu nav links ( #3844 ).
2018-08-26 13:12:41 -05:00
evazion
8ccc238791
nav menu: remove duplicate "More »" link.
...
Remove a second hidden "More »" link from the nav menu. This was
leftover code first added in f2f524b87 and later reverted in 68161f7b8 .
2018-08-26 13:11:26 -05:00
evazion
6ff70c5002
mod actions: separate account upgrades from promotions ( fix #3841 )
2018-08-26 11:12:04 -05:00
evazion
3dafca9aec
Fix #3842 : Mods can demote other mods or admins.
2018-08-25 13:52:50 -05:00
evazion
0bb787d987
Post.pending_or_flagged: fix ambiguous column reference.
...
Fixes an ambiguous column reference error when searching for
`status:unmoderated` on the comments page:
https://danbooru.donmai.us/comments?group_by=comment&search[post_tags_match]=status:unmoderated
Also removes the `id in (...)` subquery checking whether flagged posts
have a flag from the last week; this is always true.
2018-08-25 11:26:00 -05:00
evazion
e33d6f9e84
Post#is_approvable?: fix 'Approve' link appearing on approver's own uploads.
...
Fixes the 'Approve' link in the modqueue and in the quickmod bar being
shown as available on the approver's own flagged uploads, even though
they can't actually approve these posts.
2018-08-25 11:12:37 -05:00
evazion
847237980b
Fix #3469 : Rejecting post shouldn't hide pending/flagged notices
...
Just reload the page entirely instead of trying to update it in place.
2018-08-25 00:39:08 -05:00
evazion
f9a39c9fbe
Fix #3840 : "Q" moves cursor to beginning of search bar.
2018-08-24 20:31:37 -05:00
evazion
e10df5bdf7
Fix #3839 : Allow prepopulating upload form with url params.
2018-08-24 17:39:26 -05:00
evazion
05ad112831
Fix #3835 : Related tags update vulnerability.
...
Also fixes deprecated call to `render :text`.
2018-08-24 12:16:23 -05:00
evazion
8833374294
Fix calling reportbooru when it isn't fully configured ( #3834 ).
2018-08-24 11:23:19 -05:00
evazion
cf5c458020
danbooru_default_config.rb: document enable_post_search_counts ( #3834 ).
2018-08-24 11:21:54 -05:00
evazion
83cca4a382
PostDisapproval: fix duplicate initialize_attributes definition.
2018-08-23 15:24:57 -05:00
evazion
85ae2cda0d
optimization: prefer relation.none over relation.where("false")
...
Using `relation.none` instead of `relation.where("false")` avoids an sql query.
2018-08-23 15:21:51 -05:00
evazion
4f02c7f70a
search: add status:modqueue, status:unmoderated metatags.
...
* status:modqueue = ~status:pending ~status:flagged
* status:unmoderated = status:modqueue -user:self -approver:self -disapproval:any
2018-08-23 14:48:39 -05:00
evazion
89c4fe150a
search: add disapproval:<any|none|disinterest|poor_quality|breaks_rules> metatag.
2018-08-23 14:08:02 -05:00
evazion
db23e06a4f
comments.js: remove unused import.
2018-08-22 20:29:51 -05:00
evazion
a6162246f4
Fix #3830 : JS Upload ignores set Max-Filesize bigger than 265 MB.
2018-08-22 20:24:52 -05:00
evazion
8890baaf42
Fix #3821 : Blacklist and mod queue.
2018-08-22 18:14:13 -05:00
evazion
083c537abf
Fix #3769 : Favgroup search negation doesn't work as expected.
2018-08-22 17:33:23 -05:00
evazion
9a0f37e359
Fix #3715 : Provide any/none modifiers for pixiv: metatag
2018-08-22 00:25:38 -05:00
evazion
8cc393183e
Fix #3754 : Include unbans in Mod Actions.
2018-08-22 00:08:33 -05:00
evazion
d6eecb5466
blacklists: truncate display of long blacklist rules.
2018-08-21 23:33:33 -05:00
evazion
6ccf4ed9c0
blacklists: refactor blacklist html+css.
...
* Consolidate blacklist css in one file.
* blacklist box: fix tag colors not dimming on hover.
* blacklist box: allow middle clicking on tags to open in new tab.
* /wiki_pages: move blacklist controls to top of tag sidebar.
* /wiki_pages: fix missing "disable all" / "re-enable all" buttons.
2018-08-21 23:33:08 -05:00
evazion
d26d450c09
Fix #3709 : Provide OR capability for blacklist items.
2018-08-21 23:31:25 -05:00
evazion
03a97d2962
Post#normalized_source: add toranoana.jp normalization.
2018-08-21 00:07:58 -05:00
evazion
3af82de596
Partial fix for #3719 : Certain commentaries not parsed correctly
2018-08-20 23:18:26 -05:00
evazion
33506839c4
Post#normalized_source: fix gelbooru source normalization.
...
Didn't handle https or md5-based subdirs:
https://gelbooru.com//images/57/a3/57a3676a63e5cf4ab05463a3a9a953bb.jpg
^ ^^^^^
2018-08-20 15:02:08 -05:00
evazion
e4286632f5
Fix #3826 : Upload error: Could not parse output from FFProbe
2018-08-19 18:22:49 -05:00
evazion
c504ad555d
Fix #3822 : Move favorites (while deleting) fails if user has also favorited destination
2018-08-19 00:54:17 -05:00
evazion
eaef616a01
Fixup tests for 03cf4c917.
2018-08-19 00:42:06 -05:00
evazion
3419193341
Post#normalized_source: fix twipple.jp normalization.
2018-08-19 00:33:31 -05:00
evazion
03cf4c917e
Post#normalized_source: prefer https links where supported.
2018-08-19 00:31:07 -05:00
evazion
4eead40f4d
Fix #3823 : Add Photozou source normalization.
2018-08-18 23:23:48 -05:00
evazion
3ae913a707
html: convert html comments to erb comments.
...
Avoid emitting useless comments in the html.
2018-08-17 18:55:21 -05:00
evazion
3f7b1e0b13
html: fix invalid </meta>, </link>, </input> closing tags.
2018-08-17 18:41:48 -05:00
evazion
f85b34cd9f
shortcuts.js: simplify scroll up/down hotkeys.
2018-08-17 16:25:47 -05:00
evazion
e9d6a0fda6
utility.js: remove dead Utility.without function.
2018-08-17 16:25:47 -05:00
evazion
21895ef0aa
utility.js: simplify $.fn.selectEnd().
...
Remove createTextRange fallback; setSelectionRange is supported by all modern browsers.
https://caniuse.com/#feat=input-selection
2018-08-17 16:25:47 -05:00
evazion
dfffabd662
utility.js: replace Utility.scroll_to with Element.scrollIntoView.
...
https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
https://caniuse.com/#feat=scrollintoview
2018-08-17 16:25:47 -05:00
evazion
ad056e69d5
utility.js: simplify even/odd table row striping.
2018-08-17 16:25:36 -05:00
evazion
eef8b9c323
posts/show: fix flash message when faving/unfaving posts.
...
Bug: if you faved a post, then opened another page in a separate tab,
then the "You have favorited this post" flash message would appear in
the separate tab.
Fixes regression in bcaee199 .
2018-08-15 20:14:51 -05:00
evazion
ec0646c234
posts/show: don't scroll page when opening edit dialog.
...
Don't scroll up the page when opening the tag edit dialog via shift+e.
Fixes regression in #3812 .
2018-08-15 18:56:52 -05:00
evazion
56beed8a23
dtext: fix flicker in [expand] elements.
2018-08-14 16:04:13 -05:00
evazion
0b6e89c908
dtext: fix flickering dtext preview div.
2018-08-14 16:04:08 -05:00
evazion
e57eb87632
forum_topics/show: fix flickering forum post edit forms.
2018-08-14 16:04:08 -05:00
evazion
7aa2a41798
blacklists: fix flickering of inline blacklists.
2018-08-14 16:04:08 -05:00
evazion
33ed762e91
posts/show: eliminate unused <meta> tags.
2018-08-14 16:04:08 -05:00
evazion
766d68c4ee
posts/show: fix flickering post unvote link.
2018-08-14 16:04:08 -05:00
evazion
7174c24ac8
posts/show: fix flickering recommended tab.
2018-08-14 16:04:08 -05:00
evazion
73fc7cab7f
posts/show: fix flickering tabs in artist commentary box.
2018-08-14 16:04:08 -05:00
evazion
0c49b162f0
posts/show: fix flickering favlist show/hide buttons.
2018-08-14 16:03:16 -05:00
evazion
72a37c2f94
posts/show: fix flickering fav/unfav buttons.
2018-08-14 16:03:16 -05:00
evazion
7028417bfb
posts/show: fix 'Flag' option in sidebar.
...
* Don't show 'Flag' option on already flagged posts.
* Drop flag/appeal link show/hide Javascript (did nothing, links were already shown/hidden in html).
2018-08-14 16:03:16 -05:00
evazion
d7ec28b804
posts/show: fix 'Hide from queue' option in sidebar.
...
Fix 'Hide from queue' option appearing on deleted posts, but not on
pending or flagged posts.
2018-08-14 12:48:13 -05:00
evazion
bcaee199f5
favorites: unify create.js.erb & destory.js.erb code paths.
2018-08-12 15:51:18 -05:00
evazion
fb91bbc6c5
Fix #3813 : Favorite limit can be bypassed.
2018-08-12 14:22:08 -05:00
evazion
202527008f
user.rb: drop unused add_favorite!, delete_favorite! methods.
...
These methods were incorrect anyway, didn't upvote/downvote the post.
2018-08-12 12:35:15 -05:00
evazion
bbaadda1e3
Convert keyboard shortcuts to use data-shortcut.
2018-08-12 12:09:58 -05:00
evazion
d369d38419
shortcuts.js: Add declarative data-shortcut keyboard shortcuts.
2018-08-11 16:38:21 -05:00
evazion
755397e6c9
comments.js: remove dead code.
...
Remove dead and hide_threshold_comments and initialize_expand_links
methods. initialize_expand_links is dead because `.comment-section`
doesn't exist.
2018-08-09 14:45:26 -05:00
evazion
130570aa33
comments.js: fix thresholded comments.
...
* Restore behavior of thresholded comments being greyed out (lost in 6fa0ae2cf ).
* Set the `below-threshold` class for thresholded comments in the html instead of in javascript.
* Remove `include_below_threshold` param; it was always true when clicking "Show all comments".
2018-08-09 14:45:26 -05:00
evazion
031cb6b8cf
comments.js: use event delegation to bind click handlers.
...
Use event delegation to bind click handlers so that they don't have to
be rebound when comments are dynamically loaded with "Show all comments".
2018-08-09 14:45:24 -05:00
evazion
8e8a39af43
comments.js: fix forms flickering on page load.
...
Mark the edit form, new comment form, and unvote links as hidden in
html, instead of showing them by default then hiding them later in
Javascript. This eliminates flickering on page load.
2018-08-09 14:44:20 -05:00
evazion
c615b53a7e
Fix broken "Link to alias" / "Link to implication" forum links.
...
/tag_implications was changed to filter out inactive implications by
default when the `status` param wasn't given.
This broke "Link to implication":/tag_implications?search[id]=NNN links
inside pending implication requests in forum posts. These links now
return an empty search instead of the pending implication.
Hiding inactive aliases/implications by default also changed the API behavior.
2018-08-09 12:49:40 -05:00
evazion
abe8b9c071
Fix "Show all comments" link.
...
The second argument to `trigger` is supposed to be an array.
ref: https://danbooru.donmai.us/forum_topics/9127?page=250#forum_post_149379
2018-08-08 23:44:35 -05:00
evazion
107d19c6b3
Tag scripts: drop [if ...] and [reset] syntax ( fix #3807 , #3773 )
...
Fixes #3807 . Drops the TagScript module entirely and replaces it with
a simple call to Post.tag.
Simultaneously fixes #3773 as a consequence of removing TagScript.run.
Post.update already updates data-tags by itself, so there was no need
for TagScript.run to update data-tags as well.
2018-08-08 16:01:42 -05:00
evazion
f72b32b27b
Fix eslint warnings.
2018-08-05 18:30:25 -05:00
evazion
752557e813
Add eslint support.
...
Run with `yarn run lint` or `bin/webpack`.
2018-08-05 18:30:25 -05:00
evazion
9ee93a8d1f
Utility.keydown(): fix search+replace mistake ( #3799 ).
2018-08-04 18:14:54 -05:00
evazion
5de0bd2ebb
cookie.js: remove unused code.
...
Unused since 65a87941 .
2018-08-04 18:14:54 -05:00
evazion
0c5b5e28b5
utility.js: remove unused get_url_parameter function.
...
Unused since 025d66a6 .
2018-08-04 18:14:54 -05:00
evazion
7c524f867b
Fix more missing Utility imports ( #3791 ).
2018-08-04 11:37:25 -05:00
evazion
2b33d23168
Fix broken commentary fetch in "Add commentary" dialog ( #3791 ).
2018-08-04 11:31:44 -05:00
evazion
8589d514dc
Fix #3799 : Fetch source data link is broken
2018-08-04 10:28:14 -05:00
evazion
0b4e114721
Fix #3705 : Rename "Flags & Appeals" now that it includes approvals.
2018-05-11 17:28:06 -05:00
evazion
0ac28634f4
Fix #3708 : Post approvals sometimes displays multiple approvers for same post
2018-05-11 17:15:51 -05:00
evazion
a22bf20230
post tooltips: add header bar with more post info.
...
Add a header bar containing the following information:
* Uploader + top tagger + upload date
* Score, favorite count, comment count
* Rating
* Source (Pixiv, Twitter, etc)
* Image dimensions
Also list series pools with tags.
2018-05-07 13:18:22 -05:00
evazion
27ca4f7cb1
post tooltips: reduce width/height, increase delay.
2018-05-07 13:18:22 -05:00
evazion
e8f5d8d8c2
site map: add approvals index, move post events to own section.
2018-05-05 14:00:58 -05:00
evazion
bfecbffb97
post approvals: add to post events page.
2018-05-05 14:00:58 -05:00
evazion
7c1d5e25fb
post approvals: add index page + search options ( fix #3579 ).
2018-05-05 14:00:49 -05:00
evazion
181a906766
Fix #3695 : Bookmarklet breaks on pixiv fanbox direct image links.
2018-05-05 12:21:11 -05:00
evazion
c584ca5b19
Fix uploads getting stuck in 'processing' state ( fix #3659 ).
...
Bug: if an upload timed out while downloading the file, Upload#process!
would catch the error and attempt to retry, but since the upload was
already in the 'processing' state, on the second try `process!` would
bail out immediately and leave the upload stuck in the 'processing' state.
Fix: remove the retry logic from Upload#process!. Let Downloads::File#download!
(which had its own retry logic) handle it instead.
2018-05-05 11:42:40 -05:00
evazion
0836e4b850
tests: fix upload tests.
...
Fix some uploads tests that got mixed up when merging abce4d2 (see also d089be9 ).
2018-05-05 11:20:21 -05:00
evazion
59ab9820b0
tests: fix FactoryGirl reference.
2018-05-03 20:37:23 -05:00
evazion
216d735f24
Fix #3696 : API: handle boolean params consistently
...
* Use ApplicationRecord#attribute_matches to handle boolean attributes
consistently in search methods.
* Add support for searching various boolean attributes that previously
weren't supported.
2018-05-03 19:57:14 -05:00
evazion
c7492343ce
String: add truthy? & falsy? core extensions.
...
* Add `truthy?` and `falsy?` core extensions to String.
* Use `truthy?` and `falsy?` to replace ad-hoc parsing of boolean
parameters in various places.
2018-05-03 19:57:14 -05:00
evazion
96669ca4b5
Fix #3694 : Favgroup UX issues.
2018-05-03 00:53:42 -05:00
evazion
80f8a7fee4
post tooltips: add disable button inside tooltip.
2018-04-30 02:20:06 -05:00
evazion
1d14885bd5
post tooltips: reduce width/height, grey out unless hovered.
2018-04-30 02:20:06 -05:00
evazion
93471c99c9
post tooltips: position tooltips above thumbnail.
2018-04-30 02:20:06 -05:00
evazion
7e99a1b38b
artist commentary form: add partial_commentary checkbox.
...
Add a checkbox for adding/removing the partial_commentary tag in the
artist commentary form.
ref: https://danbooru.donmai.us/forum_topics/15101 .
2018-04-29 22:05:59 -05:00
evazion
21431892e8
post tooltips: increase delay 33%, remove gaps between tags.
2018-04-29 12:09:09 -05:00
evazion
47677aedf0
post tooltips: make scrollbar thinner.
2018-04-29 11:41:41 -05:00