UI Cleanup - Updated Instrumentation, jQuery and Mixins subtrees.

This commit is contained in:
Taloth Saldono 2015-02-13 22:06:20 +01:00
parent 44928c8f64
commit 70bfad4e6a
24 changed files with 716 additions and 490 deletions

View file

@ -1,21 +1,20 @@
module.exports = function(){
module.exports = function() {
var $ = this;
var original = $.ajax;
$.ajax = function(xhr){
$.ajax = function(xhr) {
'use strict';
if(xhr && xhr.data && xhr.type === 'DELETE') {
if(xhr.url.contains('?')) {
if (xhr && xhr.data && xhr.type === 'DELETE') {
if (xhr.url.contains('?')) {
xhr.url += '&';
}
else {
} else {
xhr.url += '?';
}
xhr.url += $.param(xhr.data);
delete xhr.data;
}
if(xhr) {
if (xhr) {
xhr.headers = xhr.headers || {};
xhr.headers['X-Api-Key'] = window.NzbDrone.ApiKey;
}