mirror of
https://github.com/danbee/mpd-client
synced 2025-03-04 08:39:09 +00:00
Add back button. Just needs plumbing in.
This commit is contained in:
parent
9b99eb80ed
commit
ff3bb3bdec
@ -16,6 +16,15 @@
|
||||
right: 10px
|
||||
top: 8px
|
||||
@include button
|
||||
a.back
|
||||
position: absolute
|
||||
left: 10px
|
||||
top: 8px
|
||||
&:before
|
||||
margin-right: 0.25em
|
||||
@extend .icon
|
||||
@extend .icon-chevron-left
|
||||
@include button
|
||||
&.show
|
||||
top: 0
|
||||
header
|
||||
|
||||
@ -44,6 +44,10 @@ var Library = can.Control.extend({
|
||||
this.nextPane();
|
||||
},
|
||||
|
||||
removePane: function(data) {
|
||||
this.previousPane();
|
||||
},
|
||||
|
||||
'a.close click': 'hide',
|
||||
|
||||
'route': function(data) {
|
||||
@ -53,9 +57,12 @@ var Library = can.Control.extend({
|
||||
':page route': function(data) {
|
||||
if (data.page == 'library') {
|
||||
this.show();
|
||||
if (data.show) {
|
||||
if (data.pane > this.browser.currentPane) {
|
||||
this.addPane(data);
|
||||
}
|
||||
else if (data.pane < this.browser.currentPane) {
|
||||
this.removePane(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
<header>
|
||||
<% if (browser.attr('currentPane') > 0) { %>
|
||||
<%== can.route.link('Back', { page: 'library', pane: browser.attr('currentPane') - 1 }, { class: 'back' }) %>
|
||||
<% } %>
|
||||
<a class="close" href="#!">Close</a>
|
||||
<h1><%= browser.attr('title') %></h1>
|
||||
</header>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user