mirror of
https://github.com/danbee/mpd-client
synced 2025-03-04 08:39:09 +00:00
Library now pops up.
This commit is contained in:
parent
2d8207ece4
commit
9b48cdad23
@ -4,4 +4,28 @@ can.Component.extend({
|
||||
|
||||
template: can.view('views/library.mustache'),
|
||||
|
||||
events: {
|
||||
show: function() {
|
||||
$(this.element).addClass('show');
|
||||
},
|
||||
|
||||
hide: function() {
|
||||
$(this.element).removeClass('show');
|
||||
},
|
||||
|
||||
'a.close click': 'hide',
|
||||
|
||||
':type route': function(data) {
|
||||
if (data.type == 'library') {
|
||||
this.show();
|
||||
if (data.pane > this.browser.currentPane) {
|
||||
this.addPane(data);
|
||||
}
|
||||
else if (data.pane < this.browser.currentPane) {
|
||||
this.removePane(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@ -4,8 +4,7 @@
|
||||
|
||||
//= require ./routes.js
|
||||
//= require_tree ./helpers/
|
||||
//= require_tree ./models/
|
||||
//= require_tree ./controls/
|
||||
//= require_tree ./constructs/
|
||||
//= require_tree ./models/
|
||||
//= require_tree ./components/
|
||||
//= require ./application.js
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
can.route(':page');
|
||||
can.route(':type');
|
||||
can.route.ready();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user