Jeroen Hoffman pushed to branch master at cms-community / hippo-cms
Commits: 1dc4b956 by Bert Leunis at 2017-06-09T16:47:42+02:00 CMS-10784 show an info message that warns about the checked-in state - - - - - fb53bb83 by Bert Leunis at 2017-07-10T11:55:48+02:00 CMS-10784 Merge master changes in feature/CMS-10784 - - - - - 7320e8dd by Jeroen Hoffman at 2017-07-11T14:49:31+02:00 CMS-10784 Merge branch 'master' into feature/CMS-10784 - - - - - 03f24387 by Bert Leunis at 2017-07-11T16:52:34+02:00 CMS-10784 disable editor for checked in nodes. message in properties file. - - - - - 97089651 by Jeroen Hoffman at 2017-07-13T11:46:49+02:00 Merge remote-tracking branch 'origin/feature/CMS-10784' into feature/CMS-10784 - - - - - 40399ed1 by Jeroen Hoffman at 2017-07-13T12:04:50+02:00 CMS-10784 Reintegrate branch 'feature/CMS-10784' into master - - - - - 5 changed files: - console/frontend/src/main/java/org/hippoecm/frontend/plugins/console/editor/EditorPlugin.html - console/frontend/src/main/java/org/hippoecm/frontend/plugins/console/editor/EditorPlugin.java - + console/frontend/src/main/java/org/hippoecm/frontend/plugins/console/editor/EditorPlugin.properties - console/frontend/src/main/resources/org/hippoecm/frontend/plugins/console/console.css - + console/frontend/src/main/resources/org/hippoecm/frontend/plugins/console/dialog-information-16.png Changes: ===================================== console/frontend/src/main/java/org/hippoecm/frontend/plugins/console/editor/EditorPlugin.html ===================================== --- a/console/frontend/src/main/java/org/hippoecm/frontend/plugins/console/editor/EditorPlugin.html +++ b/console/frontend/src/main/java/org/hippoecm/frontend/plugins/console/editor/EditorPlugin.html @@ -15,6 +15,7 @@ --> <html xmlns:wicket="http://wicket.apache.org/"> <wicket:panel> + <div wicket:id="message" class="panel-message">[message]</div> <form wicket:id="editor"> <h3 wicket:id="toggle-header-0">[UUID]</h3> <table class="editor-general-table" id="toggle-box-0" style="display:block;"> ===================================== console/frontend/src/main/java/org/hippoecm/frontend/plugins/console/editor/EditorPlugin.java ===================================== --- a/console/frontend/src/main/java/org/hippoecm/frontend/plugins/console/editor/EditorPlugin.java +++ b/console/frontend/src/main/java/org/hippoecm/frontend/plugins/console/editor/EditorPlugin.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2014 Hippo B.V. (http://www.onehippo.com) + * Copyright 2008-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. @@ -20,6 +20,7 @@ import javax.jcr.RepositoryException; import org.apache.wicket.AttributeModifier; import org.apache.wicket.event.IEvent; +import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.model.IModel; import org.hippoecm.frontend.plugin.IPluginContext; import org.hippoecm.frontend.plugin.config.IPluginConfig; @@ -30,13 +31,19 @@ public class EditorPlugin extends RenderPlugin<Node> { private static final long serialVersionUID = 1L; private final NodeEditor editor; + private Label message; public EditorPlugin(IPluginContext context, IPluginConfig config) { super(context, config); + message = new Label("message", getString("node.checked.in.info")); + add(message); + editor = new NodeEditor("editor", getModel()); add(editor); add(new ToggleBehavior()); + + onModelChanged(); } protected IPluginContext getPluginContext() { @@ -55,6 +62,8 @@ public class EditorPlugin extends RenderPlugin<Node> { } else { add(new AttributeModifier("style", "background-color:#ddd;")); } + message.setVisible(!node.isCheckedOut()); + editor.setEnabled(node.isCheckedOut()); redraw(); } ===================================== console/frontend/src/main/java/org/hippoecm/frontend/plugins/console/editor/EditorPlugin.properties ===================================== --- /dev/null +++ b/console/frontend/src/main/java/org/hippoecm/frontend/plugins/console/editor/EditorPlugin.properties @@ -0,0 +1 @@ +node.checked.in.info=This node is checked in. You must check it out before you can edit it. \ No newline at end of file ===================================== console/frontend/src/main/resources/org/hippoecm/frontend/plugins/console/console.css ===================================== --- a/console/frontend/src/main/resources/org/hippoecm/frontend/plugins/console/console.css +++ b/console/frontend/src/main/resources/org/hippoecm/frontend/plugins/console/console.css @@ -549,6 +549,16 @@ li.hippo-console-menu-actions-save.session-changes a { padding: 20px; } +.hippo-console-editor .panel-message { + background-image: url("dialog-information-16.png"); + background-repeat: no-repeat; + background-position: 10px 10px; + background-color: #fff8d5; + padding: 10px 10px 10px 35px; + border: 1px solid #69849f; + margin-bottom: 15px; +} + .hippo-console-editor h3 { font-size: 14px; color: #32629b; ===================================== console/frontend/src/main/resources/org/hippoecm/frontend/plugins/console/dialog-information-16.png ===================================== Binary files /dev/null and b/console/frontend/src/main/resources/org/hippoecm/frontend/plugins/console/dialog-information-16.png differ View it on GitLab: https://code.onehippo.org/cms-community/hippo-cms/compare/35cdfe224f0aaf7269805b884c4d3f2fd9069de5...40399ed1ccf216253a39bc841c8306cb28c8071c
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn