Index: /main/trunk/greenstone3/web/interfaces/default/js/debug_scripts.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/default/js/debug_scripts.js	(revision 27054)
+++ /main/trunk/greenstone3/web/interfaces/default/js/debug_scripts.js	(revision 27055)
@@ -225,5 +225,5 @@
 		_styleFunctions.push(function(){_saveButton.button({icons:{primary:"ui-icon-disk"}, disabled:true})});
 		
-		_swapEditorButton = $("<button>Switch to XML Editor</button>");
+		_swapEditorButton = $("<button>Switch to XML editor</button>");
 		_swapEditorButton.button().click(function()
 		{
@@ -247,7 +247,10 @@
 					_editor.setValue(xmlText);
 					_editor.clearSelection();
+					var UndoManager = require("ace/undomanager").UndoManager;
+					_editor.getSession().setUndoManager(new UndoManager());
 					_textEditor.show();
-					_swapEditorButton.button("option", "label", "Switch to Visual Editor");
+					_swapEditorButton.button("option", "label", "Switch to visual editor");
 					_isVisualEditor = false;
+					_xmlStatusBar.show();
 				}
 				else
@@ -260,6 +263,7 @@
 					_vEditor.selectRootElement();
 					_vEditor.getMainDiv().show();
-					_swapEditorButton.button("option", "label", "Switch to XML Editor");
+					_swapEditorButton.button("option", "label", "Switch to XML editor");
 					_isVisualEditor = true;
+					_xmlStatusBar.hide();
 				}
 			}
@@ -284,4 +288,5 @@
 		_xmlStatusBar.css("padding", "5px");
 		_xmlStatusBar.addClass("ui-corner-all");
+		_styleFunctions.push(function(){_xmlStatusBar.hide();});
 		
 		//Check the XML for errors every 2 seconds
@@ -315,5 +320,5 @@
 					_saveButton.button("option", "disabled", false);
 				}
-				if(_swapEditorButton.button("option", "label") == "Switch to Visual Editor")
+				if(_swapEditorButton.button("option", "label") == "Switch to visual editor")
 				{
 					_swapEditorButton.button("option", "disabled", false);
@@ -446,4 +451,9 @@
 
 				_closeEditorButton.button("option", "disabled", false);
+				if(_closeEditorButton.button("option", "label") == "Open editor")
+				{
+					_closeEditorButton.button("option", "label", "Close editor");
+					_editingDiv.show();
+				}
 			})
 			.error(function()
@@ -582,4 +592,9 @@
 	}
 	
+	var fixTitle = function()
+	{
+		$("title").text($("title").text().replace(/<[^>]*>/g, ""));
+	}
+	
 	var resizeContainers = function()
 	{
@@ -613,4 +628,5 @@
 
 		addMouseEventsToDebugElements(debugElems);
+		fixTitle();
 	}
 	
Index: /main/trunk/greenstone3/web/interfaces/default/js/visual-xml-editor.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/default/js/visual-xml-editor.js	(revision 27054)
+++ /main/trunk/greenstone3/web/interfaces/default/js/visual-xml-editor.js	(revision 27055)
@@ -289,7 +289,7 @@
 
 				var ns = (key == "html") ? "" : (key + ":");
-
 				var newElem = _xml.createElement(ns + elemName);
 				var veElement = new VEElement(newElem);
+				veElement.setShortName(true);
 				var veDiv = veElement.getDiv();
 				veDiv.css("float", "none");
@@ -868,4 +868,5 @@
 					{
 						var cloneElem = new VEElement(_xmlNode.cloneNode(true));
+						cloneElem.setShortName(true);
 						var cloneDiv = cloneElem.getDiv();
 						cloneDiv.css("float", "none");
@@ -958,8 +959,14 @@
 				{
 					var transactionType = (_div.data("toolbar")) ? "addElem" : "remMvElem";
+					
+					if(_div.data("toolbar"))
+					{
+						_div.data("parentVEElement").setShortName(false);
+					}
+					
 					_div.data("dragging", false);
 					_div.data("toolbar", false);
 
-					_div.css("border", "1px dashed black");
+					_div.css("border", "1px solid black");
 					_div.css("background", _div.data("prevBackground"));
 					
@@ -1187,5 +1194,5 @@
 			_div.mouseout(function(event)
 			{
-				_div.css("border", "1px dashed black");
+				_div.css("border", "1px solid black");
 				event.stopPropagation();
 			});
@@ -1247,4 +1254,16 @@
 			_div.data("parentVEElement").evenlyDistributeChildren();
 		}
+		
+		this.setShortName = function(short)
+		{
+			if(short && _xmlNode.nodeType == 1 && _xmlNode.tagName.indexOf(":") != -1)
+			{
+				_div.children(".veTitleElement").text(_xmlNode.tagName.substring(_xmlNode.tagName.indexOf(":") + 1));
+			}
+			else if(!short)
+			{
+				_div.children(".veTitleElement").text(_xmlNode.tagName);
+			}
+		}
 
 		this.setWidth = function(width)
@@ -1257,4 +1276,5 @@
 		{
 			_div.addClass("veElement");
+			_div.addClass("ui-corner-all");
 			makeDraggable();
 			
Index: /main/trunk/greenstone3/web/interfaces/default/style/core.css
===================================================================
--- /main/trunk/greenstone3/web/interfaces/default/style/core.css	(revision 27054)
+++ /main/trunk/greenstone3/web/interfaces/default/style/core.css	(revision 27055)
@@ -951,5 +951,5 @@
 
 .veElement{
-	border:1px dashed black;
+	border:1px solid black;
 	float:left;
 	margin:5px -1px;
