/** * Media Link Assistant Control module for phpGedView * * Media Link information about an individual * * webtrees: Web based Family History software * Copyright (C) 2010 webtrees development team. * * Derived from PhpGedView * Copyright (C) 2002 to 2008 PGV Development Team. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @package webtrees * @subpackage Census Assistant * @version $Id$ */ var INPUT_NAME_PREFIX = 'InputCell_'; // this is being set via script var RADIO_NAME = "totallyrad"; // this is being set via script var TABLE_NAME = 'addlinkQueue'; // this should be named in the HTML var ROW_BASE = 1; // first number (for display) var hasLoaded = false; window.onload=fillInRows; function fillInRows() { hasLoaded = true; //insertRowToTable(); //addRowToTable(); } // CONFIG: // myRowObject is an object for storing information about the table rows //function myRowObject(zero, one, two, three, four, five, six, seven, eight, nine, ten, cb, ra) function myRowObject(zero, one, two, cb, ra) { this.zero = zero; // text object this.one = one; // input text object this.two = two; // input text object this.cb = cb; // input checkbox object this.ra = ra; // input radio object } /* * insertRowToTable * Insert and reorder */ //function insertRowToTable(pid, nam, label, gend, cond, yob, age, YMD, occu, birthpl) function insertRowToTable(pid, nam, head) { if (hasLoaded) { var tbl = document.getElementById(TABLE_NAME); var rowToInsertAt = ""; // Get links list ==================================== var links = document.getElementById('existLinkTbl'); var numrows = links.rows.length; var strRow = ''; for (var i=1; i 0) { var rIndex = checkedObjArray[0].sectionRowIndex; deleteRows(checkedObjArray); reorderRows(tbl, rIndex); } } } // If there isn't an element with an onclick event in your row, then this function can't be used. function deleteCurrentRow(obj) { if (hasLoaded) { var delRow = obj.parentNode.parentNode; var tbl = delRow.parentNode.parentNode; var rIndex = delRow.sectionRowIndex; var rowArray = new Array(delRow); deleteRows(rowArray); reorderRows(tbl, rIndex); } } function reorderRows(tbl, startingIndex) { if (hasLoaded) { if (tbl.tBodies[0].rows[startingIndex]) { var count = startingIndex + ROW_BASE; for (var i=startingIndex; i