diff --git a/static/js/connectionButton.js b/static/js/connectionButton.js index 9c930e1..ae38c07 100644 --- a/static/js/connectionButton.js +++ b/static/js/connectionButton.js @@ -3,41 +3,38 @@ oml.ui.connectionButton = function() { var that = Ox.Element({ - tooltip: Ox._('Disconnected') + tooltip: Ox._('Transfers') }) .css({ marginRight: '3px' }) .bindEvent({ - // ... + click: function() { + oml.UI.set({page: 'transfers'}); + } }), - bandwidth; - /* - oml.ui.statusIcon(oml.user) - .css({float: 'left'}) - .appendTo(that); - */ + bandwidth = Ox.Element() + .addClass('OxLight') + .css({ + float: 'left', + marginTop: '2px', + fontSize: '9px' + }) + .html(formatBandwidth(0, 0)) + .appendTo(that); function formatBandwidth(up, down) { - return '↓'+Ox.formatValue(down, 'b')+' / ↑'+Ox.formatValue(up, 'b')+''; + return '↓ ' + Ox.formatValue(down, 'B') + + ' / ↑ ' + Ox.formatValue(up, 'B'); } - bandwidth = Ox.Element() - .addClass('OxLight') - .css({ - float: 'left', - marginTop: '2px', - fontSize: '9px' - }) - .html(formatBandwidth(0, 0)) - .appendTo(that); - oml.bindEvent({ bandwidth: function(data) { bandwidth.html(formatBandwidth(data.up, data.down)); } }); + return that; }; diff --git a/static/js/notificationsButton.js b/static/js/notificationsButton.js index 4360c0b..c4501fa 100644 --- a/static/js/notificationsButton.js +++ b/static/js/notificationsButton.js @@ -9,7 +9,9 @@ oml.ui.notificationsButton = function() { marginRight: '3px' }) .bindEvent({ - // ... + click: function() { + // ... + } }); Ox.Button({