[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Pushed new branch feature/visual-editing-psp2-CHANNELMGR-1236
Arthur Bogaart pushed new branch feature/visual-editing-psp2-CHANNELMGR-1236 at cms-community / hippo-addon-channel-manager ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit][feature/wpm] HSTTWO-3930 Revert update of the cms and repository wpm versions. The related br…
Arent-Jan Banck pushed to branch feature/wpm at cms-community / hippo-site-toolkit Commits: ce9a14be by Arent-Jan Banck at 2017-04-18T22:35:02+02:00 HSTTWO-3930 Revert update of the cms and repository wpm versions. The related branches no longer exists. - - - - - 1 changed file: - pom.xml Changes: = pom.xml = --- a/pom.xml +++ b/pom.xml @@ -84,8 +84,8 @@ 2.14.0-h1-SNAPSHOT 4.0.0-SNAPSHOT -5.0.0-wpm-SNAPSHOT -5.0.0-wpm-SNAPSHOT +5.0.0-SNAPSHOT +5.0.0-SNAPSHOT 4.0.0-SNAPSHOT 4.0.0-SNAPSHOT 4.0.0-SNAPSHOT View it on GitLab: https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/ce9a14be34026164c2d708eae96a7f63c8646b95 ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-cms] Pushed new branch bugfix/CMS-10695
Joeri de Gooijer pushed new branch bugfix/CMS-10695 at cms-community / hippo-cms ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit][feature/wpm] HSTTWO-3930 set correct wpm version
Ard Schrijvers pushed to branch feature/wpm at cms-community / hippo-site-toolkit Commits: 452f8ce7 by Ard Schrijvers at 2017-04-18T17:39:07+02:00 HSTTWO-3930 set correct wpm version - - - - - 30 changed files: - api/pom.xml - client-modules/cms-rest/pom.xml - client-modules/google-analytics/hst/pom.xml - client-modules/google-analytics/pom.xml - client-modules/google-analytics/repository/pom.xml - client-modules/page-composer/pom.xml - client-modules/pom.xml - client/pom.xml - cms-restapi/pom.xml - commons/pom.xml - components/core/pom.xml - components/jaxrs/pom.xml - components/pom.xml - components/resourcebundle-cnd/pom.xml - components/resourcebundle/pom.xml - components/restapi/pom.xml - components/rewriter/pom.xml - components/security/pom.xml - components/session-pool/pom.xml - content-beans/pom.xml - dependencies/client-dependencies/pom.xml - dependencies/cms-dependencies/pom.xml - dependencies/pom.xml - dependencies/repository-dependencies/pom.xml - dependencies/server-dependencies/pom.xml - dependencies/spring-dependencies/pom.xml - integration/pom.xml - integration/tests/pom.xml - integration/war/pom.xml - mock/pom.xml The diff was not included because it is too large. View it on GitLab: https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/452f8ce76c29abb642e671de401a3534405d3fd3 ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit][feature/wpm] HSTTWO-3959 correct setter
Ard Schrijvers pushed to branch feature/wpm at cms-community / hippo-site-toolkit Commits: c501cb29 by Ard Schrijvers at 2017-04-18T17:37:28+02:00 HSTTWO-3959 correct setter - - - - - 1 changed file: - api/src/main/java/org/hippoecm/hst/configuration/channel/Channel.java Changes: = api/src/main/java/org/hippoecm/hst/configuration/channel/Channel.java = --- a/api/src/main/java/org/hippoecm/hst/configuration/channel/Channel.java +++ b/api/src/main/java/org/hippoecm/hst/configuration/channel/Channel.java @@ -328,7 +328,7 @@ public class Channel implements Serializable { return workspaceExists; } -public void setWorkSpaceExists(final boolean workspaceExists) { +public void setWorkspaceExists(final boolean workspaceExists) { this.workspaceExists = workspaceExists; } View it on GitLab: https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/c501cb29076e3375d913772c1a9690cb237cd5d0 ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit][feature/wpm] HSTTWO-3959 Load channel nodes from below the hst:configuration node instead of below hst:channels
Ard Schrijvers pushed to branch feature/wpm at cms-community / hippo-site-toolkit Commits: bd48e3ff by Ard Schrijvers at 2017-04-18T17:17:06+02:00 HSTTWO-3959 Load channel nodes from below the hst:configuration node instead of below hst:channels Note : Unit and integration tests still need to be fixed With this refactoring, channel nodes are from now on stored below the hst configuration, for example instead of + hst:hst + hst:channels | + myproject | | + hst:channelinfo + hst:configurations + myproject as + hst:hst + hst:channels + hst:configurations + myproject + hst:channel + hst:channelinfo note that the /hst:hst/hst:channels node for now I kept, because based on this node, a cms user is webmaster or admin on channels. Next this, I also added support for hst:channel inheritance: Aka, if the hst:configuration is inherited from another channel, the channel info is also inherited. In this case the channel settings in the channel manager are not editable. Also, the hst:channel node has to be in the hst:workspace to be editable! Thus even if the hst:channel is not inherited, its settings are only editable if the channel info node is in the hst:workspace, thus as follows: + hst:hst + hst:channels + hst:configurations + myproject + hst:workspace + hst:channel + hst:channelinfo Since the hst:channel loading has now been completely changed, also caching is fixed: Aka, channel loading now piggy backs on the same caching and invalidation mechanism as other hst configuration objects. Another improvement that has been done is the general hst preview creation: When creating a preview, we only copy the hst:workspace from now on to preview, and have the preview extend the live. Thus for example before we had: + hst:hst + hst:configurations + common + myproject (hst:inheritsfrom = ../common) | + hst:sitemap | + hst:pages | + hst:components | + hst:templates | + hst:workspace + myproject-preview (hst:inheritsfrom = ../common) + hst:sitemap + hst:pages + hst:components + hst:templates + hst:workspace >From now on we have: + hst:hst + hst:configurations + common + myproject (hst:inheritsfrom = ../common) | + hst:sitemap | + hst:pages | + hst:components | + hst:templates | + hst:workspace + myproject-preview (hst:inheritsfrom = ../myproject) + hst:workspace Note the preview inheriting from ../myproject (thus live!) - - - - - 30 changed files: - api/src/main/java/org/hippoecm/hst/configuration/HstNodeTypes.java - api/src/main/java/org/hippoecm/hst/configuration/channel/Channel.java - api/src/main/java/org/hippoecm/hst/configuration/hosting/Mount.java - api/src/main/java/org/hippoecm/hst/configuration/hosting/MutableMount.java - api/src/main/java/org/hippoecm/hst/configuration/internal/ContextualizableMount.java - api/src/main/java/org/hippoecm/hst/configuration/site/HstSite.java - client-modules/cms-rest/src/main/java/org/hippoecm/hst/cmsrest/services/ChannelsResource.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/AbstractConfigResource.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/ChannelServiceImpl.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/RootResource.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/AbstractHelper.java - + client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/ChannelHelper.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/ContainerHelper.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/ContainerItemHelper.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/PagesHelper.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/SiteMapHelper.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/SiteMenuHelper.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/SiteMenuItemHelper.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/TemplateHelper.java - client-modules/page-composer/src/main/resources/org/hippoecm/hst/pagecomposer/SpringComponentManager-pagecomposer.xml - commons/src/main/java/org/hippoecm/hst/core/hosting/CustomMountAndVirtualCmsHostAugmenter.java - commons/src/main/java/org/hippoecm/hst/core/hosting/CustomMountAndVirtualHostAugmenter.java -
[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit] Pushed new branch feature/wpm
Ard Schrijvers pushed new branch feature/wpm at cms-community / hippo-site-toolkit ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit][feature/wpm-HSTTWO-3957] HSTTWO-3959 Load channel nodes from below the hst:configuration node instead of below hst:channels
Ard Schrijvers pushed to branch feature/wpm-HSTTWO-3957 at cms-community / hippo-site-toolkit Commits: 8a37a10f by Ard Schrijvers at 2017-04-18T17:01:43+02:00 HSTTWO-3959 Load channel nodes from below the hst:configuration node instead of below hst:channels Note : Unit and integration tests still need to be fixed With this refactoring, channel nodes are from now on stored below the hst configuration, for example instead of + hst:hst + hst:channels | + myproject | | + hst:channelinfo + hst:configurations + myproject as + hst:hst + hst:channels + hst:configurations + myproject + hst:channel + hst:channelinfo note that the /hst:hst/hst:channels node for now I kept, because based on this node, a cms user is webmaster or admin on channels. Next this, I also added support for hst:channel inheritance: Aka, if the hst:configuration is inherited from another channel, the channel info is also inherited. In this case the channel settings in the channel manager are not editable. Also, the hst:channel node has to be in the hst:workspace to be editable! Thus even if the hst:channel is not inherited, its settings are only editable if the channel info node is in the hst:workspace, thus as follows: + hst:hst + hst:channels + hst:configurations + myproject + hst:workspace + hst:channel + hst:channelinfo Since the hst:channel loading has now been completely changed, also caching is fixed: Aka, channel loading now piggy backs on the same caching and invalidation mechanism as other hst configuration objects. Another improvement that has been done is the general hst preview creation: When creating a preview, we only copy the hst:workspace from now on to preview, and have the preview extend the live. Thus for example before we had: + hst:hst + hst:configurations + common + myproject (hst:inheritsfrom = ../common) | + hst:sitemap | + hst:pages | + hst:components | + hst:templates | + hst:workspace + myproject-preview (hst:inheritsfrom = ../common) + hst:sitemap + hst:pages + hst:components + hst:templates + hst:workspace >From now on we have: + hst:hst + hst:configurations + common + myproject (hst:inheritsfrom = ../common) | + hst:sitemap | + hst:pages | + hst:components | + hst:templates | + hst:workspace + myproject-preview (hst:inheritsfrom = ../myproject) + hst:workspace Note the preview inheriting from ../myproject (thus live!) - - - - - 30 changed files: - api/src/main/java/org/hippoecm/hst/configuration/HstNodeTypes.java - api/src/main/java/org/hippoecm/hst/configuration/channel/Channel.java - api/src/main/java/org/hippoecm/hst/configuration/hosting/Mount.java - api/src/main/java/org/hippoecm/hst/configuration/hosting/MutableMount.java - api/src/main/java/org/hippoecm/hst/configuration/internal/ContextualizableMount.java - api/src/main/java/org/hippoecm/hst/configuration/site/HstSite.java - client-modules/cms-rest/src/main/java/org/hippoecm/hst/cmsrest/services/ChannelsResource.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/AbstractConfigResource.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/ChannelServiceImpl.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/RootResource.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/AbstractHelper.java - + client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/ChannelHelper.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/ContainerHelper.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/ContainerItemHelper.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/PagesHelper.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/SiteMapHelper.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/SiteMenuHelper.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/SiteMenuItemHelper.java - client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/helpers/TemplateHelper.java - client-modules/page-composer/src/main/resources/org/hippoecm/hst/pagecomposer/SpringComponentManager-pagecomposer.xml - commons/src/main/java/org/hippoecm/hst/core/hosting/CustomMountAndVirtualCmsHostAugmenter.java - commons/src/main/java/org/hippoecm/hst/core/hosting/CustomMountAndVirtualHostAugmenter.java -
[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Deleted branch feature/visual-editing-psp2-CHANNELMGR-1237
Mathijs den Burger deleted branch feature/visual-editing-psp2-CHANNELMGR-1237 at cms-community / hippo-addon-channel-manager ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/visual-editing-psp2] CHANNELMGR-254 Add missing license header
Arthur Bogaart pushed to branch feature/visual-editing-psp2 at cms-community / hippo-addon-channel-manager Commits: 4c595727 by Arthur Bogaart at 2017-04-18T16:51:04+02:00 CHANNELMGR-254 Add missing license header - - - - - 1 changed file: - content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/FieldType.java Changes: = content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/FieldType.java = --- a/content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/FieldType.java +++ b/content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/FieldType.java @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Hippo B.V. (http://www.onehippo.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.onehippo.cms.channelmanager.content.documenttype.field.type; import java.util.List; View it on GitLab: https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/4c5957275236c148a102878885eaf48a0032eff7 ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/visual-editing-psp2] CHANNELMGR-1238 Added yarn.lock to apache-rat excludes
Arthur Bogaart pushed to branch feature/visual-editing-psp2 at cms-community / hippo-addon-channel-manager Commits: 450538fb by Arthur Bogaart at 2017-04-18T16:39:44+02:00 CHANNELMGR-1238 Added yarn.lock to apache-rat excludes - - - - - 1 changed file: - pom.xml Changes: = pom.xml = --- a/pom.xml +++ b/pom.xml @@ -275,6 +275,7 @@ frontend-ng/.* frontend-ng/*.md +frontend-ng/yarn.lock **/node_modules/**/* View it on GitLab: https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/450538fb74e0592a044c7221ea3fe78015e52fc0 ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/visual-editing-psp2-CHANNELMGR-1234] CHANNELMGR-1234 Fix RichTextField#validateValue
Mathijs den Burger pushed to branch feature/visual-editing-psp2-CHANNELMGR-1234 at cms-community / hippo-addon-channel-manager Commits: 1c96664e by Mathijs den Burger at 2017-04-18T16:34:58+02:00 CHANNELMGR-1234 Fix RichTextField#validateValue - - - - - 2 changed files: - content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/RichTextFieldType.java - content-service/src/test/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/RichTextFieldTypeTest.java Changes: = content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/RichTextFieldType.java = --- a/content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/RichTextFieldType.java +++ b/content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/RichTextFieldType.java @@ -113,6 +113,6 @@ public class RichTextFieldType extends FormattedTextFieldType implements NodeFie @Override public boolean validateValue(final FieldValue value) { -return validateSingleRequired(value); +return !isRequired() || validateSingleRequired(value); } } = content-service/src/test/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/RichTextFieldTypeTest.java = --- a/content-service/src/test/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/RichTextFieldTypeTest.java +++ b/content-service/src/test/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/RichTextFieldTypeTest.java @@ -46,6 +46,7 @@ import static org.easymock.EasyMock.expectLastCall; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import static org.powermock.api.easymock.PowerMock.mockStatic; import static org.powermock.api.easymock.PowerMock.replay; import static org.powermock.api.easymock.PowerMock.replayAll; @@ -237,5 +238,39 @@ public class RichTextFieldTypeTest { assertThat(fieldValues.get(0).getValue(), equalTo("value")); }); } + +@Test +public void validateRequired() { +type.addValidator(FieldType.Validator.REQUIRED); + +assertTrue(type.isRequired()); +assertTrue(type.validate(Collections.singletonList(new FieldValue("test"; +assertFalse(type.validate(Collections.singletonList(new FieldValue(""; +assertFalse(type.validate(Arrays.asList(new FieldValue("test"), new FieldValue(""; +} + +@Test +public void validateNotRequired() { +assertFalse(type.isRequired()); +assertTrue(type.validate(Collections.singletonList(new FieldValue("test"; +assertTrue(type.validate(Collections.singletonList(new FieldValue(""; +assertTrue(type.validate(Arrays.asList(new FieldValue("test"), new FieldValue(""; +} + +@Test +public void validateRequiredValue() { +type.addValidator(FieldType.Validator.REQUIRED); + +assertTrue(type.isRequired()); +assertTrue(type.validateValue(new FieldValue("test"))); +assertFalse(type.validateValue(new FieldValue(""))); +} + +@Test +public void validateNotRequiredValue() { +assertFalse(type.isRequired()); +assertTrue(type.validateValue(new FieldValue("test"))); +assertTrue(type.validateValue(new FieldValue(""))); +} } View it on GitLab: https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/1c96664edd535f169042fac8e64fc0408ff4d6c4 ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/visual-editing-psp2-CHANNELMGR-1234] CHANNELMGR-1234 Rename isPresent() to hasValue()
Mathijs den Burger pushed to branch feature/visual-editing-psp2-CHANNELMGR-1234 at cms-community / hippo-addon-channel-manager Commits: b3277659 by Mathijs den Burger at 2017-04-18T16:13:30+02:00 CHANNELMGR-1234 Rename isPresent() to hasValue() Otherwise Jackson will try to serialize the field, and fail. - - - - - 2 changed files: - content-service/src/main/java/org/onehippo/cms/channelmanager/content/document/model/FieldValue.java - content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/RichTextFieldType.java Changes: = content-service/src/main/java/org/onehippo/cms/channelmanager/content/document/model/FieldValue.java = --- a/content-service/src/main/java/org/onehippo/cms/channelmanager/content/document/model/FieldValue.java +++ b/content-service/src/main/java/org/onehippo/cms/channelmanager/content/document/model/FieldValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Hippo B.V. (http://www.onehippo.com) + * Copyright 2016-2017 Hippo B.V. (http://www.onehippo.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,7 +61,7 @@ public class FieldValue { return Optional.ofNullable(value); } -public boolean isPresent() { +public boolean hasValue() { return value != null; } = content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/RichTextFieldType.java = --- a/content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/RichTextFieldType.java +++ b/content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/RichTextFieldType.java @@ -65,7 +65,7 @@ public class RichTextFieldType extends FormattedTextFieldType implements NodeFie final List values = new ArrayList<>((int)children.getSize()); for (final Node child : new NodeIterable(children)) { final FieldValue value = readValue(child); -if (value.isPresent()) { +if (value.hasValue()) { values.add(value); } } View it on GitLab: https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/b32776599d5607eee90a03cb0bb98c6cf52f2ae2 ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Deleted branch feature/visual-editing-psp2-CHANNELMGR-1238
Arthur Bogaart deleted branch feature/visual-editing-psp2-CHANNELMGR-1238 at cms-community / hippo-addon-channel-manager ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/visual-editing-psp2] 2 commits: CHANNELMGR-1238 Switch to yarn
Arthur Bogaart pushed to branch feature/visual-editing-psp2 at cms-community / hippo-addon-channel-manager Commits: f16e7c5a by Arthur Bogaart at 2017-04-14T00:58:31+02:00 CHANNELMGR-1238 Switch to yarn - - - - - 0af5c0ff by Arthur Bogaart at 2017-04-18T15:55:52+02:00 CHANNELMGR-1238 Reintegrate feature/visual-editing-psp2-CHANNELMGR-1238 - - - - - 5 changed files: - frontend-ng/README.md - − frontend-ng/npm-shrinkwrap.json - frontend-ng/pom.xml - + frontend-ng/yarn.lock - frontend/pom.xml Changes: = frontend-ng/README.md = --- a/frontend-ng/README.md +++ b/frontend-ng/README.md @@ -1,18 +1,19 @@ # Prerequisites * [Chrome](http://google.chrome.com) +* [yarn](https://yarnpkg.com) * [gulp-cli](https://github.com/gulpjs/gulp-cli) (optional) The Hippo Build uses [Gulp.js](https://gulpjs.com) for frontend task automation. Installing the gulp-cli globally is optional. You can install the gulp-cli -globally via `npm install -g gulp-cli` and use the gulp cli directly, initiate -gulp tasks via `npm run` or simply stick with the predefined `npm start` and -`npm test` described below. +globally via `yarn global add gulp-cli` and use the gulp cli directly, initiate +gulp tasks via `yarn run` or simply stick with the predefined `yarn start` and +`yarn test` described below. # Development of AngularJS code 1. Build the frontend and start a Webpack dev server. -npm start +yarn start 2. Start up your project with Wicket development mode enabled. Make the resource servlet forward all calls for localhost:8080/cms/angular/hippo-cm/... to the Webpack dev server. @@ -24,29 +25,29 @@ gulp tasks via `npm run` or simply stick with the predefined `npm start` and ### Install project dependencies Run the commands below in the project root directory. -npm install +yarn # Useful commands ## When starting gulp tasks through npm Serve and watch files for development -npm start +yarn start Run unit tests and watch for changes to rerun (Chrome needs to be installed) -npm test +yarn test Run unit tests once (Chrome needs to be installed) -npm run testOnce +yarn run testOnce List all gulp tasks available -npm run gulp -- --tasks +yarn run gulp -- --tasks If you do not install the gulp-cli you can still run any gulp task with npm -npm run gulp [some defined gulp task] +yarn run gulp [some defined gulp task] ## When starting gulp tasks using gulp-cli List all gulp tasks available = frontend-ng/npm-shrinkwrap.json deleted = The diff for this file was not included because it is too large. = frontend-ng/pom.xml = --- a/frontend-ng/pom.xml +++ b/frontend-ng/pom.xml @@ -40,29 +40,29 @@ ${maven.plugin.exec.version} -npm-install +frontend-install generate-sources exec - npm + yarn install -npm-build +frontend-build process-resources exec - npm + yarn run build -npm-test +frontend-test test exec - npm + yarn run testOnce ${skipTests} = frontend-ng/yarn.lock = The diff for this file was not included because it is too large. = frontend/pom.xml = --- a/frontend/pom.xml +++ b/frontend/pom.xml @@ -23,7 +23,6 @@ 5.0.0-visual-editing-psp2-SNAPSHOT - hippo-addon-channel-manager-frontend jar View it on GitLab: https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/e7515b926fb06f71e857689879bfc255986423af...0af5c0ff876462359a6443ea6702e99df0136c19 ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/visual-editing-psp2-CHANNELMGR-1234] CHANNELMGR-1234 Add unit tests for rich text field choice
Mathijs den Burger pushed to branch feature/visual-editing-psp2-CHANNELMGR-1234 at cms-community / hippo-addon-channel-manager Commits: 46a97398 by Mathijs den Burger at 2017-04-18T15:33:04+02:00 CHANNELMGR-1234 Add unit tests for rich text field choice - - - - - 1 changed file: - content-service/src/test/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/ChoiceFieldUtilsTest.java Changes: = content-service/src/test/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/ChoiceFieldUtilsTest.java = --- a/content-service/src/test/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/ChoiceFieldUtilsTest.java +++ b/content-service/src/test/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/ChoiceFieldUtilsTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Hippo B.V. (http://www.onehippo.com) + * Copyright 2016-2017 Hippo B.V. (http://www.onehippo.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -276,6 +276,47 @@ public class ChoiceFieldUtilsTest { } @Test +public void initProviderIdWithValidRichTextChoice() throws Exception { +final Node node = MockNode.root(); +final ContentTypeContext parentContext = createMock(ContentTypeContext.class); +final Mapchoices = new HashMap<>(); +final ContentType provider = createMock(ContentType.class); +final Map choiceMap = new HashMap<>(); +final ContentTypeChild choice = createMock(ContentTypeChild.class); +final ContentType compound = createMock(ContentType.class); +final FieldTypeContext compoundContext = PowerMock.createMockAndExpectNew(FieldTypeContext.class, choice, parentContext); +final RichTextFieldType richTextField = PowerMock.createMockAndExpectNew(RichTextFieldType.class); + +PowerMock.mockStaticPartial(ContentTypeContext.class, "getContentType"); + +node.setProperty("cpItemsPath", "choice:provider"); + expect(ContentTypeContext.getContentType("choice:provider")).andReturn(Optional.of(provider)); +expect(provider.getChildren()).andReturn(choiceMap); + +choiceMap.put("choice", choice); +expect(choice.getItemType()).andReturn("choiceType").anyTimes(); + expect(ContentTypeContext.getContentType("choiceType")).andReturn(Optional.of(compound)); +expect(compound.isCompoundType()).andReturn(false).times(2); + expect(compound.isContentType("hippostd:html")).andReturn(true).times(2); + +richTextField.init(compoundContext); +expectLastCall(); + + expect(compoundContext.createContextForCompound()).andReturn(Optional.empty()); + +replay(provider, choice, compound); +PowerMock.replayAll(); + +ChoiceFieldUtils.populateProviderBasedChoices(node, parentContext, choices); + +verify(provider, choice, compound); +PowerMock.verifyAll(); + +assertThat(choices.size(), equalTo(1)); +assertThat(choices.get("choiceType"), equalTo(richTextField)); +} + +@Test public void populateListBasedChoicesWithoutCompoundList() { final Node node = MockNode.root(); final ContentTypeContext parentContext = createMock(ContentTypeContext.class); @@ -436,4 +477,40 @@ public class ChoiceFieldUtilsTest { assertThat(choices.size(), equalTo(1)); assertThat(choices.get("compound:id"), equalTo(compoundField)); } + +@Test +public void populateListBasedChoicesWithValidRichText() throws Exception { +final Node node = MockNode.root(); +final ContentTypeContext parentContext = createMock(ContentTypeContext.class); +final Map choices = new HashMap<>(); +final ContentTypeContext childContext = createMock(ContentTypeContext.class); +final ContentType compound = createMock(ContentType.class); +final RichTextFieldType richTextField = PowerMock.createMockAndExpectNew(RichTextFieldType.class); + +PowerMock.mockStaticPartial(ContentTypeContext.class, "createFromParent"); +PowerMock.mockStaticPartial(FieldTypeUtils.class, "populateFields"); + +node.setProperty("compoundList", "prefixed:choice"); +expect(ContentTypeContext.createFromParent("prefixed:choice", parentContext)).andReturn(Optional.of(childContext)); +expect(childContext.getContentType()).andReturn(compound).anyTimes(); +expect(compound.isCompoundType()).andReturn(false).times(2); + expect(compound.isContentType("hippostd:html")).andReturn(true).times(2); +expect(compound.getName()).andReturn("hippostd:html"); + +richTextField.initListBasedChoice("hippostd:html"); +expectLastCall(); + +
[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Pushed new branch feature/visual-editing-psp2-CHANNELMGR-1234
Mathijs den Burger pushed new branch feature/visual-editing-psp2-CHANNELMGR-1234 at cms-community / hippo-addon-channel-manager ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/visual-editing-psp2] CHANNELMGR-1047 Fixed unit tests
Ariel Weinberger pushed to branch feature/visual-editing-psp2 at cms-community / hippo-addon-channel-manager Commits: e7515b92 by Ariel Weinberger at 2017-04-18T15:07:14+02:00 CHANNELMGR-1047 Fixed unit tests - Changed fit statements to it statements - Removed an irrelevant line of code from primitiveField unit tests - - - - - 2 changed files: - frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.component.spec.js - frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/primitiveField/primitiveField.spec.js Changes: = frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.component.spec.js = --- a/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.component.spec.js +++ b/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.component.spec.js @@ -96,7 +96,7 @@ describe('CKEditor Component', () => { return onCall.args[1]; } - fit('initializes the component', () => { + it('initializes the component', () => { init(); expect($ctrl.model.$viewValue).toEqual = 'initial value'; expect($ctrl.name).toEqual('TestField'); @@ -126,7 +126,7 @@ describe('CKEditor Component', () => { expect(model.$viewValue).toBe(newValue); }); - fit('ckeditor is focused', () => { + it('ckeditor is focused', () => { init(); const onEditorFocus = getEventListener('focus'); spyOn($ctrl.textAreaElement, 'focus'); = frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/primitiveField/primitiveField.spec.js = --- a/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/primitiveField/primitiveField.spec.js +++ b/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/primitiveField/primitiveField.spec.js @@ -54,7 +54,6 @@ describe('CompoundField', () => { expect($ctrl.name).toBe('test-name'); expect($ctrl.onFieldFocus).toBe(onFieldFocus); expect($ctrl.onFieldBlur).toBe(onFieldBlur); -expect($ctrl.textAreaElement).toBeDefined(); }); it('helps composing unique form field names', () => { View it on GitLab: https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/e7515b926fb06f71e857689879bfc255986423af ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/visual-editing-psp2] CHANNELMGR-1047 Added unit tests
Ariel Weinberger pushed to branch feature/visual-editing-psp2 at cms-community / hippo-addon-channel-manager Commits: bee5c0c4 by Ariel Weinberger at 2017-04-18T15:03:46+02:00 CHANNELMGR-1047 Added unit tests - - - - - 2 changed files: - frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.component.spec.js - frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/primitiveField/primitiveField.spec.js Changes: = frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.component.spec.js = --- a/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.component.spec.js +++ b/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.component.spec.js @@ -96,7 +96,7 @@ describe('CKEditor Component', () => { return onCall.args[1]; } - it('initializes the component', () => { + fit('initializes the component', () => { init(); expect($ctrl.model.$viewValue).toEqual = 'initial value'; expect($ctrl.name).toEqual('TestField'); @@ -104,6 +104,7 @@ describe('CKEditor Component', () => { expect($ctrl.config).toEqual(config); expect($ctrl.onFocus).toBeDefined(); expect($ctrl.onBlur).toBeDefined(); +expect($ctrl.textAreaElement).toBeDefined(); }); it('uses the current language', () => { @@ -125,18 +126,22 @@ describe('CKEditor Component', () => { expect(model.$viewValue).toBe(newValue); }); - it('ckeditor is focused', () => { + fit('ckeditor is focused', () => { init(); const onEditorFocus = getEventListener('focus'); +spyOn($ctrl.textAreaElement, 'focus'); onEditorFocus(); expect($ctrl.onFocus).toHaveBeenCalled(); +expect($ctrl.textAreaElement.focus).toHaveBeenCalled(); }); it('ckeditor is blurred', () => { init(); const onEditorBlur = getEventListener('blur'); +spyOn($ctrl.textAreaElement, 'blur'); onEditorBlur(); expect($ctrl.onBlur).toHaveBeenCalled(); +expect($ctrl.textAreaElement.blur).toHaveBeenCalled(); }); it('destroys the editor once the scope is destroyed', () => { = frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/primitiveField/primitiveField.spec.js = --- a/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/primitiveField/primitiveField.spec.js +++ b/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/primitiveField/primitiveField.spec.js @@ -54,6 +54,7 @@ describe('CompoundField', () => { expect($ctrl.name).toBe('test-name'); expect($ctrl.onFieldFocus).toBe(onFieldFocus); expect($ctrl.onFieldBlur).toBe(onFieldBlur); +expect($ctrl.textAreaElement).toBeDefined(); }); it('helps composing unique form field names', () => { View it on GitLab: https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/bee5c0c485e688a36dfda2a2cadd11870e321f3e ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Deleted branch feature/visual-editing-psp2-CHANNELMGR-1234
Mathijs den Burger deleted branch feature/visual-editing-psp2-CHANNELMGR-1234 at cms-community / hippo-addon-channel-manager ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [onehippo/ckeditor] 23094f: CHANNELMGR-1237 Add hippopicker plugin
Branch: refs/heads/feature/visual-editing-psp2-CHANNELMGR-1237 Home: https://github.com/onehippo/ckeditor Commit: 23094f4b7e8e27fb3f7d81ca99e0e33f776c362a https://github.com/onehippo/ckeditor/commit/23094f4b7e8e27fb3f7d81ca99e0e33f776c362a Author: Arthur BogaartDate: 2017-04-18 (Tue, 18 Apr 2017) Changed paths: M config/src/main/java/org/onehippo/ckeditor/CKEditorConfig.java Log Message: --- CHANNELMGR-1237 Add hippopicker plugin ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Pushed new branch feature/visual-editing-psp2-CHANNELMGR-1237
Arthur Bogaart pushed new branch feature/visual-editing-psp2-CHANNELMGR-1237 at cms-community / hippo-addon-channel-manager ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/visual-editing-psp2] CHANNELMGR-1047 Fixed validation for required HTML rich text fields
Ariel Weinberger pushed to branch feature/visual-editing-psp2 at cms-community / hippo-addon-channel-manager Commits: d1356ef8 by Ariel Weinberger at 2017-04-18T14:29:32+02:00 CHANNELMGR-1047 Fixed validation for required HTML rich text fields - - - - - 2 changed files: - frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.controller.js - frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.html Changes: = frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.controller.js = --- a/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.controller.js +++ b/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.controller.js @@ -22,6 +22,7 @@ class CKEditorController { this.$element = $element; this.CKEditorService = CKEditorService; this.ConfigService = ConfigService; +this.textAreaElement = $element.find('textarea'); } $onInit() { @@ -39,10 +40,12 @@ class CKEditorController { }); this.editor.on('focus', () => { +this.textAreaElement.focus(); this.$scope.$apply(() => this.onFocus()); }); this.editor.on('blur', () => { +this.textAreaElement.blur(); this.$scope.$apply(() => this.onBlur()); }); = frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.html = --- a/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.html +++ b/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.html @@ -14,10 +14,9 @@ limitations under the License. --> - - \ No newline at end of file + md-no-resize> View it on GitLab: https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/d1356ef87a67cfe4a580a46956ba32cb987b782e ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Pushed new branch feature/visual-editing-psp2-CHANNELMGR-1234
Mathijs den Burger pushed new branch feature/visual-editing-psp2-CHANNELMGR-1234 at cms-community / hippo-addon-channel-manager ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Deleted branch feature/visual-editing-psp2-CHANNELMGR-1234
Mathijs den Burger deleted branch feature/visual-editing-psp2-CHANNELMGR-1234 at cms-community / hippo-addon-channel-manager ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn
[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit] Pushed new tag hst-5.0.0-wpm-april18
Arent-Jan Banck pushed new tag hst-5.0.0-wpm-april18 at cms-community / hippo-site-toolkit ___ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn