zulip/static/third
Greg Price d053e07760 upload: Make filedrop error handling more consistent.
The first argument to the error callback is *usually* a string code
from a list in the filedrop source; but sometimes it was the text
the server sent in the HTTP status line, instead.  The latter isn't
predictable, and so it's not possible to write app code that uses it
to handle error consistently.

Instead, use that parameter for the numeric HTTP status code.  This
still isn't totally clean in that sometimes it's internal filedrop
errors, as strings, and sometimes it's HTTP status codes, as numbers;
but at least both of those are things we can sanely handle with a
`switch` statement.

Also pass through `serverResponse`, which for a nice JSON error from
the server will contain meaningful information about the error which
the calling code can use for nice error handling.  And just drop the
HTTP status text, which at best is redundant with the numeric code.

In passing, fix one case where for no obvious reason filedrop was
passing the file object but not the index.

This should be a pure refactor.
2018-01-29 16:06:11 -08:00
..
bootstrap bootstrap: Patch bootstrap.js to support contenteditable. 2017-11-10 14:14:03 -08:00
bootstrap-notify
fontawesome Update Font Awesome to version 4.7.0. 2017-02-06 22:45:02 -08:00
handlebars deps: Upgrade and move `handlebars` from `static/third` to `npm`. 2017-03-04 21:49:02 -08:00
html5-formdata
jquery-autosize
jquery-caret [third] Replace jquery-caret with newer implementation. 2016-06-14 16:36:51 -07:00
jquery-filedrop upload: Make filedrop error handling more consistent. 2018-01-29 16:06:11 -08:00
jquery-form Change from deprecated $.parseJSON to JSON.parse. 2017-07-27 14:16:57 -07:00
jquery-idle Refactor to delete mousewheel.js. 2017-07-03 11:04:20 -04:00
jquery-throttle-debounce
katex Revert "katex: Update the `require` path to point to the new one." 2018-01-23 12:30:28 -08:00
lazyload Update with proper LF line-endings. 2016-10-17 20:19:55 -07:00
marked bugdown: Remove whitespace strip from inline code. 2017-12-14 07:48:10 -05:00
sockjs Revert "update-sockjs: Update sockjs from version 0.3.4 to 1.1.1." 2017-01-10 11:46:15 -08:00
sorttable
sourcesans third: Update version of Source Sans Pro font. 2017-08-28 16:08:30 -07:00
spectrum Patch spectrum.js for jQuery 3 compatibility. 2017-07-02 07:59:24 -04:00
zocial Zocial buttons: Fix overflow of text when internationalized. 2016-10-16 12:35:43 -07:00
thirdparty-fonts.css font-awesome: Fix font-awesome 4.7.0 upgrade in a hacky way. 2017-03-25 18:30:40 -07:00