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