update menu extras

This commit is contained in:
Rolux 2016-01-07 10:39:10 +05:30
parent e0857fc00d
commit 4019a987a6
2 changed files with 19 additions and 20 deletions

View file

@ -3,41 +3,38 @@
oml.ui.connectionButton = function() { oml.ui.connectionButton = function() {
var that = Ox.Element({ var that = Ox.Element({
tooltip: Ox._('Disconnected') tooltip: Ox._('Transfers')
}) })
.css({ .css({
marginRight: '3px' marginRight: '3px'
}) })
.bindEvent({ .bindEvent({
// ... click: function() {
oml.UI.set({page: 'transfers'});
}
}), }),
bandwidth;
/* bandwidth = Ox.Element()
oml.ui.statusIcon(oml.user) .addClass('OxLight')
.css({float: 'left'}) .css({
.appendTo(that); float: 'left',
*/ marginTop: '2px',
fontSize: '9px'
})
.html(formatBandwidth(0, 0))
.appendTo(that);
function formatBandwidth(up, down) { 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({ oml.bindEvent({
bandwidth: function(data) { bandwidth: function(data) {
bandwidth.html(formatBandwidth(data.up, data.down)); bandwidth.html(formatBandwidth(data.up, data.down));
} }
}); });
return that; return that;
}; };

View file

@ -9,7 +9,9 @@ oml.ui.notificationsButton = function() {
marginRight: '3px' marginRight: '3px'
}) })
.bindEvent({ .bindEvent({
// ... click: function() {
// ...
}
}); });
Ox.Button({ Ox.Button({