myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hno...@apache.org
Subject [myfaces-tobago] branch master updated: TOBAGO-1915 Vertical button group for tc:selectManyShuttle
Date Tue, 18 Sep 2018 14:53:00 GMT
This is an automated email from the ASF dual-hosted git repository.

hnoeth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/master by this push:
     new fb03e83  TOBAGO-1915 Vertical button group for tc:selectManyShuttle
fb03e83 is described below

commit fb03e831811fb0c12edaf68b086b240f90582fd9
Author: Henning Noeth <hnoeth@apache.org>
AuthorDate: Tue Sep 18 16:52:51 2018 +0200

    TOBAGO-1915 Vertical button group for tc:selectManyShuttle
    
    * select many shuttle tool bar use now "btn-group-vertical"
    * since "btn-group-vertical" align the tool bar to the center, we can
      delete the empty DIVs for centering
---
 .../internal/renderkit/renderer/SelectManyShuttleRenderer.java      | 6 +-----
 .../org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java     | 1 +
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectManyShuttleRenderer.java
b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectManyShuttleRenderer.java
index d3ae2e4..44c5756 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectManyShuttleRenderer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectManyShuttleRenderer.java
@@ -102,9 +102,7 @@ public class SelectManyShuttleRenderer extends SelectManyRendererBase
{
 
     writer.endElement(HtmlElements.SELECT);
     writer.startElement(HtmlElements.DIV);
-    writer.writeClassAttribute(TobagoClass.SELECT_MANY_SHUTTLE__TOOL_BAR);
-    writer.startElement(HtmlElements.DIV);
-    writer.endElement(HtmlElements.DIV);
+    writer.writeClassAttribute(TobagoClass.SELECT_MANY_SHUTTLE__TOOL_BAR, BootstrapClass.BTN_GROUP_VERTICAL);
     createButton(facesContext, component, writer, disabled | readonly,
         Icons.ANGLE_DOUBLE_RIGHT, "addAll", TobagoClass.SELECT_MANY_SHUTTLE__ADD_ALL);
     createButton(facesContext, component, writer, disabled | readonly,
@@ -113,8 +111,6 @@ public class SelectManyShuttleRenderer extends SelectManyRendererBase
{
         Icons.ANGLE_LEFT, "remove", TobagoClass.SELECT_MANY_SHUTTLE__REMOVE);
     createButton(facesContext, component, writer, disabled | readonly,
         Icons.ANGLE_DOUBLE_LEFT, "removeAll", TobagoClass.SELECT_MANY_SHUTTLE__REMOVE_ALL);
-    writer.startElement(HtmlElements.DIV);
-    writer.endElement(HtmlElements.DIV);
     writer.endElement(HtmlElements.DIV);
     final String selectedLabel = select.getSelectedLabel();
     if (selectedLabel != null) {
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java
b/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java
index ead4342..cc2d869 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java
@@ -82,6 +82,7 @@ public enum BootstrapClass implements CssItem {
   BTN_DANGER("btn-danger"),
   BTN_DARK("btn-dark"),
   BTN_GROUP("btn-group"),
+  BTN_GROUP_VERTICAL("btn-group-vertical"),
   BTN_INFO("btn-info"),
   BTN_LIGHT("btn-light"),
   BTN_LINK("btn-link"),


Mime
View raw message