Commit Graph

856 Commits

Author SHA1 Message Date
evazion
80f8a7fee4 post tooltips: add disable button inside tooltip. 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
21431892e8 post tooltips: increase delay 33%, remove gaps between tags. 2018-04-29 12:09:09 -05:00
evazion
862b1bc4c8 post tooltips: don't show if lost focus during ajax call (#3689).
Fix the tooltip appearing and getting stuck when the user mouses out
during the ajax request.
2018-04-29 01:58:39 -05:00
evazion
57203727b6 post tooltips: hide on keypresses (#3689). 2018-04-29 00:17:56 -05:00
evazion
08e25e40c5 post tooltips: disable tooltips on touchscreens (#3689).
On phones / tablets, long pressing a thumbnail sends emulated mouse events
that trigger the tooltip. Disable tooltips while touching is active.
2018-04-29 00:05:33 -05:00
evazion
a6499b5169 post tooltips: add disable option (#3689).
* Add "disable post tooltips" account setting.
* Add back title attribute for when fancy tooltips are disabled.
2018-04-28 23:50:51 -05:00
evazion
1a29b96579 post tooltips: avoid positioning tooltips offscreen (#3689).
ref: http://qtip2.com/plugins#viewport.
2018-04-28 23:49:22 -05:00
evazion
0dcd303546 post tooltips: cache html after first api call (#3689).
Avoid triggering the API call each time you hover over the same post.
Overwrite `content.text` to save the results after the first call.
2018-04-28 23:49:03 -05:00
evazion
e5db839e54 post tooltips: hide when clicking thumbnail (#3689). 2018-04-28 22:01:16 -05:00
r888888888
c5de0ca425 clear out menu.bindings on autocomplete lib after search (#3688) 2018-04-28 19:10:58 -07:00
r888888888
b0a161b745 remove jquery-ui-autocomplete from compiled app js 2018-04-28 18:38:18 -07:00
Albert Yi
36f15daa49 Merge pull request #3683 from evazion/fix-3678
Fix #3678: "Access denied" when adding commentary.
2018-04-27 17:28:23 -07:00
evazion
18c40b0d60 Fix #3678: "Access denied" when adding commentary. 2018-04-27 18:32:15 -05:00
Albert Yi
06e7dbb8e4 fixes #3674 2018-04-27 15:48:52 -07:00
evazion
907881aced post tooltips: increase delay, constraint height, condense tags (#3666).
* Increase hover delay to 450ms.
* Set max height and add scrollbars for long tag lists.
* Condense tag list (don't put categories on separate lines).
2018-04-27 13:55:14 -05:00
evazion
d731ec4393 Fix #3673: Autocomplete: hide menu after hitting space. 2018-04-27 13:24:23 -05:00
evazion
c398c8fff6 autocomplete: trigger completion for metatags after typing colon (#3558)
When completing metatags (e.g. `rating:safe`), show completions
immediately after typing the colon (`rating:`), instead of after the
first letter (`rating:s`).
2018-04-27 01:22:26 -05:00
evazion
6ab58104d4 jquery: fix obsolete use of load.
ref: https://jquery.com/upgrade-guide/3.0/#breaking-change-load-unload-and-error-removed
2018-04-27 00:38:46 -05:00
evazion
63a29247b2 post tooltips: disable on pool/favgroup order pages.
Disable to avoid tooltips appearing while trying to drag and drop.
2018-04-27 00:08:21 -05: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
dd2abeb180 jquery-ui: fix autocomplete menu styling (#3671).
* Wrap menu items in a div.
* Replace ui-state-focus with ui-state-active.
* Make active items have a grey background.

ref: http://jqueryui.com/upgrade-guide/1.12/#require-wrappers-for-each-menu-item
ref: http://jqueryui.com/upgrade-guide/1.12/#use-consistent-styling-for-focused-and-active-items
2018-04-26 23:18:00 -05:00
evazion
36b819fdf8 notes.js: fix deprecated dialogClass option.
ref: http://jqueryui.com/upgrade-guide/1.12/#dialog
2018-04-26 22:11:17 -05:00
evazion
87c6698d55 sources.js: remove (dead code). 2018-04-26 21:33:28 -05:00
evazion
f7a44ae8dd Fix redirect in "disable responsive mode" link. 2018-04-26 21:31:53 -05:00
Albert Yi
f2b525a6d2 Implement forum topic voting and tag change pruning (#3580) 2018-04-26 15:31:06 -07:00
Albert Yi
45fad069d7 Merge branch 'master' of github.com:r888888888/danbooru 2018-04-26 15:30:14 -07:00
Albert Yi
eddc789df2 fix js bugs 2018-04-26 15:01:57 -07:00
Albert Yi
95ab227b09 upgrade jquery-ui to 1.12, move to cdn 2018-04-26 14:49:33 -07:00
evazion
ed2b89a947 post tooltips: temp fix for jquery-ui 1.11 incompatibility.
ref: https://github.com/r888888888/danbooru/pull/3666#issuecomment-384775144
2018-04-26 15:49:14 -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
5082a25321 uploads.js: fix call to $.unique (deprecated as of jQuery 3.0) 2018-04-18 19:02:17 -05:00
Albert Yi
e9dc4a397e switch to jquery 3.3.1 on cdn 2018-04-17 16:32:50 -07:00
evazion
d66df41b58 Revert "common.js: show error on ajax failures." (#3640)
This reverts commit ad66b8abc9.
2018-04-13 22:50:03 -05:00
evazion
e4096460eb Fix #3622: Approval links on mod queue have same ID attribute. 2018-04-12 21:48:09 -05:00
evazion
611dacfd22 modqueue: remove dead "approve all" / "hide all" code (disabled since #2446). 2018-04-12 21:43:42 -05:00
evazion
bc0488df26 Fix #3631: Can no longer edit existing notes. 2018-04-12 18:31:07 -05:00
evazion
af9a09c2cb Fix #3626: Artist creation page doesn't autocomplete the name anymore. 2018-04-12 16:23:59 -05:00
Albert Yi
b99600bbbe fixes #3625 2018-04-12 14:12:27 -07:00
Albert Yi
c785d00eb6 remove window.console.log 2018-04-12 13:58:28 -07:00
Albert Yi
26a2e60d04 fixes #3623 2018-04-12 13:36:56 -07:00
Albert Yi
883b36ac2e fixes #3620 2018-04-12 13:00:48 -07:00
evazion
ad1ed5a510 Fix #3623: Changes to existing notes aren't being saved. 2018-04-12 14:52:50 -05:00
Albert Yi
d9d98f05c2 Merge branch 'rails-5.1' 2018-04-11 11:40:36 -07:00
Albert Yi
485c3b01c7 add uploader-id and top-tagger-id data attrs to post previews 2018-04-09 11:12:07 -07:00
evazion
ad66b8abc9 common.js: show error on ajax failures.
Make `link_to ..., remote: true` ajax requests display an error notice on failure.
2018-04-07 18:04:43 -05: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
evazion
8e457c7331 Disable user:<name> blacklists (temp fix for #3596). 2018-04-05 14:38:44 -05:00