Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /insurrection/src/

Project highlights: A modern, light-weight, self-contained, web-based toolset for Subversion repository browsing and administration.  A live system can be seen in action here.

insurrection
Discussion topic

Back to topic list

CVS update: /insurrection/src/

Author mksoft
Full name Michae Sinz
Date 2006-09-24 10:59:49 PDT
Message User: mksoft
Date: 2006-09-24 10:59:49-0700
Added:
   insurrection/src/opening.gif

Modified:
   insurrection/src/index.cgi
   insurrection/src/ins​urrection.xsl
   insurrection/src/svnindex.js

Log:
 Merged up to r336

File Changes:

Directory: /insurrection/src/
=============================

File [changed]: index.cgi
Url: http://insurrection.​tigris.org/source/br​owse/insurrection/sr​c/index.cgi?r1=1.9​&r2=1.10
Delta lines: +9 -3
-------------------
--- index.cgi 2006-06-09 22:01:25-0700 1.9
+++ index.cgi 2006-09-24 10:59:47-0700 1.10
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 #
-# $Id: index.cgi,v 1.9 2006/06/10 05:01:25 mksoft Exp $
+# $Id: index.cgi,v 1.10 2006/09/24 17:59:47 mksoft Exp $
 # Copyright 2004-2006 - Michael Sinz
 #
 # This script takes the index.html template and inserts some
@@ -11,7 +11,13 @@
 #
 require 'admin.pl';
 
-open INDEX,"<index.template" || die "Where is index.template?";
+## Start out assuming a server-name based template
+my $template = $ENV{'SERVER_NAME'} . '.template';
+
+## Try opening by server name and then try the default...
+$template = 'index.template' if (! -r $template);
+
+open INDEX,"<$template" || die "Where is $template?";
 my $index = join('',<INDEX>);
 close INDEX;
 
@@ -34,5 +40,5 @@
 
 print $index;
 
-&svn_TRAILER('$Id: index.cgi,v 1.9 2006/06/10 05:01:25 mksoft Exp $');
+&svn_TRAILER('$Id: index.cgi,v 1.10 2006/09/24 17:59:47 mksoft Exp $');
 

File [changed]: insurrection.xsl
Url: http://insurrection.​tigris.org/source/br​owse/insurrection/sr​c/insurrection.xsl?r​1=1.40&r2=1.41
Delta lines: +12 -3
--------------------
--- insurrection.xsl 2006-06-09 22:01:25-0700 1.40
+++ insurrection.xsl 2006-09-24 10:59:47-0700 1.41
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- $Id: insurrection.xsl,v 1.40 2006/06/10 05:01:25 mksoft Exp $ -->
+<!-- $Id: insurrection.xsl,v 1.41 2006/09/24 17:59:47 mksoft Exp $ -->
 <!-- Copyright 2004-2006 - Michael Sinz -->
 <!-- This is my magic Insurrection XSLT transform to HTML -->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/19​99/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" version="1.0">
@@ -50,6 +50,7 @@
        that the images are at the "root" of the server. -->
   <!-- Note: the data within these templates must be literal - no XSLT tags -->
   <xsl:template name="closedicon-pat​h">/closed.gif​</xsl:template>
+ <xsl:template name="openingicon-pa​th">/opening.gif​</xsl:template>​
   <xsl:template name="openedicon-pat​h">/opened.gif​</xsl:template>
   <xsl:template name="diricon-path"​>/folder.gif</x​sl:template>
   <xsl:template name="fileicon-path"​>/file.gif</xs​l:template>
@@ -128,7 +129,7 @@
   </xsl:template>
 
   <xsl:template name="footer">
- <div class="footer" title="$Id: insurrection.xsl,v 1.40 2006/06/10 05:01:25 mksoft Exp $">
+ <div class="footer" title="$Id: insurrection.xsl,v 1.41 2006/09/24 17:59:47 mksoft Exp $">
       <a title="Valid XML 1.0!" href="http://validator.w3.​org/check?uri=refere​r">
         <xsl:element name="img">
           <xsl:attribute name="src">
@@ -142,7 +143,7 @@
   </xsl:template>
 
   <xsl:template name="footer-noXML">
- <div class="footer" title="$Id: insurrection.xsl,v 1.40 2006/06/10 05:01:25 mksoft Exp $">
+ <div class="footer" title="$Id: insurrection.xsl,v 1.41 2006/09/24 17:59:47 mksoft Exp $">
       <xsl:call-template name="footer-common"/>
     </div>
   </xsl:template>
@@ -184,6 +185,14 @@
             <xsl:call-template name="closedicon-path"/>
           </xsl:attribute>
           <xsl:attribute name="id">closedI​mage</xsl:attribu​te>
+ <xsl:attribute name="style">display: none</xsl:attribute>
+ <xsl:attribute name="alt"></x​sl:attribute>
+ </xsl:element>
+ <xsl:element name="img">
+ <xsl:attribute name="src">
+ <xsl:call-template name="openingicon-path"/>
+ </xsl:attribute>
+ <xsl:attribute name="id">opening​Image</xsl:attrib​ute>
           <xsl:attribute name="style">display: none</xsl:attribute>
           <xsl:attribute name="alt"></x​sl:attribute>
         </xsl:element>

