]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixes #2534: PopupView stylename doesn't affect the actual popup element.
authorJouni Koivuviita <jouni.koivuviita@itmill.com>
Tue, 3 Feb 2009 13:47:35 +0000 (13:47 +0000)
committerJouni Koivuviita <jouni.koivuviita@itmill.com>
Tue, 3 Feb 2009 13:47:35 +0000 (13:47 +0000)
svn changeset:6713/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IPopupView.java

index efca0e114d1a334eedaf01e256149a9ff9118c10..21ce91d424a540f1e98d363d7efbd41ae80543c2 100644 (file)
@@ -103,6 +103,22 @@ public class IPopupView extends HTML implements Container {
             // showPopupOnTop(popup, hostReference);
             preparePopup(popup);
             popup.updateFromUIDL(popupUIDL, client);
+            if (uidl.hasAttribute("style")) {
+                final String[] styles = uidl.getStringAttribute("style").split(
+                        " ");
+                final StringBuffer styleBuf = new StringBuffer();
+                final String primaryName = popup.getStylePrimaryName();
+                styleBuf.append(primaryName);
+                for (int i = 0; i < styles.length; i++) {
+                    styleBuf.append(" ");
+                    styleBuf.append(primaryName);
+                    styleBuf.append("-");
+                    styleBuf.append(styles[i]);
+                }
+                popup.setStyleName(styleBuf.toString());
+            } else {
+                popup.setStyleName(popup.getStylePrimaryName());
+            }
             showPopup(popup);
 
             // The popup shouldn't be visible, try to hide it.
@@ -323,6 +339,7 @@ public class IPopupView extends HTML implements Container {
             hiding = false;
         }
 
+        @Override
         public Element getContainerElement() {
             return super.getContainerElement();
         }