Bug 395393 - Remove Dojo from primary pages.  Navigator glue and getting started.
diff --git a/bundles/org.eclipse.orion.client.core/web/navigate/table.js b/bundles/org.eclipse.orion.client.core/web/navigate/table.js
index f015e78..01e6966 100644
--- a/bundles/org.eclipse.orion.client.core/web/navigate/table.js
+++ b/bundles/org.eclipse.orion.client.core/web/navigate/table.js
@@ -9,17 +9,15 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-/*global define document dojo window eclipse orion serviceRegistry:true widgets alert*/
+/*global define document window eclipse orion serviceRegistry:true widgets alert*/
 /*browser:true*/
 
-define(['i18n!orion/navigate/nls/messages', 'dojo', 'orion/bootstrap', 'orion/selection', 'orion/status', 'orion/progress', 'orion/dialogs',
+define(['i18n!orion/navigate/nls/messages', 'orion/bootstrap', 'orion/webui/littlelib', 'orion/selection', 'orion/status', 'orion/progress', 'orion/dialogs',
         'orion/ssh/sshTools', 'orion/commands', 'orion/favorites', 'orion/tasks', 'orion/navoutliner', 'orion/searchClient', 'orion/fileClient', 'orion/operationsClient', 'orion/globalCommands',
-        'orion/fileCommands', 'orion/explorers/explorer-table', 'orion/explorers/navigatorRenderer', 'orion/fileUtils', 'orion/PageUtil', 'orion/URITemplate', 'orion/contentTypes',
-        'dojo/parser', 'dojo/hash'], 
-		function(messages, dojo, mBootstrap, mSelection, mStatus, mProgress, mDialogs, mSsh, mCommands, mFavorites, mTasks, mNavOutliner,
+        'orion/fileCommands', 'orion/explorers/explorer-table', 'orion/explorers/navigatorRenderer', 'orion/fileUtils', 'orion/PageUtil', 'orion/URITemplate', 'orion/contentTypes'], 
+		function(messages, mBootstrap, lib, mSelection, mStatus, mProgress, mDialogs, mSsh, mCommands, mFavorites, mTasks, mNavOutliner,
 				mSearchClient, mFileClient, mOperationsClient, mGlobalCommands, mFileCommands, mExplorerTable, mNavigatorRenderer, mFileUtils, PageUtil, URITemplate, mContentTypes) {
 
-dojo.addOnLoad(function(){
 	mBootstrap.startup().then(function(core) {
 		var serviceRegistry = core.serviceRegistry;
 		var preferences = core.preferences;
@@ -68,8 +66,9 @@
 				mGlobalCommands.setPageTarget({task: "Navigator", target: explorer.treeRoot, isFavoriteTarget: true,
 					serviceRegistry: serviceRegistry, searchService: searcher, fileService: fileClient, commandService: commandService});
 				mFileCommands.updateNavTools(serviceRegistry, explorer, "pageActions", "selectionTools", explorer.treeRoot);
-				var isAtRoot = mFileUtils.isAtRoot(explorer.treeRoot.Location) ;
-				if (isAtRoot && !dojo.byId("gettingStartedTasks")) { //$NON-NLS-0$
+				var isAtRoot = mFileUtils.isAtRoot(explorer.treeRoot.Location);
+				var gettingStartedNode = lib.node("gettingStartedTasks"); //$NON-NLS-0$
+				if (isAtRoot && !gettingStartedNode) { 
 					// create a command that represents each "orion.navigate.content" extension point
 					var newContentContributions = serviceRegistry.getServiceReferences("orion.navigate.content"); //$NON-NLS-0$
 					var tasks = [];
@@ -94,8 +93,8 @@
 						description: messages["Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files."],
 						tasks: tasks, serviceRegistry: serviceRegistry, commandService: commandService, item: {Location: "/workspace"}, handler: explorer, collapsed: false,
 						descriptionProperty: "contentDescription"}); //$NON-NLS-0$
-				} else {
-					dojo.empty("gettingStarted"); //$NON-NLS-0$
+				} else if (gettingStartedNode) {
+					lib.empty(gettingStartedNode); 
 				}
 			});
 		}
@@ -142,11 +141,6 @@
 			
 		mFileCommands.createAndPlaceFileCommandsExtension(serviceRegistry, commandService, explorer, "pageActions", "selectionTools", "orion.selectionGroup"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
 
-		//every time the user manually changes the hash, we need to load the workspace with that name
-		dojo.subscribe("/dojo/hashchange", explorer, function() { //$NON-NLS-0$
-			refresh();
-		});
+		window.addEventListener("hashchange", function() {refresh();}, false); //$NON-NLS-0$
 	});
 });
-
-});
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/tasks.js b/bundles/org.eclipse.orion.client.core/web/orion/tasks.js
index 5cdcd94..30a7cd7 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/tasks.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/tasks.js
@@ -12,7 +12,7 @@
 /*global window document define setTimeout */
 /*jslint forin:true*/
 
