Changeset 182


Ignore:
Timestamp:
Sep 3, 2006, 10:46:34 AM (15 years ago)
Author:
Peter Johansson
Message:

fixes #52 in table output directories are bold whereas files are normal.

Location:
trunk/lib
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Directory.cc

    r181 r182  
    117117
    118118
     119  const std::string Directory::node_type(void) const
     120  {
     121    return std::string("directory");
     122  }
     123
     124
    119125  void Directory::print(const bool verbose) const
    120126  {
     
    143149    if (level_){
    144150      os << "<tr class=\"light\">\n";
    145       os << "<td colspan=\"6\">";
     151      os << "<td class=\"directory\" colspan=\"6\">";
    146152      anchor(os, "../index.html", "../");
    147153      os << "</td>\n</tr>\n";
  • trunk/lib/Directory.h

    r176 r182  
    7070    std::string href(void) const;
    7171
     72    ///
     73    /// @return directory
     74    ///
     75    const std::string node_type(void) const;
     76
    7277    const Stats& parse(const bool verbose=false);
    7378
  • trunk/lib/File.cc

    r181 r182  
    4545
    4646
     47  const std::string File::node_type(void) const
     48  {
     49    return std::string("file");
     50  }
     51
     52
    4753  const Stats& File::parse(const bool verbose)
    4854  {
     
    8086    bool dark=false;
    8187    os << "<tr class=\"light\">\n";
    82     os << "<td colspan=\"5\">";
     88    os << "<td class=\"directory\" colspan=\"5\">";
    8389    anchor(os, "index.html", "../");
    8490    os << "</td>\n</tr>\n";
  • trunk/lib/File.h

    r176 r182  
    4848
    4949    ///
     50    /// @return file
     51    ///
     52    const std::string node_type(void) const;
     53
     54    ///
    5055    /// @brief Parsing out information from svn repository
    5156    ///
  • trunk/lib/Node.cc

    r181 r182  
    6767  {
    6868    os << "<tr class=\"" << css_class << "\">\n"
    69        << "<td>" ;
     69       << "<td class=\"" << node_type() << "\">";
    7070    if (binary())
    7171      os << name() << " (<i>binary</i>)";
  • trunk/lib/Node.h

    r177 r182  
    8989
    9090    ///
     91    /// @return file or directory
     92    ///
     93    virtual const std::string node_type(void) const=0;
     94
     95    ///
    9196    /// @return
    9297    ///
  • trunk/lib/html_utility.cc

    r179 r182  
    169169    s << "table.listings tbody tr:hover { background: #eed }\n";
    170170    s << "table.listings tbody td { text-align: left }\n";
     171    s << "table.listings tbody td.directory { font-weight: bold }\n";
    171172    s << "\n";
    172173    s << ".sep { color: #666}\n";
Note: See TracChangeset for help on using the changeset viewer.