Index: /Dev/trunk/client/qed/css/dijit/overrides.less
===================================================================
--- /Dev/trunk/client/qed/css/dijit/overrides.less	(revision 435)
+++ /Dev/trunk/client/qed/css/dijit/overrides.less	(revision 436)
@@ -107,2 +107,10 @@
     border: none;
 }
+
+.claro .dojoDndItemAnchor {
+    background-color: #000000;
+}
+
+.claro .dojoDndItemOver {
+    background-color: #333333;
+}
Index: /Dev/trunk/client/qed/css/qed.css
===================================================================
--- /Dev/trunk/client/qed/css/qed.css	(revision 435)
+++ /Dev/trunk/client/qed/css/qed.css	(revision 436)
@@ -339,4 +339,14 @@
   border: none;
 }
+/* line 110, /home/hendrik/gamelab/qed.svn/Dev/trunk/client/qed/css/dijit/overrides.less */
+@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/hendrik\/gamelab\/qed\.svn\/Dev\/trunk\/client\/qed\/css\/dijit\/overrides\.less}line{font-family:\00003110}}
+.claro .dojoDndItemAnchor {
+  background-color: #000000;
+}
+/* line 114, /home/hendrik/gamelab/qed.svn/Dev/trunk/client/qed/css/dijit/overrides.less */
+@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/hendrik\/gamelab\/qed\.svn\/Dev\/trunk\/client\/qed\/css\/dijit\/overrides\.less}line{font-family:\00003114}}
+.claro .dojoDndItemOver {
+  background-color: #333333;
+}
 /* line 3, /home/hendrik/gamelab/qed.svn/Dev/trunk/client/qed/css/dijit/ContentPane.less */
 @media -sass-debug-info{filename{font-family:file\:\/\/\/home\/hendrik\/gamelab\/qed\.svn\/Dev\/trunk\/client\/qed\/css\/dijit\/ContentPane\.less}line{font-family:\000033}}
