Ghost/core/client/views/post-item-view.js
Matt Enlow 09fb17a2be Abstract mobile transition interactions
Closes #4032
- Created "mobile" views: `parent-view`, `content-view` and `index-view`
- `mobile/parent-view` has three callbacks for managing layout, and a mediaQuery listener to keep in sync with the user
- content-view and index-view use their parent-views callbacks to bring themselves into and out of the viewport as appropriate
- fixed media queries for post content list from 800px to 900px
- Created `mobile-index-route` to intelligently transition to a new route on desktops (used by both PostsIndexRoute and SettingsIndexRoute)
- Extract mobile interactions from settings views to new mobile utility views
- `js-` prefixed settings view transitions
- removed unused openEditor action from PostsRoute
- removed unused mobile util "responsiveAction"
2014-09-16 07:28:03 -06:00

21 lines
488 B
JavaScript

import itemView from 'ghost/views/item-view';
var PostItemView = itemView.extend({
classNameBindings: ['isFeatured:featured', 'isPage:page'],
isFeatured: Ember.computed.alias('controller.model.featured'),
isPage: Ember.computed.alias('controller.model.page'),
doubleClick: function () {
this.get('controller').send('openEditor');
},
click: function () {
this.get('controller').send('showPostContent');
}
});
export default PostItemView;