[Bps-public-commit] r9071 - in SVKUI/trunk: lib share/web/static/css t

clsung at bestpractical.com clsung at bestpractical.com
Mon Sep 17 06:27:30 EDT 2007


Author: clsung
Date: Mon Sep 17 06:27:22 2007
New Revision: 9071

Added:
   SVKUI/trunk/t/00-selenium.t
Modified:
   SVKUI/trunk/lib/SVKUI.pm
   SVKUI/trunk/lib/SVKUI/View.pm
   SVKUI/trunk/share/web/static/css/app.css

Log:
- wondering why I failed push (-l?) back
- push directly some codes according to a previous patch :-/ 

Modified: SVKUI/trunk/lib/SVKUI.pm
==============================================================================
--- SVKUI/trunk/lib/SVKUI.pm	(original)
+++ SVKUI/trunk/lib/SVKUI.pm	Mon Sep 17 06:27:22 2007
@@ -77,6 +77,7 @@
     my $reset = shift || 0;
     $class->_peekoutput(undef) if $reset;
     return $class->_peekoutput if $class->_peekoutput;
+    warn "use new peek";
     use FileHandle;
     my $fh;
     $fh = new FileHandle Jifty->config->app('output'), "r";

Modified: SVKUI/trunk/lib/SVKUI/View.pm
==============================================================================
--- SVKUI/trunk/lib/SVKUI/View.pm	(original)
+++ SVKUI/trunk/lib/SVKUI/View.pm	Mon Sep 17 06:27:22 2007
@@ -160,21 +160,50 @@
 	show '/__jifty/error/command_failed';
     } else {
     
-    h2 { ('Output of '.$cmd.' in '.$mirror->name.' project') };
-    dl {
 	if ($cmd eq 'list') {
-#	    my @relpaths = split /\n/, $command->output_raw;
-	    my @relpaths = $command->output_lines;
-	    for my $_relpath (@relpaths) {
-		dt { 
-		    Jifty->web->link( url => '/ia2/'.$mirror->name."/" . ($_relpath =~ m#/$#m ? 'list' : 'annotate') ."?path=$relpath/$_relpath", label => $_relpath)
+	    h2 { ('Output of '.$cmd.' in '.$mirror->name.' project') };
+	    my @relpaths = split /\n/, $command->output_raw;
+	    div { { id is 'jumprev' }
+		div {
+		    label { 'Go To' }
 		}
-	    }
+	    };
+	    table { {class is 'listing' } { id is 'dirlist' } {summary is 'Browse Listing'} 
+		thead { 
+		    row {
+			th { {class is 'name' } 'Name' }
+			th { {class is 'rev' } 'Revision' }
+			th { {class is 'size' } 'Size' }
+			th { {class is 'age' } 'Age' }
+			th { {class is 'change' } 'Last Change' }
+		    }
+		}
+		tbody {
+		for my $_relpath (@relpaths) {
+		    row {
+			if ($_relpath =~ m#/$#m) {
+			cell {
+			Jifty->web->link (url => '/ia2/'.$mirror->name."/list?path=$relpath/$_relpath", label => $_relpath);
+			};
+			} else {
+			cell {
+			Jifty->web->link (url => '/ia2/'.$mirror->name."/annotate?path=$relpath/$_relpath", label => $_relpath);
+			};
+			}
+			cell { 'N/A' };
+			cell { 'N/A' };
+			cell { 'N/A' };
+			cell { 'N/A' };
+		    }
+		}
+	    };
+	    };
 	} else {
-	    pre { outs($command->output_raw) };
+	    dl {
+		pre { outs($command->output_raw) };
+	    };
 	}
     }
-    }
 };
 
 template '/' => page {

Modified: SVKUI/trunk/share/web/static/css/app.css
==============================================================================
--- SVKUI/trunk/share/web/static/css/app.css	(original)
+++ SVKUI/trunk/share/web/static/css/app.css	Mon Sep 17 06:27:22 2007
@@ -24,3 +24,26 @@
     border: 1px solid #b71111;
     color: #b71111;
 }
+
+/* for browse */
+/* Styles for the directory entries table
+ *    (extends the styles for "table.listing") */
+#dirlist { margin-top: 0 }
+#dirlist td.rev, #dirlist td.age, #dirlist td.change, #dirlist td.size {
+    color: #888;
+    white-space: nowrap;
+}
+#dirlist td.size { text-align: right; }
+#dirlist td.name { width: 100% }
+#dirlist td.name a, #dirlist td.name span {
+    background-position: 0% 50%;
+    background-repeat: no-repeat;
+    padding-left: 20px;
+}
+#dirlist td.name a.parent { background-image: url(parent.png) }
+#dirlist td.name a.dir { background-image: url(folder.png) }
+#dirlist td.name span.dir { background-image: url(folderdeny.png) }
+#dirlist td.name a.file { background-image: url(file.png) }
+#dirlist td.name span.file { background-image: url(filedeny.png) }
+#dirlist td.name a, #dirlist td.rev a { border-bottom: none; display: block }
+#dirlist td.change * { font-size: 9px }

Added: SVKUI/trunk/t/00-selenium.t
==============================================================================
--- (empty file)
+++ SVKUI/trunk/t/00-selenium.t	Mon Sep 17 06:27:22 2007
@@ -0,0 +1,10 @@
+#!/usr/bin/env perl
+use warnings;
+use strict;
+
+use Jifty::Test tests => 3;
+use Jifty::Test::WWW::Selenium;
+my $server  = Jifty::Test->make_server;
+my $sel = Jifty::Test::WWW::Selenium->rc_ok( $server );
+my $URL = $server->started_ok;
+$sel->open_ok("/");



More information about the Bps-public-commit mailing list