0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/client/views/posts.js

22 lines
635 B
JavaScript
Raw Normal View History

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;