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
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'), }.observes('model.title', 'category'),
@computed('site.mobileView', 'model.posts_count')
showSelectedPostsAtBottom(mobileView, postsCount) {
return mobileView && (postsCount > 3);
},
@computed('model.postStream.posts') @computed('model.postStream.posts')
postsToRender() { postsToRender() {
return this.capabilities.isAndroid ? this.get('model.postStream.posts') return this.capabilities.isAndroid ? this.get('model.postStream.posts')

View File

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

View File

@@ -1,9 +1,4 @@
export default Ember.View.extend({ export default Ember.View.extend({
elementId: 'selected-posts', classNameBindings: ['controller.multiSelect::hidden', ':selected-posts'],
classNameBindings: ['customVisibility'],
templateName: "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; clear: both;
} }
#selected-posts { .selected-posts {
width: 200px; width: 200px;
position: fixed; position: fixed;
z-index: 1000; z-index: 1000;

View File

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