Browse Source

Remove unused variables

adaptive-webui-19844
Vasiliy Halimonchuk 6 years ago
parent
commit
7fb1e07b39
  1. 2
      src/webui/www/private/scripts/prop-files.js
  2. 20
      src/webui/www/private/scripts/speedslider.js

2
src/webui/www/private/scripts/prop-files.js

@ -346,8 +346,6 @@ const torrentFilesContextMenu = new ContextMenu({
y: 2 y: 2
}, },
onShow: function() { onShow: function() {
var selectedRows = torrentFilesTable.selectedRowsIds();
if (is_seed) if (is_seed)
this.hideItem('FilePrio'); this.hideItem('FilePrio');
else else

20
src/webui/www/private/scripts/speedslider.js

@ -31,11 +31,9 @@
MochaUI.extend({ MochaUI.extend({
addUpLimitSlider: function(hashes) { addUpLimitSlider: function(hashes) {
if ($('uplimitSliderarea')) { if ($('uplimitSliderarea')) {
const windowOptions = MochaUI.Windows.windowOptions;
const sliderFirst = true;
// Get global upload limit // Get global upload limit
let maximum = 500; let maximum = 500;
const req = new Request({ new Request({
url: 'api/v2/transfer/uploadLimit', url: 'api/v2/transfer/uploadLimit',
method: 'post', method: 'post',
data: {}, data: {},
@ -58,7 +56,7 @@ MochaUI.extend({
let up_limit = maximum; let up_limit = maximum;
if (up_limit < 0) up_limit = 0; if (up_limit < 0) up_limit = 0;
maximum = 10000; maximum = 10000;
const mochaSlide = new Slider($('uplimitSliderarea'), $('uplimitSliderknob'), { new Slider($('uplimitSliderarea'), $('uplimitSliderknob'), {
steps: maximum, steps: maximum,
offset: 0, offset: 0,
initialStep: up_limit.round(), initialStep: up_limit.round(),
@ -84,7 +82,7 @@ MochaUI.extend({
} }
} }
else { else {
const req = new Request.JSON({ new Request.JSON({
url: 'api/v2/torrents/uploadLimit', url: 'api/v2/torrents/uploadLimit',
noCache : true, noCache : true,
method: 'post', method: 'post',
@ -100,7 +98,7 @@ MochaUI.extend({
break; break;
} }
if (up_limit < 0) up_limit = 0; if (up_limit < 0) up_limit = 0;
const mochaSlide = new Slider($('uplimitSliderarea'), $('uplimitSliderknob'), { new Slider($('uplimitSliderarea'), $('uplimitSliderknob'), {
steps: maximum, steps: maximum,
offset: 0, offset: 0,
initialStep: (up_limit / 1024.0).round(), initialStep: (up_limit / 1024.0).round(),
@ -135,11 +133,9 @@ MochaUI.extend({
addDlLimitSlider: function(hashes) { addDlLimitSlider: function(hashes) {
if ($('dllimitSliderarea')) { if ($('dllimitSliderarea')) {
const windowOptions = MochaUI.Windows.windowOptions;
const sliderFirst = true;
// Get global upload limit // Get global upload limit
let maximum = 500; let maximum = 500;
const req = new Request({ new Request({
url: 'api/v2/transfer/downloadLimit', url: 'api/v2/transfer/downloadLimit',
method: 'post', method: 'post',
data: {}, data: {},
@ -162,7 +158,7 @@ MochaUI.extend({
let dl_limit = maximum; let dl_limit = maximum;
if (dl_limit < 0) dl_limit = 0; if (dl_limit < 0) dl_limit = 0;
maximum = 10000; maximum = 10000;
const mochaSlide = new Slider($('dllimitSliderarea'), $('dllimitSliderknob'), { new Slider($('dllimitSliderarea'), $('dllimitSliderknob'), {
steps: maximum, steps: maximum,
offset: 0, offset: 0,
initialStep: dl_limit.round(), initialStep: dl_limit.round(),
@ -188,7 +184,7 @@ MochaUI.extend({
} }
} }
else { else {
const req = new Request.JSON({ new Request.JSON({
url: 'api/v2/torrents/downloadLimit', url: 'api/v2/torrents/downloadLimit',
noCache : true, noCache : true,
method: 'post', method: 'post',
@ -204,7 +200,7 @@ MochaUI.extend({
break; break;
} }
if (dl_limit < 0) dl_limit = 0; if (dl_limit < 0) dl_limit = 0;
const mochaSlide = new Slider($('dllimitSliderarea'), $('dllimitSliderknob'), { new Slider($('dllimitSliderarea'), $('dllimitSliderknob'), {
steps: maximum, steps: maximum,
offset: 0, offset: 0,
initialStep: (dl_limit / 1024.0).round(), initialStep: (dl_limit / 1024.0).round(),

Loading…
Cancel
Save