luci-base: xhr.js: rework class, handle expired session
authorJo-Philipp Wich <jo@mein.io>
Fri, 16 Nov 2018 18:31:07 +0000 (19:31 +0100)
committerJo-Philipp Wich <jo@mein.io>
Fri, 16 Nov 2018 20:11:34 +0000 (21:11 +0100)
commita1fff6a9eebbfe3e9b3e5401645b1db4bdf37735
tree50a4c8e79908823b8a62dc5b819c673c107a9b18
parent425a02734e28ec41403511aa1c46cbe489930ff1
luci-base: xhr.js: rework class, handle expired session

Drop very old IE compat code, restructure class, align code style with
other files and properly handle JSON mimetypes with charset trailer.

Also detect session related 403 errors and show a modal prompting
to re-login.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/xhr.js