Index: /Dev/trunk/client/qed/model/widgets/QuestionEditorPreview.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/QuestionEditorPreview.js	(revision 435)
+++ /Dev/trunk/client/qed/model/widgets/QuestionEditorPreview.js	(revision 436)
@@ -20,7 +20,8 @@
         _createListNode: function(item) {
             var previewItem = new QuestionEditorPreviewItem({
-                item: item
+                value: item
             });
-            previewItem.on('close',lang.hitch(this,'removeItem',item));
+            this.own(previewItem.on('close',
+                                    lang.hitch(this,'removeItem',item)));
             previewItem.startup();
             return previewItem.domNode;
Index: /Dev/trunk/client/qed/model/widgets/QuestionEditorPreviewItem.js
===================================================================
--- /Dev/trunk/client/qed/model/widgets/QuestionEditorPreviewItem.js	(revision 435)
+++ /Dev/trunk/client/qed/model/widgets/QuestionEditorPreviewItem.js	(revision 436)
@@ -1,82 +1,48 @@
 define([
-    'dojo/_base/declare',
-    'dojo/_base/fx',
-    'dojo/_base/lang',
-    'dojo/dom-class',
-    'dojo/dom-geometry',
-    'dojo/on',
-    'dijit/_Container',
-    'dijit/_TemplatedMixin',
-    'dijit/_WidgetBase',
-    'dijit/_WidgetsInTemplateMixin',
-    './QuestionWidgetFactory',
-    'dojo/text!./templates/QuestionEditorPreviewItem.html'
-], function(
-    declare,
-    fx,
-    lang,
-    domClass,
-    domGeom,
-    on,
-    _Container,
-    _TemplatedMixin,
-    _WidgetBase,
-    _WidgetsInTemplateMixin,
-    QuestionWidgetFactory,
-    template
-){
+    "./QuestionWidgetFactory",
+    "dijit/_Container",
+    "dijit/_TemplatedMixin",
+    "dijit/_WidgetBase",
+    "dijit/_WidgetsInTemplateMixin",
+    "dojo/_base/declare",
+    "dojo/_base/fx",
+    "dojo/_base/lang",
+    "dojo/dom-class",
+    "dojo/dom-geometry",
+    "dojo/on",
+    "dojo/text!./templates/QuestionEditorPreviewItem.html"
+], function(QuestionWidgetFactory, _Container, _TemplatedMixin, _WidgetBase, _WidgetsInTemplateMixin, declare, fx, lang, domClass, domGeom, on, template) {
     return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, _Container], {
-        version: "full",
         templateString: template,
         baseClass: "surveyEditorPreviewItem",
         previousContentHeight: 200,
-        item: null,
+        value: null,
         innerWidget: null,
         foldDuration: [250, 250],
         animation: null,
         _editing: false,
+        _factory: new QuestionWidgetFactory(),
 
         startup: function() {
             if ( this._started ){ return; }
             this.inherited(arguments);
-            this.foldButtonNode.onClick = lang.hitch(this, this.toggleFold);
-            this.removeButtonNode.onClick = lang.hitch(this, "onClose");
-            this.editButtonNode.onClick = lang.hitch(this, this.toggleEdit);
-            if (this.item) {
-                this._showViewWidget();
+            this.own(on(this.foldButtonNode,'click',
+                        lang.hitch(this, 'onToggleFold')));
+            this.own(on(this.removeButtonNode,'click',
+                        lang.hitch(this, 'onClose')));
+            this.own(on(this.editButtonNode,'click',
+                        lang.hitch(this, 'onToggleEdit')));
+            if (this.value) {
+                this._showEditWidget();
             } else {
                 throw "No data supplied to create an innerWidget!";
             }
         },
-        _destroyInnerWidget: function() {
-            if ( this.innerWidget !== null ) {
-                this.innerWidget.destroyRecursive();
-            }
-        },
-        _showViewWidget: function() {
-            var factory = new QuestionWidgetFactory();
-            this.innerWidget = factory.createViewWidget( this.item );
-            if ( this.innerWidget !== null ) {
-                this.innerWidget.placeAt(this.containerNode);
-                this.innerWidget.startup();
-                this.innerWidget.set('readOnly',true);
-            }
-            this.titleNode.innerHTML = this.item.type+" [preview]";
-        },
-        _showEditWidget: function() {
-            var factory = new QuestionWidgetFactory();
-            this.innerWidget = factory.createEditWidget( this.item );
-            if ( this.innerWidget !== null ) {
-                this.innerWidget.placeAt(this.containerNode);
-                this.innerWidget.startup();
-            }
-            this.titleNode.innerHTML = this.item.type+" [editing]";
-        },
         onClose: function() {},
         _getValueAttr: function(value) {
-            return this.item;
+            return this.value;
         },
         _setValueAttr: function(value) {
-            this.item = value;
+            this.value = value;
             this._destroyInnerWidget();
             if ( this._editing ) {
@@ -86,22 +52,50 @@
             }
         },
-        toggleEdit: function() {
-            if(this._editing) {
+        onToggleEdit: function() {
+            if (this._editing) {
                 if ( this.innerWidget !== null ) {
-                    this.item = this.innerWidget.get('value');
+                    if (!this.innerWidget.validate ||
+                        this.innerWidget.validate() ) {
+                        this.value = this.innerWidget.get('value');
+                        this._showViewWidget();
+                    }
+                } else {
+                    this._showViewWidget();
                 }
-                this._destroyInnerWidget();
-                this._showViewWidget();
-                this.editButtonNode.iconNode.className = this.editButtonNode.iconNode.className.replace("rftIconAccept", "rftIconEdit");
-                this.editButtonNode.set("label", "Edit");
             } else {
-                this._destroyInnerWidget();
                 this._showEditWidget();
-                this.editButtonNode.iconNode.className = this.editButtonNode.iconNode.className.replace("rftIconEdit", "rftIconAccept");
-                this.editButtonNode.set("label", "Done");
             }
-            this._editing = !this._editing;
         },
-        toggleFold: function() {
+        _showViewWidget: function() {
+            this._destroyInnerWidget();
+            this.innerWidget = this._factory.createViewWidget( this.value );
+            if ( this.innerWidget !== null ) {
+                this.innerWidget.placeAt(this.containerNode);
+                this.innerWidget.startup();
+                this.innerWidget.set('readOnly',true);
+            }
+            this.titleNode.innerHTML = this.value.type+" [preview]";
+            this.editButtonNode.iconNode.className = this.editButtonNode.iconNode.className.replace("rftIconAccept", "rftIconEdit");
+            this.editButtonNode.set("label", "Edit");
+            this._editing = false;
+        },
+        _showEditWidget: function() {
+            this._destroyInnerWidget();
+            this.innerWidget = this._factory.createEditWidget( this.value );
+            if ( this.innerWidget !== null ) {
+                this.innerWidget.placeAt(this.containerNode);
+                this.innerWidget.startup();
+            }
+            this.titleNode.innerHTML = this.value.type+" [editing]";
+            this.editButtonNode.iconNode.className = this.editButtonNode.iconNode.className.replace("rftIconEdit", "rftIconAccept");
+            this.editButtonNode.set("label", "Done");
+            this._editing = true;
+        },
+        _destroyInnerWidget: function() {
+            if ( this.innerWidget !== null ) {
+                this.innerWidget.destroyRecursive();
+            }
+        },
+        onToggleFold: function() {
             if (!this.animation) {
                 if (!domClass.contains(this.domNode, "fold")) {
