Add onselect attribute for nextmatch

This commit is contained in:
Nathan Gray
2013-04-12 09:28:42 +00:00
parent b8609009dc
commit 7f80c74b59
3 changed files with 49 additions and 1 deletions

View File

@ -52,6 +52,9 @@ var et2_dataview_selectionManager = Class.extend({
this._inUpdate = false;
this._total = 0;
this._children = [];
// Callback for when the selection changes
this.select_callback = null;
},
destroy: function () {
@ -74,6 +77,7 @@ var et2_dataview_selectionManager = Class.extend({
{
this.unregisterRow(key, this._registeredRows[key].tr);
}
this.select_callback = null;
},
setIndexMap: function (_indexMap) {
@ -418,6 +422,11 @@ var et2_dataview_selectionManager = Class.extend({
{
this._selectRange(this._focusedEntry.idx, _entry.idx);
}
if(this.select_callback && typeof this.select_callback == "function")
{
this.select_callback.apply(this._context, arguments);
}
},
_selectRange: function (_start, _stop) {