Changeset 498 for trunk/lib


Ignore:
Timestamp:
Oct 14, 2007, 8:09:34 AM (16 years ago)
Author:
Peter Johansson
Message:

fixes #223

Location:
trunk/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/File.cc

    r497 r498  
    251251      else
    252252        color = hex(static_cast<int>(k*blame.revision()+m),2);
    253       os << "<tr>\n<td class=\"rev\"><font color=\"#" << color
    254          << color << color << "\">" << blame.revision()
     253      os << "<tr>\n<td class=\"rev\">";
     254      std::stringstream color_ss;
     255      color_ss << "#" << color << color << color;
     256      os << "<font color=\"" << color_ss.str() << "\">"
     257         << trac_revision(blame.revision(), color_ss.str())
    255258         << "</font></td>\n<td class=\"date\"><font color=\"#" << color
    256259         << color << color << "\">" ;
  • trunk/lib/css.cc

    r439 r498  
    204204      << "background: #ffffff; }\n";
    205205    s << "table.blame tbody tr:hover { background: #eed; }\n";
     206    s << "table.blame tbody td a { display: block; }\n";
    206207    s << "\n";
    207208
  • trunk/lib/html_utility.cc

    r497 r498  
    3838  std::string anchor(const std::string& url,
    3939                     const std::string& name, u_int level,
    40                      const std::string& title)
     40                     const std::string& title,
     41                     const std::string& color)
    4142  {
    4243    std::stringstream ss;
     
    4950    ss << url;
    5051    ss << "\">";
     52    if (color.size())
     53      ss << "<font color=\"" << color << "\">";
    5154    hs << name;
     55    if (color.size())
     56      ss << "</font>";
    5257    ss << "</a>";
    5358    return ss.str();
     
    129134
    130135
    131   std::string trac_revision(size_t r)
     136  std::string trac_revision(size_t r, std::string color)
    132137  {
    133138    const Configuration& conf = Configuration::instance();
     
    138143      std::stringstream rev;
    139144      rev << r;
    140       ss << anchor(conf.trac_root()+"changeset/"+rev.str(), rev.str());
     145      ss << anchor(conf.trac_root()+"changeset/"+rev.str(), rev.str(),
     146                   0, "View ChangeSet "+rev.str(), color);
    141147    }
    142148    return ss.str();
  • trunk/lib/html_utility.h

    r439 r498  
    4444  std::string anchor(const std::string& url,
    4545                     const std::string& name, u_int level=0,
    46                      const std::string& title="");
     46                     const std::string& title="",
     47                     const std::string& color="");
    4748
    4849  ///
     
    6667  /// given otherwise just a string corresponding to passed parameter.
    6768  ///
    68   std::string trac_revision(size_t);
     69  std::string trac_revision(size_t, std::string color="");
    6970
    7071}} // end of namespace svndigest end of namespace theplu
Note: See TracChangeset for help on using the changeset viewer.