Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r30 - trunk/src: . Controls Utils skins/TigrisSubview

subview
Discussion topic

Back to topic list

svn commit: r30 - trunk/src: . Controls Utils skins/TigrisSubview

Reply

Author rayj
Full name Ray Johnson
Date 2006-09-21 14:53:12 PDT
Message Author: rayj
Date: 2006-09-21 14:53:12-0700
New Revision: 30

Added:
   trunk/src/Controls/S​vnPathLeafLabel.cs
Modified:
   trunk/src/Controls/F​ileView.ascx.cs
   trunk/src/Controls/SizeLabel.cs
   trunk/src/Controls/S​vnPathItemLabel.cs
   trunk/src/Controls/S​vnPathItemLink.cs
   trunk/src/Controls/S​vnPathRepeater.cs
   trunk/src/Subview.csproj
   trunk/src/TASKS.txt
   trunk/src/Utils/DiffToHTML.cs
   trunk/src/skins/Tigr​isSubview/FileView.a​scx

Log:
Added SvnPathLeafLabel & made various fixes


Modified: trunk/src/Controls/F​ileView.ascx.cs
Url: http://subview.tigri​s.org/source/browse/​subview/trunk/src/Co​ntrols/FileView.ascx​.cs?view=diff&re​v=30&p1=trunk/sr​c/Controls/FileView.​ascx.cs&p2=trunk​/src/Controls/FileVi​ew.ascx.cs&r1=29​&r2=30
====================​====================​====================​==================
--- trunk/src/Controls/F​ileView.ascx.cs (original)
+++ trunk/src/Controls/F​ileView.ascx.cs 2006-09-21 14:53:12-0700
@@ -28,6 +28,15 @@
             get { return fileLogEntry; }
         }
         LogEntry fileLogEntry = null;
+
+ /// <summary>
+ /// Used by template control to display info from "svn ls" command - like filesize
+ /// </summary>
+ public SvnList FileListInfo
+ {
+ get { return listInfo; }
+ }
+ SvnList listInfo;
 
         /// <summary>
         /// View a file control
@@ -39,6 +48,9 @@
             SvnLog log = Svn.Log(SvnPath, Revision, 1, false);
             fileLogEntry = log.LogEntries[0];
 
+ SvnList[] list = Svn.List(SvnPath, Revision);
+ listInfo = list[0];
+
             string result = "<b>error...</b>";
             string filePath = Request.Url.AbsolutePath;
             FileType extensionInfo = new FileType(filePath);

Modified: trunk/src/Controls/SizeLabel.cs
Url: http://subview.tigri​s.org/source/browse/​subview/trunk/src/Co​ntrols/SizeLabel.cs?​view=diff&rev=30​&p1=trunk/src/Co​ntrols/SizeLabel.cs​&p2=trunk/src/Con​trols/SizeLabel.cs​&r1=29&r2=30
====================​====================​====================​==================
--- trunk/src/Controls/SizeLabel.cs (original)
+++ trunk/src/Controls/SizeLabel.cs 2006-09-21 14:53:12-0700
@@ -29,6 +29,18 @@
             base.OnDataBinding(e);
         }
 
