|
|
@ -489,22 +489,26 @@ var DynamicTable = new Class({ |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
selectRow : function (rowId) { |
|
|
|
selectRow : function (rowId) { |
|
|
|
this.selectedRows.empty(); |
|
|
|
this.deselectAll(); |
|
|
|
this.selectedRows.push(rowId); |
|
|
|
this.selectedRows.push(rowId); |
|
|
|
var trs = this.tableBody.getElements('tr'); |
|
|
|
this.tableBody.getElements('tr').each(function(tr) { |
|
|
|
for (var i = 0; i < trs.length; i++) { |
|
|
|
if (tr.rowId == rowId) |
|
|
|
var tr = trs[i]; |
|
|
|
|
|
|
|
if (tr.rowId == rowId) { |
|
|
|
|
|
|
|
if (!tr.hasClass('selected')) |
|
|
|
|
|
|
|
tr.addClass('selected'); |
|
|
|
tr.addClass('selected'); |
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
else |
|
|
|
if (tr.hasClass('selected')) |
|
|
|
|
|
|
|
tr.removeClass('selected'); |
|
|
|
tr.removeClass('selected'); |
|
|
|
} |
|
|
|
}); |
|
|
|
this.onSelectedRowChanged(); |
|
|
|
this.onSelectedRowChanged(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reselectRows : function(rowIds) { |
|
|
|
|
|
|
|
this.deselectAll(); |
|
|
|
|
|
|
|
this.selectedRows = rowIds.slice(); |
|
|
|
|
|
|
|
this.tableBody.getElements('tr').each(function(tr) { |
|
|
|
|
|
|
|
if (rowIds.indexOf(tr.rowId) > -1) |
|
|
|
|
|
|
|
tr.addClass('selected'); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onSelectedRowChanged : function () {}, |
|
|
|
onSelectedRowChanged : function () {}, |
|
|
|
|
|
|
|
|
|
|
|
updateRowData : function (data) { |
|
|
|
updateRowData : function (data) { |
|
|
|