ajax-manager
Advanced tools
Comparing version 1.0.17 to 1.0.18
{ | ||
"name": "ajax-manager", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"description": "An jQuery ajax management tool", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -86,7 +86,6 @@ // use global count instead of jquery global event because it does't support cross domain request | ||
} | ||
if (!models.__global) models.__global = {} | ||
if (!models.__default) models.__default = {} | ||
}) | ||
// globle config | ||
// $.ajaxSetup(Object.assign({}, models.__global || {}, { | ||
// $.ajaxSetup(Object.assign({}, models.__default || {}, { | ||
// // reset data and event | ||
@@ -99,3 +98,3 @@ // data: null, | ||
// })) | ||
let globalEvents = { // events set in __global and register should be add in this array | ||
let globalEvents = { // events set in __default and register should be add in this array | ||
beforeSend: [], | ||
@@ -130,7 +129,7 @@ success: [], | ||
if (registerConfig[eventName]) globalEvents[eventName].push(registerConfig[eventName]) | ||
if (models.__global[eventName]) globalEvents[eventName].push(models.__global[eventName]) | ||
if (models.__default[eventName]) globalEvents[eventName].push(models.__default[eventName]) | ||
}) | ||
Object.keys(startAndStopEvents).map(eventName => { | ||
if (registerConfig[eventName]) startAndStopEvents[eventName].push(registerConfig[eventName]) | ||
if (models.__global[eventName]) startAndStopEvents[eventName].push(models.__global[eventName]) | ||
if (models.__default[eventName]) startAndStopEvents[eventName].push(models.__default[eventName]) | ||
}) | ||
@@ -151,3 +150,3 @@ | ||
registerConfig.data || {}, | ||
models.__global.data || {}, | ||
models.__default.data || {}, | ||
models[key].data || {}, | ||
@@ -162,3 +161,2 @@ config.data || {}) | ||
config, | ||
models.__global, | ||
{ | ||
@@ -165,0 +163,0 @@ url: getUrl(key, models[key], registerConfig, config), |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21621
231