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
|
right: 10px
|
||||||
top: 8px
|
top: 8px
|
||||||
@include button
|
@include button
|
||||||
|
a.back
|
||||||
|
position: absolute
|
||||||
|
left: 10px
|
||||||
|
top: 8px
|
||||||
|
&:before
|
||||||
|
margin-right: 0.25em
|
||||||
|
@extend .icon
|
||||||
|
@extend .icon-chevron-left
|
||||||
|
@include button
|
||||||
&.show
|
&.show
|
||||||
top: 0
|
top: 0
|
||||||
header
|
header
|
||||||
|
|||||||
@ -44,6 +44,10 @@ var Library = can.Control.extend({
|
|||||||
this.nextPane();
|
this.nextPane();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
removePane: function(data) {
|
||||||
|
this.previousPane();
|
||||||
|
},
|
||||||
|
|
||||||
'a.close click': 'hide',
|
'a.close click': 'hide',
|
||||||
|
|
||||||
'route': function(data) {
|
'route': function(data) {
|
||||||
@ -53,9 +57,12 @@ var Library = can.Control.extend({
|
|||||||
':page route': function(data) {
|
':page route': function(data) {
|
||||||
if (data.page == 'library') {
|
if (data.page == 'library') {
|
||||||
this.show();
|
this.show();
|
||||||
if (data.show) {
|
if (data.pane > this.browser.currentPane) {
|
||||||
this.addPane(data);
|
this.addPane(data);
|
||||||
}
|
}
|
||||||
|
else if (data.pane < this.browser.currentPane) {
|
||||||
|
this.removePane(data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
<header>
|
<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>
|
<a class="close" href="#!">Close</a>
|
||||||
<h1><%= browser.attr('title') %></h1>
|
<h1><%= browser.attr('title') %></h1>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user