Author: konstantin.mishin
Date: 2010-07-01 12:21:37 -0400 (Thu, 01 Jul 2010)
New Revision: 17697
Modified:
root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources/extendedDataTable.js
Log:
RF-8101
Modified:
root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources/extendedDataTable.js
===================================================================
---
root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources/extendedDataTable.js 2010-07-01
16:01:54 UTC (rev 17696)
+++
root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources/extendedDataTable.js 2010-07-01
16:21:37 UTC (rev 17697)
@@ -550,12 +550,11 @@
}
var selectionKeyDownListener = function(event) {
- if (event.ctrlKey && options.selectionMode != "single" &&
(event.keyCode == 65 || event.keyCode == 97)) { //Ctrl-A
- if(onbeforeselectionchange(event)) {
- selectRows([0, rows]);
- selectionFlag = "a";
- onselectionchange(event, activeIndex, true); //TODO Is there a way to know that
selection haven't changed?
- }
+ if (event.ctrlKey && options.selectionMode != "single" &&
(event.keyCode == 65 || event.keyCode == 97) //Ctrl-A
+ && onbeforeselectionchange(event)) {
+ selectRows([0, rows]);
+ selectionFlag = "a";
+ onselectionchange(event, activeIndex, true); //TODO Is there a way to know that
selection haven't changed?
return false;
}
if (typeof activeIndex == "number") {
@@ -565,18 +564,16 @@
} else if (event.keyCode == 40 && activeIndex < rows - 1) { //DOWN
index = activeIndex + 1;
}
- if (index != null) {
- if(onbeforeselectionchange(event)) {
- var changed;
- if (options.selectionMode == "single" || (!event.shiftKey &&
!event.ctrlKey)) {
- changed = selectRows([index, index]);
- } else if (event.shiftKey) {
- changed = processSlectionWithShiftKey(index);
- }
- setActiveRow(index);
- //showRow
- onselectionchange(event, index, changed);
+ if (index != null && onbeforeselectionchange(event)) {
+ var changed;
+ if (options.selectionMode == "single" || (!event.shiftKey &&
!event.ctrlKey)) {
+ changed = selectRows([index, index]);
+ } else if (event.shiftKey) {
+ changed = processSlectionWithShiftKey(index);
}
+ setActiveRow(index);
+ //showRow
+ onselectionchange(event, index, changed);
return false;
}
}