|
|
@ -27,7 +27,7 @@ myTable = new dynamicTable(); |
|
|
|
var updatePropertiesPanel = function(){}; |
|
|
|
var updatePropertiesPanel = function(){}; |
|
|
|
var updateTransferInfo = function(){}; |
|
|
|
var updateTransferInfo = function(){}; |
|
|
|
var updateTransferList = function(){}; |
|
|
|
var updateTransferList = function(){}; |
|
|
|
var alternativeSpeedsLimit = false; |
|
|
|
var alternativeSpeedLimits = false; |
|
|
|
|
|
|
|
|
|
|
|
var stateToImg = function (state) { |
|
|
|
var stateToImg = function (state) { |
|
|
|
if (state == "pausedUP" || state == "pausedDL") { |
|
|
|
if (state == "pausedUP" || state == "pausedDL") { |
|
|
@ -297,25 +297,25 @@ window.addEvent('load', function () { |
|
|
|
new Request({url: 'command/alternativeSpeedLimitsEnabled', |
|
|
|
new Request({url: 'command/alternativeSpeedLimitsEnabled', |
|
|
|
method: 'get', |
|
|
|
method: 'get', |
|
|
|
onSuccess : function (isEnabled) { |
|
|
|
onSuccess : function (isEnabled) { |
|
|
|
alternativeSpeedsLimit = !!parseInt(isEnabled); |
|
|
|
alternativeSpeedLimits = !!parseInt(isEnabled); |
|
|
|
if (alternativeSpeedsLimit) |
|
|
|
if (alternativeSpeedLimits) |
|
|
|
$('alternativeSpeedLimits').src = "images/slow.png" |
|
|
|
$('alternativeSpeedLimits').src = "images/slow.png" |
|
|
|
} |
|
|
|
} |
|
|
|
}).send(); |
|
|
|
}).send(); |
|
|
|
|
|
|
|
|
|
|
|
$('alternativeSpeedLimits').addEvent('click', function() { |
|
|
|
$('alternativeSpeedLimits').addEvent('click', function() { |
|
|
|
// Change icon immediately to give some feedback
|
|
|
|
// Change icon immediately to give some feedback
|
|
|
|
updateAltSpeedIcon(!alternativeSpeedsLimit); |
|
|
|
updateAltSpeedIcon(!alternativeSpeedLimits); |
|
|
|
|
|
|
|
|
|
|
|
new Request({url: 'command/toggleAlternativeSpeedLimits', |
|
|
|
new Request({url: 'command/toggleAlternativeSpeedLimits', |
|
|
|
method: 'post', |
|
|
|
method: 'post', |
|
|
|
onComplete: function() { |
|
|
|
onComplete: function() { |
|
|
|
alternativeSpeedsLimit = !alternativeSpeedsLimit; |
|
|
|
alternativeSpeedLimits = !alternativeSpeedLimits; |
|
|
|
updateTransferInfo(); |
|
|
|
updateTransferInfo(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
onFailure: function() { |
|
|
|
onFailure: function() { |
|
|
|
// Restore icon in case of failure
|
|
|
|
// Restore icon in case of failure
|
|
|
|
updateAltSpeedIcon(alternativeSpeedsLimit) |
|
|
|
updateAltSpeedIcon(alternativeSpeedLimits) |
|
|
|
} |
|
|
|
} |
|
|
|
}).send(); |
|
|
|
}).send(); |
|
|
|
}); |
|
|
|
}); |
|
|
|