mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
removed backbone from VS solution,
renamed NzbDrone.Backbone to UI
This commit is contained in:
parent
c7776f74e1
commit
663160c06a
230 changed files with 57 additions and 386 deletions
28
UI/Mixins/backbone.ajax.js
Normal file
28
UI/Mixins/backbone.ajax.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
//try to add ajax data as query string to DELETE calls.
|
||||
(function (){
|
||||
|
||||
var original = Backbone.ajax;
|
||||
|
||||
Backbone.ajax = function (){
|
||||
|
||||
var xhr = arguments[0];
|
||||
|
||||
//check if ajax call was made with data option
|
||||
if(xhr && xhr.data && xhr.type=='DELETE')
|
||||
{
|
||||
if(xhr.url.indexOf('?') === -1)
|
||||
{
|
||||
xhr.url = xhr.url + '?' + $.param(xhr.data);
|
||||
}
|
||||
else
|
||||
{
|
||||
xhr.url = xhr.url + '&' + $.param(xhr.data);
|
||||
}
|
||||
}
|
||||
|
||||
if (original){
|
||||
original.apply (this, arguments);
|
||||
}
|
||||
|
||||
};
|
||||
} ());
|
Loading…
Add table
Add a link
Reference in a new issue