mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-17 05:47:50 +00:00
fix the quick limits menus
fix displaying speeds with limits
This commit is contained in:
parent
dd866f07de
commit
51555cab83
@ -34,7 +34,7 @@ Copyright:
|
|||||||
|
|
||||||
deluge.menus = {
|
deluge.menus = {
|
||||||
onTorrentAction: function(item, e) {
|
onTorrentAction: function(item, e) {
|
||||||
var selection = Deluge.Torrents.getSelections();
|
var selection = deluge.torrents.getSelections();
|
||||||
var ids = [];
|
var ids = [];
|
||||||
Ext.each(selection, function(record) {
|
Ext.each(selection, function(record) {
|
||||||
ids.push(record.id);
|
ids.push(record.id);
|
||||||
@ -451,9 +451,9 @@ function onLimitChanged(item, checked) {
|
|||||||
} else {
|
} else {
|
||||||
config = {}
|
config = {}
|
||||||
config[item.group] = item.value
|
config[item.group] = item.value
|
||||||
Deluge.Client.core.set_config(config, {
|
deluge.client.core.set_config(config, {
|
||||||
success: function() {
|
success: function() {
|
||||||
Deluge.UI.update();
|
deluge.ui.update();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -92,8 +92,8 @@ Deluge.Statusbar = Ext.extend(Ext.ux.StatusBar, {
|
|||||||
var updateStat = function(name, config) {
|
var updateStat = function(name, config) {
|
||||||
var item = this.items.get('statusbar-' + name);
|
var item = this.items.get('statusbar-' + name);
|
||||||
if (config.limit.value > 0) {
|
if (config.limit.value > 0) {
|
||||||
var value = (config.value.formatter) ? config.value.formatter(config.value.value) : config.value.value;
|
var value = (config.value.formatter) ? config.value.formatter(config.value.value, true) : config.value.value;
|
||||||
var limit = (config.limit.formatter) ? config.limit.formatter(config.limit.value) : config.limit.value;
|
var limit = (config.limit.formatter) ? config.limit.formatter(config.limit.value, true) : config.limit.value;
|
||||||
var str = String.format(config.format, value, limit);
|
var str = String.format(config.format, value, limit);
|
||||||
} else {
|
} else {
|
||||||
var str = (config.value.formatter) ? config.value.formatter(config.value.value, true) : config.value.value;
|
var str = (config.value.formatter) ? config.value.formatter(config.value.value, true) : config.value.value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user