mirror of
https://github.com/danbee/mpd-client
synced 2025-03-04 08:39:09 +00:00
28 lines
453 B
JavaScript
28 lines
453 B
JavaScript
var Library = can.Control.extend({
|
|
|
|
init: function(element, options) {
|
|
this.element = element
|
|
element.html(
|
|
can.view('views/library.ejs')
|
|
);
|
|
},
|
|
|
|
show: function() {
|
|
$(this.element).addClass('show');
|
|
},
|
|
|
|
hide: function() {
|
|
$(this.element).removeClass('show');
|
|
},
|
|
|
|
'a.close click': 'hide',
|
|
|
|
':page route': function(data) {
|
|
console.log(data);
|
|
if (data.page == 'library') {
|
|
this.show();
|
|
}
|
|
}
|
|
|
|
});
|