Merge branch 'master' of ssh://git.eclipse.org/gitroot/orion/org.eclipse.orion.client
diff --git a/bundles/org.eclipse.orion.client.core/web/css/UploaderFileList.css b/bundles/org.eclipse.orion.client.core/web/css/UploaderFileList.css
deleted file mode 100644
index 6e80f84..0000000
--- a/bundles/org.eclipse.orion.client.core/web/css/UploaderFileList.css
+++ /dev/null
@@ -1,61 +0,0 @@
-.dojoxUploaderFileList{

-	border:1px solid #ccc;

-	height:20px;

-	min-width:30em;

-}

-.dojoxUploaderFileListTable{

-	width:100%;

-	border-collapse:collapse;

-}

-.dojoxUploaderFileListHeader th{

-	display:none;

-	background-color:#eee;

-}

-.dojoxUploaderFileListRow{

-

-}

-.dojoxUploaderIndex{

-	display:none;

-	width:0px;

-}

-.dojoxUploaderIcon{

-	width:50px;

-}

-.dojoxUploaderFileName{

-

-}

-.dojoxUploaderSize{

-	display:none;

-	width:70px;

-}

-.dojoxUploaderFileListContent{

-	padding-left: 2px;

-	vertical-align: middle;	

-	width:100%;

-}

-.dojoxUploaderFileListProgress{

-	border:1px solid #666;

-	height:15px;

-	position:relative;

-	background:#fff;

-	overflow:hidden;

-}

-.dojoxUploaderFileListPercentText{

-	position:absolute;

-	right:3px;

-	top:3px;

-	font-size:10px;

-	text-align:right;

-}

-.dojoxUploaderFileListProgressBar{

-	position:absolute;

-	top:0;

-	left:0;

-	height:15px;

-	width:0;

-	background:#bfe1fd;

-}

-

-.dojoxFileInput{

-	width:100px;

-}

diff --git a/bundles/org.eclipse.orion.client.core/web/navigate/table.css b/bundles/org.eclipse.orion.client.core/web/navigate/table.css
index e75fa4a..f30bfe6 100644
--- a/bundles/org.eclipse.orion.client.core/web/navigate/table.css
+++ b/bundles/org.eclipse.orion.client.core/web/navigate/table.css
@@ -1,15 +1,3 @@
-@import "../org.dojotoolkit/dojo/resources/dojo.css";
-
-@import "../org.dojotoolkit/dijit/themes/claro/claro.css";
-
-@import "../org.dojotoolkit/dijit/themes/claro/form/Common.css";
-
-@import "../org.dojotoolkit/dijit/themes/claro/form/Button.css";
-
-@import "../org.dojotoolkit/dijit/themes/claro/ProgressBar.css";
-
-@import "../css/UploaderFileList.css";
-
 @import "../css/layout.css";
 
 @import "../css/ide.css";
diff --git a/bundles/org.eclipse.orion.client.core/web/navigate/table.html b/bundles/org.eclipse.orion.client.core/web/navigate/table.html
index cd82aaf..55ec894 100644
--- a/bundles/org.eclipse.orion.client.core/web/navigate/table.html
+++ b/bundles/org.eclipse.orion.client.core/web/navigate/table.html
@@ -13,26 +13,7 @@
 		  baseUrl: '..',
 		
 		  // set the paths to our library packages
