Commit cc39f626 authored by Ate Douma's avatar Ate Douma

HIPPLUG-1200 merge changes from master

parents c1a92736 2f11f5d9
Pipeline #17 failed with stage
Hippo Plugin Content Blocks
Copyright 2009-2015 Hippo B.V. (http://www.onehippo.com)
Copyright 2009-2016 Hippo B.V. (http://www.onehippo.com)
This product includes software developed by:
Hippo B.V., Amsterdam, The Netherlands (http://www.onehippo.com/);
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010-2015 Hippo B.V. (http://www.onehippo.com)
Copyright 2010-2016 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.
......@@ -20,26 +20,27 @@
<parent>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-cms7-project</artifactId>
<version>27.2</version>
<version>28-SNAPSHOT</version>
</parent>
<inceptionYear>2009</inceptionYear>
<name>Hippo Plugin Content Blocks</name>
<description>Hippo Plugin Content Blocks</description>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-plugin-content-blocks</artifactId>
<version>2.x-translations-1.0-SNAPSHOT</version>
<version>3.0.0-translations-psp1-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
<connection>scm:svn:https://svn.onehippo.org/repos/hippo/hippo-cms7/plugins/content-blocks/branches/content-blocks-2.1.0-translations-1</connection>
<developerConnection>scm:svn:https://svn.onehippo.org/repos/hippo/hippo-cms7/plugins/content-blocks/branches/content-blocks-2.1.0-translations-1</developerConnection>
<url>https://svn.onehippo.org/repos/hippo/hippo-cms7/plugins/content-blocks/branches/content-blocks-2.1.0-translations-1</url>
<connection>scm:svn:https://svn.onehippo.org/repos/hippo/hippo-cms7/plugins/content-blocks/trunk/</connection>
<developerConnection>scm:svn:https://svn.onehippo.org/repos/hippo/hippo-cms7/plugins/content-blocks/trunk/</developerConnection>
<url>https://svn.onehippo.org/repos/hippo/hippo-cms7/plugins/content-blocks/trunk/</url>
</scm>
<properties>
<hippo.repository.version>3.0.0</hippo.repository.version>
<hippo.cms.version>3.x-translations-1.0-SNAPSHOT</hippo.cms.version>
<hippo.repository.version>4.0.0-translations-psp1-SNAPSHOT</hippo.repository.version>
<hippo.cms.version>4.0.0-translations-psp1-SNAPSHOT</hippo.cms.version>
</properties>
<repositories>
......
<!--
Copyright 2010-2015 Hippo B.V. (http://www.onehippo.com)
Copyright 2010-2016 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.
......@@ -58,16 +58,18 @@
</wicket:fragment>
<wicket:fragment wicket:id="edit-fragment">
<div class="content-block-title">
<span wicket:id="itemTitle">[ item title ]</span>
</div>
<div class="contentpicker-blocks">
<div class="hippo-editor-field-subfield-controls" wicket:id="controls">
<a class="up-link" wicket:id="up"><span wicket:id="up-icon"></span></a>
<a class="down-link" wicket:id="down"><span wicket:id="down-icon"></span></a>
<a class="remove-link" wicket:id="remove"><span wicket:id="remove-icon"></span></a>
<div class="hippo-editor-field">
<div class="content-block-title">
<span wicket:id="itemTitle">[ item title ]</span>
</div>
<div class="hippo-editor-field-subfield contentpicker-blocks">
<div class="hippo-editor-field-subfield-controls" wicket:id="controls">
<a class="up-link" wicket:id="up"><span wicket:id="up-icon"></span></a>
<a class="down-link" wicket:id="down"><span wicket:id="down-icon"></span></a>
<a class="remove-link" wicket:id="remove"><span wicket:id="remove-icon"></span></a>
</div>
<div wicket:id="item"></div>
</div>
<div wicket:id="item"></div>
</div>
</wicket:fragment>
......@@ -75,7 +77,7 @@
<div class="content-block-title">
<span wicket:id="itemTitle">[ item title ]</span>
</div>
<div class="contentpicker-blocks">
<div class="hippo-editor-field-subfield contentpicker-blocks">
<div wicket:id="item"></div>
</div>
</wicket:fragment>
......
/*
* Copyright 2010-2013 Hippo B.V. (http://www.onehippo.com)
* Copyright 2010-2016 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.
......@@ -30,8 +30,6 @@ import org.slf4j.LoggerFactory;
* @version "$Id$"
*/
public class ContentBlockComparer implements IComparer<Node> {
private static final long serialVersionUID = 1L;
static final Logger log = LoggerFactory.getLogger(ContentBlockComparer.class);
private ITemplateEngine engine;
......@@ -51,8 +49,8 @@ public class ContentBlockComparer implements IComparer<Node> {
if (!baseNode.getPrimaryNodeType().getName().equals(targetNode.getPrimaryNodeType().getName())) {
return false;
}
ITypeDescriptor type = engine.getType(baseNode.getPrimaryNodeType().getName());
NodeComparer comparer = new NodeComparer(type);
final ITypeDescriptor type = engine.getType(baseNode.getPrimaryNodeType().getName());
final NodeComparer comparer = new NodeComparer(type, engine);
return comparer.areEqual(baseNode, targetNode);
} catch (RepositoryException ex) {
log.error(ex.getMessage(), ex);
......@@ -68,8 +66,8 @@ public class ContentBlockComparer implements IComparer<Node> {
return 0;
}
try {
ITypeDescriptor type = engine.getType(node.getPrimaryNodeType().getName());
NodeComparer comparer = new NodeComparer(type);
final ITypeDescriptor type = engine.getType(node.getPrimaryNodeType().getName());
final NodeComparer comparer = new NodeComparer(type, engine);
return comparer.getHashCode(node);
} catch (RepositoryException ex) {
log.error(ex.getMessage(), ex);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment