Changeset 11131


Ignore:
Timestamp:
2006-01-27T12:47:40+13:00 (18 years ago)
Author:
jrm21
Message:

use CSS instead of tables for cover images/heading, document buttons.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/browsetools.cpp

    r10981 r11131  
    8484    here = buttons.begin();
    8585    end = buttons.end();
    86     int count = 0;
    8786    while (here != end) {
    88       if ((count != 0) && ((count % 2) == 0)) textout<< outconvert << "<br>\n";
    8987      textout << outconvert << disp << *here;
    90       ++count;
    9188      ++here;
    9289    }
     
    109106  if (args["d"].empty()) return;
    110107 
    111   textout << outconvert << disp << "<img alt=\"\" onError=\"src='_httpimg_/blank.gif'\" src=\"_httpcollimg_/_thisOID_/cover.jpg\"><br>\n";
     108  textout << outconvert << disp << "<img alt=\"\" onError=\"src='_httpimg_/blank.gif'\" src=\"_httpcollimg_/_thisOID_/cover.jpg\">\n";
    112109}
    113110
     
    796793
    797794  int tabcount = 0;
    798   bool havecontrols = false;
    799795  bool fulltoc = false;
    800796
     
    810806  // if we're inside a book
    811807  if ((!fulltoc) && (!args["d"].empty())) {
    812     textout << outconvert << "<center>\n";
    813     textout << outconvert << disp << "<p><table width=_pagewidth_ cellpadding=0 cellspacing=0><tr>\n";
    814     textout << outconvert << "<td valign=top align=left";
    815     if (formatinfo.DocumentContents) textout << outconvert << " width=200>\n";
    816     else textout << outconvert << " width=\"100%\">\n";
     808    textout << outconvert << "<div class=\"heading\">\n";
    817809    if (formatinfo.DocumentImages)
    818810      output_cover_image (args, collectproto, disp, outconvert, textout, logout);
    819811    else if (formatinfo.DocumentTitles)
    820812      output_titles (args, collectproto, browsermap, formatinfo, disp, outconvert, textout, logout);
     813    textout << outconvert << "\n</div>\n\n<div class=\"buttons\" id=\"toc_buttons\">\n";
    821814    if (args["u"] != "1") {
    822815      output_controls (args, formatinfo.DocumentButtons, collectproto, disp,
    823816               outconvert, textout, logout);
    824817    }
    825     textout << outconvert << "</td><td valign=\"top\">\n"; 
    826     havecontrols = true;
     818    textout << outconvert << "</div>\n\n";
    827819  }
    828820
    829821  if (formatinfo.DocumentContents || args["d"].empty()) {
     822    textout << outconvert << "<div class=\"toc\">\n";
    830823    if (args.getintarg("gc") == 1) {
    831824     
     
    838831      expand_show_contents(args, tabcount, fulltoc, browsermap, formatinfo,
    839832            collectproto, disp, outconvert, textout, logout);
    840     } else {
     833    } else {
    841834     
    842835      // contracted table of contents
     
    844837               collectproto, disp, outconvert, textout, logout);
    845838    }
    846   }
    847 
    848   if (havecontrols) textout << outconvert << "</td></tr></table></center>\n";
     839    textout << outconvert << "</div>\n";
     840  }
    849841
    850842  //if there is a format specified in the config file then
Note: See TracChangeset for help on using the changeset viewer.