Changeset 11166


Ignore:
Timestamp:
2006-01-31T15:40:55+13:00 (18 years ago)
Author:
kjdon
Message:

collector buttons now use css. left them in a table, but used background colors instead of images

File:
1 edited

Legend:

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

    r9931 r11166  
    728728// will be hyperlinked
    729729
    730 text_t collectoraction::get_button (const text_t &thispage, const text_t &color,
     730text_t collectoraction::get_button(const text_t &thispage, const text_t &color,
    731731                    const text_t &type, bool enabled) {
    732732
     
    735735    return g_EmptyText;
    736736
    737   text_t prefix = "gc";
    738   if (color == "grey") prefix = "nc";
    739   else if (color == "yellow") prefix = "yc";
     737  text_t href = "_http"+type+"_";
     738  text_t target = "";
     739  if (thispage == "info" || thispage == "srce" || thispage == "conf" ||
     740      thispage == "bildcancel" || thispage == "bildfail") {
     741    // call the check submit macro instead of linking directly to the page
     742    href="\"javascript:check_submit('"+type+"');\"";
     743  } else if (type == "view") {
     744    // view button is special case as it needs a target=_top
     745    target = " target=_top";
     746  }
    740747 
    741   text_t httpicon = "httpicon" + prefix + type;
    742  
     748  text_t tdclass = "collectorbar"+color;
    743749  if (enabled) {
    744     text_t gsmacro = "_gsimage_";
    745     if (thispage == "info" || thispage == "srce" || thispage == "conf" ||
    746     thispage == "bildcancel" || thispage == "bildfail") {
    747       gsmacro = "_gsjimage_";
    748     } else if (type == "view") {
    749       // view button is special case as it needs a target=_top
    750       gsmacro = "_gstimage_";
    751     }
    752     return "<td>" + gsmacro + "(_collector:http" + type + "_,_collector:" + httpicon +
    753       "of_,_collector:" + httpicon + "on_," + type + ",_collector:text" + type + "_)</td>\n";
    754   } else {
    755     return "<td>_icon" + prefix + type + "of_</td>\n";
    756   }
    757 }
     750    // link to the appropriate page
     751    return "<td class="+tdclass+"><a href="+href+target+">_text"+type+"_</a></td>";
     752  }
     753  else {
     754    // just display the text
     755    return "<td class="+tdclass+">_text"+type+"_</td>";
     756  }
     757}
     758
    758759
    759760// set the _fullnamemenu_ macro (and _warnindex_ and _selectedindex_ if
     
    10641065
    10651066  // set the collectorbar macro
    1066   text_t collectorbar = "<table border=0 cellspacing=4 cellpadding=0><tr>\n";
     1067  text_t collectorbar = "<table class=collectorbar border=0 cellspacing=4 cellpadding=0><tr>\n";
    10671068
    10681069  if (collector_page == "new") {
Note: See TracChangeset for help on using the changeset viewer.