Changeset 69 for trunk/dns.cgi


Ignore:
Timestamp:
02/16/11 11:37:48 (14 years ago)
Author:
Kris Deugau
Message:

/trunk

Changes for much nicer-looking, nifty collapsible tree for groups

  • CSS derived from http://www.thecssninja.com/css/css-tree-menu
  • HTML changes to match
  • Template changes to make the source more closely match the rendered display (and the real tree structure)
  • Minor source tweaks to work with the template changes

Still to ponder:

  • IE (CSS collapsing tree doesn't render correctly in IE 6 or 8, *may* work in 9, pretty much guaranteed to fail in < 6), experiments with <!-- [if IE]--> constructs show they don't work well in <head>
  • Tweaks to allow clicking a group name in the tree to switch to that group (currently the hidden checkbox seems to take over then entire name/line/label, making it easy to expand or collapse the group, but harder to use it for anything else)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r68 r69  
    10081008  my $root = shift;
    10091009  my $cur = shift;
     1010  my $indent = shift || '    ';
    10101011
    10111012  my @childlist;
     
    10151016  return if $#childlist == -1;
    10161017  my @grouplist;
    1017   my $foome = 0;
    10181018  foreach (@childlist) {
    10191019    my %row;
    10201020    $row{grpname} = groupName($dbh,$_);
    1021     $row{grpname} = "<b>$row{grpname}</b>" if $_ == $cur;
    1022     $row{subs} = fill_grptree($_,$cur);
    1023     $row{last} = 1 if ++$foome > $#childlist;
     1021        # for all that HTML::Template is supposed to keep the HTML out of the Perl, this is so much more compact...
     1022    $row{grpdisp} = ($_ == $cur ? "<b>$row{grpname}</b>" : $row{grpname});
     1023    $row{subs} = fill_grptree($_,$cur,$indent.'    ');
     1024    $row{indent} = $indent;
    10241025    push @grouplist, \%row;
    10251026  }
     1027  $grptree->param(indent => $indent);
    10261028  $grptree->param(treelvl => \@grouplist);
    10271029  return $grptree->output;
Note: See TracChangeset for help on using the changeset viewer.