Index: /Dev/branches/rest-dojo-ui/client/rft/css/layout.css
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/css/layout.css	(revision 365)
+++ /Dev/branches/rest-dojo-ui/client/rft/css/layout.css	(revision 366)
@@ -272,6 +272,12 @@
 }
 fieldset.align label {
+    color: #ffffff;
     display: inline-block;
     width: 100px !important;
+}
+
+.claro .newline {
+    float: left;
+    clear: both;
 }
 
@@ -340,66 +346,55 @@
 /* Experimental background colour inheritance */
 .claro div.blue.inheritBgColor,
-.claro .blue .inheritBgColor,
-.claro.blue .inheritBgColor {
+.claro .blue .inheritBgColor {
     background-color: #0072bc;
     color: #ffffff;
 }
 .claro div.green.inheritBgColor,
-.claro .green .inheritBgColor,
-.claro.green .inheritBgColor {
+.claro .green .inheritBgColor {
     background-color: #3aa605;
     color: #ffffff;
 }
 .claro div.orange.inheritBgColor,
-.claro .orange .inheritBgColor,
-.claro.orange .inheritBgColor {
+.claro .orange .inheritBgColor {
     background-color: #ff5b12;
     color: #ffffff;
 }
 .claro div.purple.inheritBgColor,
-.claro .purple .inheritBgColor,
-.claro.purple .inheritBgColor {
+.claro .purple .inheritBgColor {
     background-color: #6529b7;
     color: #ffffff;
 }
 .claro div.red.inheritBgColor,
-.claro .red .inheritBgColor,
-.claro.red .inheritBgColor {
+.claro .red .inheritBgColor {
     background-color: #8c0310;
     color: #ffffff;
 }
 .claro div.trans.inheritBgColor,
-.claro .trans .inheritBgColor,
-.claro.trans .inheritBgColor {
+.claro .trans .inheritBgColor {
     background-color: transparent;
     color: #ffffff;
 }
 .claro div.blue.inheritBgColor.light,
-.claro .blue .inheritBgColor.light,
-.claro.blue .inheritBgColor.light {
+.claro .blue .inheritBgColor.light {
     background-color: #0794d1;
     color: #ffffff;
 }
 .claro div.green.inheritBgColor.light,
-.claro .green .inheritBgColor.light,
-.claro.green .inheritBgColor.light {
+.claro .green .inheritBgColor.light {
     background-color: #79ca0a;
     color: #ffffff;
 }
 .claro div.orange.inheritBgColor.light,
-.claro .orange .inheritBgColor.light,
-.claro.orange .inheritBgColor.light {
+.claro .orange .inheritBgColor.light {
     background-color: #ff9140;
     color: #ffffff;
 }
 .claro div.purple.inheritBgColor.light,
-.claro .purple .inheritBgColor.light,
-.claro.purple .inheritBgColor.light {
+.claro .purple .inheritBgColor.light {
     background-color: #993dec;
     color: #ffffff;
 }
 .claro div.red.inheritBgColor.light,
-.claro .red .inheritBgColor.light,
-.claro.red .inheritBgColor.light {
+.claro .red .inheritBgColor.light {
     background-color: #bd0013;
     color: #ffffff;
Index: /Dev/branches/rest-dojo-ui/client/rft/css/rftButtons.css
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/css/rftButtons.css	(revision 365)
+++ /Dev/branches/rest-dojo-ui/client/rft/css/rftButtons.css	(revision 366)
@@ -1,6 +1,12 @@
 /* And now for the RFT specific stuff! */
 /*LargeButton*/
+.claro .rftLargeButton, 
+.claro .rftLargeButton * {
+    user-select: none;
+    -webkit-user-select: none;
+}
 .claro .rftLargeButton {
     margin-right: 16px;
+    height: 30px;
 }
 .claro .rftLargeButton .dijitButtonNode {
Index: /Dev/branches/rest-dojo-ui/client/rft/pages/question.html
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/pages/question.html	(revision 366)
+++ /Dev/branches/rest-dojo-ui/client/rft/pages/question.html	(revision 366)
@@ -0,0 +1,25 @@
+<div data-dojo-type="rft.pages.question" class="orange">
+	<div data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="region:'center'" style="height: 500px;">
+		<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'">
+			<h2>
+				<span class="rftIcon rftIconSurvey"></span>
+				<span class="headerText">Question 123 [Editing]</span>
+			</h2>
+		</div>
+		<div data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="region:'left', design:'headline'" style="width: 300px;">
+			
+			<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'">
+				<div id="QuestionEditorToolkit"></div>
+			</div>
+			<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'bottom'">
+				<button id="btnDiscard" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconCancel'">Discard</button>
+				<button id="btnSave" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconAccept'">Save and exit</button>
+			</div>
+		</div>
+		<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'">
+			<div id="QuestionEditorPreview">
+				
+			</div>
+		</div>
+	</div>
+</div>
Index: /Dev/branches/rest-dojo-ui/client/rft/pages/question.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/pages/question.js	(revision 366)
+++ /Dev/branches/rest-dojo-ui/client/rft/pages/question.js	(revision 366)
@@ -0,0 +1,62 @@
+define(['dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/_base/Deferred',
+    'rft/ui/LineWithActionsWidget',
+    'rft/store',
+    'rft/ui/_Page',
+    'rft/api',
+    'rft/content',
+    'dijit/registry',
+    'dojo/on',
+    'dojo/behavior',
+    'dojo/query',
+    'rft/ui/QuestionEditorPreview',
+    'rft/ui/QuestionEditorToolkit',
+    'dijit/form/FilteringSelect'],
+    function(declare, lang, Deferred, LineWithActionsWidget, store, _Page, api, content, registry, on, behavior, query){
+        return declare('rft.pages.question', [_Page], {
+            object: null,
+            preview: null,
+            
+            onVisit: function() {
+                if (this.pageArgs.uid) {
+                    Deferred.when(store.get(this.pageArgs.uid))
+                    .then(lang.hitch(this, function(obj) {
+                        this.object = obj;
+                    }));
+                } else {
+                    throw new Error("Error: no reference to object set!");
+                }
+
+                this._setupButtons();
+                this._setupEditor();
+            },
+            onLeave: function() {
+                this.inherited(arguments);
+            },
+            _setupButtons: function() {
+                var behaviorMap = {
+                    "#btnSave": {
+                        onclick: lang.hitch(this, function(){
+                            this._saveSurvey();
+                        })
+                    },
+                    "#btnDiscard": {
+                        onclick: lang.hitch(this, function(){
+                            this._restartEditor();
+                        })
+                    }
+                }
+                behavior.add(behaviorMap);
+                behavior.apply();
+            },
+            _setupEditor: function() {
+                this.toolkit = new rft.ui.QuestionEditorToolkit();
+                this.toolkit.placeAt("QuestionEditorToolkit");
+
+                this.preview = new rft.ui.QuestionEditorPreview();
+                this.preview.placeAt("QuestionEditorPreview");
+            }
+        });
+});
+
Index: /Dev/branches/rest-dojo-ui/client/rft/pages/questions.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/pages/questions.js	(revision 365)
+++ /Dev/branches/rest-dojo-ui/client/rft/pages/questions.js	(revision 366)
@@ -1,5 +1,5 @@
 define(['dojo/_base/declare','dojo/_base/lang','dojo/_base/event',
-    'dojo/_base/Deferred','rft/store','rft/ui/_Page','rft/ui/AccordionList'],
-    function(declare,lang,event,Deferred,store,_Page,AccordionList) {
+    'dojo/_base/Deferred','rft/store','rft/ui/_Page','rft/ui/AccordionList', 'rft/content'],
+    function(declare,lang,event,Deferred,store,_Page,AccordionList,content) {
         return declare('rft.pages.questions',[_Page],{
             constructor: function() {
@@ -8,7 +8,17 @@
             },
             onVisit: function() {
+                debugger;
                 this._list = new AccordionList({
                     actions: {
-                        'Edit': lang.hitch(this,'_editQuestion')
+                        'Edit': {
+                            callback: lang.hitch(this,'_editQuestion'),
+                            properties: {
+                                blockButton: true,
+                                icon: "Edit",
+                                label: "Edit"
+                            }
+                        }
+
+                        
                     },
                     idProperty: store.idProperty,
@@ -32,7 +42,8 @@
             },
             _editQuestion: function(question) {
-                this.questionForm.reset();
-                this.questionWidget.set('value',question);
-                this.questionDialog.show();
+                content.goTo("question", {uid: question._id});
+                // this.questionForm.reset();
+                // this.questionWidget.set('value',question);
+                // this.questionDialog.show();
             },
             onSaveQuestion: function(evt) {
@@ -52,3 +63,3 @@
             }
         });
-    });
+});
Index: v/branches/rest-dojo-ui/client/rft/pages/surveyAdvanced.html
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/pages/surveyAdvanced.html	(revision 365)
+++ 	(revision )
@@ -1,34 +1,0 @@
-<div data-dojo-type="rft.pages.surveyAdvanced">
-	<div data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="region:'center'" style="height: 500px;">
-		<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'">
-			<h2>
-				<span class="rftIcon rftIconSurvey"></span>
-				<span class="headerText">Survey A [Design]</span>
-			</h2>
-		</div>
-		<div data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="region:'left', design:'headline'" style="width: 300px;">
-			
-			<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'">
-				<div data-dojo-type="dijit.layout.AccordionContainer" class="blue">
-					<div data-dojo-type="dijit.layout.ContentPane" title="Content" data-dojo-props="iconClass:'rftIcon rftIconPlus'">
-						<div id="SurveyEditorToolkit" data-dojo-props="skipForm: true, accept:[], selfAccept: false, copyOnly: true, horizontal: false, singular: true">
-							
-						</div>
-					</div>
-				</div>
-			</div>
-			<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'bottom'">
-				<button id="btnSave" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconAccept'">Save</button>
-				<button id="btnDiscard" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconCancel'">Discard</button>
-				<button id="btnBack" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconUndo'">Exit Design</button>
-			</div>
-		</div>
-		<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'">
-			<div id="SurveyEditorPreview">
-				
-			</div>
-
-			<button data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconPlus'">Add new</button>
-		</div>
-	</div>
-</div>
Index: v/branches/rest-dojo-ui/client/rft/pages/surveyAdvanced.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/pages/surveyAdvanced.js	(revision 365)
+++ 	(revision )
@@ -1,57 +1,0 @@
-define(['dojo/_base/declare',
-    'dojo/_base/lang',
-    'dojo/_base/Deferred',
-    'rft/ui/LineWithActionsWidget',
-    'rft/store',
-    'rft/ui/_Page',
-    'rft/api',
-    'rft/content',
-    'dijit/registry',
-    'dojo/on'],
-    function(declare, lang, Deferred, LineWithActionsWidget, store, _Page, api, content, registry, on){
-        return declare('rft.pages.surveyAdvanced', [_Page], {
-            object: null,
-            onVisit: function() {
-                if (this.pageArgs.uid) {
-                    Deferred.when(store.get(this.pageArgs.uid))
-                    .then(lang.hitch(this, function(obj) {
-                        this.object = obj;
-                    }));
-                } else {
-                    throw new Error("Error: no reference to object set!");
-                }
-
-                this._setupButtons();
-            },
-            onLeave: function() {
-                this.inherited(arguments);
-            },
-            _confirmSave: function() {
-                return confirm("Do you want to save?");
-            },
-            _saveSurvey: function() {
-            },
-            _restartEditor: function() {
-            },
-            _backToEditor: function() {
-                if (this._confirmSave()) {
-                    this._saveSurvey()
-                    content.goTo('survey', {uid: this.object._id}); 
-                } else {
-                    content.goTo('survey', {uid: this.object._id});
-                }
-            },
-            _setupButtons: function() {
-                registry.byId("btnSave").on("click", lang.hitch(this, function() {
-                    this._saveSurvey();
-                }));
-                registry.byId("btnDiscard").on("click", lang.hitch(this, function() {
-                    this._restartEditor();
-                }));
-                registry.byId("btnBack").on("click", lang.hitch(this, function() {
-                    this._backToEditor();
-                }));
-            }
-        });
-});
-
Index: /Dev/branches/rest-dojo-ui/client/rft/run.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/run.js	(revision 365)
+++ /Dev/branches/rest-dojo-ui/client/rft/run.js	(revision 366)
@@ -45,9 +45,9 @@
     'rft/pages/index',
     'rft/pages/questions',
+    'rft/pages/question',
     'rft/pages/session',
     'rft/pages/sessions',
     'rft/pages/surveys',
-    'rft/pages/survey',
-    'rft/pages/surveyAdvanced'
+    'rft/pages/survey'
     ],
     function(win,parser,LoginDialog,dom,connect,auth,content) {
Index: /Dev/branches/rest-dojo-ui/client/rft/ui/MenuLink.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/MenuLink.js	(revision 365)
+++ /Dev/branches/rest-dojo-ui/client/rft/ui/MenuLink.js	(revision 366)
@@ -6,4 +6,5 @@
         },
         onClick: function(){
+            debugger;
             content.goTo(this.pageId);
         }
Index: /Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreview.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreview.js	(revision 366)
+++ /Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreview.js	(revision 366)
@@ -0,0 +1,81 @@
+define([
+	'dojo/_base/declare',
+	'dojo/_base/lang',
+	'dojo/_base/array',
+	'dijit/_WidgetBase',
+	'dijit/_Container',
+	'dojo/dom-construct',
+	'rft/ui/QuestionEditorPreviewItem',
+	'dijit/_TemplatedMixin',
+	'dijit/_WidgetsInTemplateMixin',
+	'dojo/text!./templates/QuestionEditorPreview.html'
+	], function(declare, lang, baseArray, _WidgetBase, _Container, domConstruct, QuestionEditorPreviewItem, _TemplatedMixin, _WidgetsInTemplateMixin, template) {
+		return declare("rft.ui.QuestionEditorPreview", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, _Container], {
+
+			templateString: template,
+			dndSource: null,
+
+			postCreate: function(){
+				this.dndSource = new dojo.dnd.Source(this.dndSourceNode, {
+					isSource: true,
+					//accept: ["ToolkitItem", "PreviewItem"],
+					horizontal: false,
+					withHandles: false,
+					copyOnly: false,
+					selfCopy: false,
+					selfAccept: true,
+					delay: 0,
+					skipForm: true,
+					creator: lang.hitch(this, this._sourceCreatorMethod)
+				});
+				this.dndSource.startup();
+			},
+			_sourceCreatorMethod: function(item, hint){
+				var node;
+				switch(hint){
+					
+					case "avatar":
+					node = document.createElement("span");
+					node.innerHTML = item.title || "Dragging!!!";
+					return {node: node, data: item, type: "PreviewItem"};
+					break;
+					
+					default:
+					var previewItem = new rft.ui.QuestionEditorPreviewItem({
+						item: item
+					});
+					return {node: previewItem.domNode, data: item, type: "PreviewItem"};
+					break;					
+				}				
+			},
+			_createInnerWidget: function(item) {
+				var innerWidget;
+				switch (item.widgetType) {
+					default:
+					innerWidget = new dijit.form.Button({});
+					break;
+				}
+
+				return innerWidget;
+			},
+			InsertObjects: function(/*Array*/objects) {
+				// This takes an array of objects {data:{//props}, type:[//types]}. Node is NOT included!
+				objects.forEach(function(item){
+					this.dndSource.insertNodes(false, [item]);
+				}, this);
+			},
+			RemoveObject: function(widget) {
+			},
+			GetNodeList: function() {
+				return this.dndSource.getAllNodes();
+			},
+			onDropInternal: function() {
+				topic.publish("/QuestionEditor/Preview/MoveItem");
+			},
+			onDropExternal: function() {
+				// This is fired when something from the Toolkit is dropped into the Preview -- add operation.
+				topic.publish("/QuestionEditor/Preview/AddItem");
+			}
+
+		});
+});
Index: /Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreviewItem.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreviewItem.js	(revision 366)
+++ /Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreviewItem.js	(revision 366)
@@ -0,0 +1,79 @@
+define([
+	'dojo/_base/declare',
+	'dojo/_base/fx',
+	'dijit/_WidgetBase',
+	'dojo/dom-class',
+	'dojo/_base/lang',
+	'dojo/on',
+	'dijit/_TemplatedMixin',
+	'dijit/_WidgetsInTemplateMixin',
+	'dijit/form/Textbox',
+	'dojo/text!./templates/QuestionEditorPreviewItem.html',
+	], function(declare, fx, _WidgetBase, domClass, lang, on, _TemplatedMixin, _WidgetsInTemplateMixin, Textbox, templateFull) {
+		return declare("rft.ui.QuestionEditorPreviewItem", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {
+
+			version: "full",
+			templateString: templateFull,
+			baseClass: "surveyEditorPreviewItem",
+			previousContentHeight: 200,
+			innerWidget: null,
+			foldDuration: [250, 250],
+			animation: null,
+			
+			postCreate: function() {
+				this.foldButtonNode.onClick = lang.hitch(this, this.toggleFold);
+				if (this.item) {
+					this._createInnerWidget();
+				} else {
+					throw "No data supplied to create an innerWidget off of!";
+				}
+
+				on(this.innerWidget, "onSetTitle", function(title) {
+					this.titleNode.innerHTML = title;
+				});
+			},
+			toggleFold: function() {
+				if (!this.animation) {
+					if (!domClass.contains(this.domNode, "fold")) {
+						this.previousContentHeight = dojo.marginBox(this.innerNode).h;
+						this.animation = fx.animateProperty({
+							node: this.innerNode,
+							duration: this.foldDuration[0],
+							properties: {
+								height: 1						
+							},
+							onEnd: lang.hitch(this, function(){
+								domClass.add(this.domNode, "fold");
+								this.animation = null;
+							})
+						}).play();
+						this.foldButtonNode.iconNode.className = this.foldButtonNode.iconNode.className.replace("rftIconHalfArrowUp", "rftIconHalfArrowDown");
+					} else {
+						this.animation = fx.animateProperty({
+							node: this.innerNode,
+							duration: this.foldDuration[1],
+							properties: {
+								height: this.previousContentHeight				
+							},
+							onEnd: lang.hitch(this, function(){
+								domClass.remove(this.domNode, "fold");
+								this.animation = null;
+							})
+						}).play();
+						this.foldButtonNode.iconNode.className = this.foldButtonNode.iconNode.className.replace("rftIconHalfArrowDown", "rftIconHalfArrowUp");
+					}
+				}
+			},
+			_createInnerWidget: function() {
+				// This always creates a textbox as innerwidget pending creation of actual innerWidgets.
+				// Introduce a better way to create these widgets than a switch statement, based on item.widgetType? Perhaps "new eval(item.widgetType)({});" ?
+				switch (this.item.widgetType) {
+					default:
+					this.innerWidget = new Textbox();
+					break;
+				}
+				this.innerWidget.placeAt(this.containerNode);
+			}
+
+		});
+});
Index: /Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorToolkit.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorToolkit.js	(revision 366)
+++ /Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorToolkit.js	(revision 366)
@@ -0,0 +1,161 @@
+define([
+	'dojo/_base/declare',
+	'dojo/_base/lang',
+	'dojo/_base/array',
+	'dijit/_WidgetBase',
+	'dijit/_Container',
+	'dojo/dom-construct',
+	'rft/ui/QuestionEditorPreviewItem',
+	'dijit/_TemplatedMixin',
+	'dijit/_WidgetsInTemplateMixin',
+	'dojo/text!./templates/QuestionEditorToolkit.html'
+	], function(declare, lang, baseArray, _WidgetBase, _Container, domConstruct, QuestionEditorPreviewItem, _TemplatedMixin, _WidgetsInTemplateMixin, template) {
+		return declare("rft.ui.QuestionEditorToolkit", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, _Container], {
+
+			templateString: template,
+			postCreate: function(){
+				this.contentSource = new dojo.dnd.Source(this.ToolkitContentSourceNode, {
+					accept: [],
+					horizontal: false,
+					withHandles: false,
+					copyOnly: true,
+					selfCopy: false,
+					selfAccept: false,
+					singular: true,
+					creator: this._creator
+				});
+				this.inputsSource = new dojo.dnd.Source(this.ToolkitInputsSourceNode, {
+					accept: [],
+					horizontal: false,
+					withHandles: false,
+					copyOnly: true,
+					selfCopy: false,
+					selfAccept: false,
+					singular: true,
+					creator: this._creator
+				});
+				var contentItems = this._contentItems();
+				var inputsItems = this._inputsItems();
+				this.contentSource.insertNodes(false, contentItems);
+				this.inputsSource.insertNodes(false, inputsItems);
+			},
+			_creator: function(item, hint) {
+				var node;
+				if (hint == "avatar") {
+					node = document.createElement("span");
+					node.innerHTML = item.widgetType;
+					// debugger;
+					return {node: node, data: item, type: "ToolkitItem"};
+				} else {
+					var w = new dijit.form.Button({
+						baseClass: "rftLargeButton",
+						iconClass: "rftIcon rftIcon"+item.icon,
+						label: item.label,
+						showLabel: true,
+						class: "newline"
+					});
+					return {node: w.domNode, data: item.objectData, type: "ToolkitItem"};
+				}
+			},
+			_contentItems: function() {
+				// Returns an array of objects, from which to generate buttons to populate the ToolkitContentSource list.
+				return [
+				{
+					label: "Header",
+					objectData: {
+						_id: null,
+						widgetType: "rft.surveyContent.HeaderDialog",
+						widgetProps: {}
+					},
+					icon: "Header"
+				},
+				{
+					label: "Text",
+					objectData: {
+						_id: null,
+						widgetType: "rft.surveyContent.TextDialog",
+						widgetProps: {}
+					},
+					icon: "TextBox"
+				},
+				{
+					label: "Image",
+					objectData: {
+						_id: null,
+						widgetType: "rft.surveyContent.ImageDialog",
+						widgetProps: {}
+					},
+					icon: "Image"
+				},
+				{
+					label: "External media",
+					objectData: {
+						_id: null,
+						widgetType: "rft.surveyContent.ExternalDialog",
+						widgetProps: {}
+					},
+					icon: "External"
+				},
+				{
+					label: "Divider",
+					objectData: {
+						_id: null,
+						widgetType: "rft.surveyContent.Divider",
+						widgetProps: {}
+					},
+					icon: "Divider"
+				}];
+			},
+			_inputsItems: function() {
+				// Returns an array of objects, from which to generate buttons to populate the ToolkitInputsSource list.
+				return [
+				{
+					label: "Free text",
+					objectData: {
+						_id: null,
+						widgetType: "rft.surveyContent.TextInput",
+						widgetProps: {}
+					},
+					icon: "Text"
+				},
+				{
+					label: "Integer",
+					objectData: {
+						_id: null,
+						widgetType: "rft.surveyContent.IntegerInput",
+						widgetProps: {}
+					},
+					icon: "Integer"
+				},
+				{
+					label: "Scale",
+					objectData: {
+						_id: null,
+						widgetType: "rft.surveyContent.ScaleInput",
+						widgetProps: {}
+					},
+					icon: "Scale"
+				},
+				{
+					label: "Cards",
+					objectData: {
+						_id: null,
+						widgetType: "rft.surveyContent.CardsInput",
+						widgetProps: {}
+					},
+					icon: "Cards"
+				},
+				{
+					label: "Multiple Choice",
+					objectData: {
+						_id: null,
+						widgetType: "rft.surveyContent.MultipleChoiceInput",
+						widgetProps: {}
+					},
+					icon: "MultipleChoice"
+				}
+				];
+			}
+
+		});
+});
Index: v/branches/rest-dojo-ui/client/rft/ui/SurveyEditor.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/SurveyEditor.js	(revision 365)
+++ 	(revision )
@@ -1,28 +1,0 @@
-define([
-	'dojo/_base/declare',
-	'rft/ui/SurveyEditorPreview'
-	], function(declare, SurveyEditorPreview) {
-		return declare("rft.ui.SurveyEditor", [], {
-
-	//Properties
-	/* This class will coordinate between the SurveyEditorPreview and SurveyEditorToolkit (in both the SurveyEditor.html and QuestionEditor.html, if at all possible!)
-		It will keep the list of SurveyContent that is currently included and configured, and pass this to the aforementioned instances so they can display this and allow the user to interact.
-		It will need to either expose a bunch of method calls that the two subclasses can call when the user performs an action, or it will have to listen to their events.
-		*/
-		postCreate: function(){
-			this.preview = new SurveyEditorPreview({}).placeAt("surveyEditorPreviewNode");
-			this.preview.startup();
-			/* NOT DEFINED YET
-			this.toolkit = new SurveyEditorToolkit({}).placeAt("surveyEditorToolkitNode");
-			this.toolkit.startup();
-			*/
-		},
-
-		loadSurveyContent: function() {
-			// 1. Get data from server on startup.
-			// 2. Pass this data to toolkit and preview so they can update the visual representation.
-			debugger;
-		}
-
-	});
-});
Index: v/branches/rest-dojo-ui/client/rft/ui/SurveyEditorPreview.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/SurveyEditorPreview.js	(revision 365)
+++ 	(revision )
@@ -1,84 +1,0 @@
-define([
-	'dojo/_base/declare',
-	'dojo/_base/lang',
-	'dojo/_base/array',
-	'dijit/_WidgetBase',
-	'dijit/_Container',
-	'dojo/dom-construct',
-	'dojo/store/Memory',
-	'rft/ui/SurveyEditorPreviewItem',
-	'dijit/_TemplatedMixin',
-	'dijit/_WidgetsInTemplateMixin',
-	'dojo/text!./templates/SurveyEditorPreview.html'
-	], function(declare, lang, baseArray, _WidgetBase, _Container, domConstruct, Memory, SurveyEditorPreviewItem, _TemplatedMixin, _WidgetsInTemplateMixin, template) {
-		return declare("rft.ui.SurveyEditorPreview", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, _Container], {
-
-			templateString: template,
-			store: null,
-			dndSource: null,
-
-			postCreate: function(){
-				this.dndSource = new dojo.dnd.Source(this.dndSourceNode, {
-					isSource: true,
-					//accept: ["editorToolkitItem", "editorPreviewItem"],
-					horizontal: false,
-					withHandles: false,
-					copyOnly: false,
-					selfCopy: false,
-					selfAccept: true,
-					delay: 0,
-					skipForm: true,
-					parent: this.dndSourceContainerNode,
-					creator: lang.hitch(this, this._sourceCreatorMethod)
-				});
-				this.dndSource.startup();
-
-				this.store = new Memory({
-					data: [],
-					idProperty: "code"
-				});
-			},
-			_sourceCreatorMethod: function(item, hint){
-				switch(hint){
-					case "avatar":
-					var node = document.createElement("div");
-					node.innerHTML = item.title || "Dragging!!!";
-					item.node = node;
-					break;
-					default:
-					var widget = new rft.ui.SurveyEditorPreviewItem({
-						data: item.data,
-						type: item.type
-					});
-					item.node = widget.domNode;
-					break;					
-				}
-				console.log(item);
-				return item;
-
-				
-				/* TODO: Create widgetFactory method that handles creation of PreviewItem Dialogs and Views */
-			},
-			
-			InsertObjects: function(/*Array*/objects) {
-				// This takes an array of objects {data:{//props}, type:[//types]}. Node is NOT included!
-				objects.forEach(function(item){
-					this.dndSource.insertNodes(false, [item]);
-				}, this);
-			},
-
-			RemoveObject: function(widget) {
-			},
-			GetNodeList: function() {
-				return this.dndSource.getAllNodes();
-			},
-			onDropInternal: function() {
-				topic.publish("/SurveyEditor/Preview/MoveItem");
-			},
-			onDropExternal: function() {
-				// This is fired when something from the Toolkit is dropped into the Preview -- add operation.
-				topic.publish("/SurveyEditor/Preview/AddItem");
-			}
-
-		});
-});
Index: v/branches/rest-dojo-ui/client/rft/ui/SurveyEditorPreviewItem.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/SurveyEditorPreviewItem.js	(revision 365)
+++ 	(revision )
@@ -1,58 +1,0 @@
-define([
-	'dojo/_base/declare',
-	'dojo/_base/fx',
-	'dijit/_WidgetBase',
-	'dojo/dom-class',
-	'dojo/_base/lang',
-	'dijit/_TemplatedMixin',
-	'dijit/_WidgetsInTemplateMixin',
-	'dojo/text!./templates/SurveyEditorPreviewItem.html',
-	], function(declare, fx, _WidgetBase, domClass, lang, _TemplatedMixin, _WidgetsInTemplateMixin, templateFull) {
-		return declare("rft.ui.SurveyEditorPreviewItem", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {
-
-			version: "full",
-			templateString: templateFull,
-			baseClass: "surveyEditorPreviewItem",
-			previousContentHeight: 200,
-			innerWidget: null,
-			foldDuration: [250, 250],
-			animation: null,
-			
-			postCreate: function() {
-				this.foldButtonNode.onClick = lang.hitch(this, this.toggleFold);
-			},
-			toggleFold: function() {
-				if (!this.animation) {
-					if (!domClass.contains(this.domNode, "fold")) {
-						this.previousContentHeight = dojo.marginBox(this.innerNode).h;
-						this.animation = fx.animateProperty({
-							node: this.innerNode,
-							duration: this.foldDuration[0],
-							properties: {
-								height: 1						
-							},
-							onEnd: lang.hitch(this, function(){
-								domClass.add(this.domNode, "fold");
-								this.animation = null;
-							})
-						}).play();
-						this.foldButtonNode.iconNode.className = this.foldButtonNode.iconNode.className.replace("rftIconHalfArrowUp", "rftIconHalfArrowDown");
-					} else {
-						this.animation = fx.animateProperty({
-							node: this.innerNode,
-							duration: this.foldDuration[1],
-							properties: {
-								height: this.previousContentHeight				
-							},
-							onEnd: lang.hitch(this, function(){
-								domClass.remove(this.domNode, "fold");
-								this.animation = null;
-							})
-						}).play();
-						this.foldButtonNode.iconNode.className = this.foldButtonNode.iconNode.className.replace("rftIconHalfArrowDown", "rftIconHalfArrowUp");
-					}
-				}
-			},
-
-		});
-});
Index: v/branches/rest-dojo-ui/client/rft/ui/SurveyEditorToolkit.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/SurveyEditorToolkit.js	(revision 365)
+++ 	(revision )
@@ -1,88 +1,0 @@
-define([
-	'dojo/_base/declare',
-	'dojo/_base/lang',
-	'dojo/_base/array',
-	'dijit/_WidgetBase',
-	'dijit/_Container',
-	'dojo/dom-construct',
-	'dojo/store/Memory',
-	'rft/ui/SurveyEditorPreviewItem',
-	'dijit/_TemplatedMixin',
-	'dijit/_WidgetsInTemplateMixin',
-	'dojo/text!./templates/SurveyEditorPreview.html'
-	], function(declare, lang, baseArray, _WidgetBase, _Container, domConstruct, Memory, SurveyEditorPreviewItem, _TemplatedMixin, _WidgetsInTemplateMixin, template) {
-		return declare("rft.ui.SurveyEditorToolkit", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, _Container], {
-
-			templateString: template,
-			store: null,
-			dndSource: null,
-
-			postCreate: function(){
-				this.dndSource = new dojo.dnd.Source(this.dndSourceNode, {
-					isSource: true,
-					//accept: ["editorToolkitItem", "editorPreviewItem"],
-					horizontal: false,
-					withHandles: false,
-					copyOnly: false,
-					selfCopy: false,
-					selfAccept: true,
-					delay: 0,
-					skipForm: true,
-					parent: this.dndSourceContainerNode,
-					creator: lang.hitch(this, this._sourceCreatorMethod)
-				});
-				this.dndSource.startup();
-
-				this.store = new Memory({
-					data: [],
-					idProperty: "code"
-				});
-			},
-			_sourceCreatorMethod: function(item, hint){
-				switch(hint){
-					case "avatar":
-					debugger;
-					var node = document.createElement("div");
-					node.innerHTML = item.title || "Dragging!!!";
-					item.node = node;
-					break;
-					default:
-					var widget = new rft.ui.SurveyEditorPreviewItem({
-						data: item.data,
-						title: (item.data.title || "Untitled"),
-						description: (item.data.description || "No description"),
-						type: item.type,
-						code: item.data.code
-					});
-					item.node = widget.domNode;
-					break;					
-				}
-				console.log(item);
-				return item;
-
-				
-				/* TODO: Create widgetFactory method that handles creation of PreviewItem Dialogs and Views */
-			},
-			
-			InsertObjects: function(/*Array*/objects) {
-				// This takes an array of objects {data:{//props}, type:[//types]}. Node is NOT included!
-				objects.forEach(function(item){
-					this.dndSource.insertNodes(false, [item]);
-				}, this);
-			},
-
-			RemoveObject: function(widget) {
-			},
-			GetNodeList: function() {
-				return this.dndSource.getAllNodes();
-			},
-			onDropInternal: function() {
-				topic.publish("/SurveyEditor/Preview/MoveItem");
-			},
-			onDropExternal: function() {
-				// This is fired when something from the Toolkit is dropped into the Preview -- add operation.
-				topic.publish("/SurveyEditor/Preview/AddItem");
-			}
-
-		});
-});
Index: /Dev/branches/rest-dojo-ui/client/rft/ui/_Page.js
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/_Page.js	(revision 365)
+++ /Dev/branches/rest-dojo-ui/client/rft/ui/_Page.js	(revision 366)
@@ -36,8 +36,10 @@
             /** Event fired before leaving the page. Return false to prevent */
             onLeave: function(){
+                debugger;
                 dijit.findWidgets(this.domNode).forEach(function(w){
                     w.destroyRecursive(false);
                 });
+                return true;
             }
         });
-    });
+});
Index: /Dev/branches/rest-dojo-ui/client/rft/ui/templates/QuestionEditorPreview.html
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/templates/QuestionEditorPreview.html	(revision 366)
+++ /Dev/branches/rest-dojo-ui/client/rft/ui/templates/QuestionEditorPreview.html	(revision 366)
@@ -0,0 +1,6 @@
+<div>
+	<div data-dojo-attach-point="windowNode" class="surveyEditorPreview">
+		<div data-dojo-attach-point="dndSourceNode" class="surveyEditorPreviewSource">
+		</div>
+	</div>
+</div>
Index: /Dev/branches/rest-dojo-ui/client/rft/ui/templates/QuestionEditorPreviewItem.html
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/templates/QuestionEditorPreviewItem.html	(revision 366)
+++ /Dev/branches/rest-dojo-ui/client/rft/ui/templates/QuestionEditorPreviewItem.html	(revision 366)
@@ -0,0 +1,20 @@
+<div class="inheritBgColor light">
+	<div class="topBorder inheritBgColor light" data-dojo-attach-point="topBorderNode">
+		<span class="title" data-dojo-attach-point="titleNode">Default title</span>
+		<span class="floatRight">
+			<button class="blue" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftBlockButton', showLabel: false, iconClass: 'rftIcon rftIconHalfArrowUp'" data-dojo-attach-point="foldButtonNode">Fold</button>
+			<button class="blue" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftBlockButton', showLabel: false, iconClass: 'rftIcon rftIconDelete'">Remove</button>
+		</span>
+	</div>
+	
+	<div class="surveyEditorPreviewItemInner" data-dojo-attach-point="innerNode">
+		<div class="surveyEditorPreviewItemContent inheritBgColor" data-dojo-attach-point="containerNode">
+		</div>
+	</div>
+	
+	<div class="bottomBorder inheritBgColor light" data-dojo-attach-point="bottomBorderNode">
+		<span class="floatRight">
+			<button class="trans" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftBlockButton', iconClass: 'rftIcon rftIconEdit'">Edit</button>
+		</span>
+	</div>
+</div>
Index: /Dev/branches/rest-dojo-ui/client/rft/ui/templates/QuestionEditorToolkit.html
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/templates/QuestionEditorToolkit.html	(revision 366)
+++ /Dev/branches/rest-dojo-ui/client/rft/ui/templates/QuestionEditorToolkit.html	(revision 366)
@@ -0,0 +1,27 @@
+<div>
+	<div data-dojo-type="dijit.layout.AccordionContainer" class="orange">
+		<div data-dojo-type="dijit.layout.ContentPane" title="Properties" data-dojo-props="iconClass:'rftIcon rftIconProperties'">
+			<form id="propertiesForm">
+				<fieldset class="align">
+					<label for="propertiesTitle">Title:</label><input data-dojo-type="dijit.form.TextBox" id="propertiesTitle"/>
+					<label for="propertiesCode">Code:</label><input data-dojo-type="dijit.form.TextBox" id="propertiesCode"/>
+					<label for="propertiesCategories">Categories:</label><input data-dojo-type="dijit.form.FilteringSelect" id="propertiesCategories"/>
+					<label for="propertiesTopic">Topic:</label><input data-dojo-type="dijit.form.FilteringSelect" id="propertiesTopic"/>
+					<label for="propertiesDescription">Description:</label><textarea data-dojo-type="dijit.form.Textarea" id="propertiesDescription"></textarea>
+				</fieldset>
+			</form>
+		</div>
+
+		<div data-dojo-type="dijit.layout.ContentPane" title="Content" data-dojo-props="iconClass:'rftIcon rftIconPlus'">
+			<div data-dojo-attach-point="ToolkitContentSourceNode">
+				
+			</div>
+		</div>
+
+		<div data-dojo-type="dijit.layout.ContentPane" title="Inputs" data-dojo-props="iconClass:'rftIcon rftIconInput'">
+			<div data-dojo-attach-point="ToolkitInputsSourceNode">
+				
+			</div>
+		</div>
+	</div>
+</div>
Index: v/branches/rest-dojo-ui/client/rft/ui/templates/SurveyEditorPreview.html
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/templates/SurveyEditorPreview.html	(revision 365)
+++ 	(revision )
@@ -1,8 +1,0 @@
-<div>
-	<div data-dojo-attach-point="windowNode" class="surveyEditorPreview">
-		<div data-dojo-attach-point="dndSourceNode">
-			<h2>Preview:</h2>
-			<div data-dojo-attach-point="dndSourceContainerNode" class="surveyEditorPreviewSource"></div>
-		</div>
-	</div>
-</div>
Index: v/branches/rest-dojo-ui/client/rft/ui/templates/SurveyEditorPreviewItem.html
===================================================================
--- /Dev/branches/rest-dojo-ui/client/rft/ui/templates/SurveyEditorPreviewItem.html	(revision 365)
+++ 	(revision )
@@ -1,24 +1,0 @@
-<div class="inheritBgColor light">
-	<div class="topBorder inheritBgColor light" data-dojo-attach-point="topBorderNode">
-		<span class="title" data-dojo-attach-point="titleNode">Default title</span>
-		<span class="floatRight">
-			<button class="blue" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftBlockButton', showLabel: false, iconClass: 'rftIcon rftIconHalfArrowUp'" data-dojo-attach-point="foldButtonNode">Fold</button>
-			<button class="blue" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftBlockButton', showLabel: false, iconClass: 'rftIcon rftIconDelete'">Remove</button>
-		</span>
-	</div>
-	
-	<div class="surveyEditorPreviewItemInner" data-dojo-attach-point="innerNode">
-		<div class="surveyEditorPreviewItemContent inheritBgColor" data-dojo-attach-point="containerNode">
-			Content goes here.<br/>
-			This is content.<br/><br/>
-			This is some more content. <br/>
-			And the last bit.
-		</div>
-	</div>
-	
-	<div class="bottomBorder inheritBgColor light" data-dojo-attach-point="bottomBorderNode">
-		<span class="floatRight">
-			<button class="trans" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftBlockButton', iconClass: 'rftIcon rftIconEdit'">Edit</button>
-		</span>
-	</div>
-</div>
