Index: main/trunk/greenstone3/web/interfaces/oran/js/document_scripts.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/document_scripts.js	(revision 25123)
+++ main/trunk/greenstone3/web/interfaces/oran/js/document_scripts.js	(revision 25142)
@@ -522,5 +522,5 @@
 	flash_plug_html += '    <PARAM name="movie" value="Book.swf';
 	flash_plug_html += '?src_image=' + escape(img_cover);
-	flash_plug_html += '&doc_url=' + escape(doc_url)
+	flash_plug_html += '&doc_url=' + escape(doc_url);
 	flash_plug_html += '" />\n';
 	flash_plug_html += '    <PARAM name="quality" value="high" />\n';
@@ -540,2 +540,25 @@
 	flash_div.innerHTML = flash_plug_html;
 }
+
+function readyPageForEditing()
+{
+	var textDivs = gs.functions.getElementsByClassName("sectionText");
+	
+	for(var i = 0; i < textDivs.length; i++)
+	{
+		de.doc.registerEditSection(textDivs[i]);
+	}
+	
+	var editBar = document.getElementById("editBarLeft");
+	var saveButton = document.createElement("BUTTON");
+	saveButton.onclick = save;
+	saveButton.innerHTML = "Save changes";
+	saveButton.setAttribute("id", "saveButton");
+	editBar.appendChild(saveButton);
+	
+	var statusBarDiv = document.createElement("DIV");
+	editBar.appendChild(statusBarDiv);
+	_statusBar = new StatusBar(statusBarDiv);
+	
+	_baseURL = gs.xsltParams.library_name;
+}
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentmaker_scripts.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentmaker_scripts.js	(revision 25123)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentmaker_scripts.js	(revision 25142)
@@ -11,7 +11,6 @@
 var _metadataSetList = new Array();
 
-function init()
-{
-	de.init();
+function initDocumentMaker()
+{
 	//Get all of the links on the page
 	var allLinks = document.getElementsByTagName("a");
@@ -703,4 +702,2 @@
 	}
 }
-
-YAHOO.util.Event.onDOMReady(init);
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentmaker_scripts_util.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentmaker_scripts_util.js	(revision 25123)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentmaker_scripts_util.js	(revision 25142)
@@ -195,5 +195,5 @@
 		
 		gs.functions.removeArchivesMetadata(gs.cgiParams.p_c /*bad*/, "localsite" /*bad*/, docID, name, null, value, function(){console.log("REMOVED ARCHIVES");});
-		addCollectionToBuild(gs.cgiParams.p_c);
+		addCollectionToBuild(gs.cgiParams.p_c); /*bad*/
 		
 		removeFromParent(currentRow);
@@ -237,4 +237,11 @@
 			saveTransaction('{"operation":"setText", "text":"' + changedElem.innerHTML.replace(/"/g, "\\\"").replace(/&/g, "%26") + '", "collection":"' + section.collection + '", "oid":"' + section.nodeID + '"}');
 			addCollectionToBuild(section.collection);
+		}
+		else if(hasClass(changedElem, "sectionText"))
+		{
+			var id = changedElem.getAttribute("id");
+			var sectionID = id.substring(4);
+			saveTransaction('{"operation":"setText", "text":"' + changedElem.innerHTML.replace(/"/g, "\\\"").replace(/&/g, "%26") + '", "collection":"' + gs.cgiParams.c + '", "oid":"' + sectionID + '"}');
+			addCollectionToBuild(gs.cgiParams.c);
 		}
 	}
@@ -285,5 +292,5 @@
 		saveButton.innerHTML = "Saving...";
 		saveButton.disabled = true;
-		
+
 		statusID = _statusBar.addStatus("Modifying archive files...");
 		ajax.send("a=g&rt=r&s=DocumentExecuteTransaction&s1.transactions=" + request);
Index: main/trunk/greenstone3/web/interfaces/oran/js/javascript-global-functions.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/javascript-global-functions.js	(revision 25123)
+++ main/trunk/greenstone3/web/interfaces/oran/js/javascript-global-functions.js	(revision 25142)
@@ -24,4 +24,21 @@
 	}
 }
+
+gs.functions.getElementsByClassName = function(cl) 
+{
+	var nodes = new Array();
+	var classRegEx = new RegExp('\\b'+cl+'\\b');
+	var allElems = document.getElementsByTagName('*');
+	
+	for (var i = 0; i < allElems.length; i++) 
+	{
+		var classes = allElems[i].className;
+		if (classRegEx.test(classes)) 
+		{
+			nodes.push(allElems[i]);
+		}
+	}
+	return nodes;
+}; 
 
 gs.functions.makeToggle = function(buttons, divs)