-		  packages: [
-		    {
-		      name: 'dojo',
-		      location: 'org.dojotoolkit/dojo',
-		      main: 'lib/main-browser',
-		      lib: '.'
-		    },
-		    {
-		      name: 'dijit',
-		      location: 'org.dojotoolkit/dijit',
-		      main: 'lib/main',
-		      lib: '.'
-		    },
-		    {
-		      name: 'dojox',
-		      location: 'org.dojotoolkit/dojox',
-		      main: 'lib/main',
-		      lib: '.'
-		    }		    
-		  ],
+		  packages: [],
 		  paths: {
 			  text: 'requirejs/text',
 			  i18n: 'requirejs/i18n',
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/compare/compare-container.js b/bundles/org.eclipse.orion.client.core/web/orion/compare/compare-container.js
index dc51a61..239e6eb 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/compare/compare-container.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/compare/compare-container.js
@@ -918,8 +918,12 @@
 		this._editorDivId = editorDivId;
 		var editorContainer = dijit.byId(this._editorDivId);
 		if(!editorContainer){//If there is no dijit widget as the parent we need one sitting in the middle to listen to the resize event
-			mCompareUtils.destroyDijit(this._editorDivId + "_dijit_inline_compare");//Desteroy the existing dijit first 
-			var styleStr = mCompareUtils.getDijitSizeStyle(this._editorDivId);
+			var widget = dijit.byId(this._editorDivId + "_dijit_inline_compare");
+			if(widget){
+				widget.destroyRecursive();
+			}
+			var marginBox = dojo.marginBox(this._editorDivId);
+			var styleStr = "height: " + marginBox.h + "px; width: 100%;"; //$NON-NLS-1$ //$NON-NLS-0$
 			var wrapperWidget = new dijit.layout.BorderContainer({id: this._editorDivId + "_dijit_inline_compare", style: styleStr, region:"center", gutters:false ,design:"headline", liveSplitters:false, persist:false , splitter:false }); //$NON-NLS-1$ //$NON-NLS-0$
 			wrapperWidget.placeAt(this._editorDivId);
 			wrapperWidget.layout();
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/compare/compare-features.js b/bundles/org.eclipse.orion.client.core/web/orion/compare/compare-features.js
index 17bd174..aabf13a 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/compare/compare-features.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/compare/compare-features.js
@@ -166,7 +166,8 @@
 			this.destroy();
 			var leftB = this._createLeftBorder();
 			var rightB = this._createRightBorder();
-			var styleStr = mCompareUtils.getDijitSizeStyle(this._parentDivID);
+			var marginBox = dojo.marginBox(this._parentDivID);
+			var styleStr = "height: " + marginBox.h + "px; width: 100%;"; //$NON-NLS-1$ //$NON-NLS-0$
 			var topWidget = new dijit.layout.BorderContainer({id: this._topWidgetId, style: styleStr, region:"center", gutters:false ,design:"headline", liveSplitters:true, persist:false , splitter:true }); //$NON-NLS-1$ //$NON-NLS-0$
 		
 			topWidget.placeAt(this._parentDivID);
@@ -178,7 +179,10 @@
 		},
 		
 		destroy: function(){
-			mCompareUtils.destroyDijit(this._topWidgetId);
+			var widget = dijit.byId(this._topWidgetId);
+			if(widget){
+				widget.destroyRecursive();
+			}
 		},
 		
 		getEditorParentDivId: function(left){
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/compare/compareUtils.js b/bundles/org.eclipse.orion.client.core/web/orion/compare/compareUtils.js
index b69de91..49f9fc3 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/compare/compareUtils.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/compare/compareUtils.js
@@ -9,8 +9,9 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
+/*global define require orion window document console */
 
-define(['dojo', 'dijit'], function(dojo, dijit) {
+define([], function() {
 
 var orion = orion || {};
 
@@ -219,7 +220,8 @@
 			}
 		}
 	}
-	var tempLink = dojo.create("a", {href: base + compareParam + "#" + diffLocation + diffPosition}); //$NON-NLS-1$ //$NON-NLS-0$
+	var tempLink = document.createElement("a"); //$NON-NLS-0$
+	tempLink.href = base + compareParam + "#" + diffLocation + diffPosition; //$NON-NLS-0$
 	return tempLink.href;
 };
 
@@ -244,20 +246,5 @@
 	return diffObj;
 };
 
-orion.compareUtils.destroyDijit = function(dijitId) {
-	var widget = dijit.byId(dijitId);
-	if(widget){
-		widget.destroyRecursive();
-	}
-};
-
-orion.compareUtils.getDijitSizeStyle = function(parentId) {
-	var marginBox = dojo.marginBox(parentId);
-	var styleH = marginBox.h + "px"; //$NON-NLS-0$
-	var styleW = "100%"; //$NON-NLS-0$
-	var styleStr = "height:" + styleH + ";width:" + styleW; //$NON-NLS-1$ //$NON-NLS-0$
-	return styleStr;
-};
-
 return orion.compareUtils;
 });
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/fileCommands.js b/bundles/org.eclipse.orion.client.core/web/orion/fileCommands.js
index 2e78d31..b92b47c 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/fileCommands.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/fileCommands.js
@@ -13,8 +13,8 @@
 /*browser:true*/
 
 define(['i18n!orion/navigate/nls/messages', 'require', 'orion/webui/littlelib', 'orion/i18nUtil', 'orion/uiUtils', 'orion/fileUtils', 'orion/commands', 'orion/extensionCommands', 'orion/contentTypes', 'orion/compare/compareUtils', 
-	'orion/Deferred', 'orion/webui/dialogs/DirectoryPrompterDialog', 'orion/webui/dialogs/SFTPConnectionDialog', 'orion/widgets/ImportDialog'],
-	function(messages, require, lib, i18nUtil, mUIUtils, mFileUtils, mCommands, mExtensionCommands, mContentTypes, mCompareUtils, Deferred, DirPrompter, SFTPDialog){
+	'orion/Deferred', 'orion/webui/dialogs/DirectoryPrompterDialog', 'orion/webui/dialogs/SFTPConnectionDialog', 'orion/webui/dialogs/ImportDialog'],
+	function(messages, require, lib, i18nUtil, mUIUtils, mFileUtils, mCommands, mExtensionCommands, mContentTypes, mCompareUtils, Deferred, DirPrompter, SFTPDialog, ImportDialog){
 
 	/**
 	 * Utility methods
@@ -776,11 +776,10 @@
 			callback : function(data) {
 				var item = forceSingleItem(data.items);
 				var ex = explorer;
-				var dialog = new orion.widgets.ImportDialog({
+				var dialog = new ImportDialog.ImportDialog({
 					importLocation: item.ImportLocation,
 					func: function() {ex.changedItem.bind(ex)(item, true); }
 				});
-				dialog.startup();
 				dialog.show();
 			},
 			visibleWhen: function(item) {
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/webui/dialog.js b/bundles/org.eclipse.orion.client.core/web/orion/webui/dialog.js
index ead3ca9..2000e38 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/webui/dialog.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/webui/dialog.js
@@ -15,7 +15,26 @@
 define(['i18n!orion/widgets/nls/messages', 'require', 'orion/webui/littlelib'], 
 		function(messages, require, lib) {
 	/**
-	 * Usage: Not instantiated by clients.  The prototype is used elsewhere.
+	 * Dialog is used to implement common dialog behavior in Orion.
+	 * Clients use the Dialog prototype and implement the following behavior:
+	 *    1.  Ensure that the HTML template for the dialog content is defined in the prototype TEMPLATE variable
+	 *        prior to calling the _initialize() function. Set the following fields in the dialog prior to calling the 
+	 *        _initialize() function if applicable.
+	 *
+	 *        messages - If i18n message bindings are used in the template, set the messages field to the messages object that
+	 *            should be used to bind strings.
+	 *        title - If the dialog should display a title, set the title field.
+	 *        buttons - If the dialog should show buttons along the bottom, set an array of button objects.  Each button should
+	 *            have a text property that labels the button and a calback property that is called when the button is pushed.
+	 *        modal - Set this field to true if modal behavior is desired.
+	 * 
+	 *    2.  To hook event listeners to elements in the dialog, implement the _bindToDOM function.  DOM elements
+	 *        in the template will be bound to variable names prefixed by a '$' character.  For example, the
+	 *        element with id "myElement" can be referenced with this.$myElement
+	 *
+	 *    3.  Implement any of _beforeShowing, _afterShowing, _beforeHiding, _afterHiding to perform initialization and cleanup work.
+	 *
+	 * Usage: Not instantiated by clients.  The prototype is used by the application dialog instance.
 	 * 
 	 * @name orion.webui.Dialog
 	 */
@@ -23,6 +42,8 @@
 	}
 
 	Dialog.prototype = /** @lends orion.webui.Dialog.prototype */ {
+	
+		/* Not used by clients */
 		CONTAINERTEMPLATE:		
 		'<div class="dialog">' + //$NON-NLS-0$
 			'<div class="dialogTitle layoutBlock"><span id="title" class="dialogTitleText layoutLeft"></span><span tabindex="0" role="button" aria-label="Close" class="dialogDismiss layoutRight core-sprite-close imageSprite" id="closeDialog"></span></div>' + //$NON-NLS-0$
@@ -31,7 +52,10 @@
 			'<div id="buttons" class="dialogButtons"></div>' + //$NON-NLS-1$ //$NON-NLS-0$
 		'</div>', //$NON-NLS-0$
 
-		
+		/* 
+		 * Called by clients once the dialog template has been bound to the TEMPLATE variable, and any additional options (title, buttons,
+		 * messages, modal) have been set.
+		 */
 		_initialize: function() {
 			var parent = document.body;
 			this.$frameParent = parent;
@@ -79,6 +103,9 @@
 			}
 		},
 		
+		/*
+		 * Internal.  Generates any specified buttons.
+		 */
 		_makeButtons: function() {
 			if (this.$buttonContainer && Array.isArray(this.buttons)) {
 				var self = this;
@@ -104,6 +131,10 @@
 			}
 		},
 		
+		/*
+		 * Internal.  Makes modal behavior by immediately returning focus to the dialog when user leaves the dialog, and by
+		 * styling the background to look faded.
+		 */
 		_makeModal: function(parent) {
 			var self = this;
 			this.$frame.addEventListener("blur", function(e) { //$NON-NLS-0$
@@ -144,6 +175,9 @@
 			}
 		},
 		
+		/*
+		 * Internal.  Binds any child nodes with id's to the matching field variables.
+		 */
 		_bindElements: function(node) {
 			for (var i=0; i<node.childNodes.length; i++) {
 				var child = node.childNodes[i];
@@ -154,6 +188,11 @@
 			}
 		},
 		
+		/*
+		 * Internal.  Hides the dialog.  Clients should use the before and after
+		 * hooks (_beforeHiding, _afterHiding) to do any work related to hiding the dialog, such
+		 * as destroying resources.
+		 */
 		hide: function() {
 			if (typeof this._beforeHiding === "function") { //$NON-NLS-0$
 				this._beforeHiding();
@@ -168,6 +207,11 @@
 			}
 		}, 
 		
+		/*
+		 * Internal.  Shows the dialog.  Clients should use the before and after
+		 * hooks (_beforeShowing, _afterShowing) to do any work related to showing the dialog,
+		 * such as setting initial focus.
+		 */
 		show: function(near) {
 			if (typeof this._beforeShowing === "function") { //$NON-NLS-0$
 				this._beforeShowing();
@@ -200,6 +244,9 @@
 
 		},
 		
+		/*
+		 * Internal.  Cleanup and remove dom nodes.
+		 */
 		destroy: function() {
 			if (this.modal) {
 				lib.$$array(".modalBackdrop").forEach(function(node) { //$NON-NLS-0$
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/webui/dialogs/ImportDialog.js b/bundles/org.eclipse.orion.client.core/web/orion/webui/dialogs/ImportDialog.js
new file mode 100644
index 0000000..29e6c70
--- /dev/null
+++ b/bundles/org.eclipse.orion.client.core/web/orion/webui/dialogs/ImportDialog.js
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * @license
+ * Copyright (c) 2011, 2012 IBM Corporation and others. 
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ * 
+ * Contributors: IBM Corporation - initial API and implementation
+ ******************************************************************************/
+/*global console define orion*/
+/*jslint browser:true */
+
+define(['i18n!orion/widgets/nls/messages', 'orion/webui/littlelib', 'orion/webui/dialog'], function(messages, lib, dialog) {
+
+
+	function ImportDialog(options) {
+		this._init(options);
+	}
+	
+	ImportDialog.prototype = new dialog.Dialog();
+	
+	ImportDialog.prototype.TEMPLATE = 
+	'<div ondragover="event.preventDefault()">' + //$NON-NLS-0$
+		'<div class="uploadContainer" id="uploadContainer">' + //$NON-NLS-0$
+			'<div class="dottedOutline">' + //$NON-NLS-0$
+				'<div id="dragArea" class="floatingSection">' + //$NON-NLS-0$
+					'<div class="uploadInstruction">${Drag a file here}</div>' +//$NON-NLS-0$
+					'<div class="uploadOptions">(' +  //$NON-NLS-0$
+						'<input style="height: 20px;" class="uploadOptionsItem" id="unzipCheckbox" checked="true" type="checkbox">' + //$NON-NLS-0$
+						'<label style="line-height: 20px;" class="uploadOptionsItem" for="${id}_unzipCheckbox">${unzip zips}</label>' + //$NON-NLS-0$
+					')</div>'  + //$NON-NLS-0$
+					'<div class="tipInstruction">${or if you prefer}</div>' +  //$NON-NLS-0$
+				'</div>' + //$NON-NLS-0$
+			'</div>' + //$NON-NLS-0$
+		'<div>' + //$NON-NLS-0$
+	'</div>'; //$NON-NLS-0$
+	
+	ImportDialog.prototype._init = function(options) {
+		this.title = messages['Import a file or zip'];
+		this.messages = messages;
+		this.modal = true;
+		this._importLocation = options.importLocation;
+		this._func = options.func;
+		this._initialize();
+	};
+
+	ImportDialog.prototype._bindToDom = function(parent) {
+		this.$uploadContainer.addEventListener("dragenter", this.dragEnter.bind(this), false); //$NON-NLS-0$
+		this.$uploadContainer.addEventListener("dragover", this.dragOver.bind(this), false); //$NON-NLS-0$
+		this.$uploadContainer.addEventListener("dragleave", this.dragLeave.bind(this), false); //$NON-NLS-0$
+		this.$uploadContainer.addEventListener("drop", this.drop.bind(this), false); //$NON-NLS-0$
+	};
+
+	ImportDialog.prototype.handleReadyState = function(state){	
+		if( this.req.readyState === 4 ){
+			this.hide();
+			this._func();
+		}
+	};
+
+	/* This upload works for the drag and dropped files */
+	ImportDialog.prototype.uploadDroppedFiles = function(file, unzip) {
+		this.req = new XMLHttpRequest();
+		this.req.open('post', this._importLocation, true); //$NON-NLS-0$
+		this.req.setRequestHeader("X-Requested-With", "XMLHttpRequest"); //$NON-NLS-1$ //$NON-NLS-0$
+		this.req.setRequestHeader("Slug", file.name); //$NON-NLS-0$
+		if (!unzip) {
+			this.req.setRequestHeader("X-Xfer-Options", "raw"); //$NON-NLS-1$ //$NON-NLS-0$
+		}
+		this.req.setRequestHeader("Content-Type", file.type); //$NON-NLS-0$
+		this.req.onreadystatechange = this.handleReadyState.bind(this);
+		this.req.send(file);
+	};
+
+	ImportDialog.prototype.handleFiles = function(files){
+		for( var i=0; i< files.length; i++ ){
+			this.uploadDroppedFiles(files[i], this.$unzipCheckbox.checked && (files[i].name.indexOf(".zip") === files[i].name.length-4)); //$NON-NLS-0$)
+		}
+	};
+
+	ImportDialog.prototype.dragEnter = function(evt) {
+		lib.stop(evt);
+	};
+	
+	ImportDialog.prototype.dragLeave = function(evt) {
+		lib.stop(evt);
+	};
+
+	ImportDialog.prototype.dragOver = function(evt) {
+		lib.stop(evt);
+	};
+
+	ImportDialog.prototype.drop = function(evt) {
+		lib.stop(evt);
+ 
+		var files = evt.dataTransfer.files;
+		var count = files.length;
+ 
+		if( count > 0 ){
+			this.handleFiles(files);
+		}
+	};
+
+	ImportDialog.prototype.constructor = ImportDialog;
+	//return the module exports
+	return {ImportDialog: ImportDialog};
+});
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/webui/popupdialog.js b/bundles/org.eclipse.orion.client.core/web/orion/webui/popupdialog.js
index 5ce63df..16ccd2d 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/webui/popupdialog.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/webui/popupdialog.js
@@ -15,7 +15,21 @@
 define(['i18n!orion/widgets/nls/messages', 'require', 'orion/webui/littlelib', 'orion/webui/tooltip'], 
 		function(messages, require, lib, tooltip) {
 	/**
-	 * Usage: Not instantiated by clients.  The prototype is used elsewhere.
+	 * PopupDialog is used to implement a lightweight, automatically dismissed dialog in Orion that is triggered when
+	 * clicking a DOM node.
+	 * Clients use the PopupDialog prototype and implement the following behavior:
+	 *    1.  Ensure that the HTML template for the popup content is defined in the prototype TEMPLATE variable
+	 *        prior to calling the _initialize() function. Set the following fields in the dialog prior to calling the 
+	 *        _initialize() function if applicable.
+	 *
+	 *        messages - If i18n message bindings are used in the template, set the messages field to the messages object that
+	 *            should be used to bind strings.
+	 * 
+	 *    2.  To hook event listeners to elements in the dialog, implement the _bindToDOM function.  DOM elements
+	 *        in the template will be bound to variable names prefixed by a '$' character.  For example, the
+	 *        element with id "myElement" can be referenced with this.$myElement
+	 *
+	 * Usage: Not instantiated by clients.  The prototype is used by the application popup instance.
 	 * 
 	 * @name orion.webui.PopupDialog
 	 */
@@ -24,6 +38,14 @@
 
 	PopupDialog.prototype = /** @lends orion.webui.PopupDialog.prototype */ {
 		
+		/* 
+		 * Called by clients once the popup dialog template has been bound to the TEMPLATE variable, and an optional message object has
+		 * been set.
+		 * @param {DOMElement} triggerNode The node that should trigger the popup.
+		 * @param {Function} afterShowing Optional.  A function to call after the popup appears.
+		 * @param {Function} afterHiding Optional.  A function to call after the popup is hidden.
+		 */
+
 		_initialize: function(triggerNode, afterShowing, afterHiding) {
 			this._tooltip = new tooltip.Tooltip({
 				node: triggerNode,
@@ -40,9 +62,14 @@
 			}
 			this.$parent.appendChild(contentFragment);
 			this._bindElements(this.$parent);
-			this._bindToDom(this.$parent);
+			if (typeof this._bindToDom === "function") { //$NON-NLS-0$
+				this._bindToDom(this.$parent);
+			}
 		},
 		
+		/*
+		 * Internal.  Binds any child nodes with id's to the matching field variables.
+		 */
 		_bindElements: function(node) {
 			for (var i=0; i<node.childNodes.length; i++) {
 				var child = node.childNodes[i];
@@ -53,6 +80,11 @@
 			}
 		},
 		
+		/*
+		 * Internal.  Hides the dialog.  Clients should use the _beforeHiding function and
+		 * the afterHiding function passed to _initialize to do any work related to hiding the dialog,
+		 * such as destroying resources.
+		 */
 		hide: function() {
 			if (typeof this._beforeHiding === "function") { //$NON-NLS-0$
 				this._beforeHiding();
@@ -60,6 +92,11 @@
 			this._tooltip.hide();
 		}, 
 		
+		/*
+		 * Internal.  Shows the dialog.  Clients should use the _beforeShowing function and the
+		 * afterShowing function passed to _initialize to do any work related to showing the dialog,
+		 * such as setting initial focus.
+		 */
 		show: function() {
 			if (typeof this._beforeShowing === "function") { //$NON-NLS-0$
 				this._beforeShowing();
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/widgets/ImportDialog.js b/bundles/org.eclipse.orion.client.core/web/orion/widgets/ImportDialog.js
deleted file mode 100644
index 93292b5..0000000
--- a/bundles/org.eclipse.orion.client.core/web/orion/widgets/ImportDialog.js
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * @license
- * Copyright (c) 2011, 2012 IBM Corporation and others. 
- * All rights reserved. This program and the accompanying materials are made 
- * available under the terms of the Eclipse Public License v1.0 
- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
- * 
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-/*global dojo dijit dojox widgets console define orion*/
-/*jslint browser:true */
-
-define(['i18n!orion/widgets/nls/messages', 'dojo', 'dijit', 'dojox', 'dijit/Dialog', 'dojo/data/ItemFileReadStore', 'dojox/form/Uploader', 'dojox/form/uploader/FileList', 'dojox/form/uploader/plugins/IFrame', 'dijit/form/Button', 'dijit/ProgressBar', 'orion/widgets/_OrionDialogMixin', 'text!orion/widgets/templates/ImportDialog.html', 'dojo/io/iframe'], function(messages, dojo, dijit, dojox) {
-
-dojo.declare("orion.widgets.ImportDialog", [ dijit.Dialog, orion.widgets._OrionDialogMixin ], { //$NON-NLS-0$
-	widgetsInTemplate : true,
-
-	templateString: '<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">' + //$NON-NLS-0$
-						'<div data-dojo-attach-point="titleBar" class="dijitDialogTitleBar">' + //$NON-NLS-0$
-							'<span data-dojo-attach-point="titleNode" class="dijitDialogTitle" id="${id}_title"></span>' + //$NON-NLS-0$
-							'<span data-dojo-attach-point="closeButtonNode" class="dijitDialogCloseIcon" data-dojo-attach-event="onclick:onCancel" title="${buttonCancel}">' + //$NON-NLS-0$
-								'<span data-dojo-attach-point="closeText" class="closeText" title="${buttonCancel}">x</span>' + //$NON-NLS-0$
-							'</span>' + //$NON-NLS-0$
-						'</div>' + //$NON-NLS-0$
-						'<div ondragover="event.preventDefault()" data-dojo-attach-point="containerNode" class="dijitDialogPaneContent">' + //$NON-NLS-0$
-							'<div class="uploadContainer" data-dojo-attach-event="drop:drop,dragenter:dragEnter,dragexit:dragExit,dragover:dragOver">' + //$NON-NLS-0$
-								'<div class="dottedOutline">' + //$NON-NLS-0$
-									'<div data-dojo-attach-point="dragArea" class="floatingSection">' + //$NON-NLS-0$
-										'<div class="uploadInstruction">'+messages['Drag a file here']+  //$NON-NLS-0$
-										'</div>' +//$NON-NLS-0$
-										'<div class="uploadOptions">(' +  //$NON-NLS-0$
-										'<input style="height: 20px;" class="uploadOptionsItem" dojoAttachPoint="unzipCheckbox" id="${id}_unzipCheckbox" dojoType="dijit.form.CheckBox" checked="true" type="checkbox">' + //$NON-NLS-0$
-										'<label style="line-height: 20px;" class="uploadOptionsItem" dojoAttachPoint="unzipCheckboxLabel" for="${id}_unzipCheckbox">'+messages['unzip zips']+'</label>' + //$NON-NLS-1$ //$NON-NLS-0$
-										')</div>'  + //$NON-NLS-0$
-										'<div class="tipInstruction">'+messages['or if you prefer']+'</div>' +  //$NON-NLS-1$ //$NON-NLS-0$
-										'<form data-dojo-attach-point="importform" method="post" id="importDialog.myForm" enctype="multipart/form-data" >' + //$NON-NLS-0$
-										'<input class="uploadBrowser" data-dojo-attach-point="importloader" name="uploadedfile" multiple="false" type="file" id="importLoader" force="iframe" data-dojo-type="dojox.form.Uploader" style="height: 20px" label="'+messages['Browse...']+'" >' + //$NON-NLS-2$ //$NON-NLS-0$
-										'<input type="submit" label="Finish" value="OK" dojoType="dijit.form.Button" style="visibility:hidden;padding: 20 0 10 0; float: right; clear: both;"/>' + //$NON-NLS-0$
-										'</form>' + //$NON-NLS-0$
-										
-									'</div>' + //$NON-NLS-0$
-								'</div>' + //$NON-NLS-0$
-								'<div>' + //$NON-NLS-0$
-							'</div>' + //$NON-NLS-0$
-						'</div>' +  //$NON-NLS-0$
-					'</div>', //$NON-NLS-0$
-
-
-	constructor : function() {
-		this.inherited(arguments);
-		this.options = arguments[0] || {};
-	},
-
-	postMixInProperties : function() {
-		this.inherited(arguments);
-		this.title = messages['Import a file or zip'];
-	},
-
-	handleReadyState: function(state){	
-		if( this.req.readyState === 4 ){
-			this.hide();
-			this.options.func();
-		}
-	},
-
-	/* This upload works for the drag and dropped files */
-
-	uploadDroppedFiles: function(file, unzip) {
-		// Use native XMLHttpRequest instead of XhrGet since dojo 1.5 does not allow to send binary data as per docs
-		this.req = new XMLHttpRequest();
-
-		this.req.open('post', this.options.importLocation, true); //$NON-NLS-0$
-		this.req.setRequestHeader("X-Requested-With", "XMLHttpRequest"); //$NON-NLS-1$ //$NON-NLS-0$
-		this.req.setRequestHeader("Slug", file.name); //$NON-NLS-0$
-		if (!unzip) {
-			this.req.setRequestHeader("X-Xfer-Options", "raw"); //$NON-NLS-1$ //$NON-NLS-0$
-		}
-		this.req.setRequestHeader("Content-Type", file.type); //$NON-NLS-0$
-		this.req.onreadystatechange = dojo.hitch( this, 'handleReadyState' ); //$NON-NLS-0$
-		this.req.send(file);
-	},
-
-	/* upload from form input */
-
-	upload: function(files){
-
-		if(files){
-			var uploadData = { preventDefault: function(){}, stopPropagation: function(){} };	
-			uploadData.fileList = files;
-			this.importloader.upload(files);
-		}		
-	},
-
-	handleFiles: function(files){
-
-		this.importloader.form[0].files = files;
-		var checkboxState = this.unzipCheckbox.get('checked'); //$NON-NLS-0$)
-		for( var i=0; i< files.length; i++ ){
-			this.uploadDroppedFiles(files[i], checkboxState && (files[i].name.indexOf(".zip") === files[i].name.length-4)); //$NON-NLS-0$)
-		}
-	},
-
-	dragEnter: function(evt){
-		return false;
-	},
-
-	dragExit: function(evt){
-		return false;
-	},
-
-	dragOver: function(evt){
-		return false;
-	},
-
-	drop: function(evt){
-		evt.preventDefault();
-		evt.stopPropagation();
- 
-		var files = evt.dataTransfer.files;
-		var count = files.length;
- 
-		if( count > 0 ){
-			this.handleFiles(files);
-		}
-	},
-
-	postCreate : function() {
-		this.inherited(arguments);
-
-		dojo.style( this.importloader.domNode, "left", '100px' ); //$NON-NLS-1$ //$NON-NLS-0$
-		dojo.style( this.titleBar, "padding", '10px 10px 10px' ); //$NON-NLS-1$ //$NON-NLS-0$
-
-		this.importloader.force = 'iframe'; //$NON-NLS-0$
-		this.importloader.preventDefault = function(){};
-		this.importloader.stopPropagation = function(){};
-
-		this.importform.action = this.options.importLocation;
-		this.importloader.url = this.options.importLocation;
-
-		dojo.connect(this.importloader, "onChange", dojo.hitch(this, function(dataArray) { //$NON-NLS-0$
-			var uploadData = { preventDefault: function(){}, stopPropagation: function(){} };
-			this.importloader.upload(uploadData);
-		}));
-
-		dojo.connect(this.importloader, "onError", dojo.hitch(this, function(dataArray) { //$NON-NLS-0$
-			setTimeout(dojo.hitch(this, function(){
-				this.hide();
-			}), 2000);		
-		}));
-
-		dojo.connect(this.importloader, "onComplete", dojo.hitch(this, function(dataArray) { //$NON-NLS-0$
-			setTimeout(dojo.hitch(this, function(){
-				this.hide();
-				this.options.func();
-			}), 2000);		
-		}));
-		
-		// Stop the dialog from submitting if trying to activate the upload button with a keyboard.
-		// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=370969
-		
-		dojo.connect(this.importloader, "onKeyPress", function(evt) { //$NON-NLS-0$
-			if(evt.keyCode === dojo.keys.ENTER) {
-				evt.stopPropagation();
-			}
-		});
-	}
-});
-});
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/widgets/OperationsDialog.js b/bundles/org.eclipse.orion.client.core/web/orion/widgets/OperationsDialog.js
deleted file mode 100644
index 591aef4..0000000
--- a/bundles/org.eclipse.orion.client.core/web/orion/widgets/OperationsDialog.js
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************

- * @license
- * Copyright (c) 2010, 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- * 

- * Contributors: IBM Corporation - initial API and implementation

- ******************************************************************************/

-/*global dojo dijit widgets define*/

-/*jslint browser:true*/

-

-define(['i18n!orion/operations/nls/messages', 'require', 'dojo', 'dijit', 'dijit/TooltipDialog', 'text!orion/widgets/templates/OperationsDialog.html'], function(messages, require, dojo, dijit) {

-	

-	dojo.declare("orion.widgets.OperationsDialog", [dijit.TooltipDialog], { //$NON-NLS-0$

-		widgetsInTemplate: true,

-		closable: true,

-		templateString: dojo.cache('orion', 'widgets/templates/OperationsDialog.html'), //$NON-NLS-1$ //$NON-NLS-0$

-

-		constructor : function() {

-			this.inherited(arguments);

-			this.options = arguments[0] || {};

-			this._myOperations = [];

-		},

-		postCreate: function(){

-			this.inherited(arguments);

-			this.allOperationsLink.href = require.toUrl("operations/list.html"); //$NON-NLS-0$

-			this._setOperationsVisibility();

-		},

-		setOperations: function(operations){

-			this._myOperations = [];

-			if(operations)

-				for(var i in operations){

-					this._myOperations.push(operations[i]);

-				}

-			this._renderOperations();

-		},

-		parseProgressResult: function(result){

-			if(!result){

-				return {};

-			}

-			//could either be responseText from xhrGet or just a string

-			var status = result.responseText || result;

-			//accept either a string or a JSON representation of an IStatus

-			try {

-				status = JSON.parse(status);

-			} catch(error) {

-				//it is not JSON, just continue;

-			}

-			var ret = {Message: status.Message};

-			if(status.DetailedMessage && status.DetailedMessage !== ret.Message){

-				ret.DetailedMessage = status.DetailedMessage;

-			}

-			return ret;

-		},

-		_renderOperations: function(){

-			this._renderOperationsTable(this.myOperationsList, this._myOperations);

-		},

-		_renderOperationsTable: function(operationsTable, operations){

-			dojo.empty(operationsTable);

-			for(var i=0; i<operations.length; i++){

-				var operation = operations[i];

-				var name = operation.Name ? operation.Name : (operation.id ? ("Operation " + operation.id) : "Operation");

-				var tr = dojo.create("tr"); //$NON-NLS-0$

-				var col = dojo.create("td", {style: "padding-left: 5px; padding-right: 5px"}, tr); //$NON-NLS-1$ //$NON-NLS-0$

-				col.textContent = name;

-				var div = dojo.create("div", null, col, "only"); //$NON-NLS-1$ //$NON-NLS-0$

-				var link = dojo.create("span", {className: "primaryColumn"}, div, "last"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$

-				link.textContent = name;

-

-				dojo.place(document.createTextNode(name), link, "only"); //$NON-NLS-0$

-				

-				var operationIcon = dojo.create("span", null, div, "first"); //$NON-NLS-1$ //$NON-NLS-0$

-				dojo.addClass(operationIcon, "imageSprite"); //$NON-NLS-0$

-				

-				switch (operation.type) {

-					case "Warning": //$NON-NLS-0$ //TODO no warning status

-						dojo.addClass(operationIcon, "core-sprite-warning"); //$NON-NLS-0$

-						dojo.attr(operationIcon, "aria-label", messages["Operation resulted in a warning."]); //$NON-NLS-0$

-						break;

-					case "error": //$NON-NLS-0$

-						dojo.addClass(operationIcon, "core-sprite-error"); //$NON-NLS-0$

-						dojo.attr(operationIcon, "aria-label", messages["Operation resulted in an error."]); //$NON-NLS-0$

-						break;

-					

-					case "loadstart":

-					case "progress":

-						dojo.addClass(operationIcon, "core-sprite-start"); //$NON-NLS-0$

-						dojo.attr(operationIcon, "aria-label", messages["Operation is running."]); //$NON-NLS-0$

-						break;

-					case "abort":

-						dojo.addClass(operationIcon, "core-sprite-stop"); //$NON-NLS-0$

-						dojo.attr(operationIcon, "aria-label", messages["Operation is canceled."]); //$NON-NLS-0$

-						break;

-						

-					case "load":

-					case "loadend":

-						dojo.addClass(operationIcon, "core-sprite-ok"); //$NON-NLS-0$

-						dojo.attr(operationIcon, "aria-label", "Operation ok."); //$NON-NLS-1$ //$NON-NLS-0$

-						break;

-				}

-				

-				if(operation.error){

-					var message = operation.error.Message || operation.error;

-					if(operation.error.DetailedMessage && operation.error.DetailedMessage!=="")

-						message += ": " + operation.error.DetailedMessage; //$NON-NLS-0$

-					dojo.create("br", null, div, "last"); //$NON-NLS-1$ //$NON-NLS-0$

-					var span = dojo.create("span", {className: "secondaryColumn", style: "margin-left: 18px;"}, div, "last"); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$

-					span.textContent = message;

-				}

-				

-				dojo.place(tr, operationsTable, "last"); //$NON-NLS-0$

-			}

-			this._setOperationsVisibility();

-		},

-		_setOperationsVisibility: function(){			

-			this.myOperationsList.style.display = this._myOperations.length > 0 ? "" : "none"; //$NON-NLS-0$

-			this.myOperationsListEmpty.style.display = this._myOperations.length > 0 ? "none" : ""; //$NON-NLS-0$

-			this.operationsDontExist.style.display = this._myOperations.length > 0 ? "none": ""; //$NON-NLS-0$

-			this.operationsExist.style.display = this._myOperations.length > 0 ? "" : "none"; //$NON-NLS-0$

-		},

-		_onBlur: function(){

-			this.inherited(arguments);

-			if(dijit.popup.hide)

-				dijit.popup.hide(this); //close doesn't work on FF

-			dijit.popup.close(this);

-		}

-	});

-});
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/widgets/templates/ImportDialog.html b/bundles/org.eclipse.orion.client.core/web/orion/widgets/templates/ImportDialog.html
deleted file mode 100644
index c7c454b..0000000
--- a/bundles/org.eclipse.orion.client.core/web/orion/widgets/templates/ImportDialog.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">
-	<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">
-		<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>
-		<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">
-			<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>
-		</span>
-	</div>
-	<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">
-		<!-- Actual content here -->
-
-		<form method="post" id="importDialog.myForm"
-			enctype="multipart/form-data" >
-			<fieldset>
-				<div style="display: table-row">
-					<div style="display: table-row; height: 20px">
-						<div style="display: table-cell; padding: 1px;">
-							File:
-						</div>
-						<div style="display: table-cell; padding: 1px; vertical-align: top;">
-							<div id="files" dojoType="dojox.form.uploader.FileList" uploaderId="importDialog.uploader"></div>
-						</div>
-						<div style="display: table-cell; padding: 1px;">
-							<input name="uploadedfile" multiple="false" type="file" id="importDialog.uploader" force="iframe"
-								dojoType="dojox.form.Uploader" style="height: 20px" label="Browse..." >
-						</div>
-					</div>
-					<div style="display: table-row">
-						<div style="display: table-cell; padding: 1px;">
-						</div>
-						<div style="display: table-cell; padding: 1px;">
-						</div>
-						<div style="display: table-cell; padding: 1px;">
-							<input type="submit" label="Finish" value="OK" dojoType="dijit.form.Button"
-								style="padding: 20 0 10 0; float: right; clear: both;"/>
-						</div>
-					</div>
-				</div>	
-			</fieldset>
-		</form>
-	</div>
-</div>
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/widgets/templates/LoginDialog.html b/bundles/org.eclipse.orion.client.core/web/orion/widgets/templates/LoginDialog.html
deleted file mode 100644
index 25733e9..0000000
--- a/bundles/org.eclipse.orion.client.core/web/orion/widgets/templates/LoginDialog.html
+++ /dev/null
@@ -1,28 +0,0 @@
-

-<div>

-	<div class="dijitTooltipContainer" role="presentation" style="width: 300px; padding-left: 0; padding-right: 0; padding-top: 0; padding-bottom: 0.45em">

-		<div class="dijitTooltipContents dijitTooltipFocusNode" role="dialog"

-			dojoattachpoint="containerNode" style="padding: 0">

-			<table style="width: 100%;">

-				<tr>

-					<td style="text-align: left; vertical-align: top;">

-						<h2 dojoAttachPoint="emptyListInfo" class="LoginWindowLeft">No authentication required.</h2>

-						<table dojoAttachPoint="authenticated" style="display: none; width: 100%;">

-							<tbody dojoAttachPoint="authenticatedList">

-							</tbody>

-						</table>

-						<table dojoAttachPoint="otherUnauthenticated" style="display: none; width: 100%;">

-							<tbody dojoAttachPoint="otherUnauthenticatedList">

-							</tbody>

-						</table>

-					</td>

-					<td style="text-align: right; vertical-align: top; padding-right: 2px; margin: 0">

-						<span dojoAttachPoint="closeLink" role="button" title="Close"></span>

-					</td>

-				</tr>

-			</table>

-		</div>

-	</div>

-	<div class="dijitTooltipConnector" role="presentation"></div>

-

-</div>
\ No newline at end of file