Jeroen Hoffman pushed to branch release/5.0 at cms-community / hippo-cms

Commits:
c5ee50a1 by Jeroen Hoffman at 2017-10-24T10:44:43+02:00
CMS-10963 [Back port CMS-10941 to 12.0] Regression: three column layout for cms 
document gives errors

(cherry picked from commit 074b301d4433280fdefba354307b4562a7692cdf)

- - - - -


2 changed files:

- api/src/main/styling/styles/_editor.scss
- 
editor/frontend/src/main/java/org/hippoecm/frontend/editor/builder/RenderPluginEditorPlugin.java


Changes:

=====================================
api/src/main/styling/styles/_editor.scss
=====================================
--- a/api/src/main/styling/styles/_editor.scss
+++ b/api/src/main/styling/styles/_editor.scss
@@ -40,6 +40,12 @@
     float: right;
   }
 
+  .col40 {
+    padding-right: 16px;
+    width: 40%;
+    float: left;
+  }
+
   .col70 {
     padding-right: 16px;
     width: 70%;
@@ -54,6 +60,7 @@
 
   .col20,
   .col30,
+  .col40,
   .col70,
   .col80 {
     box-sizing: border-box;


=====================================
editor/frontend/src/main/java/org/hippoecm/frontend/editor/builder/RenderPluginEditorPlugin.java
=====================================
--- 
a/editor/frontend/src/main/java/org/hippoecm/frontend/editor/builder/RenderPluginEditorPlugin.java
+++ 
b/editor/frontend/src/main/java/org/hippoecm/frontend/editor/builder/RenderPluginEditorPlugin.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2008-2016 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.
@@ -490,20 +490,24 @@ public class RenderPluginEditorPlugin extends 
RenderPlugin implements ILayoutAwa
     }
 
     private Icon getTransitionIconByName(final String name) {
-        switch (name) {
-            case "up": {
-                return Icon.CHEVRON_UP_CIRCLE;
-            }
-            case "down": {
-                return Icon.CHEVRON_DOWN_CIRCLE;
-            }
-            case "left": {
-                return Icon.CHEVRON_LEFT_CIRCLE;
-            }
-            case "right": {
-                return Icon.CHEVRON_RIGHT_CIRCLE;
+        if (name != null) {
+            final String[] split = StringUtils.split(name, " ");
+            switch (split[split.length - 1]) {
+                case "up": {
+                    return Icon.CHEVRON_UP_CIRCLE;
+                }
+                case "down": {
+                    return Icon.CHEVRON_DOWN_CIRCLE;
+                }
+                case "left": {
+                    return Icon.CHEVRON_LEFT_CIRCLE;
+                }
+                case "right": {
+                    return Icon.CHEVRON_RIGHT_CIRCLE;
+                }
             }
         }
-        return null;
+        log.warn("Undetermined transition icon by name '{}'; the name should 
be, or have as last word: 'up', 'down', 'left' or 'right'. Returning default 
icon.", name);
+        return Icon.EXCLAMATION_CIRCLE;
     }
 }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/commit/c5ee50a1bc73378b8cae882c523bf67707eeee35

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/commit/c5ee50a1bc73378b8cae882c523bf67707eeee35
You're receiving this email because of your account on code.onehippo.org.
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to