2 getSelectedRows: function(element) {
4 if (element.tagName == 'TABLE') {
5 var tbody = (element.getElementsByTagName('tbody'))[0];
7 return $(tbody).getSelectedNodes();
9 else if (element.tagName == 'UL') {
10 return element.getSelectedNodes();
14 getSelectedRowsId: function(element) {
16 if (element.tagName == 'TABLE') {
17 var tbody = (element.getElementsByTagName('tbody'))[0];
19 return $(tbody).getSelectedNodesId();
21 else if (element.tagName == 'UL') {
22 return element.getSelectedNodesId();
26 selectRowsMatchingClass: function(element, className) {
28 if (element.tagName == 'TABLE') {
29 var tbody = (element.getElementsByTagName('tbody'))[0];
30 var nodes = tbody.childNodes;
31 for (var i = 0; i < nodes.length; i++) {
32 var node = nodes.item(i);
33 if (node.tagName && node.hasClassName(className))
39 getColumnsWidth: function(element) {
41 var widths = new Array();
42 if (element.tagName == 'TABLE') {
43 var cells = TableKit.getHeaderCells(element);
44 for (var i = 0; i < cells.length; i++) {
45 widths[i] = $(cells[i]).getWidth();
51 setColumnsWidth: function(element, widths) {
53 if (element.tagName == 'TABLE') {
54 for (var i = 0; i < widths.length; i++) {
55 TableKit.Resizable.resize(element, i, widths[i]);
61 }); // Element.addMethods