Fix App activation calls, fix block insertion animations

This commit is contained in:
Tautvidas Sipavičius
2017-04-14 14:22:00 +03:00
parent 92b128039a
commit 592f11bd5f
13 changed files with 21 additions and 21 deletions

View File

@@ -377,7 +377,7 @@ define([
},
});
App.on('before:start', function() {
App.on('before:start', function(App, options) {
App.registerBlockType('automatedLatestContent', {
blockModel: Module.AutomatedLatestContentBlockModel,
blockView: Module.AutomatedLatestContentBlockView,
@@ -390,7 +390,7 @@ define([
});
});
App.on('start', function() {
App.on('start', function(App, options) {
App._ALCSupervisor = new Module.ALCSupervisor();
App._ALCSupervisor.refresh();
});

View File

@@ -94,8 +94,8 @@ define([
},
initialize: function() {
this.on('showSettings', this.showSettings, this);
//this.on('dom:refresh', this.showBlock, this);
//this._isFirstRender = true;
this.on('dom:refresh', this.showBlock, this);
this._isFirstRender = true;
},
showTools: function(_event) {
if (!this.showingToolsDisabled) {
@@ -125,12 +125,12 @@ define([
return this.model.clone();
}.bind(this);
},
//showBlock: function() {
//if (this._isFirstRender) {
//this.transitionIn();
//this._isFirstRender = false;
//}
//},
showBlock: function() {
if (this._isFirstRender) {
this.transitionIn();
this._isFirstRender = false;
}
},
deleteBlock: function() {
this.transitionOut().then(function() {
this.model.destroy();

View File

@@ -133,7 +133,7 @@ define([
},
});
App.on('before:start', function() {
App.on('before:start', function(App, options) {
App.registerBlockType('button', {
blockModel: Module.ButtonBlockModel,
blockView: Module.ButtonBlockView,

View File

@@ -387,7 +387,7 @@ define([
},
});
App.on('before:start', function() {
App.on('before:start', function(App, options) {
App.registerBlockType('container', {
blockModel: Module.ContainerBlockModel,
blockView: Module.ContainerBlockView,

View File

@@ -140,7 +140,7 @@ define([
}
},
});
App.on('before:start', function() {
App.on('before:start', function(App, options) {
App.registerBlockType('divider', {
blockModel: Module.DividerBlockModel,
blockView: Module.DividerBlockView,

View File

@@ -116,7 +116,7 @@ define([
},
});
App.on('before:start', function() {
App.on('before:start', function(App, options) {
App.registerBlockType('footer', {
blockModel: Module.FooterBlockModel,
blockView: Module.FooterBlockView,

View File

@@ -116,7 +116,7 @@ define([
},
});
App.on('before:start', function() {
App.on('before:start', function(App, options) {
App.registerBlockType('header', {
blockModel: Module.HeaderBlockModel,
blockView: Module.HeaderBlockView,

View File

@@ -365,7 +365,7 @@ define([
});
Module.ImageWidgetView = ImageWidgetView;
App.on('before:start', function() {
App.on('before:start', function(App, options) {
App.registerBlockType('image', {
blockModel: Module.ImageBlockModel,
blockView: Module.ImageBlockView,

View File

@@ -520,7 +520,7 @@ define([
},
});
App.on('before:start', function() {
App.on('before:start', function(App, options) {
App.registerBlockType('posts', {
blockModel: Module.PostsBlockModel,
blockView: Module.PostsBlockView,

View File

@@ -389,7 +389,7 @@ define([
},
});
App.on('before:start', function() {
App.on('before:start', function(App, options) {
App.registerBlockType('social', {
blockModel: Module.SocialBlockModel,
blockView: Module.SocialBlockView,

View File

@@ -87,7 +87,7 @@ define([
},
});
App.on('before:start', function() {
App.on('before:start', function(App, options) {
App.registerBlockType('spacer', {
blockModel: Module.SpacerBlockModel,
blockView: Module.SpacerBlockView,

View File

@@ -100,7 +100,7 @@ define([
},
});
App.on('before:start', function() {
App.on('before:start', function(App, options) {
App.registerBlockType('text', {
blockModel: Module.TextBlockModel,
blockView: Module.TextBlockView,

View File

@@ -67,7 +67,7 @@ define([
return _.filter(blocks, predicate);
};
App.on('before:start', function(options) {
App.on('before:start', function(App, options) {
// Expose block methods globally
App.registerBlockType = Module.registerBlockType;
App.getBlockTypeModel = Module.getBlockTypeModel;