(oTable, oSortTypes)
| 61 | */ |
| 62 | |
| 63 | function SortableTable(oTable, oSortTypes) { |
| 64 | |
| 65 | this.element = oTable; |
| 66 | this.tHead = oTable.tHead; |
| 67 | this.tBody = oTable.tBodies[0]; |
| 68 | this.document = oTable.ownerDocument || oTable.document; |
| 69 | |
| 70 | this.sortColumn = null; |
| 71 | this.descending = null; |
| 72 | |
| 73 | var oThis = this; |
| 74 | this._headerOnclick = function (e) { |
| 75 | oThis.headerOnclick(e); |
| 76 | }; |
| 77 | |
| 78 | |
| 79 | // only IE needs this |
| 80 | var win = this.document.defaultView || this.document.parentWindow; |
| 81 | this._onunload = function () { |
| 82 | oThis.destroy(); |
| 83 | }; |
| 84 | if (win && typeof win.attachEvent != "undefined") { |
| 85 | win.attachEvent("onunload", this._onunload); |
| 86 | } |
| 87 | |
| 88 | this.initHeader(oSortTypes || []); |
| 89 | } |
| 90 | |
| 91 | SortableTable.gecko = navigator.product == "Gecko"; |
| 92 | SortableTable.msie = /msie/i.test(navigator.userAgent); |
nothing calls this directly
no outgoing calls
no test coverage detected