File [added]: opening.gif
Url: http://insurrection.​tigris.org/source/br​owse/insurrection/sr​c/opening.gif?rev=1.​1&content-type=t​ext/vnd.viewcvs-mark​up
File [changed]: svnindex.js
Url: http://insurrection.​tigris.org/source/br​owse/insurrection/sr​c/svnindex.js?r1=1.2​7&r2=1.28
Delta lines: +48 -12
---------------------
--- svnindex.js 2006-06-09 22:01:25-0700 1.27
+++ svnindex.js 2006-09-24 10:59:47-0700 1.28
@@ -1,5 +1,5 @@
 /*
- * $Id: svnindex.js,v 1.27 2006/06/10 05:01:25 mksoft Exp $
+ * $Id: svnindex.js,v 1.28 2006/09/24 17:59:47 mksoft Exp $
  * Copyright 2004-2006 - Michael Sinz
  *
  * Some JavaScript support routines for the svn index pages
@@ -134,9 +134,16 @@
 }
 
 /*
+ * A noop function for our use during the load process...
+ */
+function noop()
+{
+}
+
+/*
  * This is to support the changing of the visible state and the arrow.
  */
-function foldDir(arrow)
+function foldDir(arrow,busy)
 {
     var target = document.getElementById('.' + arrow.id);
     if (target)
@@ -144,11 +151,34 @@
         var row = document.getElementB​yId(target.id + '/');
         if (row)
         {
- if (row.style.display == 'none')
+ if (busy)
+ {
+ // Change the onclick to basically be a no-op
+ // since we are busy...
+ if (!arrow.busy)
             {
+ arrow['onclick'] = noop;
+ }
+
+ arrow.src = document.getElementB​yId('openingImage').​src;
+ arrow.title = 'Opening...';
+ row.style.display = '';
+ arrow.busy = true;
+ }
+ else if (arrow.busy || (row.style.display == 'none'))
+ {
+ // Change the onclick to just fold the directory as
+ // we have completed the load. We only change this
+ // once...
+ if (arrow.busy)
+ {
+ arrow['onclick'] = function(){foldDir(a​rrow,false);};
+ }
+
                 row.style.display = '';
                 arrow.src = document.getElementB​yId('openedImage').s​rc;
                 arrow.title = 'Collapse directory';
+ arrow.busy = false;
             }
             else
             {
@@ -209,7 +239,6 @@
         }
 
         tr = document.createElement('tr');
- action.target.dirlis​t.appendChild(tr);
 
         if (action.type == 'dir')
         {
@@ -333,6 +362,9 @@
         img.alt = a.title;
         a.appendChild(img);
 
+ // Append the line now that we actually have the full row complete...
+ action.target.dirlis​t.appendChild(tr);
+
         // Directories also have a hidden second row where the
         // in-line sub-directory expansion happens. Fun stuff
         if (action.type == 'dir')
@@ -340,7 +372,6 @@
             tr = document.createElement('tr');
             tr.style.display = 'none';
             tr.id = tgt + '/';
- action.target.dirlis​t.appendChild(tr);
 
             td = document.createElement('td');
             tr.appendChild(td);
@@ -355,6 +386,8 @@
             tr.appendChild(td);
             td.id = tgt;
             td.colSpan = 2;
+
+ action.target.dirlis​t.appendChild(tr);
         }
     }
 
@@ -364,6 +397,10 @@
     {
         setTimeout(function() {doNextItem(actionList);},1);
     }
+ else
+ {
+ foldDir(actionList.a​rrow,false);
+ }
 }
 
 /*
@@ -397,10 +434,6 @@
  */
 function loadDirTarget(target​,responseXML)
 {
- // Change the onclick to just fold the directory as
- // we have completed the load...
- target.arrow['onclick'] = function(){foldDir(this);};
-
     // Clear our HTML container before we start building this.
     target.innerHTML = '';
 
@@ -459,6 +492,9 @@
         actionList.push(action);
     }
 
+ // Save the arrow location...
+ actionList.arrow = target.arrow;
+
     // Ask the system to process the list...
     doNextItem(actionList);
 }
@@ -514,11 +550,11 @@
             target.xml = getXMLHTTP();
             if (target.xml)
             {
- // Flip the arrow and start showing the rows now...
- foldDir(arrow);
+ // Flip the arrow into busy state...
+ foldDir(arrow,true);
 
                 // Set the internal text such that we know where we are...
- target.innerHTML = 'xml.open("GET","' + target.uri + '",true);';
+ target.innerHTML = 'Loading ' + target.uri + ' ...';
 
                 target.xml.onreadystatechange = function() { loadDirCheck(target); };
                 target.xml.open("GET​",target.uri,true);

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

Messages

Show all messages in topic

CVS update: /insurrection/src/ mksoft Michae Sinz 2006-09-24 10:59:49 PDT
Messages per page: