mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
update js libraries.
This commit is contained in:
parent
1c5a74df98
commit
38c3faf53c
4 changed files with 100 additions and 45 deletions
|
@ -1,4 +1,4 @@
|
|||
/*! messenger 1.3.3 */
|
||||
/*! messenger 1.3.5 */
|
||||
/*
|
||||
* This file begins the output concatenated into messenger.js
|
||||
*
|
||||
|
@ -993,23 +993,22 @@ window.Messenger.Events = (function() {
|
|||
}
|
||||
handlers = {};
|
||||
_.each(['error', 'success'], function(type) {
|
||||
var originalHandler;
|
||||
originalHandler = opts[type];
|
||||
return handlers[type] = function() {
|
||||
var data, defaultOpts, handlerResp, msgOpts, reason, resp, responseOpts, xhr, _base, _ref10, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
|
||||
var data, defaultOpts, handlerResp, msgOpts, reason, resp, responseOpts, xhr, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
|
||||
resp = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
|
||||
if ((_ref3 = opts[type]) != null ? _ref3._originalHandler : void 0) {
|
||||
opts[type] = opts[type]._originalHandler;
|
||||
}
|
||||
_ref4 = _this._normalizeResponse.apply(_this, resp), reason = _ref4[0], data = _ref4[1], xhr = _ref4[2];
|
||||
_ref3 = _this._normalizeResponse.apply(_this, resp), reason = _ref3[0], data = _ref3[1], xhr = _ref3[2];
|
||||
if (type === 'success' && !(msg.errorCount != null) && m_opts.showSuccessWithoutError === false) {
|
||||
m_opts['successMessage'] = null;
|
||||
}
|
||||
if (type === 'error') {
|
||||
if ((_ref5 = m_opts.errorCount) == null) {
|
||||
if ((_ref4 = m_opts.errorCount) == null) {
|
||||
m_opts.errorCount = 0;
|
||||
}
|
||||
m_opts.errorCount += 1;
|
||||
}
|
||||
handlerResp = m_opts.returnsPromise ? resp[0] : typeof (_base = opts[type])._originalHandler === "function" ? _base._originalHandler.apply(_base, resp) : void 0;
|
||||
handlerResp = m_opts.returnsPromise ? resp[0] : typeof originalHandler === "function" ? originalHandler.apply(null, resp) : void 0;
|
||||
responseOpts = _this._getHandlerResponse(handlerResp);
|
||||
if (_.isString(responseOpts)) {
|
||||
responseOpts = {
|
||||
|
@ -1020,21 +1019,21 @@ window.Messenger.Events = (function() {
|
|||
msg.hide();
|
||||
return;
|
||||
}
|
||||
if (type === 'error' && ((m_opts.ignoredErrorCodes != null) && (_ref6 = xhr != null ? xhr.status : void 0, __indexOf.call(m_opts.ignoredErrorCodes, _ref6) >= 0))) {
|
||||
if (type === 'error' && ((m_opts.ignoredErrorCodes != null) && (_ref5 = xhr != null ? xhr.status : void 0, __indexOf.call(m_opts.ignoredErrorCodes, _ref5) >= 0))) {
|
||||
msg.hide();
|
||||
return;
|
||||
}
|
||||
defaultOpts = {
|
||||
message: getMessageText(type, xhr),
|
||||
type: type,
|
||||
events: (_ref7 = events[type]) != null ? _ref7 : {},
|
||||
events: (_ref6 = events[type]) != null ? _ref6 : {},
|
||||
hideOnNavigate: type === 'success'
|
||||
};
|
||||
msgOpts = $.extend({}, m_opts, defaultOpts, responseOpts);
|
||||
if (typeof ((_ref8 = msgOpts.retry) != null ? _ref8.allow : void 0) === 'number') {
|
||||
if (typeof ((_ref7 = msgOpts.retry) != null ? _ref7.allow : void 0) === 'number') {
|
||||
msgOpts.retry.allow--;
|
||||
}
|
||||
if (type === 'error' && (xhr != null ? xhr.status : void 0) >= 500 && ((_ref9 = msgOpts.retry) != null ? _ref9.allow : void 0)) {
|
||||
if (type === 'error' && (xhr != null ? xhr.status : void 0) >= 500 && ((_ref8 = msgOpts.retry) != null ? _ref8.allow : void 0)) {
|
||||
if (msgOpts.retry.delay == null) {
|
||||
if (msgOpts.errorCount < 4) {
|
||||
msgOpts.retry.delay = 10;
|
||||
|
@ -1043,7 +1042,7 @@ window.Messenger.Events = (function() {
|
|||
}
|
||||
}
|
||||
if (msgOpts.hideAfter) {
|
||||
if ((_ref10 = msgOpts._hideAfter) == null) {
|
||||
if ((_ref9 = msgOpts._hideAfter) == null) {
|
||||
msgOpts._hideAfter = msgOpts.hideAfter;
|
||||
}
|
||||
msgOpts.hideAfter = msgOpts._hideAfter + msgOpts.retry.delay;
|
||||
|
@ -1087,7 +1086,6 @@ window.Messenger.Events = (function() {
|
|||
handler = handlers[type];
|
||||
old = opts[type];
|
||||
opts[type] = handler;
|
||||
opts[type]._originalHandler = old;
|
||||
}
|
||||
}
|
||||
msg._actionInstance = m_opts.action.apply(m_opts, [opts].concat(__slice.call(args)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue