diff options
author | John Alhroos <john.ahlroos@itmill.com> | 2010-10-26 13:34:43 +0000 |
---|---|---|
committer | John Alhroos <john.ahlroos@itmill.com> | 2010-10-26 13:34:43 +0000 |
commit | 5b1b98b27e151dbe16b139da624d298298585690 (patch) | |
tree | 5d8851009790f60897efda14009dd2f8b3b22b20 /src | |
parent | a81c1514223797947e138d2b2f32f84ec9573358 (diff) | |
download | vaadin-framework-5b1b98b27e151dbe16b139da624d298298585690.tar.gz vaadin-framework-5b1b98b27e151dbe16b139da624d298298585690.zip |
Fix for #5744
svn changeset:15721/svn branch:6.4
Diffstat (limited to 'src')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java index 8ad782411d..7592839af1 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java @@ -115,6 +115,14 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, private static final int MULTISELECT_MODE_DEFAULT = 0; /** + * The simple multiselect mode is what the table used to have before + * ctrl/shift selections were added. That is that when this is set clicking + * on an item selects/deselects the item and no ctrl/shift selections are + * available. + */ + private static final int MULTISELECT_MODE_SIMPLE = 1; + + /** * multiple of pagelength which component will cache when requesting more * rows */ @@ -3963,7 +3971,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, deselectAll(); } toggleSelection(); - } else if (selectMode == SELECT_MODE_SINGLE + } else if ((selectMode == SELECT_MODE_SINGLE || multiselectmode == MULTISELECT_MODE_SIMPLE) && nullSelectionAllowed) { toggleSelection(); }/* @@ -5011,12 +5019,12 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, var top = elem.offsetTop; var height = elem.offsetHeight; - if (elem.parentNode != elem.offsetParent) { + if (elem.parentNode != elem.offsetParent) { top -= elem.parentNode.offsetTop; } var cur = elem.parentNode; - while (cur && (cur.nodeType == 1)) { + while (cur && (cur.nodeType == 1)) { if (top < cur.scrollTop) { cur.scrollTop = top; } @@ -5025,7 +5033,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, } var offsetTop = cur.offsetTop; - if (cur.parentNode != cur.offsetParent) { + if (cur.parentNode != cur.offsetParent) { offsetTop -= cur.parentNode.offsetTop; } |