Ox.load('UI', function() {
var current,
columns = [
{
id: 'state',
title: '+',
visible: true,
width: 16,
operator: '+',
format: function(value, data) {
return $('')
.attr({
src: Ox.UI.getImageURL('symbol' + {
'available': 'Play',
'playing': 'Pause',
'downloading': 'Sync',
'': 'Down',
}[value])
})
.css({
width: '10px',
height: '10px',
padding: '3px',
});
}
},
{
id: 'id',
title: 'ID',
visible: true,
width: 48,
operator: '+',
},
{
id: 'title',
title: 'Title',
visible: true,
width: 512,
operator: '+',
},
{
id: 'size',
title: 'Size',
visible: true,
width: 72,
operator: '+',
format: function(value) {
return Ox.formatValue(value, 'b');
}
},
{
id: 'extension',
title: 'Extension',
visible: true,
width: 48,
operator: '+',
},
{
id: 'info',
title: 'Info',
visible: true,
width: 200,
operator: '+',
format: function(value) {
return value || '';
}
},
];
window.app = Ox.App({
name: 'lsd',
url: '/api/'
}).bindEvent({
load: function(data) {
window.app.local = Ox.API({
url: 'http://127.0.0.1:15550/api/'
}, function() {
if (!data.user) {
signupDialog();
return;
}
app._seed = setInterval(function() {
app.local.seedRequests({});
}, 60000);
app.local.config({});
app.$player = $('