+ protected override void OnPreRender(EventArgs e)
+ {
+ FileView fileView = CtrlUtil.FindParentO​fType<FileView​>(this.Parent);
+ if (fileView != null)
+ {
+ SvnList listInfo = fileView.FileListInfo;
+ sizeStr = listInfo.Size.ToString();
+ }
+
+ base.OnPreRender(e);
+ }
+
         protected override void Render(HtmlTextWriter writer)
         {
             writer.Write(sizeStr);

Modified: trunk/src/Controls/S​vnPathItemLabel.cs
Url: http://subview.tigri​s.org/source/browse/​subview/trunk/src/Co​ntrols/SvnPathItemLa​bel.cs?view=diff​&rev=30&p1=trunk​/src/Controls/SvnPat​hItemLabel.cs&p2​=trunk/src/Controls/​SvnPathItemLabel.cs​&r1=29&r2=30
====================​====================​====================​==================
--- trunk/src/Controls/S​vnPathItemLabel.cs (original)
+++ trunk/src/Controls/S​vnPathItemLabel.cs 2006-09-21 14:53:12-0700
@@ -12,16 +12,22 @@
 {
     public class SvnPathItemLabel : PlaceHolder
     {
- /// <summary>
- /// SvnPath Item Label
- /// </summary>
- public string SvnPathItemName
+ string svnPathItemName;
+
+ protected override void OnDataBinding(EventArgs e)
         {
- get { return svnPathItemName; }
- set { svnPathItemName = value; }
+ RepeaterItem repeatItem = CtrlUtil.FindParentO​fType<RepeaterIte​m>(this.Parent);
+ if (repeatItem != null)
+ {
+ if (repeatItem.Parent is SvnPathRepeater)
+ {
+ SvnPathRepeater.ItemInfo info = (SvnPathRepeater.Ite​mInfo)repeatItem.Dat​aItem;
+ svnPathItemName = info.itemName;
+ }
+ }
+ base.OnDataBinding(e);
         }
- string svnPathItemName;
-
+
         protected override void Render(HtmlTextWriter writer)
         {
             writer.Write(svnPathItemName);

Modified: trunk/src/Controls/S​vnPathItemLink.cs
Url: http://subview.tigri​s.org/source/browse/​subview/trunk/src/Co​ntrols/SvnPathItemLi​nk.cs?view=diff&​rev=30&p1=trunk/​src/Controls/SvnPath​ItemLink.cs&p2=t​runk/src/Controls/Sv​nPathItemLink.cs​&r1=29&r2=30
====================​====================​====================​==================
--- trunk/src/Controls/S​vnPathItemLink.cs (original)
+++ trunk/src/Controls/S​vnPathItemLink.cs 2006-09-21 14:53:12-0700
@@ -12,16 +12,22 @@
 {
     public class SvnPathItemLink : PlaceHolder
     {
- /// <summary>
- /// Set a link to a item the element in the SvnPath
- /// </summary>
- public string SvnPathItemHref
- {
- get { return url; }
- set { url = value; }
- }
         string url = null;
 
+ protected override void OnDataBinding(EventArgs e)
+ {
+ RepeaterItem repeatItem = CtrlUtil.FindParentO​fType<RepeaterIte​m>(this.Parent);
+ if (repeatItem != null)
+ {
+ if (repeatItem.Parent is SvnPathRepeater)
+ {
+ SvnPathRepeater.ItemInfo info = (SvnPathRepeater.Ite​mInfo)repeatItem.Dat​aItem;
+ url = info.itemUrl;
+ }
+ }
+ base.OnDataBinding(e);
+ }
+
         protected override void Render(HtmlTextWriter writer)
         {
             if (url != null)

Added: trunk/src/Controls/S​vnPathLeafLabel.cs
Url: http://subview.tigri​s.org/source/browse/​subview/trunk/src/Co​ntrols/SvnPathLeafLa​bel.cs?view=auto​&rev=30
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/Controls/S​vnPathLeafLabel.cs 2006-09-21 14:53:12-0700
@@ -0,0 +1,22 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebCon​trols.WebParts;
+using System.Web.UI.HtmlControls;
+
+namespace subview.Controls
+{
+ public class SvnPathLeafLabel : PlaceHolder
+ {
+ protected override void Render(HtmlTextWriter writer)
+ {
+ string leaf = HttpContext.Current.​Request.Url.Segments​[HttpContext.Current​.Request.Url.Segment​s.Length - 1];
+
+ writer.Write(leaf);
+ }
+ }
+}

Modified: trunk/src/Controls/S​vnPathRepeater.cs
Url: http://subview.tigri​s.org/source/browse/​subview/trunk/src/Co​ntrols/SvnPathRepeat​er.cs?view=diff&​rev=30&p1=trunk/​src/Controls/SvnPath​Repeater.cs&p2=t​runk/src/Controls/Sv​nPathRepeater.cs​&r1=29&r2=30
====================​====================​====================​==================
--- trunk/src/Controls/S​vnPathRepeater.cs (original)
+++ trunk/src/Controls/S​vnPathRepeater.cs 2006-09-21 14:53:12-0700
@@ -16,9 +16,15 @@
         {
             get { return includeRepository; }
             set { includeRepository = value; }
-
         }
         bool includeRepository = true;
+
+ public bool DisableLeafItemLink
+ {
+ get { return disableLeafItemLink; }
+ set { disableLeafItemLink = value; }
+ }
+ bool disableLeafItemLink = true;
 
         protected override void OnPreRender(EventArgs e)
         {
@@ -55,36 +61,25 @@
                     if (i != endIndex || pathIsDirectory)
                         itemUrl += "/";
 
+ if (i == endIndex && disableLeafItemLink)
+ itemUrl = null;
+
                     items[j] = new ItemInfo();
                     items[j].itemName = parts[i];
                     items[j].itemUrl = itemUrl;
                 }
 
                 base.DataSource = items;
- base.ItemDataBound += new RepeaterItemEventHan​dler(SvnPathRepeater​_ItemDataBound);
                 base.DataBind();
             }
 
             base.OnPreRender(e);
         }
 
- struct ItemInfo
+ public struct ItemInfo
         {
             public string itemName;
             public string itemUrl;
         }
-
- void SvnPathRepeater_Item​DataBound(object sender, RepeaterItemEventArgs e)
- {
- if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
- {
- ItemInfo item = (ItemInfo)e.Item.DataItem;
- foreach (SvnPathItemLabel itemLabel in CtrlUtil.FindControl​sOfType<SvnPathIt​emLabel>(e.Item.C​ontrols))
- itemLabel.SvnPathItemName = item.itemName;
- foreach (SvnPathItemLink itemLink in CtrlUtil.FindControl​sOfType<SvnPathIt​emLink>(e.Item.Co​ntrols))
- itemLink.SvnPathItemHref = item.itemUrl;
-
- }
- }
     }
 }

Modified: trunk/src/Subview.csproj
Url: http://subview.tigri​s.org/source/browse/​subview/trunk/src/Su​bview.csproj?view=di​ff&rev=30&p1​=trunk/src/Subview.c​sproj&p2=trunk/s​rc/Subview.csproj​&r1=29&r2=30
====================​====================​====================​==================
--- trunk/src/Subview.csproj (original)
+++ trunk/src/Subview.csproj 2006-09-21 14:53:12-0700
@@ -115,6 +115,7 @@
     <Compile Include="Controls\S​vnPathItemLabel.cs" />
     <Compile Include="Controls\S​vnPathItemLink.cs" />
     <Compile Include="Controls\S​vnPathLabel.cs" />
+ <Compile Include="Controls\S​vnPathLeafLabel.cs" />
     <Compile Include="Controls\S​vnPathRepeater.cs" />
     <Compile Include="DynamicPopu​late\DynamicPopulat​eDesigner.cs" />
     <Compile Include="DynamicPopu​late\DynamicPopulat​eExtender.cs" />

Modified: trunk/src/TASKS.txt
Url: http://subview.tigri​s.org/source/browse/​subview/trunk/src/TA​SKS.txt?view=diff​&rev=30&p1=trun​k/src/TASKS.txt&​p2=trunk/src/TASKS.t​xt&r1=29&r2=​30
====================​====================​====================​==================
--- trunk/src/TASKS.txt (original)
+++ trunk/src/TASKS.txt 2006-09-21 14:53:12-0700
@@ -1,11 +1,19 @@
 Template thoughts:
     ItemLink - change DirItemLink -> ItemLink, Use ItemLink instead of SvnPathItemLink
             - same for ItemLabel & probably ItemImage
- Create a HeadRevisionButton for use on multiple pages
- Diff - SwitchViewLink?, use LogViewLink, DiffContent
+ DiffView - SwitchViewLink?, use LogViewLink, DiffContent, DiffDropDownChooser, DownLoadPatch?
+ Other diff options: ColoredDiff w/ Legend, LongColoredDiff w/ Legend,
+ Unidiff (our std diff), ContextDiff - do we even want it?, SideBySide (our cool diff)
+ Our cool diff needs better control over floating control panel
     PropertyView - Done - but WebService version appears broken.
- Impliment Svn.Log --limit
+ DirectoryView - LastLogEntryLabel, group by type (folder vs. file), number of files & dirs in dir,
+ RevisionTB to show actual revision on load
+ LogView - need way to specify arbtrary diffs, Need FileSizeLabel for each log item, BlameViewLink, RequestDiff panel
+ FileView - BlameViewLink, ReproNameLabel for nav
+ RevisionView - ActionLabel, skin issues,
     
+ - DateTime age option - could it be better?
+ - DirectoryPath - option to not have leaf element be linkable?
     - Review all controls with overrides - are they needed?
     - Need basic docs for template system
     - Should also doc URL to view mapping scheme
@@ -14,6 +22,7 @@
         - Do I need a Cache mechanism to do what websvn does?
     - Should centralize use of Request.Url
     - Impliment Blame View
+ - TigrisSkin issues - Font size too big
     
 
 Current "projects":

Modified: trunk/src/Utils/DiffToHTML.cs
Url: http://subview.tigri​s.org/source/browse/​subview/trunk/src/Ut​ils/DiffToHTML.cs?vi​ew=diff&rev=30​&p1=trunk/src/Util​s/DiffToHTML.cs&​p2=trunk/src/Utils/D​iffToHTML.cs&r1=​29&r2=30
====================​====================​====================​==================
--- trunk/src/Utils/DiffToHTML.cs (original)
+++ trunk/src/Utils/DiffToHTML.cs 2006-09-21 14:53:12-0700
@@ -179,14 +179,6 @@
             emitFooter(outstream,changeID);
         }
 
- private void emitFooter(StringWriter outstream, int maxChangeID)
- {
- outstream.WriteLine(​"</tr>");
- outstream.WriteLine(​"</table>");
- emitScriptSection(ou​tstream,maxChangeID)​;
- outstream.WriteLine(​"</HTML>");
- }
-
         private static void emitBody(StringWriter outstream, ArrayList leftPrefixes, ArrayList rightPrefixes,
             ArrayList leftLines, ArrayList rightLines)
         {
@@ -225,7 +217,7 @@
 
         private void emitHeader(StringWriter outstream)
         {
- outstream.WriteLine(​"<HTML>");
+ // outstream.WriteLine(​"<HTML>");
             outstream.WriteLine(​"<STYLE>");
             outstream.WriteLine("A {text-decoration:none;}");
             outstream.WriteLine(​"BLOCKQUOTE.added { margin: 0em 0em 0em 0em ; color: green ; background:#D0D0D0}");
@@ -233,17 +225,26 @@
             outstream.WriteLine(​"BLOCKQUOTE.changed { margin: 0em 0em 0em 0em ; color: blue ; background:#D0D0D0}");
             outstream.WriteLine(".left { height: 102%; width:100% ;overflow-x: scroll; float:left; overflow:auto; background:white;}");
             outstream.WriteLine(".right { height: 102%; width:100%; overflow-x: scroll; background:white; overflow:auto; float:left; border-left: medium solid black;}");
+ outstream.WriteLine(​"</STYLE>");
     
             emitController(outstream);
- outstream.WriteLine(​"</STYLE>");
     
             outstream.WriteLine("<table id=\"maintable\" style=\"font-size:13\" width=\"100%\">");
             outstream.WriteLine(​"<tr>");
         }
 
+ private void emitFooter(StringWriter outstream, int maxChangeID)
+ {
+ outstream.WriteLine(​"</tr>");
+ outstream.WriteLine(​"</table>");
+ emitScriptSection(outstream, maxChangeID);
+ // outstream.WriteLine(​"</HTML>");
+ }
+
         private void emitController(StringWriter outstream)
         {
- outstream.WriteLine(​"#controller{");
+ outstream.WriteLine(​"<style>");
+ outstream.WriteLine(​"#controller{");
             outstream.WriteLine(​"position:absolute;"​);
             outstream.WriteLine("width: 100px;");
             outstream.WriteLine("right: 20px;");
@@ -260,12 +261,12 @@
             outstream.WriteLine(​"overflow:auto;");
             outstream.WriteLine("}");
             outstream.WriteLine(​"</style>");
- outstream.WriteLine(​"<BODY>");
+ // outstream.WriteLine(​"<BODY>");
             outstream.WriteLine("<DIV id=\"controller\">");
             outstream.WriteLine("<div align=\"center\">");
             outstream.WriteLine("<a id=\"testlink2\" href=\"javascript:s​howleft()\">[L]​</a>");
             outstream.WriteLine("<a href=\"javascript:s​howboth()\">[B]o​th</a>");
- outstream.WriteLine("<a href=\"javascript:s​howright()\">[R]​</a><BR>​");
+ outstream.WriteLine("<a href=\"javascript:s​howright()\">[R]​</a><BR />");
             outstream.WriteLine("<a href=\"javascript:p​revchange()\">[P​]rev</a>");
             outstream.WriteLine("<a href=\"javascript:n​extchange()\">[N​]ext</a>");
             outstream.WriteLine("<div id=\"cscroll\" onscroll=\"javascri​pt:scrollboth()\"​>");

Modified: trunk/src/skins/Tigr​isSubview/FileView.a​scx
Url: http://subview.tigri​s.org/source/browse/​subview/trunk/src/sk​ins/TigrisSubview/Fi​leView.ascx?view=dif​f&rev=30&p1=​trunk/src/skins/Tigr​isSubview/FileView.a​scx&p2=trunk/src​/skins/TigrisSubview​/FileView.ascx&r​1=29&r2=30
====================​====================​====================​==================
--- trunk/src/skins/Tigr​isSubview/FileView.a​scx (original)
+++ trunk/src/skins/Tigr​isSubview/FileView.a​scx 2006-09-21 14:53:12-0700
@@ -1,7 +1,7 @@
 <%@ Control Language="c#" AutoEventWireup="True" Codebehind="~/Contro​ls/FileView.ascx.cs"​ Inherits="subview.Co​ntrols.FileView" TargetSchema="http://schemas.micro​soft.com/intellisens​e/ie5"%>
 <%@ Register TagPrefix="Subview" NameSpace="subview.Controls" Assembly="subview" %>
 <p class="tasknav">
-Return to <Subview:LogViewLink ID="LogViewLink1" runat="server">lo​g</Subview:LogVie​wLink> view
+Return to <Subview:LogViewLink ID="LogViewLink1" runat="server">​<Subview:SvnPathLea​fLabel ID="leaf" runat="server" /></Subview:Lo​gViewLink> log.
 </p>
 <div class="application">
 <table class="axial">
@@ -25,6 +25,10 @@
         <th>Commit info</th>
         <td><i>​<Subview:DateLabel​ ID="mod" runat="server" Format="yyyy'-'MM'-'dd' 'HH':'mm':'ssK" /> (<Subview:DateLabel ID="age" runat="server" Format="age" />)</i> by <i><Subview​:AuthorLabel ID="author" runat="server" /></i></td>
     </tr>
+ <tr>
+ <th>Filesize</th>
+ <td><Subview:SizeLabel ID="DateLabel1" runat="server" /> bytes</td>
+ </tr>
 </table>
 <div class="h2">
     <h2>Commit log comment</h2>

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r30 - trunk/src: . Controls Utils skins/TigrisSubview rayj Ray Johnson 2006-09-21 14:53:12 PDT
Messages per page: