Commit Graph

15 Commits

Author SHA1 Message Date
Albert Yi
a57d4a9558 fixes #2680 2018-11-12 16:29:44 -08:00
evazion
a20eba9ef7 Fix #3983: Uploads: NoMethodError - undefined method `>=' for nil:NilClass
* Rename Upload#download_for_upload to #get_file_for_upload.

* Fix #get_file_for_upload to raise error if no file or source url was given.

* Fix javascript upload validation to disallow submitting form if file is
  not present and the source is not an url.
2018-11-11 17:12:39 -06:00
evazion
33ca028927 related tags: fix initialization logic for recent/frequent/translated/artist columns.
Initialize the recent tags, frequent tags, translated tags, and artist
tags columns only once, when the related tags section is first shown.

The related tags section is shown automatically when the 'Edit' tab is
opened, or by default on the uploads page.

This fixes the /related_tags.js and /source.js calls being triggered
every time the tag edit dialog box or the 'Edit' tab was opened.
2018-10-15 18:42:04 -05:00
evazion
091c4c97a8 Fix #3895: 'Related tags' not appearing automatically on uploads page. 2018-09-12 19:26:59 -05:00
evazion
056fe365f2 Render "Fetch source data" box html server-side.
Instead of calling /sources.json and rendering the "Fetch source data"
box client-side in Javascript, call /sources.js so we can render the
html server-side.
2018-09-08 15:42:16 -05:00
evazion
3bed5f3cf9 Fix #3867: Add namespaces to all Javascript events. 2018-09-04 12:26:18 -05:00
Albert Yi
64c3bc18a7 rename ref and url fields to upload_source and upload_referer_url 2018-08-29 16:46:04 -07:00
Albert Yi
692c3ddac8 ignore #post_source when autorunning the iqdb search (#3851) 2018-08-29 16:20:36 -07:00
Albert Yi
ed050e74b9 update iqdb source in uploads js (#3851) 2018-08-29 15:15:03 -07:00
evazion
cd11ae6008 upload page: fix fetch source data when not using bookmarklet.
* #upload_referer_url no longer exists, just using #ref works.
* #upload_source defaults to params[:url], so using it instead of #url still works.

ref: https://github.com/r888888888/danbooru/issues/3850#issuecomment-417116385
2018-08-29 16:54:03 -05:00
Albert Yi
ab220f295c search for source/referer in additional elements 2018-08-29 14:04:10 -07:00
evazion
bbaadda1e3 Convert keyboard shortcuts to use data-shortcut. 2018-08-12 12:09:58 -05:00
evazion
f72b32b27b Fix eslint warnings. 2018-08-05 18:30:25 -05:00
evazion
8589d514dc Fix #3799: Fetch source data link is broken 2018-08-04 10:28:14 -05:00
Albert Yi
6fa0ae2cf1 Migrate assets to use Webpacker 2018-07-27 15:24:05 -07:00