diff options
author | Leif Åstrand <leif@vaadin.com> | 2015-11-19 14:31:46 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-11-27 09:20:27 +0000 |
commit | 5f42729e994821bbf84b1160083348c62b5353e9 (patch) | |
tree | fd4859cad853464f38d2a6bf6f2719fa533e8d17 /client/src | |
parent | 8d1d9618a09b76b79ff4f24a93977f4fea4b2f0e (diff) | |
download | vaadin-framework-5f42729e994821bbf84b1160083348c62b5353e9.tar.gz vaadin-framework-5f42729e994821bbf84b1160083348c62b5353e9.zip |
Add stylename to sortable Table header cells (#8219)
Change-Id: I4774b4079f5c564fdc67e8cabf89278ad7cf2f6f
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/com/vaadin/client/ui/VScrollTable.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java index 3b85356f86..5bd6ed390d 100644 --- a/client/src/com/vaadin/client/ui/VScrollTable.java +++ b/client/src/com/vaadin/client/ui/VScrollTable.java @@ -2808,6 +2808,12 @@ public class VScrollTable extends FlowPanel implements HasWidgets, public void setSortable(boolean b) { sortable = b; + /* + * Should in theory call updateStyleNames here, but that would just + * be a waste of time since this method is only called from + * updateCellsFromUIDL which immediately afterwards calls setAlign + * which also updates the style names. + */ } /** @@ -2881,6 +2887,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets, setStyleName(primaryStyleName + "-header-cell"); } + if (sortable) { + addStyleName(primaryStyleName + "-header-sortable"); + } + final String ALIGN_PREFIX = primaryStyleName + "-caption-container-align-"; @@ -3648,6 +3658,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets, c.setSortable(false); } + // The previous call to setSortable relies on c.setAlign calling + // c.updateStyleNames if (col.hasAttribute("align")) { c.setAlign(col.getStringAttribute("align").charAt(0)); } else { |