mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-04 17:04:59 +03:00
parent
6ed629b410
commit
0a9bde7702
@ -75,6 +75,11 @@ var PostsController = Ember.ArrayController.extend(PaginationControllerMixin, {
|
||||
},
|
||||
|
||||
actions: {
|
||||
resetContentPreview: function () {
|
||||
$('.content-list').removeAttr('style');
|
||||
$('.content-preview').removeAttr('style');
|
||||
},
|
||||
|
||||
showContentPreview: function () {
|
||||
$('.content-list').animate({right: '100%', left: '-100%', 'margin-right': '15px'}, 300);
|
||||
$('.content-preview').animate({right: '0', left: '0', 'margin-left': '0'}, 300);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {responsiveAction} from 'ghost/utils/mobile';
|
||||
import {mobileQuery, responsiveAction} from 'ghost/utils/mobile';
|
||||
|
||||
var PostsView = Ember.View.extend({
|
||||
target: Ember.computed.alias('controller'),
|
||||
@ -8,6 +8,13 @@ var PostsView = Ember.View.extend({
|
||||
mobileInteractions: function () {
|
||||
Ember.run.scheduleOnce('afterRender', this, function () {
|
||||
var self = this;
|
||||
|
||||
$(window).resize(function () {
|
||||
if (!mobileQuery.matches) {
|
||||
self.send('resetContentPreview');
|
||||
}
|
||||
});
|
||||
|
||||
// ### Show content preview when swiping left on content list
|
||||
$('.manage').on('click', '.content-list ol li', function (event) {
|
||||
responsiveAction(event, '(max-width: 800px)', function () {
|
||||
|
Loading…
Reference in New Issue
Block a user