Author: konstantin.mishin
Date: 2007-06-22 14:07:10 -0400 (Fri, 22 Jun 2007)
New Revision: 1282
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
Log:
add selection JS events
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-06-22
18:06:39 UTC (rev 1281)
+++
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-06-22
18:07:10 UTC (rev 1282)
@@ -226,6 +226,7 @@
this.selection = new ClientUI.controls.grid.Selection();
this.inputElement = grid.options.selectionInput;
+ this.onselectionchange = grid.options.onselectionchange;
this.selectedClass = grid.options.selectedClass;
this.activeClass = grid.options.activeClass;
@@ -387,7 +388,7 @@
this.lostFocus();
}
if (noDefault) {
- this.selectionChanged();
+ this.selectionChanged(event);
if (event.preventBubble) event.preventBubble();
Event.stop(event);
}
@@ -431,13 +432,15 @@
} else if (document.selection) {
document.selection.empty();
}
- this.selectionChanged();
+ this.selectionChanged(event);
},
- selectionChanged: function() {
- $(this.inputElement).value = this.selection.inspectRanges()+ this.selectionFlag;
- var state = this.selection.getState();
-// IL.Event.fireEvent(this.grid.element, "selectionchange", {oldSelection:
this.oldState, newSelection: state}, null);
+ selectionChanged: function(event) {
+ $(this.inputElement).value = this.selection.inspectRanges()+ this.selectionFlag;
+ var state = this.selection.getState();
+ event.oldSelection = this.oldState;
+ event.newSelection = state;
+ this.onselectionchange(event);
this.oldState = state;
},
Show replies by date