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', { App.registerBlockType('automatedLatestContent', {
blockModel: Module.AutomatedLatestContentBlockModel, blockModel: Module.AutomatedLatestContentBlockModel,
blockView: Module.AutomatedLatestContentBlockView, 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 = new Module.ALCSupervisor();
App._ALCSupervisor.refresh(); App._ALCSupervisor.refresh();
}); });

View File

@@ -94,8 +94,8 @@ define([
}, },
initialize: function() { initialize: function() {
this.on('showSettings', this.showSettings, this); this.on('showSettings', this.showSettings, this);
//this.on('dom:refresh', this.showBlock, this); this.on('dom:refresh', this.showBlock, this);
//this._isFirstRender = true; this._isFirstRender = true;
}, },
showTools: function(_event) { showTools: function(_event) {
if (!this.showingToolsDisabled) { if (!this.showingToolsDisabled) {
@@ -125,12 +125,12 @@ define([
return this.model.clone(); return this.model.clone();
}.bind(this); }.bind(this);
}, },
//showBlock: function() { showBlock: function() {
//if (this._isFirstRender) { if (this._isFirstRender) {
//this.transitionIn(); this.transitionIn();
//this._isFirstRender = false; this._isFirstRender = false;
//} }
//}, },
deleteBlock: function() { deleteBlock: function() {
this.transitionOut().then(function() { this.transitionOut().then(function() {
this.model.destroy(); 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', { App.registerBlockType('button', {
blockModel: Module.ButtonBlockModel, blockModel: Module.ButtonBlockModel,
blockView: Module.ButtonBlockView, 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', { App.registerBlockType('container', {
blockModel: Module.ContainerBlockModel, blockModel: Module.ContainerBlockModel,
blockView: Module.ContainerBlockView, 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', { App.registerBlockType('divider', {
blockModel: Module.DividerBlockModel, blockModel: Module.DividerBlockModel,
blockView: Module.DividerBlockView, 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', { App.registerBlockType('footer', {
blockModel: Module.FooterBlockModel, blockModel: Module.FooterBlockModel,
blockView: Module.FooterBlockView, 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', { App.registerBlockType('header', {
blockModel: Module.HeaderBlockModel, blockModel: Module.HeaderBlockModel,
blockView: Module.HeaderBlockView, blockView: Module.HeaderBlockView,

View File

@@ -365,7 +365,7 @@ define([
}); });
Module.ImageWidgetView = ImageWidgetView; Module.ImageWidgetView = ImageWidgetView;
App.on('before:start', function() { App.on('before:start', function(App, options) {
App.registerBlockType('image', { App.registerBlockType('image', {
blockModel: Module.ImageBlockModel, blockModel: Module.ImageBlockModel,
blockView: Module.ImageBlockView, 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', { App.registerBlockType('posts', {
blockModel: Module.PostsBlockModel, blockModel: Module.PostsBlockModel,
blockView: Module.PostsBlockView, 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', { App.registerBlockType('social', {
blockModel: Module.SocialBlockModel, blockModel: Module.SocialBlockModel,
blockView: Module.SocialBlockView, 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', { App.registerBlockType('spacer', {
blockModel: Module.SpacerBlockModel, blockModel: Module.SpacerBlockModel,
blockView: Module.SpacerBlockView, 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', { App.registerBlockType('text', {
blockModel: Module.TextBlockModel, blockModel: Module.TextBlockModel,
blockView: Module.TextBlockView, blockView: Module.TextBlockView,

View File

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