0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/views/posts.js
Matt Enlow 6f929eee4a Emberify Posts mobile transitions
Closes #3950

- Fixed up event attachment and removal in a few mixins
- Renamed content-list-content-view to something more understandable
- simplify transition from posts.index to posts.post
2014-09-10 20:58:10 -06:00

21 lines
635 B
JavaScript

import {mobileQuery} from 'ghost/utils/mobile';
var PostsView = Ember.View.extend({
classNames: ['content-view-container'],
tagName: 'section',
resetMobileView: function (mq) {
if (!mq.matches) {
$('.js-content-list').removeAttr('style');
$('.js-content-preview').removeAttr('style');
}
},
attachResetMobileView: function () {
mobileQuery.addListener(this.resetMobileView);
}.on('didInsertElement'),
detachResetMobileView: function () {
mobileQuery.removeListener(this.resetMobileView);
}.on('willDestroyElement')
});
export default PostsView;