mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
6f929eee4a
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
21 lines
635 B
JavaScript
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;
|