parent
72772bed5a
commit
467c88f711
@ -1,14 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
define(['app','backgrid'], function () {
|
|
||||||
NzbDrone.Missing.Row = Backgrid.Row.extend({
|
|
||||||
events: {
|
|
||||||
'click .x-search': 'search'
|
|
||||||
},
|
|
||||||
|
|
||||||
search: function () {
|
|
||||||
window.alert('Episode Search');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return NzbDrone.Missing.Row;
|
|
||||||
});
|
|
@ -1,16 +1,16 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
define(['app','backgrid'], function () {
|
define(
|
||||||
|
[
|
||||||
|
'backgrid'
|
||||||
|
], function (Backgrid) {
|
||||||
|
|
||||||
NzbDrone.Missing.Row = Backgrid.Row.extend({
|
return Backgrid.Row.extend({
|
||||||
events: {
|
events: {
|
||||||
'click .x-search': 'search'
|
'click .x-search': 'search'
|
||||||
},
|
},
|
||||||
|
search: function () {
|
||||||
search: function () {
|
window.alert('Episode Search');
|
||||||
window.alert('Episode Search');
|
}
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
return NzbDrone.Mixins.Row;
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
@ -1,23 +1,26 @@
|
|||||||
//try to add ajax data as query string to DELETE calls.
|
//try to add ajax data as query string to DELETE calls.
|
||||||
"use strict";
|
"use strict";
|
||||||
define(['jquery'], function () {
|
define(function () {
|
||||||
|
|
||||||
var original = Backbone.ajax;
|
return function () {
|
||||||
|
|
||||||
Backbone.ajax = function () {
|
var original = this.ajax;
|
||||||
|
this.ajax = function () {
|
||||||
|
|
||||||
var xhr = arguments[0];
|
var xhr = arguments[0];
|
||||||
|
|
||||||
//check if ajax call was made with data option
|
//check if ajax call was made with data option
|
||||||
if (xhr && xhr.data && xhr.type === 'DELETE') {
|
if (xhr && xhr.data && xhr.type === 'DELETE') {
|
||||||
if (xhr.url.indexOf('?') === -1) {
|
if (xhr.url.indexOf('?') === -1) {
|
||||||
xhr.url = xhr.url + '?' + $.param(xhr.data);
|
xhr.url = xhr.url + '?' + $.param(xhr.data);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
xhr.url = xhr.url + '&' + $.param(xhr.data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
xhr.url = xhr.url + '&' + $.param(xhr.data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return original.apply(this, arguments);
|
return original.apply(this, arguments);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in new issue