1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00
TiddlyWiki5/core/modules
Simon Baird 39e4e69ae7
Show server response as error message in put saver (#6589)
* Show server response as error message in put saver

I'd like to use this on Tiddlyhost so users can get more informative
error messages if the put save fails for whatever reason.

This would make the put saver a viable replacement for the legacy
upload saver, which is what Tiddlyhost uses currently.

I'm not sure what standard WebDAV servers do, but I would guess they
don't provide any response body for put requests, and hence this
patch would have no impact for a standard WebDAV server. (That said,
it would be a good idea to test it to make sure there aren't any
unexpected regressions for WebDAV or other put saver compatible
services.)

* Access http response status directly in put saver

There's no need to extract it from the error string created inside
tw.utils.httpRequest if we can get it directly from the xhr object.

* Add 'Save starting' notification for put saver

There are two related changes here:

1. Add a 'Save starting' notification for the put saver, similar to
   the upload saver. Not sure if it was intentionally omitted for
   the put saver, but it seems reasonable to have the two be
   consistent.

2. Send the 'Save starting' notifications in both upload and put
   save right before the actual request is sent. While testing I
   noticed that the save might have failed before the "Save
   starting" notification appeared which doesn't seem useful.
2022-04-05 17:06:56 +01:00
..
commands Introduce JSON parse utility function with error handling (#6401) 2022-02-21 15:29:25 +00:00
editor fix: bug introduced with 88812092fd fixes #6419 (#6420) 2022-01-24 19:17:09 +00:00
filterrunprefixes Support macro parameters in filter run prefixes (#6164) 2021-11-23 13:51:42 +00:00
filters Make butlast[0] consistent with rest (#6483) 2022-02-26 09:42:24 +00:00
indexers style(App) eliminate whitespace at the end of code lines (#5735) 2021-05-30 19:20:17 +01:00
info style(App) eliminate whitespace at the end of code lines (#5735) 2021-05-30 19:20:17 +01:00
macros allow unusedtitle macro to use the prefix parameter and fix wiki.generateNewTitle() (#5361) 2021-05-02 19:26:50 +01:00
parsers Allow newlines within filtered transclusions (#6421) 2022-02-21 15:28:21 +00:00
savers Show server response as error message in put saver (#6589) 2022-04-05 17:06:56 +01:00
server Introduce JSON parse utility function with error handling (#6401) 2022-02-21 15:29:25 +00:00
startup Fix: only refresh styles if the CSS has changed (#6537) 2022-03-17 21:19:49 +00:00
storyviews Add test to storyviews if targetElement is null (#5767) 2021-06-09 10:18:15 +01:00
upgraders Introduce JSON parse utility function with error handling (#6401) 2022-02-21 15:29:25 +00:00
utils Extend $draggable to support an optional drag handle (#6480) 2022-02-24 11:06:18 +00:00
widgets Checkbox widget: list and filter modes (#6561) 2022-04-02 15:16:08 +01:00
commander.js style(App) eliminate whitespace at the end of code lines (#5735) 2021-05-30 19:20:17 +01:00
config.js Fix configuration list of HTML5 block elements (#5469) 2021-05-23 17:50:27 +01:00
deserializers.js Introduce JSON parse utility function with error handling (#6401) 2022-02-21 15:29:25 +00:00
filters.js Fixed issue: deprecated regexp could cause crash (#6438) 2022-02-07 16:39:29 +00:00
keyboard.js Keyboard widget: provide variable for shortcut descriptor to actions. (#5782) 2021-06-14 12:03:59 +01:00
language.js Make lazy loading message be translateable 2015-09-08 10:41:27 +01:00
pluginswitcher.js Introduce JSON parse utility function with error handling (#6401) 2022-02-21 15:29:25 +00:00
saver-handler.js Fix faulty external-js single-file wiki (#5570) 2021-07-06 15:02:21 +01:00
story.js Fix issues with creation and modification dates 2015-09-11 13:34:01 +01:00
syncer.js Fix syncer logout alert (#5936) 2021-08-05 14:50:22 +01:00
tiddler.js Radio widget should use default if field/index is missing 2022-01-09 17:17:12 +00:00
wiki-bulkops.js Fix renaming a tiddler can result in duplicate tags 2022-01-14 16:57:30 +00:00
wiki.js Introduce JSON parse utility function with error handling (#6401) 2022-02-21 15:29:25 +00:00