1
0
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:
Dan Barber 2014-01-08 15:02:44 +00:00
parent 2d8207ece4
commit 9b48cdad23
3 changed files with 26 additions and 3 deletions

View File

@ -4,4 +4,28 @@ can.Component.extend({
template: can.view('views/library.mustache'), 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);
}
}
}
}
}); });

View File

@ -4,8 +4,7 @@
//= require ./routes.js //= require ./routes.js
//= require_tree ./helpers/ //= require_tree ./helpers/
//= require_tree ./models/
//= require_tree ./controls/
//= require_tree ./constructs/ //= require_tree ./constructs/
//= require_tree ./models/
//= require_tree ./components/ //= require_tree ./components/
//= require ./application.js //= require ./application.js

View File

@ -1,2 +1,2 @@
can.route(':page'); can.route(':type');
can.route.ready(); can.route.ready();