Index: main/trunk/greenstone3/web/interfaces/oran/transform/layouts/header.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/transform/layouts/header.xsl	(revision 25123)
+++ main/trunk/greenstone3/web/interfaces/oran/transform/layouts/header.xsl	(revision 25142)
@@ -29,4 +29,5 @@
 		<xsl:choose>
 			<xsl:when test="/page/pageResponse/interfaceOptions/option[@name = 'cssTheme']/@value">
+				<!-- Get the theme from the interfaceConfig.xml file -->
 				<link rel="stylesheet" href="{/page/pageResponse/interfaceOptions/option[@name = 'cssTheme']/@value}" type="text/css"/>
 			</xsl:when>
@@ -47,5 +48,6 @@
 			<xsl:call-template name="map-scripts"/>
 		</xsl:if>
-		<xsl:call-template name="init-seaweed"/>
+		
+		<xsl:call-template name="init-direct-edit"/>
 		<xsl:call-template name="setup-gs-variable"/>
 		<xsl:call-template name="additionalHeaderContent"/>
@@ -56,12 +58,15 @@
 	</xsl:template>
 	
-	<xsl:template name="init-seaweed">
+	<xsl:template name="init-direct-edit">
 		<script type="text/javascript">
 			<xsl:text disable-output-escaping="yes">
-				de.onready(function() {
-					try {
+				de.onready(function() 
+				{
+					try 
+					{
 						de.init();
 					}
-					catch (err) {
+					catch (err) 
+					{
 						alert("Seaweed failed to initialise: " + err.message);
 					}
Index: main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl	(revision 25123)
+++ main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl	(revision 25142)
@@ -127,4 +127,9 @@
 	<!-- the page content -->
 	<xsl:template match="/page/pageResponse/document">
+		<xsl:if test="/page/pageRequest/paramList/param[@name = 'documentbasket']/@value = 'on'">
+			<script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts.js"><xsl:text> </xsl:text></script>
+			<script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts_util.js"><xsl:text> </xsl:text></script>
+		</xsl:if>
+		
 		<xsl:if test="/page/pageRequest/paramList/param[@name = 'dmd']/@value = 'true'">
 			<gsf:metadata name="all"/>
@@ -151,9 +156,13 @@
 			
 			<xsl:if test="/page/pageRequest/paramList/param[@name = 'documentbasket']/@value = 'on'">
-				<table style="width:100%"><tr><td style="width:70%"><xsl:text> </xsl:text></td>
-					<td>
+				<table style="width:100%"><tr>
+					<td id="editBarLeft" style="width:70%"><xsl:text> </xsl:text></td>
+					<td id="editBarRight">
 						<div style="text-align:center;">
-							<div class="ui-state-default ui-corner-all">
-								<a style="padding: 3px; text-decoration:none;" href="{$library_name}?a=g&amp;sa=documentbasket&amp;c=&amp;s=DisplayDocumentList&amp;rt=r&amp;p.c={/page/pageResponse/collection/@name}&amp;docToEdit={/page/pageResponse/document/documentNode/@nodeID}">Edit this document</a>
+							<div style="margin:5px;" class="ui-state-default ui-corner-all">
+								<a style="padding: 3px; text-decoration:none;" href="{$library_name}?a=g&amp;sa=documentbasket&amp;c=&amp;s=DisplayDocumentList&amp;rt=r&amp;p.c={/page/pageResponse/collection/@name}&amp;docToEdit={/page/pageResponse/document/documentNode/@nodeID}">Edit structure</a>
+							</div>
+							<div style="margin:5px;" class="ui-state-default ui-corner-all">
+								<a style="padding: 3px; text-decoration:none;" href="javascript:readyPageForEditing();">Edit content</a>
 							</div>
 						</div>
Index: main/trunk/greenstone3/web/interfaces/oran/transform/pages/documentbasket.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/transform/pages/documentbasket.xsl	(revision 25123)
+++ main/trunk/greenstone3/web/interfaces/oran/transform/pages/documentbasket.xsl	(revision 25142)
@@ -21,7 +21,9 @@
 	<!-- the page content -->
 	<xsl:template match="/page">
-		<script src="interfaces/{$interface_name}/js/documentmaker_scripts.js"><xsl:text> </xsl:text></script>
-		<script src="interfaces/{$interface_name}/js/documentmaker_scripts_dd.js"><xsl:text> </xsl:text></script>
-		<script src="interfaces/{$interface_name}/js/documentmaker_scripts_util.js"><xsl:text> </xsl:text></script>
+		<script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts.js"><xsl:text> </xsl:text></script>
+		<script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts_dd.js"><xsl:text> </xsl:text></script>
+		<script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts_util.js"><xsl:text> </xsl:text></script>
+		<script type="text/javascript">YAHOO.util.Event.onDOMReady(initDocumentMaker);</script>
+
 		<link src="interfaces/{$interface_name}/style/documentbasket.js"/>
 		<xsl:for-each select="//item">
