Fixed: Back to top button is back

Fixed: Delete series in Firefox
pull/6/head
kayone 11 years ago
parent c926775719
commit 48c9e29eab

@ -1,31 +1,28 @@
//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(function () { define(
[
'jquery'
], function ($) {
return function () { var original = $.ajax;
var original = this.ajax; $.ajax = function (xhr) {
this.ajax = function () {
var xhr = arguments[0];
//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.contains('?')) {
xhr.url = xhr.url + '?' + $.param(xhr.data); if (xhr.url.contains('?')) {
xhr.url += '&';
} }
else { else {
xhr.url = xhr.url + '&' + $.param(xhr.data); xhr.url += '?';
} }
xhr.url += $.param(xhr.data);
delete xhr.data; delete xhr.data;
} }
if (xhr) {
xhr.headers = xhr.headers || {};
// xhr.headers.Authorization = window.NzbDrone.ApiKey;
}
return original.apply(this, arguments); return original.apply(this, arguments);
}; };
}; });
});

@ -29,25 +29,6 @@ require.config({
shim: { shim: {
jquery: {
exports: 'jQuery',
deps :
[
'Mixins/jquery.ajax'
],
init: function (AjaxMixin) {
require(
[
'jQuery/ToTheTop',
'Instrumentation/ErrorHandler'
]);
AjaxMixin.apply($);
}
},
signalR: { signalR: {
deps: deps:
[ [
@ -83,11 +64,15 @@ require.config({
}, },
backbone: { backbone: {
deps : deps:
[ [
'jquery',
'underscore', 'underscore',
'jquery' 'Mixins/jquery.ajax',
'jQuery/ToTheTop'
], ],
exports: 'Backbone' exports: 'Backbone'
}, },
@ -199,6 +184,7 @@ require.config({
define( define(
[ [
'jquery',
'backbone', 'backbone',
'marionette', 'marionette',
'jQuery/RouteBinder', 'jQuery/RouteBinder',
@ -209,7 +195,7 @@ define(
'Router', 'Router',
'Shared/Modal/Controller', 'Shared/Modal/Controller',
'Instrumentation/StringFormat' 'Instrumentation/StringFormat'
], function (Backbone, Marionette, RouteBinder, SignalRBroadcaster, NavbarView, AppLayout, SeriesController, Router, ModalController) { ], function ($, Backbone, Marionette, RouteBinder, SignalRBroadcaster, NavbarView, AppLayout, SeriesController, Router, ModalController) {
new SeriesController(); new SeriesController();
new ModalController(); new ModalController();

@ -1,8 +1,9 @@
'use strict'; 'use strict';
define( define(
[ [
'jquery',
'bootstrap' 'bootstrap'
], function () { ], function ($) {
$(document).ready(function () { $(document).ready(function () {
var _window = $(window); var _window = $(window);
@ -18,7 +19,7 @@ define(
}); });
_scrollButton.click(function () { _scrollButton.click(function () {
$("html, body").animate({ scrollTop: 0 }, 600); $('html, body').animate({ scrollTop: 0 }, 600);
return false; return false;
}); });
}); });

Loading…
Cancel
Save