|
|
@ -199,12 +199,12 @@ remove_row: function(uid, sel_next)
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Add row to the list and initialize it
|
|
|
|
* Add row to the list and initialize it
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
insert_row: function(row, attop)
|
|
|
|
insert_row: function(row, before)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var tbody = this.list.tBodies[0];
|
|
|
|
var tbody = this.list.tBodies[0];
|
|
|
|
|
|
|
|
|
|
|
|
if (attop && tbody.rows.length)
|
|
|
|
if (before && tbody.rows.length)
|
|
|
|
tbody.insertBefore(row, tbody.firstChild);
|
|
|
|
tbody.insertBefore(row, (typeof before == 'object' && before.parentNode == tbody) ? before : tbody.firstChild);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
tbody.appendChild(row);
|
|
|
|
tbody.appendChild(row);
|
|
|
|
|
|
|
|
|
|
|
|