Index: main/trunk/greenstone3/web/interfaces/default/transform/depositor/de_page1.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/default/transform/depositor/de_page1.xsl	(revision 27875)
+++ main/trunk/greenstone3/web/interfaces/default/transform/depositor/de_page1.xsl	(revision 27875)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:java="http://xml.apache.org/xslt/java"
+	xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="java util">
+	
+	<!-- set page title -->
+	<xsl:variable name="title">Specify Metadata</xsl:variable>
+
+	<!-- the page content -->
+	<xsl:template name="wizardPage">
+		<table>
+			<tr>
+				<td>Title:</td><td><input type="text" name="md___dc.Title" size="74"/></td>
+			</tr>
+			<tr>
+				<td>Creator:</td><td><input type="text" name="md___dc.Creator"/></td>
+			</tr>
+			<tr>
+				<td>Description:</td><td><textarea cols="40" rows="5" name="md___dc.Description"><xsl:text> </xsl:text></textarea></td>
+			</tr>
+		</table>
+	</xsl:template>
+</xsl:stylesheet>  
+
Index: main/trunk/greenstone3/web/interfaces/default/transform/depositor/de_page2.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/default/transform/depositor/de_page2.xsl	(revision 27875)
+++ main/trunk/greenstone3/web/interfaces/default/transform/depositor/de_page2.xsl	(revision 27875)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:java="http://xml.apache.org/xslt/java"
+	xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="java util">
+	
+	<!-- set page title -->
+	<xsl:variable name="title">Select File</xsl:variable>
+
+	<!-- the page content -->
+	<xsl:template name="wizardPage">
+		<table>
+			<tr>
+				<td>Filename:</td><td><input type="file" name="userfile"/></td>
+			</tr>
+		</table>
+	</xsl:template>
+</xsl:stylesheet>  
+
Index: main/trunk/greenstone3/web/interfaces/default/transform/depositor/de_page3.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/default/transform/depositor/de_page3.xsl	(revision 27875)
+++ main/trunk/greenstone3/web/interfaces/default/transform/depositor/de_page3.xsl	(revision 27875)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:java="http://xml.apache.org/xslt/java"
+	xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="java util">
+	
+	<!-- set page title -->
+	<xsl:variable name="title">Confirmation</xsl:variable>
+
+	<!-- the page content -->
+	<xsl:template name="wizardPage">
+		Filename: <span gs-metadata="ex.Filename"><xsl:text> </xsl:text></span><br/>
+		File size: <span gs-metadata="ex.Filesize"><xsl:text> </xsl:text></span>
+	</xsl:template>
+</xsl:stylesheet>  
+
Index: main/trunk/greenstone3/web/interfaces/default/transform/depositor/de_page4.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/default/transform/depositor/de_page4.xsl	(revision 27875)
+++ main/trunk/greenstone3/web/interfaces/default/transform/depositor/de_page4.xsl	(revision 27875)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:java="http://xml.apache.org/xslt/java"
+	xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="java util">
+	
+	<!-- set page title -->
+	<xsl:variable name="title">Deposit Item</xsl:variable>
+
+	<!-- the page content -->
+	<xsl:template name="wizardPage">
+		<div id="progressBar">Please wait...</div>
+		<script type="text/javascript">
+			<xsl:text disable-output-escaping="yes">
+				{
+					$(window).load(function()
+					{
+						$("#progressBar").html($("#progressBar").html() + "&lt;br/&gt;Moving file into collection...");
+						var url = gs.xsltParams.library_name + "?a=de&amp;sa=depositFile&amp;ro=1&amp;c=" + gs.cgiParams.c + "&amp;fileToAdd=" + gs.deSavedMetadata["md___ex.Filename"];
+						$.ajax(url).success(function(response)
+						{
+							$("#progressBar").html($("#progressBar").html() + "&lt;br/&gt;Importing collection...");
+							var xml;
+							try
+							{
+								xml = $.parseXML(response.replace(/&amp;/g, "&amp;amp;"));
+							}
+							catch(e)
+							{
+								console.log("ERROR: " + e);
+								$("#progressBar").html($("#progressBar").html() + "&lt;br/&gt;There was an error on the server.");
+								return;
+							}							
+							
+							if(!($(xml).find("error").length))
+							{
+								var pid = $(xml).find("status").attr("pid");
+								gs.functions.startCheckLoop(pid, "ImportCollection", function()
+								{
+									$("#progressBar").html($("#progressBar").html() + "&lt;br/&gt;Building collection...");
+									gs.functions.buildCollections([gs.cgiParams.c], function()
+									{
+										$("#progressBar").html($("#progressBar").html() + "&lt;br/&gt;Collection built...");
+										$("#progressBar").html($("#progressBar").html() + "&lt;br/&gt;Reloading Greenstone...");
+										$.ajax(gs.xsltParams.library_name + "?a=s&amp;sa=c").success(function()
+										{
+											$("#progressBar").html($("#progressBar").html() + "&lt;br/&gt;Done!");
+										})
+										.error(function()
+										{
+											$("#progressBar").html($("#progressBar").html() + "&lt;br/&gt;Reload failed, please restart Greenstone manually.");
+										});
+									});
+								});
+							}
+							else
+							{
+								$("#progressBar").html($("#progressBar").html() + "&lt;br/&gt;There was an error depositing your file:");
+								$(xml).find("error").each(function()
+								{
+									$("#progressBar").html($("#progressBar").html() + "&lt;br/&gt;" + $(this).text());
+								});
+							}
+						});
+					});
+				}
+			</xsl:text>
+		</script>
+	</xsl:template>
+</xsl:stylesheet>  
+
Index: main/trunk/greenstone3/web/interfaces/default/transform/depositor/de_page5.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/default/transform/depositor/de_page5.xsl	(revision 27875)
+++ main/trunk/greenstone3/web/interfaces/default/transform/depositor/de_page5.xsl	(revision 27875)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:java="http://xml.apache.org/xslt/java"
+	xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="java util">
+	
+	<!-- set page title -->
+	<xsl:variable name="title">View Collection</xsl:variable>
+
+	<!-- the page content -->
+	<xsl:template name="wizardPage">
+		<div class="ui-state-default ui-corner-all">
+		<a>
+			<xsl:attribute name="href"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="/page/pageResponse/collection/@name"/>/page/about</xsl:attribute>
+			View your collection
+		</a>
+		</div>
+	</xsl:template>
+</xsl:stylesheet>  
+
Index: main/trunk/greenstone3/web/interfaces/default/transform/depositor/depositor.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/default/transform/depositor/depositor.xsl	(revision 27875)
+++ main/trunk/greenstone3/web/interfaces/default/transform/depositor/depositor.xsl	(revision 27875)
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:java="http://xml.apache.org/xslt/java"
+	xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="java util">
+	
+	<!-- use the 'main' layout -->
+	<xsl:include href="layouts/main.xsl"/>
+
+	<!-- Used to store how many pages are present in the depositor -->
+	<xsl:variable name="numOfPages">5</xsl:variable>
+	
+	<!-- set page title -->
+	<xsl:template name="pageTitle">Depositor</xsl:template>
+
+	<!-- set page breadcrumbs -->
+	<xsl:template name="breadcrumbs"></xsl:template>
+
+	<!-- the page content -->
+	<xsl:template match="/page">
+		<xsl:call-template name="depositorJavascript"/>
+		<div id="wizardContainer"><xsl:text> </xsl:text>
+			<form enctype="multipart/form-data" method="post" name="depositorform" id="depositorform">
+				<xsl:attribute name="action"><xsl:value-of select="$library_name"/></xsl:attribute>
+				<input type="hidden" name="a" value="de"/>
+				<input type="hidden" name="sa" value="getwizard"/>
+				<input type="hidden" name="c" value="{/page/pageResponse/collection/@name}"/>
+				<input type="hidden" name="currentPage" value="{/page/pageRequest/paramList/param[@name='dePage']/@value}"/>
+				<!-- A CALL TO THE APPROPRIATE PAGE ADDED ON THE SERVER -->
+			</form>
+		</div>
+		<xsl:call-template name="wizardBar"/>
+	</xsl:template>
+	
+	<xsl:template name="wizardBar">
+		<!-- CREATED ON THE SERVER -->
+	</xsl:template>
+	
+	<xsl:template name="depositorJavascript">
+		<script type="text/javascript">
+			<xsl:text disable-output-escaping="yes">
+				{
+					$(window).load(function()
+					{
+						var cachedMetadata = [];
+						var cachedPageMetaString;
+
+						</xsl:text>
+						<xsl:for-each select="/page/pageResponse/cachedValues/pageCache">
+							<xsl:text disable-output-escaping="yes">cachedPageMetaString = '</xsl:text><xsl:value-of select="."/><xsl:text disable-output-escaping="yes">';
+							cachedPageMetaString = cachedPageMetaString.replace(/&amp;lt;/g, "&lt;").replace(/&amp;gt;/g, "&gt;").replace(/&amp;amp;/g, "&amp;").replace(/&amp;quot;/g, "\"");
+							cachedMetadata.push(eval(cachedPageMetaString));</xsl:text>
+						</xsl:for-each>
+						<xsl:text disable-output-escaping="yes">
+
+						//console.log(cachedMetadata);
+						gs.deSavedMetadata = [];
+						for(var j = 0; j &lt; cachedMetadata.length; j++)
+						{
+							var currentPageCache = cachedMetadata[j];
+							for(var i = 0; i &lt; currentPageCache.length; i++)
+							{
+								gs.deSavedMetadata[currentPageCache[i].name] = currentPageCache[i].value;
+								$('form [name="' + currentPageCache[i].name + '"]').val(currentPageCache[i].value);
+							}
+						}
+
+						$(".wizardStepLink a").click(function()
+						{
+							var requestedPage = $(this).attr("page");
+							var form = $("#depositorform");
+							form.append($("&lt;input&gt;").attr({type:"hidden", name:"dePage", value:requestedPage}));
+							form.submit();
+						});
+						
+						$("[gs-metadata]").each(function()
+						{
+							var metaVal = gs.deSavedMetadata["md___" + $(this).attr("gs-metadata")];
+							if(metaVal)
+							{
+								$(this).text(metaVal);
+							}
+						});
+					});
+				}
+			</xsl:text>
+		</script>
+	</xsl:template>
+</xsl:stylesheet>  
+
Index: main/trunk/greenstone3/web/interfaces/default/transform/depositor/depositorutil.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/default/transform/depositor/depositorutil.xsl	(revision 27875)
+++ main/trunk/greenstone3/web/interfaces/default/transform/depositor/depositorutil.xsl	(revision 27875)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:java="http://xml.apache.org/xslt/java"
+	xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="java util">
+
+	<xsl:template match="de:textMetadata">
+		
+	</xsl:template>
+
+	<xsl:template match="de:textMetadata">
+		
+	</xsl:template>
+</xsl:stylesheet>  
+
