mirror of
https://gitee.com/jmix/cuba.git
synced 2024-11-30 18:27:56 +08:00
Support select first N rows by Shift+Click in Table #PL-3267
This commit is contained in:
parent
0b32d35998
commit
2214d99f1a
@ -60,7 +60,7 @@ def webToolkitLegacyModule = project(':cuba-web6-toolkit')
|
||||
def webModuleThemes = project(':cuba-web-themes')
|
||||
def webLegacyModuleThemes = project(':cuba-web6-themes')
|
||||
|
||||
def vaadinVersion = '7.1.8.cuba.6'
|
||||
def vaadinVersion = '7.1.8.cuba.7'
|
||||
def vaadinLegacyVersion = '6.6.1.140'
|
||||
def springVersion = '3.1.3.RELEASE'
|
||||
|
||||
|
@ -57,6 +57,22 @@ public class CubaScrollTableWidget extends VScrollTable implements ShortcutActio
|
||||
DOM.sinkEvents(getElement(), Event.ONKEYDOWN);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected VScrollTableBody.VScrollTableRow getNextRowToFocus(VScrollTableBody.VScrollTableRow currentRow, int offset) {
|
||||
// Support select first N rows by Shift+Click #PL-3267
|
||||
if (focusedRow == currentRow && !focusedRow.isSelected()) {
|
||||
return focusedRow;
|
||||
}
|
||||
|
||||
return super.getNextRowToFocus(currentRow, offset);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean needToSelectFocused(VScrollTableBody.VScrollTableRow currentRow) {
|
||||
// Support select first N rows by Shift+Click #PL-3267
|
||||
return currentRow == focusedRow && (!focusedRow.isSelected());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBrowserEvent(Event event) {
|
||||
super.onBrowserEvent(event);
|
||||
|
@ -78,6 +78,22 @@ public class CubaTreeTableWidget extends VTreeTable {
|
||||
removeStyleDependentName("body-focus");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected VScrollTableBody.VScrollTableRow getNextRowToFocus(VScrollTableBody.VScrollTableRow currentRow, int offset) {
|
||||
// Support select first N rows by Shift+Click #PL-3267
|
||||
if (focusedRow == currentRow && !focusedRow.isSelected()) {
|
||||
return focusedRow;
|
||||
}
|
||||
|
||||
return super.getNextRowToFocus(currentRow, offset);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean needToSelectFocused(VScrollTableBody.VScrollTableRow currentRow) {
|
||||
// Support select first N rows by Shift+Click #PL-3267
|
||||
return currentRow == focusedRow && (!focusedRow.isSelected());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableHead createTableHead() {
|
||||
return new CubaTreeTableTableHead();
|
||||
|
Loading…
Reference in New Issue
Block a user