Commit Graph

270 Commits

Author SHA1 Message Date
r888888888
c5de0ca425 clear out menu.bindings on autocomplete lib after search (#3688) 2018-04-28 19:10:58 -07:00
Albert Yi
06e7dbb8e4 fixes #3674 2018-04-27 15:48:52 -07:00
evazion
72664e0105 saved searches: fix broken query/label autocomplete. 2018-04-26 23:55:13 -05:00
evazion
a49cb1c105 jquery: fix obsolete uses of success (#3548). 2018-04-26 23:53:49 -05:00
evazion
bb3c88dbc8 thumbnails: replace browser tooltips with qtip2 tooltips (#3664). 2018-04-25 23:06:11 -05:00
evazion
8fb72ffcaf Fix #3660: Resize-to-fit broken for previews on upload page. 2018-04-20 21:26:06 -05:00
evazion
e4096460eb Fix #3622: Approval links on mod queue have same ID attribute. 2018-04-12 21:48:09 -05:00
Albert Yi
b99600bbbe fixes #3625 2018-04-12 14:12:27 -07:00
r888888888
abce4d2551 Raise error on unpermitted params.
Fail loudly if we forget to whitelist a param instead of silently
ignoring it.

misc models: convert to strong params.

artist commentaries: convert to strong params.

* Disallow changing or setting post_id to a nonexistent post.

artists: convert to strong params.

* Disallow setting `is_banned` in create/update actions. Changing it
  this way instead of with the ban/unban actions would leave the artist in
  a partially banned state.

bans: convert to strong params.

* Disallow changing the user_id after the ban has been created.

comments: convert to strong params.

favorite groups: convert to strong params.

news updates: convert to strong params.

post appeals: convert to strong params.

post flags: convert to strong params.

* Disallow users from setting the `is_deleted` / `is_resolved` flags.

ip bans: convert to strong params.

user feedbacks: convert to strong params.

* Disallow users from setting `disable_dmail_notification` when creating feedbacks.
* Disallow changing the user_id after the feedback has been created.

notes: convert to strong params.

wiki pages: convert to strong params.

* Also fix non-Builders being able to delete wiki pages.

saved searches: convert to strong params.

pools: convert to strong params.

* Disallow setting `post_count` or `is_deleted` in create/update actions.

janitor trials: convert to strong params.

post disapprovals: convert to strong params.

* Factor out quick-mod bar to shared partial.
* Fix quick-mod bar to use `Post#is_approvable?` to determine visibility
  of Approve button.

dmail filters: convert to strong params.

password resets: convert to strong params.

user name change requests: convert to strong params.

posts: convert to strong params.

users: convert to strong params.

* Disallow setting password_hash, last_logged_in_at, last_forum_read_at,
  has_mail, and dmail_filter_attributes[user_id].

* Remove initialize_default_image_size (dead code).

uploads: convert to strong params.

* Remove `initialize_status` because status already defaults to pending
  in the database.

tag aliases/implications: convert to strong params.

tags: convert to strong params.

forum posts: convert to strong params.

* Disallow changing the topic_id after creating the post.
* Disallow setting is_deleted (destroy/undelete actions should be used instead).
* Remove is_sticky / is_locked (nonexistent attributes).

forum topics: convert to strong params.

* merges https://github.com/evazion/danbooru/tree/wip-rails-5.1
* lock pg gem to 0.21 (1.0.0 is incompatible with rails 5.1.4)
* switch to factorybot and change all references

Co-authored-by: r888888888 <r888888888@gmail.com>
Co-authored-by: evazion <noizave@gmail.com>

add diffs
2018-04-06 18:09:57 -07:00
Albert Yi
6c790c61d3 replace uploader information post previews and comment listing, rename tagger to top tagger 2018-03-27 10:49:41 -07:00
r888888888
916a57b2fd update deprecated jquery 2018-02-22 11:46:11 -08:00
BrokenEagle
31114b716a Fix the auto resize in desktop mode (ref: a95af95e) 2018-02-05 10:20:24 -08:00
r888888888
32ff7de6d8 fixes #3346 2017-10-30 14:47:00 -07:00
r888888888
facb351552 fixes #3331 2017-10-11 14:40:10 -07:00
r888888888
1855ff885f make swipe animations faster 2017-10-11 13:06:04 -07:00
r888888888
3797c9ec2e refactor gestures 2017-10-11 13:03:33 -07:00
r888888888
12a815a53b disable gestures after expanding image to full size 2017-10-09 14:03:12 -07:00
r888888888
e3529b827f higher thresholds for gestures #3311 2017-10-09 13:50:47 -07:00
r888888888
6fdb8ae893 disable gestures in full image mode 2017-09-29 18:46:30 -07:00
r888888888
80b676604f permit scrolling in responsive view 2017-09-29 18:41:05 -07:00
BrokenEagle
216d43e35d Use window.screen for resizes instead 2017-09-28 13:00:28 -07:00
r888888888
b8466a6aaa fix logic with gestures 2017-09-26 14:29:05 -07:00
r888888888
d48df46ea5 disable swipe next gesture for posts/show 2017-09-26 14:20:24 -07:00
r888888888
16b3b78e17 add dedicated handler for swipe gestures 2017-09-26 14:17:31 -07:00
r888888888
3858622241 tweak gesture js 2017-09-25 19:46:30 -07:00
r888888888
8cb1e0e076 tweak js 2017-09-25 19:23:24 -07:00
r888888888
ac2afbaf3f tweak js 2017-09-25 19:19:50 -07:00
r888888888
3debaeb80b tweak gesture js 2017-09-25 16:47:59 -07:00
r888888888
01240f3a10 add option for desktop mode in user settings 2017-09-25 15:26:11 -07:00
r888888888
9ae1e0202c tweak gesture js 2017-09-25 15:16:34 -07:00
r888888888
d6a597492c bug fix 2017-09-23 13:45:01 -07:00
r888888888
d4106473dd enable gestures on posts/show 2017-09-23 13:44:41 -07:00
r888888888
233c118df4 fix responsive trigger 2017-09-23 13:38:36 -07:00
r888888888
e339c0c919 activate gestures in <660px only 2017-09-23 13:28:35 -07:00
r888888888
5a47c91d2b add threshold for gesture event 2017-09-23 13:26:02 -07:00
r888888888
507aa7c641 Merge branch 'master' of github.com:r888888888/danbooru 2017-09-23 13:15:05 -07:00
r888888888
5ad18aef22 implement gestures 2017-09-23 13:14:49 -07:00
r888888888
ffb212c616 remove extraneous links from post/show 2017-09-18 15:00:39 -07:00
r888888888
0985f929cc style buttons for upload/post edit pages 2017-09-14 16:56:40 -07:00
r888888888
5448ae5af4 truncate artist urls on display 2017-09-14 15:56:04 -07:00
r888888888
43c0a04011 more aggressive resizing to window for responsive mode 2017-09-07 18:43:08 -07:00
r888888888
b38789a875 remove unused js 2017-09-06 17:09:50 -07:00
r888888888
bb228d5735 add favorite action underneath image 2017-09-05 14:41:33 -07:00
evazion
ffbf5bbcdf Factor out related tags visibility toggling code. 2017-07-17 18:58:20 -05:00
evazion
6e3763e7d7 Remove minlength for autocompleting labels in saved search dialog.
Trigger autocomplete after typing the first letter when adding labels in
the saved search dialog.
2017-07-11 19:27:04 -05:00
evazion
51d0feb2c6 Fix #3214: Add autocomplete for saved searches.
* Autocomplete the `search:<label>` metatag.

* Make label autocompletion do a prefix match instead of a substring
  match. Example: `search:ar` matches `artists`, not `characters`. This
  is how tags and most other things are autocompleted.
2017-07-11 19:24:49 -05:00
Albert Yi
494ad99aac Merge pull request #3111 from evazion/fix-3099
Fix #3099: NilClass error for approval API request
2017-06-05 12:03:18 -07:00
evazion
fdf8e7d5d7 Fix mode menu 'approve' option.
* Fix routing error in respond_with (didn't use /moderator namespace).

* Fix /moderator/posts/approvals.json response to return full
  PostApproval object, not just a success/failure message.

* Simplify the javascript a bit (use $.post instead of $.ajax).
2017-06-04 12:14:35 -05:00
evazion
3880fbe13e /posts/$id: fix shift+O to approve shortcut.
`Danbooru.Post.approve` is used for approving posts via the mode menu.
It doesn't hide all the notices or the approve/disapprove/flag buttons.
Click the link instead to hide those things.

Click the #quick-mod-approve link instead of #approve because #approve
prompts for confirmation.
2017-06-04 10:07:26 -05:00
BrokenEagle
6f593de46d Resize images for mobile layout 2017-06-03 12:52:27 -07:00