1 /*----------------------------------------------------------------------------\
2 | Selectable Elements 1.02 |
3 |-----------------------------------------------------------------------------|
4 | Created by Erik Arvidsson |
5 | (http://webfx.eae.net/contact.html#erik) |
6 | For WebFX (http://webfx.eae.net/) |
7 |-----------------------------------------------------------------------------|
8 | A script that allows children of any element to be selected |
9 |-----------------------------------------------------------------------------|
10 | Copyright (c) 1999 - 2004 Erik Arvidsson |
11 |-----------------------------------------------------------------------------|
12 | This software is provided "as is", without warranty of any kind, express or |
13 | implied, including but not limited to the warranties of merchantability, |
14 | fitness for a particular purpose and noninfringement. In no event shall the |
15 | authors or copyright holders be liable for any claim, damages or other |
16 | liability, whether in an action of contract, tort or otherwise, arising |
17 | from, out of or in connection with the software or the use or other |
18 | dealings in the software. |
19 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
20 | This software is available under the three different licenses mentioned |
21 | below. To use this software you must chose, and qualify, for one of those. |
22 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
23 | The WebFX Non-Commercial License http://webfx.eae.net/license.html |
24 | Permits anyone the right to use the software in a non-commercial context |
26 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
27 | The WebFX Commercial license http://webfx.eae.net/commercial.html |
28 | Permits the license holder the right to use the software in a commercial |
29 | context. Such license must be specifically obtained, however it's valid for |
30 | any number of implementations of the licensed software. |
31 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
32 | GPL - The GNU General Public License http://www.gnu.org/licenses/gpl.txt |
33 | Permits anyone the right to use and modify the software without limitations |
34 | as long as proper credits are given and the original and modified source |
35 | code are included. Requires that the final product, software derivate from |
36 | the original source or any software utilizing a GPL component, such as |
37 | this, is also licensed under the GPL license. |
38 |-----------------------------------------------------------------------------|
39 | 2002-09-19 | Original Version Posted. |
40 | 2002-09-27 | Fixed a bug in IE when mouse down and up occured on different |
42 | 2003-02-11 | Minor problem with addClassName and removeClassName that |
43 | | triggered a bug in Opera 7. Added destroy method |
44 |-----------------------------------------------------------------------------|
45 | Created 2002-09-04 | All changes are in the log above. | Updated 2003-02-11 |
46 \----------------------------------------------------------------------------*/
48 /*----------------------------------------------------------------------------\
49 | This file requires that SelectableElements is first defined. This class can |
50 | be found in the file selectableelements.js at WebFX |
51 \----------------------------------------------------------------------------*/
53 function SelectableTableRows(oTableElement, bMultiple) {
54 SelectableElements.call(this, oTableElement, bMultiple);
56 SelectableTableRows.prototype = new SelectableElements;
58 SelectableTableRows.prototype.isItem = function (node) {
59 return node != null && node.tagName == "TR" &&
60 node.parentNode.tagName == "TBODY" &&
61 node.parentNode.parentNode == this._htmlElement;
64 /* Indexable Collection Interface */
66 SelectableTableRows.prototype.getItems = function () {
67 return this._htmlElement.rows;
70 SelectableTableRows.prototype.getItemIndex = function (el) {
74 SelectableTableRows.prototype.getItem = function (i) {
75 return this._htmlElement.rows[i];
78 /* End Indexable Collection Interface */