","").replace("","");
< pref = ",";
< }
< }
< return clist;
< },
< showInfo: function(andmore, tObj) {
---
> showInfo: function(andmore) {
225,230c24
< if (cur_book == 1 && andmore == "more") {
< tObj.init(this.tablename, this.getCList(bookb.innerHTML), bookb.innerHTML);
< }
< var trow = "| " + cur_book + " | " + this.title + " | " + this.subtitle + " | " + this.author + " | " + this.published + " | " + this.publishing_date + " | " + this.total_pages + " | " + this.total_chapters + " | " + this.comments + " |
"
< tObj.addrow(trow);
< if (bookb != null) bookb.innerHTML = bookb.innerHTML + trow;
---
> bookb.innerHTML = bookb.innerHTML + "| " + cur_book + " | " + this.title + " | " + this.subtitle + " | " + this.author + " | " + this.published + " | " + this.publishing_date + " | " + this.total_pages + " | " + this.total_chapters + " | " + this.comments + " |
";
233a28,29
> total_pages: this.total_pages,
> total_chapters: this.total_chapters,
237,238d32
< total_pages: this.total_pages,
< total_chapters: this.total_chapters,
241,243c35
< var obbih = document.getElementById('bbih');
< if (obbih != null) obbih.value = bookb.innerHTML;
< if (andmore == 'more') this.book_ask(tObj);
---
> if (andmore == 'more') this.book_ask();
251a44
> //alert(book_array[(whichone - 1)].title);
253,262c46
< book_set: function(inb, ldata, tableObj) {
< if (lrow != ldata) {
< cur_book = inb;
< var cdata = ldata.split(",");
< this.init(cdata[0], cdata[1], cdata[2], cdata[3], cdata[4], cdata[5], cdata[6], cdata[7]);
< this.showInfo('nomore', tableObj);
< lrow = ldata;
< }
< },
< book_ask: function(tObj) {
---
> book_ask: function() {
275,297c59,60
< this.init(title, subtitle, author, published, publishing_date, total_pages, total_chapters, comments);
< this.showInfo('more', tObj);
< } else {
< var formx = document.getElementById('xform');
< formx.style.display = 'block';
< }
< },
< piecetogether: function(header, rest, myTs) {
< var bookb = document.getElementById('book_body');
< this.init('','','','','','','','');
< if (bookb != null) {
< bookb.innerHTML = header;
< }
< var obbih = document.getElementById('bbih');
< if (obbih != null) obbih.value = header;
< myTs.init(myObject.tablename, myTs.getCList(header), header);
< if (rest != "") {
< var rest2 = rest.replace(/<\/tr>/g,"~");
< var ij, rows = rest2.split("~");
< for (ij=1; ij<=rows.length; ij++) {
< myTs.rlist[this.rlist.length] = "<tr>" + rows[ij - 1];
< myTs.rowlist[this.rowlist.length] = this.getCList("<tr>" + rows[ij - 1]);
< this.book_set(ij, myTs.getCList("<tr>" + rows[ij - 1]), this);
---
> this.init(title, subtitle, total_pages, total_chapters, author, publishing_date, published, comments);
> this.showInfo('more');
299,309c62
< }
< },
< pieceonerow: function(rest, myTs) {
< var rest2 = rest.replace(/<\/tr>/g,"~");
< var ij, rows = rest2.split("~");
< for (ij=1; ij<=rows.length; ij++) {
< myTs.rlist[myTs.rlist.length] = "<tr>" + rows[ij - 1];
< myTs.rowlist[myTs.rowlist.length] = myTs.getCList("<tr>" + rows[ij - 1]);
< this.book_set(ij, myTs.getCList("<tr>" + rows[ij - 1]), myTs);
< }
< },
---
> }
311,321d63
<
<
<
< myObject = Object.create(Book);
< tableObject = Object.create(TableSpreadsheet);
<
<
< function atstart() {
< myObject.book_ask(tableObject);
< }
<
324c66
<
---
>
326c68
< Your Book List (more OOP) goes below ...
---
> Your Book List (towards OOP) goes below ...
333d74
<