Changeset 2899


Ignore:
Timestamp:
2001-12-14T13:18:02+13:00 (22 years ago)
Author:
sjboddie
Message:

Added Alan Christensen's W3ImagePlug

Location:
trunk/gsdl
Files:
1 added
1 edited

Legend:

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

    r2763 r2899  
    124124  ResultDocInfo_tarray::iterator endsection = sections.docInfo.end();
    125125
     126  // ** here lies Alan's hack to get 4 results per table row
     127  int item = 0, perline;; // set perline to 1 normally
     128  text_t fstring;
     129  if ( thissection != endsection ) { // only if there are results (else corrupts display)
     130    fstring =
     131      get_formatted_string (collection, collectproto,
     132                *thissection, disp, formatlistptr, link, icon, false, logout);
     133    // if format string
     134    // has <td><t (e.g. <td><table>) then
     135    // we assume it is an image and put it in 4 columns
     136    if (fstring[5] == 't')
     137      perline = 4;
     138    else
     139      perline = 1;
     140  }
     141
    126142  while (thissection != endsection) {
    127 
     143    item++;
    128144    get_link_icon (*thissection, args, collink, link, icon);
    129145    bool highlight = false;
     
    133149      if (arg_cl == (*thissection).OID) highlight = true;
    134150
    135     if (use_table || colnumber > 0) textout << "<tr valign=top>";
     151    if ((item == 1 && use_table) || colnumber > 0 )
     152      textout << "<tr valign=top>\n";
     153
    136154    textout << outconvert << disp
    137         << get_formatted_string (collection, collectproto,
    138                      *thissection, disp, formatlistptr,
    139                      link, icon, highlight, logout);
    140 
    141     if (use_table || colnumber > 0) textout << "</tr>";
     155        << " " << get_formatted_string (collection, collectproto,
     156      *thissection, disp, formatlistptr, link, icon, false, logout);
     157
     158    if ((item >= perline && use_table) || colnumber > 0) {
     159      textout << "\n</tr>";
     160      item = 0;
     161    }
    142162    textout << "\n";
    143163    thissection ++;
Note: See TracChangeset for help on using the changeset viewer.