Tobias Jeger pushed to branch feature/cmng-psp1 at cms-community / hippo-addon-channel-manager
Commits: 73dfbecb by Canh Ngo at 2016-04-05T15:34:13+02:00 CHANNELMGR-556: When deleting a component, it is not logical to reset it to the original state. Because the component has been removed, so the call to reset it is not necessary, which also causes 404. - - - - - 2 changed files: - frontend/src/main/resources/org/onehippo/cms7/channelmanager/channeleditor/ComponentPropertiesPanel.js - frontend/src/main/resources/org/onehippo/cms7/channelmanager/channeleditor/ComponentPropertiesWindow.js Changes: ===================================== frontend/src/main/resources/org/onehippo/cms7/channelmanager/channeleditor/ComponentPropertiesPanel.js ===================================== --- a/frontend/src/main/resources/org/onehippo/cms7/channelmanager/channeleditor/ComponentPropertiesPanel.js +++ b/frontend/src/main/resources/org/onehippo/cms7/channelmanager/channeleditor/ComponentPropertiesPanel.js @@ -108,8 +108,11 @@ this.fireEvent('onLoad'); }, - clearComponent: function () { - this._renderInitialComponentState(); + clearComponent: function (componentRemoved) { + if (!componentRemoved) { + // only re-render the initial state if the component is not removed + this._renderInitialComponentState(); + } this.hasComponent = false; }, ===================================== frontend/src/main/resources/org/onehippo/cms7/channelmanager/channeleditor/ComponentPropertiesWindow.js ===================================== --- a/frontend/src/main/resources/org/onehippo/cms7/channelmanager/channeleditor/ComponentPropertiesWindow.js +++ b/frontend/src/main/resources/org/onehippo/cms7/channelmanager/channeleditor/ComponentPropertiesWindow.js @@ -160,7 +160,7 @@ onComponentRemoved: function () { // clear recorded changes because the component has been removed. - this.componentPropertiesPanel.clearComponent(); + this.componentPropertiesPanel.clearComponent(true); } }); View it on GitLab: https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/73dfbecb9e195f05763d163bb110fb6fc8530a75
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn