mirror of
https://github.com/danbee/mpd-client
synced 2025-03-04 08:39:09 +00:00
Remove old control files for queue and transport.
This commit is contained in:
parent
ecdc1c8983
commit
a8e5488078
@ -1,26 +0,0 @@
|
||||
var Queue = can.Control.extend({
|
||||
|
||||
init: function(element, options) {
|
||||
element.html(
|
||||
can.view('views/queue.ejs', {
|
||||
queueSongs: options.queueSongs,
|
||||
status: options.status
|
||||
},
|
||||
{ formatLength: timeHelpers.formatLength }
|
||||
));
|
||||
},
|
||||
|
||||
playSong: function(pos) {
|
||||
can.ajax({
|
||||
url: '/api/control/play',
|
||||
data: { pos: pos },
|
||||
type: 'PUT'
|
||||
});
|
||||
},
|
||||
|
||||
'li click': function(element, event) {
|
||||
var pos = $(element).data('pos');
|
||||
this.playSong(pos);
|
||||
}
|
||||
|
||||
});
|
||||
@ -1,30 +0,0 @@
|
||||
var Transport = can.Control.extend({
|
||||
|
||||
init: function(element, options) {
|
||||
this.status = options.status;
|
||||
element.html(
|
||||
can.view(
|
||||
'views/transport.ejs', { status: this.status },
|
||||
{ formatLength: timeHelpers.formatLength }
|
||||
)
|
||||
);
|
||||
},
|
||||
|
||||
updateStatus: function(status) {
|
||||
this.status.attr(status);
|
||||
},
|
||||
|
||||
sendCommand: function(command) {
|
||||
can.ajax({
|
||||
url: '/api/control/' + command,
|
||||
type: 'PUT'
|
||||
});
|
||||
},
|
||||
|
||||
'button click': function(element, event) {
|
||||
var command = $(element).data('command');
|
||||
this.sendCommand(command);
|
||||
$(element).blur();
|
||||
}
|
||||
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user