-define(['i18n!orion/nls/messages', 'require', 'dojo', 'orion/section', 'orion/commands'], function(messages, require, dojo, mSection, mCommands){
+define(['i18n!orion/nls/messages', 'require', 'orion/webui/littlelib', 'orion/section', 'orion/commands'], function(messages, require, lib, mSection, mCommands){
 
 	/**
 	 * Creates a new user interface element showing a list of tasks
@@ -33,10 +33,7 @@
 	 * 	The command tooltip will be used as the description if no descriptionProperty is provided.
 	 */
 	function TaskList(options) {
-		var parent = options.parent;
-		if (typeof(parent) === "string") { //$NON-NLS-0$
-			parent = dojo.byId(parent);
-		}
+		var parent = lib.node(options.parent);
 		if (!parent) { throw messages['no parent']; }
 		if (!options.serviceRegistry) {throw messages["no service registry"]; }
 		this._parent = parent;
@@ -62,7 +59,8 @@
 			// first time setup
 			if (!this._taskSection) {
 				var contentId = "taskListContent"+this._title; //$NON-NLS-0$
-				var contentDiv = dojo.create("div", {id: contentId}); //$NON-NLS-0$
+				var contentDiv = document.createElement("div"); //$NON-NLS-0$
+				contentDiv.id = contentId;
 				this.fileSystemsSection = new mSection.Section(this._parent, {
 					id: "taskListSection"+this._title, //$NON-NLS-0$
 					title: this._title,
@@ -73,24 +71,31 @@
 					useAuxStyle: true
 				});
 				if (this._description) {
-					dojo.place("<p>"+this._description+"</p>", contentId, "only"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+					var p = document.createElement("p"); //$NON-NLS-0$
+					p.appendChild(document.createTextNode(this._description));
+					contentDiv.appendChild(p);
 				}
-				var taskTable = dojo.create("table", { role: "presentation" }, contentId, "last"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+				var taskTable = document.createElement("table"); //$NON-NLS-0$
+				taskTable.role = "presentation"; //$NON-NLS-0$
+				contentDiv.appendChild(taskTable);
 				for (var i=0; i<this._tasks.length; i++) {
-					var row = dojo.create("tr", null, taskTable, "last"); //$NON-NLS-1$ //$NON-NLS-0$
-					var col = dojo.create("td", null, row, "last"); //$NON-NLS-1$ //$NON-NLS-0$
+					var row = document.createElement("tr"); //$NON-NLS-0$
+					taskTable.appendChild(row);
+					var col = document.createElement("td"); //$NON-NLS-0$
+					row.appendChild(col);
 					this._commandService.registerCommandContribution("task"+i, this._tasks[i].commandId, 1); //$NON-NLS-0$
 					this._commandService.renderCommands("task"+i, col, this._item, this._handler, "button"); //$NON-NLS-1$ //$NON-NLS-0$
 					if (col.childNodes.length > 0) {
 						// I know I have only one command if I have any at all
-						dojo.addClass(col.childNodes[0], "taskTitle"); //$NON-NLS-0$
+						col.childNodes[0].classList.add("taskTitle"); //$NON-NLS-0$
 					}					
-					col = dojo.create("td", null, row, "last"); //$NON-NLS-1$ //$NON-NLS-0$
-					dojo.addClass(col, "taskDescription"); //$NON-NLS-0$
+					col = document.createElement("td"); //$NON-NLS-0$
+					row.appendChild(col);
+					col.classList.add("taskDescription"); //$NON-NLS-0$
 					var command = this._commandService.findCommand(this._tasks[i].commandId);
 					if (command) {
 						var description = this._descriptionProperty ? command[this._descriptionProperty] : command.tooltip;
-						dojo.place(document.createTextNode(description), col, "last"); //$NON-NLS-0$
+						col.appendChild(document.createTextNode(description));
 					}
 				}
 			}