UX: Show the selected posts controls at the bottom of mobile topics too

This commit is contained in:
Robin Ward 2016-04-08 15:25:52 -04:00
parent ab0c6e69e9
commit 038a5a0767
No known key found for this signature in database
GPG Key ID: 0E091E2B4ED1B83D
5 changed files with 13 additions and 9 deletions

View File

@ -34,6 +34,11 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, {
}
}.observes('model.title', 'category'),
@computed('site.mobileView', 'model.posts_count')
showSelectedPostsAtBottom(mobileView, postsCount) {
return mobileView && (postsCount > 3);
},
@computed('model.postStream.posts')
postsToRender() {
return this.capabilities.isAndroid ? this.get('model.postStream.posts')

View File

@ -130,6 +130,10 @@
</div>
{{/if}}
{{#if showSelectedPostsAtBottom}}
{{view "selected-posts"}}
{{/if}}
{{plugin-outlet "topic-above-suggested"}}
{{#if model.details.suggested_topics.length}}

View File

@ -1,9 +1,4 @@
export default Ember.View.extend({
elementId: 'selected-posts',
classNameBindings: ['customVisibility'],
classNameBindings: ['controller.multiSelect::hidden', ':selected-posts'],
templateName: "selected-posts",
customVisibility: function() {
if (!this.get('controller.multiSelect')) return 'hidden';
}.property('controller.multiSelect')
});

View File

@ -805,7 +805,7 @@ $topic-avatar-width: 45px;
clear: both;
}
#selected-posts {
.selected-posts {
width: 200px;
position: fixed;
z-index: 1000;

View File

@ -417,9 +417,9 @@ iframe {
right: 4px;
}
#selected-posts {
.selected-posts {
width: 97%;
padding-left: 3%;
padding: 0.1em 0.7em;
background-color: srgb-scale($tertiary, $secondary, 15%);
.btn {
margin-bottom: 10px;