rename menu extras
This commit is contained in:
parent
dc3d59ca42
commit
9fe7bcecbf
3 changed files with 4 additions and 4 deletions
40
static/js/transferButton.js
Normal file
40
static/js/transferButton.js
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
'use strict';
|
||||
|
||||
oml.ui.transferButton = function() {
|
||||
|
||||
var that = Ox.Element({
|
||||
tooltip: Ox._('Transfers')
|
||||
})
|
||||
.css({
|
||||
marginRight: '6px'
|
||||
})
|
||||
.bindEvent({
|
||||
click: function() {
|
||||
oml.UI.set({page: 'transfers'});
|
||||
}
|
||||
}),
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
oml.bindEvent({
|
||||
bandwidth: function(data) {
|
||||
bandwidth.html(formatBandwidth(data.up, data.down));
|
||||
}
|
||||
});
|
||||
|
||||
return that;
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue