audio player example: cleanup

This commit is contained in:
rolux 2012-12-11 22:50:12 +01:00
parent f2b2547db2
commit 1ad54a06d5

View file

@ -427,7 +427,7 @@ Ox.load('UI', function() {
.attr({id: 'findSelect'}) .attr({id: 'findSelect'})
.bindEvent({ .bindEvent({
change: function(data) { change: function(data) {
$findLabel.options({title: data.title}); app.$ui.findLabel.options({title: data.title});
} }
}); });
}; };
@ -546,6 +546,7 @@ Ox.load('UI', function() {
var $element = Ox.TableList({ var $element = Ox.TableList({
columns: app.site.listColumns, columns: app.site.listColumns,
items: app.user.lists, items: app.user.lists,
keys: ['query'],
max: 1, max: 1,
selected: [app.user.ui.list], selected: [app.user.ui.list],
sort: [{key: 'index', operator: '+'}], sort: [{key: 'index', operator: '+'}],
@ -554,7 +555,7 @@ Ox.load('UI', function() {
}) })
.bindEvent({ .bindEvent({
move: function(data) { move: function(data) {
Ox.print('MOVE:', data); // ...
}, },
select: function(data) { select: function(data) {
app.UI.set({list: data.ids[0] || app.site.lists[0].id}); app.UI.set({list: data.ids[0] || app.site.lists[0].id});
@ -719,7 +720,6 @@ Ox.load('UI', function() {
}); });
$element.update = function() { $element.update = function() {
app.utils.getTrackAlbums(function(albums) { app.utils.getTrackAlbums(function(albums) {
Ox.print('ALBUMS::::', albums)
$element.options({items: albums}); $element.options({items: albums});
}); });
return $element; return $element;
@ -744,7 +744,7 @@ Ox.load('UI', function() {
init: function(data) { init: function(data) {
app.$ui.statusText.update(data); app.$ui.statusText.update(data);
app.utils.getTrackAlbums(function(data) { app.utils.getTrackAlbums(function(data) {
Ox.print('::::', data); // ...
}); });
}, },
open: function(data) { open: function(data) {
@ -770,7 +770,6 @@ Ox.load('UI', function() {
app.UI.set({selectedTrack: data.ids}); app.UI.set({selectedTrack: data.ids});
}, },
sort: function(data) { sort: function(data) {
Ox.print('DDD', data);
app.UI.set({sort: [data]}); app.UI.set({sort: [data]});
} }
}); });
@ -984,7 +983,6 @@ Ox.load('UI', function() {
$panel.options({width: data.size}) $panel.options({width: data.size})
}, },
select: function(data) { select: function(data) {
Ox.print('SELECT::', data)
app.UI.set( app.UI.set(
'selected' + Ox.toTitleCase(data.id.slice(0, -1)), 'selected' + Ox.toTitleCase(data.id.slice(0, -1)),
data.ids data.ids