Index: Dev/branches/rest-dojo-ui/README.txt
===================================================================
--- Dev/branches/rest-dojo-ui/README.txt	(revision 423)
+++ 	(revision )
@@ -1,77 +1,0 @@
-===
-QED
-===
-
-Install
--------
-
-- Install CouchDB
-- Install Node.js
-- Install apache with rewrite,proxy and proxy_http modules enables
-- Run in console (cmd.exe):
-  C:\>cd <qed-root>/server/couchdb-admin/
-  C:\..\couchdb-admin\>run.bat config/config.js
-- Open http://localhost/.../qed/admin.html
-
-
-File organisation
------------------
-client/
-  The web application for QED.
-  routes.js
-    Contains the mapping from URLs to pages.
-  run.js
-    The script for starting the web application (the researchers part).
-  stddeps.js
-    Contains many dependencies that are used declarativly in the
-    templates. Maybe it can be deprecated with Dojo 1.8+'s auto require
-    if the build scans templates as well.
-  store.js
-    Module that returns a fully configured store for the rest of the
-    application to use for database access. Handles caching and exposes
-    some common serialization functions.
-  view.js
-    Script that starts the survey part (the respondent part).
-  data/
-    Apache proxy configuration for transparant access to CouchDB.
-  dijit/
-    Dijit library (UI components)
-  dojo/
-    Dojo library (Dojo JS framework)
-  dojox/
-    DojoX library (contrib library for Dojo and Dijit)
-  qed/
-    Sourcecode of the QED application
-    app/
-      Small app framework for handling pages, content, notifications
-      and URL history. Our application is build on this.
-    css/
-      Contains all CSS of the application. Should be distributed better
-      with the widgets. The styling is based on LESS, although a copy
-      of the CSS is still there.
-    model/
-      Contains all code dependent on our model, that is, the concrete
-      representation of our database documents.
-      classes/
-        Smart classes on top of the database documents, to help with
-        creating and validating objects.
-      widgets/
-        All widgets that are specific for objects of our model.
-    pages/
-      The pages in the application. Are wired up to URLs in the routes.js
-      file.
-    store/
-      Dojo Store implementations for Couch and Elastic.
-    ui/
-      Deprecated. Used to contain all widgets, but these are now split
-      between general and model specific widgets. Contains a few widgets
-      that were not yet refactored.
-    widgets/
-      Contains general widgets that are used in our application but do
-      not depend on our model.
-  rx/
-    Rx.JS reactive framework for Javascript
-    rx.dojo.js
-      Custom file to integrate Rx with Dojo.
-  util/
-    Dojo utils (e.g. build infrastructure)
Index: Dev/trunk/README.txt
===================================================================
--- Dev/trunk/README.txt	(revision 424)
+++ Dev/trunk/README.txt	(revision 424)
@@ -0,0 +1,77 @@
+===
+QED
+===
+
+Install
+-------
+
+- Install CouchDB
+- Install Node.js
+- Install apache with rewrite,proxy and proxy_http modules enables
+- Run in console (cmd.exe):
+  C:\>cd <qed-root>/server/couchdb-admin/
+  C:\..\couchdb-admin\>run.bat config/config.js
+- Open http://localhost/.../qed/admin.html
+
+
+File organisation
+-----------------
+client/
+  The web application for QED.
+  routes.js
+    Contains the mapping from URLs to pages.
+  run.js
+    The script for starting the web application (the researchers part).
+  stddeps.js
+    Contains many dependencies that are used declarativly in the
+    templates. Maybe it can be deprecated with Dojo 1.8+'s auto require
+    if the build scans templates as well.
+  store.js
+    Module that returns a fully configured store for the rest of the
+    application to use for database access. Handles caching and exposes
+    some common serialization functions.
+  view.js
+    Script that starts the survey part (the respondent part).
+  data/
+    Apache proxy configuration for transparant access to CouchDB.
+  dijit/
+    Dijit library (UI components)
+  dojo/
+    Dojo library (Dojo JS framework)
+  dojox/
+    DojoX library (contrib library for Dojo and Dijit)
+  qed/
+    Sourcecode of the QED application
+    app/
+      Small app framework for handling pages, content, notifications
+      and URL history. Our application is build on this.
+    css/
+      Contains all CSS of the application. Should be distributed better
+      with the widgets. The styling is based on LESS, although a copy
+      of the CSS is still there.
+    model/
+      Contains all code dependent on our model, that is, the concrete
+      representation of our database documents.
+      classes/
+        Smart classes on top of the database documents, to help with
+        creating and validating objects.
+      widgets/
+        All widgets that are specific for objects of our model.
+    pages/
+      The pages in the application. Are wired up to URLs in the routes.js
+      file.
+    store/
+      Dojo Store implementations for Couch and Elastic.
+    ui/
+      Deprecated. Used to contain all widgets, but these are now split
+      between general and model specific widgets. Contains a few widgets
+      that were not yet refactored.
+    widgets/
+      Contains general widgets that are used in our application but do
+      not depend on our model.
+  rx/
+    Rx.JS reactive framework for Javascript
+    rx.dojo.js
+      Custom file to integrate Rx with Dojo.
+  util/
+    Dojo utils (e.g. build infrastructure)
Index: Dev/trunk/build/build.sh
===================================================================
--- Dev/trunk/build/build.sh	(revision 424)
+++ Dev/trunk/build/build.sh	(revision 424)
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+PROFILE=$1
+if [ -z "$PROFILE" ]; then
+    echo "Usage: $0 <profile.js>"
+    exit 1
+fi
+
+TIME0=$SECONDS
+
+BUILDDIR="`dirname $0`"
+SRCDIR="$BUILDDIR/../client"
+DISTDIR="$BUILDDIR/../release"
+
+echo "Removing existing release directory $DISTDIR."
+rm -rf "$DISTDIR"
+
+echo "Start Dojo build process."
+"$SRCDIR/util/buildscripts/build.sh" --profile "$PROFILE"
+
+echo "Copying application top level resources."
+for i in "$SRCDIR/data" "$SRCDIR"/*.html; do
+    svn export "$i" "$DISTDIR/`basename $i`"
+done
+
+echo "Preparing top level HTML files."
+sed -i 's/data-dojo-config\s*=\s*".*"//' "$DISTDIR"/*.html
+
+echo "Done. Runtime was $(($SECONDS-$TIME0)) seconds."
Index: Dev/trunk/build/debug.profile.js
===================================================================
--- Dev/trunk/build/debug.profile.js	(revision 424)
+++ Dev/trunk/build/debug.profile.js	(revision 424)
@@ -0,0 +1,45 @@
+var profile = (function(){
+
+    return {
+        basePath: '../client/',
+        action: 'release',
+
+        mini: false,
+        layerOptimize: false,
+        optimize: false,
+        cssOptimize: false,
+        stripConsole: false,
+
+        selectorEngine: 'acme',
+
+        defaultConfig: {
+            async: true,
+            parseOnLoad: false
+        },
+
+        packages: [
+            'dojo',
+            'dijit',
+            'dojox',
+            'rft',
+            'config'
+        ],
+
+        layers: {
+            'dojo/dojo': {
+                include: [ 'dojo/dojo', 'dojo/domReady', 'dojo/_base/declare' ],
+                boot: true,
+                customBase: true
+            },
+            'rft/run' :{
+                include: [ 'rft/run' ]
+            },
+            'config/db' :{
+                include: [ 'config/db' ]
+            },
+            'rft/view' :{
+                include: [ 'rft/view' ]
+            }
+        }
+    };
+})();
Index: Dev/trunk/build/release.profile.js
===================================================================
--- Dev/trunk/build/release.profile.js	(revision 424)
+++ Dev/trunk/build/release.profile.js	(revision 424)
@@ -0,0 +1,60 @@
+var profile = (function(){
+
+    return {
+        basePath: '../client/',
+        action: 'release',
+
+        mini: true,
+        layerOptimize: 'closure',
+        optimize: 'closure',
+        cssOptimize: 'comments',
+        stripConsole: 'warn',
+
+        selectorEngine: 'acme',
+
+        defaultConfig: {
+            async: true,
+            parseOnLoad: false
+        },
+
+        staticHasFeatures: {
+            "dojo-loader": 1,
+            "dojo-config-api": 1,
+            "dojo-dom-ready-api": 1,
+            "dojo-has-api": 1,
+            "dojo-inject-api": 1,
+
+            "dojo-trace-api": 0,
+            "dojo-log-api": 0,
+            "dojo-publish-privates": 0,
+
+            "dom": 1,
+            "host-browser": 1
+        },
+
+        packages: [
+            'dojo',
+            'dijit',
+            'dojox',
+            'rft',
+            'config'
+        ],
+
+        layers: {
+            'dojo/dojo': {
+                include: [ 'dojo/dojo', 'dojo/domReady', 'dojo/_base/declare' ],
+                boot: true,
+                customBase: true
+            },
+            'rft/run' :{
+                include: [ 'rft/run' ]
+            },
+            'config/db' :{
+                include: [ 'config/db' ]
+            },
+            'rft/view' :{
+                include: [ 'rft/view' ]
+            }
+        }
+    };
+})();
Index: Dev/trunk/client/admin.html
===================================================================
--- Dev/trunk/client/admin.html	(revision 424)
+++ Dev/trunk/client/admin.html	(revision 424)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>QED - Researcher</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <link rel="stylesheet" type="text/css" href="qed/css/main.css" />
+    </head>
+    <body class="dijitReset claro" id="rft">
+        <script type="text/javascript" src="dojo/dojo.js" data-dojo-config="async: true, parseOnLoad: false, isDebug: true"></script>
+        <script type="text/javascript" src="qed/main-admin.js"></script>
+        <div id="content" class="page" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="region:'center'" style="width: 100%; height: 100%;">
+            <div class="topbar" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'">
+                <a href="#!/"><h1>QED</h1></a>
+                <div id="menu"></div>
+            </div>
+        </div>
+        <div id="toaster" data-dojo-type="qed/app/Notifications"></div>
+    </body>
+</html>
Index: Dev/trunk/client/data/.htaccess
===================================================================
--- Dev/trunk/client/data/.htaccess	(revision 424)
+++ Dev/trunk/client/data/.htaccess	(revision 424)
@@ -0,0 +1,3 @@
+RewriteEngine on
+RewriteRule couch/(.*) http://localhost:5984/qed/$1 [P,QSA]
+RewriteRule elastic http://localhost:9200/qed/_search [P,QSA]
Index: Dev/trunk/client/index.html
===================================================================
--- Dev/trunk/client/index.html	(revision 424)
+++ Dev/trunk/client/index.html	(revision 424)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>QED</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <link rel="stylesheet" type="text/css" href="qed/css/main.css" />
+    </head>
+    <body class="dijitReset claro" id="rft">
+        <div class="topbar">
+            <h1>QED</h1><br>
+            <p>Nothing is shown here.</p>
+        </div>
+    </body>
+</html>
Index: Dev/trunk/client/qed/app/Content.js
===================================================================
--- Dev/trunk/client/qed/app/Content.js	(revision 424)
+++ Dev/trunk/client/qed/app/Content.js	(revision 424)
@@ -0,0 +1,46 @@
+define([
+    'dojo/_base/declare',
+    'dijit/registry'
+],function(declare,registry){
+
+    var Content = declare(null,{
+        _started: false,
+        _container: null,
+        _previousContent: null,
+        startup: function() {
+            if ( this._started ) { return; }
+
+            this._container = registry.byId('content');
+            if ( !this._container || !this._container.addChild ) {
+                throw new Error("Cannot find container widget with id 'content'.");
+            }
+
+            this._toaster = registry.byId('toaster');
+            if ( !this._toaster || !this._toaster.setContent ) {
+                throw new Error("Cannot find toaster widget with id 'toaster'.");
+            }
+
+            this._started = true;
+        },
+        set: function(widget) {
+            if ( !this._started ) {
+                throw new Error('Call startup() before setting content.');
+            }
+            if ( this._previousContent ) {
+                this._previousContent.destroyRecursive();
+                this._previousContent = null;
+            }
+            widget.region = 'center';
+            this._container.addChild(widget);
+            this._previousContent = widget;
+        },
+        notify: function(text,type) {
+            if ( !this._started ) {
+                throw new Error('Call startup() before setting content.');
+            }
+            this._toaster.setContent(text,type || 'message');
+        }
+    });
+
+    return new Content();
+});
Index: Dev/trunk/client/qed/app/Notifications.js
===================================================================
--- Dev/trunk/client/qed/app/Notifications.js	(revision 424)
+++ Dev/trunk/client/qed/app/Notifications.js	(revision 424)
@@ -0,0 +1,7 @@
+define(['dojo/_base/declare','dojox/widget/Toaster'],
+function(declare,Toaster){
+    return declare([Toaster],{
+        positionDirection: "br-up",
+        duration: 3000
+    });
+});
Index: Dev/trunk/client/qed/app/Page.js
===================================================================
--- Dev/trunk/client/qed/app/Page.js	(revision 424)
+++ Dev/trunk/client/qed/app/Page.js	(revision 424)
@@ -0,0 +1,10 @@
+define([
+    'dojo/_base/declare',
+    'dijit/_TemplatedMixin',
+    'dijit/_WidgetsInTemplateMixin',
+    'dijit/layout/BorderContainer'
+],function(declare,_TemplatedMixin,_WidgetsInTemplateMixin,BorderContainer){
+    return declare([BorderContainer,_TemplatedMixin,_WidgetsInTemplateMixin],{
+        templateString: '<div>Empty page.</div>'
+    });
+});
Index: Dev/trunk/client/qed/app/Path.js
===================================================================
--- Dev/trunk/client/qed/app/Path.js	(revision 424)
+++ Dev/trunk/client/qed/app/Path.js	(revision 424)
@@ -0,0 +1,51 @@
+define([
+    'dojo/_base/declare',
+    'dojo/io-query'
+],function(declare,ioQuery){
+
+    var _paramMatch = /:(\w[\w\d]*)/g;
+    var _paramReplace = "([^\\/!]+)";
+
+    var Path = declare(null,{
+        _paramNames: null,
+        _matcher: null,
+        constructor: function(pattern) {
+            var match = null;
+            this._paramNames = [];
+			while((match = _paramMatch.exec(pattern)) !== null){
+				this._paramNames.push(match[1]);
+			}
+            pattern = pattern.replace(_paramMatch, _paramReplace);
+            this._matcher = new RegExp('^!'+pattern+'(!(.*))?$');
+        },
+        match: function(path) {
+            var params = null;
+            var result = null;
+            if ((result = this._matcher.exec(path)) !== null) {
+                var numParams = this._paramNames.length;
+                params = {};
+                for (var j = 0; j < numParams; j++) {
+                    params[this._paramNames[j]] = result[j+1];
+                }
+                if ( result.length > numParams+1 && result[numParams+2] ) {
+                    params.options = ioQuery.queryToObject(result[numParams+2]);
+                }
+            }
+            return params;
+        }
+    });
+
+    Path.getDefault = function() {
+        return "!/";
+    };
+
+    Path.format = function(path,options) {
+        var hash = '!'+path;
+        if ( options ) {
+            hash += '!'+ioQuery.objectToQuery(options);
+        }
+        return hash;
+    };
+
+    return Path;
+});
Index: Dev/trunk/client/qed/app/Router.js
===================================================================
--- Dev/trunk/client/qed/app/Router.js	(revision 424)
+++ Dev/trunk/client/qed/app/Router.js	(revision 424)
@@ -0,0 +1,105 @@
+define([
+    'dojo/_base/declare',
+    'dojo/hash',
+    'dojo/topic',
+    './Content',
+    './Page',
+    './Path'
+],function(declare,hash,topic,Content,Page,Path){
+
+    var Router = declare(null,{
+        _started: false,
+        _routes: null,
+        _previousHash: null,
+
+        constructor: function() {
+            this._routes = [];
+        },
+        startup: function() {
+            if ( this._started ) { return; }
+            if ( !Content._started ) {
+                Content.startup();
+            }
+            this._started = true;
+
+            var self = this;
+
+            if ( hash() === "" ) {
+                hash(Path.getDefault());
+            }
+            this._handlePathChange(hash());
+			topic.subscribe("/dojo/hashchange", function(){
+                self._handlePathChange.apply(self,arguments);
+            });
+        },
+        register: function(route) {
+            if ( this._started ) {
+                console.warn('Registering routes after startup() is called is discouraged.');
+            }
+            var callback = this._normalizeCallback(route);
+            if ( callback ) {
+                if ( route.path ) {
+                    route.callback = callback;
+                    route.path = new Path(route.path);
+                    this._routes.push(route);
+                } else {
+                    this._defaultCallback = callback;
+                }
+            } else {
+                console.warn("Route "+(route.path||"default")+" has no action.");
+            }
+        },
+        _normalizeCallback: function(route) {
+            var self = this;
+            var callback = null;
+            if ( route.callback ) {
+                callback = function(params){
+                    Content.set(route.callback(params));
+                };
+            } else if ( route.redirect ) {
+                callback = function(params){
+                    self.go(route.redirect);
+                };
+            } else if ( route.constructor ) {
+                callback = function(params){
+                    Content.set( new route.constructor(params) );
+                };
+            }
+            return callback;
+        },
+        _handlePathChange: function(newHash) {
+            if ( this._previousHash === newHash ) { return; }
+            this._previousHash = newHash;
+            for (var i = this._routes.length-1; i >= 0; i--) {
+                var route = this._routes[i];
+                var params = null;
+                if ((params = route.path.match(newHash)) !== null) {
+                    try {
+                        route.callback(params);
+                    } catch(err) {
+                        console.error("Page change failed.",err);
+                    }
+                    return;
+                }
+            }
+            try {
+                this._defaultCallback();
+            } catch(err) {
+                console.error("Default page failed.",err);
+            }
+        },
+        go: function(path,args) {
+            if ( !this._started ) { return; }
+            var newHash = Path.format(path,args);
+            this._handlePathChange(newHash);
+            hash(newHash);
+        },
+        _defaultCallback: function() {
+            Content.set(new Page({
+                templateString: "<div>Requested page not found. Go <a href=\"#"+Path.getDefault()+"\">home</a>.</div>"
+            }));
+        }
+    });
+
+    return new Router();
+});
Index: Dev/trunk/client/qed/css/LESS/claroOverride.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/claroOverride.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/claroOverride.less	(revision 424)
@@ -0,0 +1,108 @@
+/* This stylesheet compensates for the restoration of the claro style to its original specs. (21-6-2012)
+ * These changes should be moved to relevant stylesheets as soon as possible!
+*/
+
+
+/* Menu.css */
+.claro .topbar .dijitMenuitem {
+    width: 90px;
+    background-image: none;
+    background-position: top;
+    text-align: center;
+}
+.claro .dijitMenuPassive .dijitMenuItemHover, .claro .dijitMenuPassive .dijitMenuItemSelected {
+    background-color: transparent;
+    color: #ffffff;
+    border: none;
+    padding: 0 4px;
+}
+.claro .dijitMenuPassive .dijitMenuItemActive {
+    background-position: top;
+}
+
+/* layout/BorderContainer.css */
+.claro .dijitSplitContainer-child, .claro .dijitBorderContainer-child {
+    border: none;
+}
+.claro .dijitTabContainerTop-dijitContentPane,
+.claro .dijitTabContainerLeft-dijitContentPane,
+.claro .dijitTabContainerBottom-dijitContentPane,
+.claro .dijitTabContainerRight-dijitContentPane,
+.claro .dijitAccordionContainer-dijitContentPane {
+    background-color: transparent;
+}
+.claro .dijitSplitContainer-dijitContentPane,
+.claro .dijitBorderContainer-dijitContentPane {
+    background-color: transparent;
+}
+
+/* layout/TabContainer.css */
+.claro .dijitTabPaneWrapper {
+    background: transparent;
+}
+.claro .dijitTabInnerDiv {
+    background-color: transparent;
+    color: #999999;
+    border: none;
+}
+.claro .dijitTabContent {
+    border: none;
+}
+.claro .dijitTabHover .dijitTabInnerDiv {
+    background-color: transparent;
+    color: #ffffff;
+}
+.claro .dijitTabActive .dijitTabInnerDiv {
+    color: #0072bc;
+}
+.claro .dijitTabChecked .dijitTabInnerDiv {
+    background-color: transparent;
+    color: #ffffff;
+}
+.claro .dijitTabContent {
+    border: 1px solid #999999;
+}
+.claro .dijitTabHover .dijitTabContent {
+    border-color: #ffffff;
+}
+.claro .dijitTabActive .dijitTabContent {
+    border-color: transparent;
+}
+.claro .dijitTabChecked .dijitTabContent {
+    color: #ffffff;
+    border-color: #0072bc;
+}
+/*lefttabs*/
+.claro .dijitTabContainerLeft-tabs .dijitTab {
+    border-width: 1px;
+    left: 0;
+    margin-bottom: 4px;
+    margin-right: 8px;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabInnerDiv {
+    border: none;
+    background: transparent;
+    background-image: none;
+    background-position: top;
+    background-repeat: no-repeat;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabContent {
+    padding: 3px 8px 4px 8px;
+    background-image: none;
+
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabChecked .dijitTabContent {
+    padding-right: 8px;
+    background-image: none;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabChecked .dijitTabInnerDiv {
+    -webkit-box-shadow: none;
+    -moz-box-shadow: none;
+    box-shadow: none;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabInnerDiv,
+.claro .dijitTabContainerLeft-tabs .dijitTabContent {
+    -moz-border-radius: 0;
+    border-radius: 0;
+    border: none;
+}
Index: Dev/trunk/client/qed/css/LESS/colors.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/colors.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/colors.less	(revision 424)
@@ -0,0 +1,90 @@
+#rft {
+	&.claro {
+		
+		.colorMixin (@color) {
+			&.bgColor {
+				background-color: @@color !important;
+				&.light {
+					@colorName: "@{color}_light";
+					background-color: @@colorName !important;
+				}
+			}
+			.bgColor {
+				background-color: @@color;
+				&.light {
+					@colorName: "@{color}_light";
+					background-color: @@colorName;
+				}
+			}
+		}
+
+		.hoverColorMixin (@color) {
+			&.hoverBgColor:hover {
+				background-color: @@color !important;
+				&.light {
+					@colorName: "@{color}_light";
+					background-color: @@colorName !important;
+				}
+			}
+			.hoverBgColor:hover {
+				background-color: @@color;
+				&.light {
+					@colorName: "@{color}_light";
+					background-color: @@colorName;
+				}
+			}
+		}
+
+		.hoverTextColorMixin (@color) {
+			&.hoverTextColor:hover {
+				color: @@color !important;
+				&.light {
+					@colorName: "@{color}_light";
+					color: @@colorName !important;
+				}
+			}
+			.hoverTextColor:hover {
+				color: @@color;
+				&.light {
+					@colorName: "@{color}_light";
+					color: @@colorName;
+				}
+			}
+		}
+
+		.bgColor {
+			-webkit-transition-property: background-color 0.2s;
+			-moz-transition-property: background-color 0.2s;
+			-o-transition-property: background-color 0.2s;
+			-ms-transition-property: background-color 0.2s;
+			transition-property: background-color 0.2s;			
+		}
+
+		.blue,
+		&.blue {
+			.colorMixin ("blue");
+			.hoverColorMixin ("blue");
+		}
+		.green,
+		&.green {
+			.colorMixin ("green");
+			.hoverColorMixin ("green");
+		}
+		.orange,
+		&.orange {
+			.colorMixin ("orange");
+			.hoverColorMixin ("orange");
+		}
+		.red,
+		&.red {
+			.colorMixin ("red");
+			.hoverColorMixin ("red");
+		}
+		.purple,
+		&.purple {
+			.colorMixin ("purple");
+			.hoverColorMixin ("purple");
+		}
+
+	}
+}
Index: Dev/trunk/client/qed/css/LESS/colors2.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/colors2.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/colors2.less	(revision 424)
@@ -0,0 +1,106 @@
+DESCRIPTION {
+	/*
+How to use colour system:
+Apply a combination of at most 1 "colour" class and one or more "modifier" classes.
+Colour classes: Red, Blue, Green, Orange, Purple
+Modifer classes:
+- textColor: Change the font colour of element to the "colour" class combined with.
+- bgColor: Change the background colour to the "colour" class combined with.
+- doesHover: If present in combination with one of the above two modifiers, 
+the element will shift it's background- or text colour to a lighter version on hover.
+- hoverTextColor: Same as .textColor, but only affects elements being hovered over.
+- hoverBgColor: Same as .bgColor, but only affects elements being hovered over.
+NOTE: .doesHover does nothing in combination with the above two modifiers!
+*/
+}
+
+// Variables/Colour scheme parameters
+.textColor (@color) {
+	color: @@color;
+}
+.textColorH (@color) {
+	color: @@color;
+	&.doesHover:hover {
+		@colorName: "@{color}_light";
+		color: @@colorName;
+	}
+}
+.hoverTextColor (@color) {
+	&:hover {
+		color: @@color;
+
+	}
+}
+.bgColor (@color) {
+	background-color: @@color;
+}
+.bgColorH (@color) {
+	background-color: @@color;
+	&.doesHover:hover {
+		@colorName: "@{color}_light";
+		background-color: @@colorName;
+	}
+}
+.hoverBgColor (@color) {
+	&:hover {
+		background-color: @@color;
+
+	}
+}
+
+
+// Private color mixin is used to assign the colour classes below, don't use this in external CSS!
+.privateColorMixin (@color) {
+	&.textColor {	//Change text colour to C-Class
+		color: @@color;
+		&.doesHover:hover {	//If also .doesHover, shift colour to light version on hover
+			@colorName: "@{color}_light";
+			color: @@colorName;
+		}
+	}
+	&.bgColor {	// Change background colour to C-Class
+		background-color: @@color;
+		color: @text;
+		&.doesHover:hover {	//If .doesHover, shift to light on hover
+			@colorName: "@{color}_light";
+			background-color: @@colorName;
+			color: @darkest;
+		}
+	}
+	&.hoverTextColor:hover {	// Only change text colour to C-class on hover
+		color: @@color;
+	}
+	&.hoverBgColor:hover {	// Only change background colour to C-class on hover
+		background-color: @@color;
+	}
+}
+
+#rft {
+	&.claro {
+
+		.blue {
+			.privateColorMixin("blue");
+		}
+		.red {
+			.privateColorMixin("red");
+		}
+		.orange {
+			.privateColorMixin("orange");
+		}
+		.green {
+			.privateColorMixin("green");
+		}
+		.purple {
+			.privateColorMixin("purple");
+		}
+
+		.textColor,
+		.hoverTextColor {
+			transition: color 0.2s;
+		}
+		.bgColor, 
+		.hoverBgColor {
+			transition: background-color 0.2s;
+		}
+	}
+}
Index: Dev/trunk/client/qed/css/LESS/layout.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/layout.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/layout.less	(revision 424)
@@ -0,0 +1,285 @@
+*:focus {
+	//disable Chrome outline of focused elements
+	outline: none;
+}
+html, body {
+	width: 100%;
+	height: 100%;
+	background-color: @base;
+}
+
+#rft {
+	&.claro {
+		font-family: @font;
+		font-size: @font_size;
+		color: @darkest;
+
+		.dijitBorderContainer, .dijitContentPane, .dijitTabContainer, .dijitTabPaneWrapper {
+			background: transparent;
+			border: none;
+		}		
+
+
+		h1 {
+			.noMargin;
+			padding: 0 10px 8px 10px;
+			float: left;
+			clear: left;
+			font-size: @h1Size;
+			color: @headers;
+			line-height: @h1Size;
+			font-weight: normal;
+			-webkit-user-select: none;
+			-moz-user-select: none;
+			-ms-user-select: none;
+			user-select: none;
+		}
+
+		h2 {
+			.noOffset;
+			color: @headers;
+			font-size: @h2Size;
+			line-height: floor(@h2Size * 1.365);
+
+			.rftIcon {
+				.setIcon(32px);
+				margin-right: 8px;
+			}
+		}
+
+		h3 {
+			.noMargin;
+			font-size: @h3Size;
+			margin-bottom: @std_offset;
+		}
+
+		h4 {
+			font-size: @h4Size;
+		}
+
+		//Main screen layout
+		.topbar {
+
+			overflow-y: hidden;
+
+			.dijitMenuBar {
+				.flatShading;
+				background-color: transparent;
+				float: right;
+				clear: right;
+				margin-top: 16px;
+			}
+
+			.breadcrumbs {
+				color: @headers;
+				.breadcrumb {
+					font-size: @font_size;
+					&.breadcrumbCurrent {
+						color: @text;
+						font-size: round(@font_size * 1.125);
+					}
+					&.breadcrumbHover {
+						color: @blue;
+					}
+				}
+			}
+		}
+
+		.dijitContentPane.page {
+			.noOffset;
+		}
+
+		.dijitContentPane.content {
+			.noOffset;
+			display: block;
+			clear: both;
+			background-color: @base2;
+			background-image: -webkit-gradient(
+				50% 50%, 
+				circle, 
+				#666666 1%,
+				#444444 100%
+				);
+			-moz-background-image: gradient(
+				50% 50%, 
+				circle, 
+				#666666 1%,
+				#444444 100%
+				);
+			-o-background-image: gradient(
+				50% 50%, 
+				circle, 
+				#666666 1%,
+				#444444 100%
+				);
+			-ms-background-image: gradient(
+				50% 50%, 
+				circle, 
+				#666666 1%,
+				#444444 100%
+				);
+			background-image: gradient(
+				50% 50%, 
+				circle, 
+				#666666 1%,
+				#444444 100%
+				);
+
+			.dijitBorderContainer {
+				padding: @std_offset;
+			}
+		}
+
+		//Form stuff?
+		.loginLabel {
+			.newLine;
+			width: 100px;
+		}
+		.loginInput {
+			width: 150px;
+		}
+
+		.rftMultipleChoiceWidget {
+			display: table;
+			.row {
+				display: table-row;
+			}
+			.rowBox {
+				display: table-cell;
+			}
+			.rowText {
+				display: table-cell;
+				width: 100px;
+			}
+			.rowBtn {
+				display: table-cell;
+				width: 30px;
+			}
+		}
+
+		//Tabs
+		.verticalTabList {
+			width: 190px;
+		}
+
+		.dijitTab {
+			.transition(0.2s);
+			background-color: transparent;
+			padding: @std_offset @std_offset_big;
+			color: @headers;
+			overflow: hidden;
+
+			
+
+			
+		}
+
+		.dijitTabContainerLeft-tabs {
+			border: none;
+			padding: @std_offset;
+
+			.dijitTab {
+				margin: @std_offset;
+				width: 200px;
+				min-height: @tab_height;
+				border: 1px solid @headers;
+
+				.dijitTabContent {
+					min-height: @tab_height;
+					line-height: @tab_height;
+					width: 190px;
+				}
+
+				&.dijitTabChecked {
+					.transition (0.1s);
+					color: @text;
+					border: 1px solid transparent;
+
+					&.dijitTabHover {
+						border: 1px solid transparent;
+					}
+				}
+
+				&.dijitTabHover {
+					.transition (0.1s);
+					color: @text;
+					border-color: @text;
+				}
+
+				&.dijitTabActive {
+					.transition (0.1s);
+					color: @headers;
+				}
+			}
+
+		}
+		//Tab colour settings
+		&.blue .dijitTabChecked,
+		.blue .dijitTabChecked,
+		div.blue.dijitTabChecked {
+			.bgColor ("blue");
+		}
+		&.green .dijitTabChecked,
+		.green .dijitTabChecked,
+		div.green.dijitTabChecked {
+			.bgColor ("green");
+		}
+		&.red .dijitTabChecked,
+		.red .dijitTabChecked,
+		div.red.dijitTabChecked {
+			.bgColor ("red");
+		}
+		&.orange .dijitTabChecked,
+		.orange .dijitTabChecked,
+		div.orange.dijitTabChecked {
+			.bgColor ("orange");
+		}
+		&.purple .dijitTabChecked,
+		.purple .dijitTabChecked,
+		div.purple.dijitTabChecked {
+			.bgColor ("purple");
+		}
+
+
+		// Inputs
+		fieldset {
+			border: none;
+			
+			&.align {
+				
+				input,
+				.dijitTextBox,
+				textarea {
+					margin-left: 0;
+				}
+
+				label {
+					color: @text;
+					display: inline-block;
+					width: 100px !important;
+				}
+			}
+		}
+
+		.newline {
+			.newLine;
+			display: block;
+		}
+
+		.floatRight {
+			float: right;
+			.noMargin
+		}
+
+		.rftLineListView {
+			max-width: 200px;
+			max-height: 500px;
+			
+			.rftLineListViewContent {
+				width: auto;
+				overflow: auto;
+			}
+		}
+	}
+}
+
Index: Dev/trunk/client/qed/css/LESS/main.css
===================================================================
--- Dev/trunk/client/qed/css/LESS/main.css	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/main.css	(revision 424)
@@ -0,0 +1,1281 @@
+/* Menu.css */
+@import "external.css";
+DESCRIPTION {
+  /*
+How to use colour system:
+Apply a combination of at most 1 "colour" class and one or more "modifier" classes.
+Colour classes: Red, Blue, Green, Orange, Purple
+Modifer classes:
+- textColor: Change the font colour of element to the "colour" class combined with.
+- bgColor: Change the background colour to the "colour" class combined with.
+- doesHover: If present in combination with one of the above two modifiers, 
+the element will shift it's background- or text colour to a lighter version on hover.
+- hoverTextColor: Same as .textColor, but only affects elements being hovered over.
+- hoverBgColor: Same as .bgColor, but only affects elements being hovered over.
+NOTE: .doesHover does nothing in combination with the above two modifiers!
+*/
+
+}
+#rft.claro .blue.textColor {
+  color: #0072bc;
+}
+#rft.claro .blue.textColor.doesHover:hover {
+  color: #0794d1;
+}
+#rft.claro .blue.bgColor {
+  background-color: #0072bc;
+  color: #ffffff;
+}
+#rft.claro .blue.bgColor.doesHover:hover {
+  background-color: #0794d1;
+  color: #111111;
+}
+#rft.claro .blue.hoverTextColor:hover {
+  color: #0072bc;
+}
+#rft.claro .blue.hoverBgColor:hover {
+  background-color: #0072bc;
+}
+#rft.claro .red.textColor {
+  color: #8c0310;
+}
+#rft.claro .red.textColor.doesHover:hover {
+  color: #bd0013;
+}
+#rft.claro .red.bgColor {
+  background-color: #8c0310;
+  color: #ffffff;
+}
+#rft.claro .red.bgColor.doesHover:hover {
+  background-color: #bd0013;
+  color: #111111;
+}
+#rft.claro .red.hoverTextColor:hover {
+  color: #8c0310;
+}
+#rft.claro .red.hoverBgColor:hover {
+  background-color: #8c0310;
+}
+#rft.claro .orange.textColor {
+  color: #ff5b12;
+}
+#rft.claro .orange.textColor.doesHover:hover {
+  color: #ff9140;
+}
+#rft.claro .orange.bgColor {
+  background-color: #ff5b12;
+  color: #ffffff;
+}
+#rft.claro .orange.bgColor.doesHover:hover {
+  background-color: #ff9140;
+  color: #111111;
+}
+#rft.claro .orange.hoverTextColor:hover {
+  color: #ff5b12;
+}
+#rft.claro .orange.hoverBgColor:hover {
+  background-color: #ff5b12;
+}
+#rft.claro .green.textColor {
+  color: #3aa605;
+}
+#rft.claro .green.textColor.doesHover:hover {
+  color: #79ca0a;
+}
+#rft.claro .green.bgColor {
+  background-color: #3aa605;
+  color: #ffffff;
+}
+#rft.claro .green.bgColor.doesHover:hover {
+  background-color: #79ca0a;
+  color: #111111;
+}
+#rft.claro .green.hoverTextColor:hover {
+  color: #3aa605;
+}
+#rft.claro .green.hoverBgColor:hover {
+  background-color: #3aa605;
+}
+#rft.claro .purple.textColor {
+  color: #6529b7;
+}
+#rft.claro .purple.textColor.doesHover:hover {
+  color: #993dec;
+}
+#rft.claro .purple.bgColor {
+  background-color: #6529b7;
+  color: #ffffff;
+}
+#rft.claro .purple.bgColor.doesHover:hover {
+  background-color: #993dec;
+  color: #111111;
+}
+#rft.claro .purple.hoverTextColor:hover {
+  color: #6529b7;
+}
+#rft.claro .purple.hoverBgColor:hover {
+  background-color: #6529b7;
+}
+#rft.claro .textColor,
+#rft.claro .hoverTextColor {
+  transition: color 0.2s;
+}
+#rft.claro .bgColor,
+#rft.claro .hoverBgColor {
+  transition: background-color 0.2s;
+}
+/* This stylesheet compensates for the restoration of the claro style to its original specs. (21-6-2012)
+ * These changes should be moved to relevant stylesheets as soon as possible!
+*/
+/* Menu.css */
+.claro .topbar .dijitMenuitem {
+  width: 90px;
+  background-image: none;
+  background-position: top;
+  text-align: center;
+}
+.claro .dijitMenuPassive .dijitMenuItemHover,
+.claro .dijitMenuPassive .dijitMenuItemSelected {
+  background-color: transparent;
+  color: #ffffff;
+  border: none;
+  padding: 0 4px;
+}
+.claro .dijitMenuPassive .dijitMenuItemActive {
+  background-position: top;
+}
+/* layout/BorderContainer.css */
+.claro .dijitSplitContainer-child,
+.claro .dijitBorderContainer-child {
+  border: none;
+}
+.claro .dijitTabContainerTop-dijitContentPane,
+.claro .dijitTabContainerLeft-dijitContentPane,
+.claro .dijitTabContainerBottom-dijitContentPane,
+.claro .dijitTabContainerRight-dijitContentPane,
+.claro .dijitAccordionContainer-dijitContentPane {
+  background-color: transparent;
+}
+.claro .dijitSplitContainer-dijitContentPane,
+.claro .dijitBorderContainer-dijitContentPane {
+  background-color: transparent;
+}
+/* layout/TabContainer.css */
+.claro .dijitTabPaneWrapper {
+  background: transparent;
+}
+.claro .dijitTabInnerDiv {
+  background-color: transparent;
+  color: #999999;
+  border: none;
+}
+.claro .dijitTabContent {
+  border: none;
+}
+.claro .dijitTabHover .dijitTabInnerDiv {
+  background-color: transparent;
+  color: #ffffff;
+}
+.claro .dijitTabActive .dijitTabInnerDiv {
+  color: #0072bc;
+}
+.claro .dijitTabChecked .dijitTabInnerDiv {
+  background-color: transparent;
+  color: #ffffff;
+}
+.claro .dijitTabContent {
+  border: 1px solid #999999;
+}
+.claro .dijitTabHover .dijitTabContent {
+  border-color: #ffffff;
+}
+.claro .dijitTabActive .dijitTabContent {
+  border-color: transparent;
+}
+.claro .dijitTabChecked .dijitTabContent {
+  color: #ffffff;
+  border-color: #0072bc;
+}
+/*lefttabs*/
+.claro .dijitTabContainerLeft-tabs .dijitTab {
+  border-width: 1px;
+  left: 0;
+  margin-bottom: 4px;
+  margin-right: 8px;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabInnerDiv {
+  border: none;
+  background: transparent;
+  background-image: none;
+  background-position: top;
+  background-repeat: no-repeat;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabContent {
+  padding: 3px 8px 4px 8px;
+  background-image: none;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabChecked .dijitTabContent {
+  padding-right: 8px;
+  background-image: none;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabChecked .dijitTabInnerDiv {
+  -webkit-box-shadow: none;
+  -moz-box-shadow: none;
+  box-shadow: none;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabInnerDiv,
+.claro .dijitTabContainerLeft-tabs .dijitTabContent {
+  -moz-border-radius: 0;
+  border-radius: 0;
+  border: none;
+}
+*:focus {
+  outline: none;
+}
+html,
+body {
+  width: 100%;
+  height: 100%;
+  background-color: #333333;
+}
+#rft.claro {
+  font-family: 'Segoe UI', Helvetica, Verdana, Arial, sans-serif;
+  font-size: 13px;
+  color: #111111;
+}
+#rft.claro .dijitBorderContainer,
+#rft.claro .dijitContentPane,
+#rft.claro .dijitTabContainer,
+#rft.claro .dijitTabPaneWrapper {
+  background: transparent;
+  border: none;
+}
+#rft.claro h1 {
+  margin: 0 0 0 0;
+  padding: 0 10px 8px 10px;
+  float: left;
+  clear: left;
+  font-size: 48px;
+  color: #999999;
+  line-height: 48px;
+  font-weight: normal;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+#rft.claro h2 {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  color: #999999;
+  font-size: 22px;
+  line-height: 30px;
+}
+#rft.claro h2 .rftIcon {
+  width: 32px;
+  height: 32px;
+  margin: 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons32.png');
+  margin-right: 8px;
+}
+#rft.claro h3 {
+  margin: 0 0 0 0;
+  font-size: 18px;
+  margin-bottom: 4px;
+}
+#rft.claro h4 {
+  font-size: 16px;
+}
+#rft.claro .topbar {
+  overflow-y: hidden;
+}
+#rft.claro .topbar .dijitMenuBar {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  background-color: transparent;
+  float: right;
+  clear: right;
+  margin-top: 16px;
+}
+#rft.claro .topbar .breadcrumbs {
+  color: #999999;
+}
+#rft.claro .topbar .breadcrumbs .breadcrumb {
+  font-size: 13px;
+}
+#rft.claro .topbar .breadcrumbs .breadcrumb.breadcrumbCurrent {
+  color: #ffffff;
+  font-size: 15px;
+}
+#rft.claro .topbar .breadcrumbs .breadcrumb.breadcrumbHover {
+  color: #0072bc;
+}
+#rft.claro .dijitContentPane.page {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+}
+#rft.claro .dijitContentPane.content {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  display: block;
+  clear: both;
+  background-color: #555555;
+  background-image: -webkit-gradient(50% 50%, circle, #666666 1%, #444444 100%);
+  -moz-background-image: gradient(50% 50%, circle, #666666 1%, #444444 100%);
+  -o-background-image: gradient(50% 50%, circle, #666666 1%, #444444 100%);
+  -ms-background-image: gradient(50% 50%, circle, #666666 1%, #444444 100%);
+  background-image: gradient(50% 50%, circle, #666666 1%, #444444 100%);
+}
+#rft.claro .dijitContentPane.content .dijitBorderContainer {
+  padding: 4px;
+}
+#rft.claro .loginLabel {
+  float: left;
+  clear: left;
+  width: 100px;
+}
+#rft.claro .loginInput {
+  width: 150px;
+}
+#rft.claro .rftMultipleChoiceWidget {
+  display: table;
+}
+#rft.claro .rftMultipleChoiceWidget .row {
+  display: table-row;
+}
+#rft.claro .rftMultipleChoiceWidget .rowBox {
+  display: table-cell;
+}
+#rft.claro .rftMultipleChoiceWidget .rowText {
+  display: table-cell;
+  width: 100px;
+}
+#rft.claro .rftMultipleChoiceWidget .rowBtn {
+  display: table-cell;
+  width: 30px;
+}
+#rft.claro .verticalTabList {
+  width: 190px;
+}
+#rft.claro .dijitTab {
+  -webkit-transition: all 0.2s;
+  -moz-transition: all 0.2s;
+  -o-transition: all 0.2s;
+  -ms-transition: all 0.2s;
+  transition: all 0.2s;
+  background-color: transparent;
+  padding: 4px 8px;
+  color: #999999;
+  overflow: hidden;
+}
+#rft.claro .dijitTabContainerLeft-tabs {
+  border: none;
+  padding: 4px;
+}
+#rft.claro .dijitTabContainerLeft-tabs .dijitTab {
+  margin: 4px;
+  width: 200px;
+  min-height: 30px;
+  border: 1px solid #999999;
+}
+#rft.claro .dijitTabContainerLeft-tabs .dijitTab .dijitTabContent {
+  min-height: 30px;
+  line-height: 30px;
+  width: 190px;
+}
+#rft.claro .dijitTabContainerLeft-tabs .dijitTab.dijitTabChecked {
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+  color: #ffffff;
+  border: 1px solid transparent;
+}
+#rft.claro .dijitTabContainerLeft-tabs .dijitTab.dijitTabChecked.dijitTabHover {
+  border: 1px solid transparent;
+}
+#rft.claro .dijitTabContainerLeft-tabs .dijitTab.dijitTabHover {
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+  color: #ffffff;
+  border-color: #ffffff;
+}
+#rft.claro .dijitTabContainerLeft-tabs .dijitTab.dijitTabActive {
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+  color: #999999;
+}
+#rft.claro.blue .dijitTabChecked,
+#rft.claro .blue .dijitTabChecked,
+#rft.claro div.blue.dijitTabChecked {
+  background-color: #0072bc;
+}
+#rft.claro.green .dijitTabChecked,
+#rft.claro .green .dijitTabChecked,
+#rft.claro div.green.dijitTabChecked {
+  background-color: #3aa605;
+}
+#rft.claro.red .dijitTabChecked,
+#rft.claro .red .dijitTabChecked,
+#rft.claro div.red.dijitTabChecked {
+  background-color: #8c0310;
+}
+#rft.claro.orange .dijitTabChecked,
+#rft.claro .orange .dijitTabChecked,
+#rft.claro div.orange.dijitTabChecked {
+  background-color: #ff5b12;
+}
+#rft.claro.purple .dijitTabChecked,
+#rft.claro .purple .dijitTabChecked,
+#rft.claro div.purple.dijitTabChecked {
+  background-color: #6529b7;
+}
+#rft.claro fieldset {
+  border: none;
+}
+#rft.claro fieldset.align input,
+#rft.claro fieldset.align .dijitTextBox,
+#rft.claro fieldset.align textarea {
+  margin-left: 0;
+}
+#rft.claro fieldset.align label {
+  color: #ffffff;
+  display: inline-block;
+  width: 100px !important;
+}
+#rft.claro .newline {
+  float: left;
+  clear: left;
+  display: block;
+}
+#rft.claro .floatRight {
+  float: right;
+  margin: 0 0 0 0;
+}
+#rft.claro .rftLineListView {
+  max-width: 200px;
+  max-height: 500px;
+}
+#rft.claro .rftLineListView .rftLineListViewContent {
+  width: auto;
+  overflow: auto;
+}
+#rft.claro .rftIcon {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  float: left;
+  display: inline-block;
+  border: none;
+  background-color: transparent;
+  background-repeat: no-repeat;
+}
+#rft .rftIconApplication {
+  background-position: 0px 0px;
+}
+#rft .rftIconDashboard {
+  background-position: -32px 0px;
+}
+#rft .rftIconSession {
+  background-position: -64px 0px;
+}
+#rft .rftIconSessionActive {
+  background-position: -96px 0px;
+}
+#rft .rftIconSessionTemplate {
+  background-position: -128px 0px;
+}
+#rft .rftIconSurvey {
+  background-position: -160px 0px;
+}
+#rft .rftIconQuestion {
+  background-position: -192px 0px;
+}
+#rft .rftIconQuestionFill {
+  background-position: -224px 0px;
+}
+#rft .rftIconRespondent {
+  background-position: -256px 0px;
+}
+#rft .rftIconAnswer {
+  background-position: -288px 0px;
+}
+#rft .rftIconAnswerSet {
+  background-position: -320px 0px;
+}
+#rft .rftIconGameData {
+  background-position: -352px 0px;
+}
+#rft .rftIconUser {
+  background-position: -384px 0px;
+}
+#rft .rftIconAccept {
+  background-position: -416px 0px;
+}
+#rft .rftIconCancel {
+  background-position: -448px 0px;
+}
+#rft .rftIconPlus {
+  background-position: -480px 0px;
+}
+#rft .rftIconMinus {
+  background-position: -512px 0px;
+}
+#rft .rftIconIncrease {
+  background-position: -544px 0px;
+}
+#rft .rftIconDecrease {
+  background-position: -576px 0px;
+}
+#rft .rftIconDelete {
+  background-position: -608px 0px;
+}
+#rft .rftIconHome {
+  background-position: -640px 0px;
+}
+#rft .rftIconPreview {
+  background-position: -672px 0px;
+}
+#rft .rftIconSave {
+  background-position: -704px 0px;
+}
+#rft .rftIconDiscard {
+  background-position: -736px 0px;
+}
+#rft .rftIconProperties {
+  background-position: -768px 0px;
+}
+#rft .rftIconUndo {
+  background-position: -800px 0px;
+}
+#rft .rftIconRedo {
+  background-position: -832px 0px;
+}
+#rft .rftIconBack {
+  background-position: -864px 0px;
+}
+#rft .rftIconForward {
+  background-position: -896px 0px;
+}
+#rft .rftIconRefresh {
+  background-position: -928px 0px;
+}
+#rft .rftIconHelp {
+  background-position: -960px 0px;
+}
+#rft .rftIconInspect {
+  background-position: -992px 0px;
+}
+#rft .rftIconTag {
+  background-position: -1024px 0px;
+}
+#rft .rftIconImage {
+  background-position: -1056px 0px;
+}
+#rft .rftIconEdit {
+  background-position: -1088px 0px;
+}
+#rft .rftIconLock {
+  background-position: -1120px 0px;
+}
+#rft .rftIconUnlock {
+  background-position: -1152px 0px;
+}
+#rft .rftIconPreset {
+  background-position: -1184px 0px;
+}
+#rft .rftIconTextBlock {
+  background-position: -1216px 0px;
+}
+#rft .rftIconPageBreak {
+  background-position: -1248px 0px;
+}
+#rft .rftIconExternal {
+  background-position: -1280px 0px;
+}
+#rft .rftIconInput {
+  background-position: -1312px 0px;
+}
+#rft .rftIconPublish {
+  background-position: -1344px 0px;
+}
+#rft .rftIconFullArrowUp {
+  background-position: -1696px 0px;
+}
+#rft .rftIconFullArrowDown {
+  background-position: -1728px 0px;
+}
+#rft .rftIconFullArrowLeft {
+  background-position: -1760px 0px;
+}
+#rft .rftIconFullArrowRight {
+  background-position: -1792px 0px;
+}
+#rft .rftIconHalfArrowUp {
+  background-position: -1824px 0px;
+}
+#rft .rftIconHalfArrowDown {
+  background-position: -1856px 0px;
+}
+#rft .rftIconHalfArrowLeft {
+  background-position: -1888px 0px;
+}
+#rft .rftIconHalfArrowRight {
+  background-position: -1920px 0px;
+}
+#rft.claro .rftSelector {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  margin: 4px;
+}
+#rft.claro .rftSelector .rftLineWithActions {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+}
+#rft.claro .rftSelector .rftSelectorSelected .rftSelectorIndicator {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  float: left;
+  width: 8px;
+  height: 24px;
+  background-color: #bedead;
+}
+#rft.claro .rftSelector .rftSelectorSelected .rftSelectorIndicator.conflict {
+  background-color: #ff0000;
+}
+#rft.claro .rftSelector .rftSelectorSelected .rftSelectorIndicator.pending {
+  background-color: #ff8000;
+}
+#rft.claro .rftSelector .rftSelectorSelected .rftSelectorIndicator.success {
+  background-color: #00ff00;
+}
+#rft.claro .rftSelector .rftSelectorOptions .rftLineWithActions,
+#rft.claro .rftSelector .rftSelectorSelected .rftLineWithActions {
+  background-color: #ffffff;
+  color: #111111;
+}
+#rft.claro .rftLineWithActions {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  position: relative;
+  height: 24px;
+  white-space: nowrap;
+  margin: 4px 0;
+  color: #ffffff;
+}
+#rft.claro .rftLineWithActions.dojoDndItem {
+  -webkit-transition: all 0.2s;
+  -moz-transition: all 0.2s;
+  -o-transition: all 0.2s;
+  -ms-transition: all 0.2s;
+  transition: all 0.2s;
+}
+#rft.claro .rftLineWithActions.dojoDndItem.dojoDndItemBefore {
+  margin-top: 6px;
+  border-top: 6px solid #ffffff;
+}
+#rft.claro .rftLineWithActions.dojoDndItem.dojoDndItemAfter {
+  margin-bottom: 6px;
+  border-bottom: 6px solid #ffffff;
+}
+#rft.claro .rftLineWithActions.dojoDndItem.dojoDndItemover,
+#rft.claro .rftLineWithActions.dojoDndItem.dojoDndItemAnchor {
+  background-image: none;
+  border: none;
+  padding: 2px;
+  background-color: rgba(255, 255, 255, 0.1);
+}
+#rft.claro .rftLineWithActions .rftLineWithActionsTitle {
+  float: left;
+  margin: 0 8px;
+  overflow: hidden;
+  white-space: nowrap;
+  word-wrap: break-word;
+}
+#rft.claro .rftLineWithActions .rftLineWithActionsButtons {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  line-height: 24px;
+  height: 24px;
+  position: absolute;
+  right: 0;
+  float: left;
+}
+#rft.claro .dojoDndSourceMoved .rftLineWithActions.dojoDndItemAnchor {
+  height: 0;
+}
+#rft.claro .rftIndexMenuBlock {
+  width: 400px;
+  height: 400px;
+  background: #444444;
+  float: left;
+  margin: 16px;
+  overflow: hidden;
+}
+#rft.claro .rftIndexMenuBlock:hover .rftIndexMenuMask {
+  margin-top: -400px;
+}
+#rft.claro .rftIndexMenuMask {
+  width: 400px;
+  height: 400px;
+  background: #444444;
+  color: #999999;
+  margin-top: 0;
+}
+#rft.claro .rftIndexMenuMask .label {
+  color: #999999;
+  font-size: 32px;
+  height: 32px;
+  line-height: 32px;
+  margin-top: 184px;
+  float: left;
+}
+#rft.claro .rftIndexMenuMask .rftIcon {
+  width: 32px;
+  height: 32px;
+  margin: 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons32.png');
+  float: left;
+  margin: 184px 8px 0 8px;
+}
+#rft.claro .rftIndexMenuButton {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  -webkit-transition: all 0.3s;
+  -moz-transition: all 0.3s;
+  -o-transition: all 0.3s;
+  -ms-transition: all 0.3s;
+  transition: all 0.3s;
+  line-height: 32px;
+  border: none;
+}
+#rft.claro .rftIndexMenuButton .dijitButtonNode {
+  border: none;
+  color: #999999;
+  font-size: 22px;
+}
+#rft.claro .rftIndexMenuButton .dijitButtonNode .dijitButtonContents {
+  vertical-align: top;
+}
+#rft.claro .rftIndexMenuButton .dijitButtonNode .dijitButtonContents .dijitButtonText {
+  padding-bottom: 10px;
+  line-height: 20px;
+}
+#rft.claro .rftIndexMenuButton .dijitButtonNode .dijitButtonContents .rftIcon {
+  width: 32px;
+  height: 32px;
+  margin: 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons32.png');
+  margin: 0 8px;
+}
+#rft.claro .rftIndexMenuButton.oneHeight {
+  height: 100px;
+  width: 400px;
+}
+#rft.claro .rftIndexMenuButton.oneHeight .dijitButtonNode {
+  margin: 38px 0 0 0;
+}
+#rft.claro .rftIndexMenuButton.twoHeight {
+  height: 200px;
+  width: 400px;
+}
+#rft.claro .rftIndexMenuButton.twoHeight .dijitButtonNode {
+  margin: 88px 0 0 0;
+}
+#rft.claro .rftIndexMenuButton.fourHeight {
+  height: 400px;
+  width: 400px;
+}
+#rft.claro .rftIndexMenuButton.fourHeight .dijitButtonNode {
+  margin: 188px 0 0 0;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonHover {
+  color: #ffffff;
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonHover .dijitButtonText {
+  color: #ffffff;
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonHover.blue {
+  background-color: #0072bc;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonHover.red {
+  background-color: #8c0310;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonHover.green {
+  background-color: #3aa605;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonHover.orange {
+  background-color: #ff5b12;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonHover.purple {
+  background-color: #6529b7;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonActive {
+  -webkit-transition: all 0.3s;
+  -moz-transition: all 0.3s;
+  -o-transition: all 0.3s;
+  -ms-transition: all 0.3s;
+  transition: all 0.3s;
+  color: #111111;
+  background: #ffffff;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonActive .rftIcon {
+  width: 32px;
+  height: 32px;
+  margin: 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons32b.png');
+}
+#rft.claro .dijitMenuPopup .dijitMenu {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  color: #999999;
+  background-color: #333333;
+  border: none;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem {
+  color: #999999;
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  background-color: #333333;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemHover .dijitMenuItemLabel,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemActive .dijitMenuItemLabel,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemSelected .dijitMenuItemLabel {
+  color: #ffffff;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemHover.red,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemActive.red,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemSelected.red {
+  background-color: #8c0310;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemHover.blue,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemActive.blue,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemSelected.blue {
+  background-color: #0072bc;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemHover.green,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemActive.green,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemSelected.green {
+  background-color: #3aa605;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemHover.orange,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemActive.orange,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemSelected.orange {
+  background-color: #ff5b12;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemHover.purple,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemActive.purple,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemSelected.purple {
+  background-color: #6529b7;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem .rftIcon {
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16.png');
+  margin: 0 0 0 0;
+  margin-right: 8px;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemActive .rftIcon {
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16b.png');
+}
+#rft.claro .dijitMenuBar .rftMainMenuButton {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+  border: none;
+  height: 30px;
+  width: auto;
+  background: transparent;
+  color: #999999;
+  text-align: center;
+  font-size: 24px;
+  line-height: 30px;
+  padding: 0 4px;
+  margin: 0 5px;
+}
+#rft.claro .dijitMenuBar .rftMainMenuButton.dijitMenuItemHover,
+#rft.claro .dijitMenuBar .rftMainMenuButton.dijitMenuitemActive {
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+}
+#rft.claro .dijitMenuBar .rftMainMenuButton.dijitMenuItemHover {
+  color: #ffffff;
+  font-size: 26px;
+}
+#rft.claro .dijitMenuBar .rftMainMenuButton.dijitMenuItemActive {
+  color: #0072bc;
+  font-size: 26px;
+}
+#rft.claro .dijitMenuBar .rftMainMenuButton.dijitMenuItemSelected {
+  font-size: 26px;
+  color: #ffffff;
+}
+#rft.claro .dojoxTitleGroup .dijitTitlePane {
+  margin: 0 0 0 0;
+}
+#rft.claro .dojoxTitleGroup .dijitTitlePane .dijitTitlePaneTitle {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  margin: 0 0 0 0;
+  background-color: #ff5b12;
+  border: none;
+  padding: 0 4px;
+  height: 24px;
+}
+#rft.claro .dojoxTitleGroup .dijitTitlePane .dijitTitlePaneTitle.dijitTitlePaneTitleHover,
+#rft.claro .dojoxTitleGroup .dijitTitlePane .dijitTitlePaneTitle.dijitTitlePaneTitleFocused {
+  background-color: #ff9140;
+}
+#rft.claro .dojoxTitleGroup .dijitTitlePane .dijitTitlePaneTextNode {
+  color: #ffffff;
+  font-size: 13px;
+  line-height: 24px;
+}
+#rft.claro .dojoxTitleGroup .dijitTitlePane .dijitTitlePaneContentOuter {
+  background-color: #444444;
+  border: none;
+}
+#rft.claro .dojoxTitleGroup .dijitTitlePane .dijitTitlePaneTitleFocus {
+  margin: 0 0 0 0;
+}
+#rft.claro .rftSurveyListView .rftSurveyListViewContent {
+  min-height: 300px;
+  background: #444444;
+  overflow: auto;
+}
+#rft.claro .rftLargeButton {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  margin-right: 16px;
+  height: 24px;
+}
+#rft.claro .rftLargeButton*,
+#rft.claro .rftLargeButton * {
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+#rft.claro .rftLargeButton .dijitButtonNode {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  border: none;
+  height: 24px;
+  background: transparent;
+  color: #999999;
+  font-size: 20px;
+  -webkit-transition: all 0.3s;
+  -moz-transition: all 0.3s;
+  -o-transition: all 0.3s;
+  -ms-transition: all 0.3s;
+  transition: all 0.3s;
+}
+#rft.claro .rftLargeButton .dijitButtonNode .rftIcon {
+  width: 24px;
+  height: 24px;
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons24.png');
+}
+#rft.claro .rftLargeButton .dijitButtonNode .dijitButtonText {
+  line-height: 24px;
+  margin: 0 0 0 0;
+  padding-left: 8px;
+}
+#rft.claro .rftLargeButton.black .dijitButtonNode .rftIcon {
+  width: 24px;
+  height: 24px;
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons24b.png');
+}
+#rft.claro .rftLargeButton.rftLargeButtonHover .dijitButtonNode,
+#rft.claro .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+}
+#rft.claro span.blue.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+#rft.claro .blue .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+  color: #0794d1;
+}
+#rft.claro span.orange.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+#rft.claro .orange .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+  color: #ff9140;
+}
+#rft.claro span.green.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+#rft.claro .green .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+  color: #79ca0a;
+}
+#rft.claro span.red.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+#rft.claro .red .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+  color: #bd0013;
+}
+#rft.claro span.purple.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+#rft.claro .purple .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+  color: #993dec;
+}
+#rft.claro .rftBlockButton {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  margin: 0 0 0 0;
+  height: 24px;
+  line-height: 24px;
+  vertical-align: top;
+}
+#rft.claro .rftBlockButton .dijitButtonNode {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  -webkit-transition: all 0.3s;
+  -moz-transition: all 0.3s;
+  -o-transition: all 0.3s;
+  -ms-transition: all 0.3s;
+  transition: all 0.3s;
+  line-height: 24px;
+  vertical-align: top;
+  height: 24px;
+  padding: 0 4px;
+  border: none;
+  color: #ffffff;
+  font-size: 13px;
+}
+#rft.claro .rftBlockButton .dijitButtonNode .rftIcon {
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16.png');
+}
+#rft.claro .rftBlockButton.rftBlockButtonHover,
+#rft.claro .rftBlockButton.rftBlockButtonActive {
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+}
+#rft.claro .rftBlockButton.rftBlockButtonHover .rftIcon,
+#rft.claro .rftBlockButton.rftBlockButtonActive .rftIcon {
+  vertical-align: top;
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16b.png');
+}
+#rft.claro .rftInlineButton {
+  float: right;
+  height: 24px;
+  width: 24px;
+}
+#rft.claro .rftInlineButton .dijitButtonNode {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  width: 24px;
+  height: 24px;
+  border: none;
+}
+#rft.claro .rftInlineButton .rftIcon {
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16.png');
+}
+#rft.claro .rftInlineButton.white .rftIcon {
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16.png');
+}
+#rft.claro .rftInlineButton.black .rftIcon {
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16b.png');
+}
+#rft.claro .rftInlineButton.rftInlineButtonHover.white {
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16b.png');
+}
+#rft.claro .rftInlineButton.rftInlineButtonHover.black {
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16b.png');
+}
+#rft.claro .rftObjectBox {
+  margin: 8px 0;
+}
+#rft.claro .rftObjectBox .rftIcon {
+  width: 32px;
+  height: 32px;
+  margin: 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons32.png');
+  float: left;
+  margin: 20px 8px;
+}
+#rft.claro .rftObjectBox .rftLineWithActions {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+}
+#rft.claro .rftSessionObject {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  width: 100px;
+  height: 100px;
+  background: #999999;
+  margin: 8px;
+  display: inline-block;
+}
+#rft.claro .rftSessionObject .rftIcon {
+  width: 32px;
+  height: 32px;
+  margin: 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons32.png');
+  margin: 8px 34px 0 34px;
+}
+#rft.claro .rftSessionObject label {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  float: left;
+  clear: both;
+  width: 100px;
+  text-align: center;
+  color: #ffffff;
+  overflow: hidden;
+}
+#rft.claro .rftSessionObject.blue {
+  background-color: #0072bc;
+}
+#rft.claro .rftSessionObject.blue.selected {
+  background-color: #0794d1;
+}
+#rft.claro .rftSessionObject.green {
+  background-color: #3aa605;
+}
+#rft.claro .rftSessionObject.green.selected {
+  background-color: #79ca0a;
+}
+#rft.claro .rftSessionObject.red {
+  background-color: #8c0310;
+}
+#rft.claro .rftSessionObject.red.selected {
+  background-color: #bd0013;
+}
+#rft.claro .rftObjectBox {
+  padding: 0 0 0 0;
+  color: #ffffff;
+}
+#rft.claro .rftObjectBox .typeIcon.rftIcon {
+  width: 32px;
+  height: 32px;
+  margin: 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons32.png');
+}
+#rft.claro .rftObjectBox .rftLineWithActions {
+  background-color: #3aa605;
+}
+#rft.claro .page_questions .rftSelector .rftSelectorCategory .rftLineWithActions {
+  background-color: #ff5b12;
+}
+#rft.claro .page_questions .rftSelector .rftSelectorSelected .rftLineWithActions {
+  background-color: #ffffff;
+  color: #111111;
+}
+#rft.claro .page_questions .rftSelector .rftSelectorSelected .rftBlockButton {
+  background-color: #ff00ff;
+}
+#rft.claro .page_questions .rftSelector .rftSelectorSelected .rftBlockButton .dijitButtonNode {
+  background-color: #ff5b12;
+}
+#rft.claro .page_questions .rftSelector .rftSelectorSelected .rftBlockButton.dijitHover .dijitButtonNode {
+  background-color: #ffffff;
+}
+#rft.claro .page_questions .rftSelector .rftSelectorSelected .rftBlockButton.dijitActive .dijitButtonNode {
+  background-color: #ff9140;
+}
Index: Dev/trunk/client/qed/css/LESS/main.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/main.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/main.less	(revision 424)
@@ -0,0 +1,25 @@
+// Setup up compilation context and shared functionality
+@import "variables.less";
+@import "mixins.less";
+@import "colors2.less";
+
+// Link to dijit/claro/dojox css
+@import "external.css";
+@import "claroOverride.less";
+
+// RFT specific styling
+@import "layout.less";
+@import "rftIcons.less";
+@import "rftSelector.less";
+@import "rftLineWithActions.less";
+@import "menus.less";
+@import "questionEditor.less";
+@import "surveyEditor.less";
+@import "rftButtons.less";
+@import "rftObjectBox.less";
+@import "sessionEditor.less";
+
+
+// Page specific stylesheets!
+@import "pages/questions.less";
+@import "pages/sessions.less";
Index: Dev/trunk/client/qed/css/LESS/menus.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/menus.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/menus.less	(revision 424)
@@ -0,0 +1,213 @@
+#rft {
+	&.claro {
+		//Index menu
+		.rftIndexMenuBlock {
+			width: @indexmenu_blockwidth;
+			height: @indexmenu_blockheight;
+			background: @base1;
+			float: left;
+			margin: @indexmenu_blockmargin;
+			overflow: hidden;
+
+			&:hover .rftIndexMenuMask {
+				margin-top: -@indexmenu_blockheight;
+			}
+		}
+		.rftIndexMenuMask {
+			width: @indexmenu_blockwidth;
+			height: @indexmenu_blockheight;
+			background: @base1;
+			color: @headers;
+			margin-top: 0;
+
+			.label {
+				color: @headers;
+				font-size: @indexmenu_font_size;
+				height: @indexmenu_font_size;
+				line-height: @indexmenu_font_size;
+				margin-top: (@indexmenu_blockheight - @indexmenu_font_size) / 2;
+				float: left;
+			}
+
+			.rftIcon {
+				.setIcon(32px);
+				float: left;
+				margin: ((@indexmenu_blockheight - @indexmenu_font_size)/2) 8px 0 8px;
+			}
+		}
+		.rftIndexMenuButton {
+			.flatShading;
+			.noOffset;
+			.transition (0.3s);
+			line-height: @button_indexmenu_height;
+			border: none;
+
+			.dijitButtonNode {
+				border: none;
+				color: @headers;
+				font-size: @h2Size;
+
+				.dijitButtonContents {
+					vertical-align: top;
+
+					.dijitButtonText {
+						padding-bottom: 10px;
+						line-height: 20px;
+					}
+
+					.rftIcon {
+						.setIcon (32px);
+						margin: 0 @std_offset_big;
+					}
+				}
+
+				
+			}
+
+			.indexMenuMixin (@number) when (@number > 0){
+				@height: @indexmenu_blockheight / @number;
+				height: @height;
+				width: @indexmenu_blockwidth;
+				
+				.dijitButtonNode {
+					margin: ((@height - @button_indexmenu_content_size)/2) 0 0 0;
+				}
+			}
+
+			&.oneHeight {
+				.indexMenuMixin (4);
+			}
+			&.twoHeight {
+				.indexMenuMixin (2);
+			}
+			&.fourHeight {
+				.indexMenuMixin (1);
+			}
+
+			&.rftIndexMenuButtonHover {
+				color: @text;
+				.transition (0.1s);
+				.dijitButtonText {
+					color: @text;
+					.transition(0.1s);
+				}
+
+				&.blue {
+					background-color: @blue;
+				}
+				&.red {
+					background-color: @red;
+				}
+				&.green {
+					background-color: @green;
+				}
+				&.orange {
+					background-color: @orange;
+				}
+				&.purple {
+					background-color: @purple;
+				}
+			}
+
+			&.rftIndexMenuButtonActive {
+				.rftIcon {
+					.setIcon (32px, black);
+				}
+				.transition(0.3s);
+				color: @darkest;
+				background: @text;
+
+			}
+
+		}
+
+		//Topbar dropdown menu
+		.dijitMenuPopup {
+			.dijitMenu {
+				
+				.flatShading;
+				color: @headers;
+				background-color: @base;
+				border: none;
+
+				.dijitMenuItem {
+					color: @headers;
+					.flatShading;
+					background-color: @base;
+
+					&.dijitMenuItemHover,
+					&.dijitMenuItemActive,
+					&.dijitMenuItemSelected {
+						.dijitMenuItemLabel {
+							color: @text;
+						}
+
+						&.red {
+							background-color: @red;
+						}
+						&.blue {
+							background-color: @blue;
+						}
+						&.green {
+							background-color: @green;
+						}
+						&.orange {
+							background-color: @orange;
+						}
+						&.purple {
+							background-color: @purple;
+						}
+
+					}
+
+					.rftIcon {
+						.setIcon (16px);
+						.noMargin;
+						margin-right: @std_offset_big;
+					}
+
+					&.dijitMenuItemActive .rftIcon {
+						.setIcon(16px, black);
+					}
+				}
+
+			}
+		}
+
+
+		//Main menu
+		.dijitMenuBar .rftMainMenuButton {
+			.flatShading;
+			.transition (0.1s);
+			border: none;
+			height: @button_mainmenu_height;
+			width: auto;
+			background: transparent;
+			color: @headers;
+			text-align: center;
+			font-size: @button_mainmenu_font_size;
+			line-height: @button_mainmenu_height;
+			padding: 0 @button_mainmenu_padding;
+			margin: 0 @button_mainmenu_spacing;
+
+			&.dijitMenuItemHover, 
+			&.dijitMenuitemActive {
+				.transition (0.1s);
+			}
+
+			&.dijitMenuItemHover {
+				color: @text;
+				font-size: @button_mainmenu_font_size + @button_mainmenu_font_grow;
+			}
+
+			&.dijitMenuItemActive {
+				color: @blue;
+				font-size: @button_mainmenu_font_size + @button_mainmenu_font_grow;
+			}
+			&.dijitMenuItemSelected {
+				font-size: @button_mainmenu_font_size + @button_mainmenu_font_grow;
+				color: @text;
+			}
+		}
+	}
+}
Index: Dev/trunk/client/qed/css/LESS/mixins.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/mixins.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/mixins.less	(revision 424)
@@ -0,0 +1,96 @@
+//LAYOUT
+.newLine () {
+	float: left;
+	clear: left;
+}
+
+.transition (@time: @transition_time) {
+	-webkit-transition: all @time;
+	-moz-transition: all @time;
+	-o-transition: all @time;
+	-ms-transition: all @time;
+	transition: all @time;
+}
+
+.flatShading () {
+	//Disable borders, gradients and other effects. One flat colour shading.
+	border: none;
+	background-image: none;
+	-webkit-box-shadow: none;
+	box-shadow: none;
+	border-radius: 0;
+}
+
+.noOffset () {
+	.noMargin;
+	.noPadding;
+}
+
+.noMargin () {
+	margin: 0 0 0 0;
+}
+
+.noPadding () {
+	padding: 0 0 0 0;
+}
+//------------------------------------------
+//ICONS
+
+.setIconSize (@size, @b) when (@size < 24px) {
+	width: @size;
+	height: @size;
+	margin: ((24px - @size) / 2) 0;
+	.noPadding ();
+	background-image: url('images/icons/rftIcons16@{b}.png');
+}
+
+.setIconSize (@size, @b) when (@size >= 24px) and (@size < 32) {
+	width: 24px;
+	height: 24px;
+	.noMargin ();
+	.noPadding ();
+	background-image: url('images/icons/rftIcons24@{b}.png');
+}
+
+.setIconSize (@size, @b) when (@size >= 32px) {
+	width: 32px;
+	height: 32px;
+	margin: 0;
+	.noPadding ();
+	background-image: url('images/icons/rftIcons32@{b}.png');
+}
+
+.setIcon (@size, black) {
+	.setIconSize(@size, "b");
+}
+.setIcon (@size, white) {
+	.setIconSize(@size, "");
+}
+.setIcon (@size) {
+	.setIconSize(@size, "");
+}
+//------------------------------------------
+
+//Old colour settings
+//TODO: I AM NOT SURE IF THIS ACTUALLY WORKS! THOROUGHLY TEST WHEN APPLIED TO PAGES!!!!
+// Oke, wat. Deze shit is echt niet te snappen. :P Gewoon maar weer de oude meuk erin hangen?
+.blockButtonColorMixin (@color) {
+	.dijitButtonNode {
+		background-color: @@color;
+	}
+
+	&.dijitHover {
+		.dijitButtonNode {
+			background-color: @text;
+			color: @darkest;
+		}
+	}
+	&.dijitActive {
+		.dijitButtonNode {
+			@colorName: "@{color}_light";
+			background-color: @@colorName;
+			color: @text;
+		}
+	}
+
+}
Index: Dev/trunk/client/qed/css/LESS/pages/questions.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/pages/questions.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/pages/questions.less	(revision 424)
@@ -0,0 +1,23 @@
+#rft.claro {
+	.page_questions {
+		
+		.rftSelector {
+			.rftSelectorCategory .rftLineWithActions {
+				.bgColor ("orange");
+			}
+
+			.rftSelectorSelected { 
+				.rftLineWithActions {
+					.bgColor ("text");
+					color: @darkest;
+				}
+
+				.rftBlockButton {
+					background-color: #ff00ff;
+					.blockButtonColorMixin ("orange");
+				}
+				
+			}
+		}
+	}
+}
Index: Dev/trunk/client/qed/css/LESS/pages/sessions.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/pages/sessions.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/pages/sessions.less	(revision 424)
@@ -0,0 +1,20 @@
+#rft.claro {
+	.page_sessions {
+
+		.rftObjectBox {
+			.noPadding ();
+			color: @text;
+
+			.typeIcon.rftIcon {
+				.setIcon(32px);
+			}
+
+			.rftLineWithActions {
+				background-color: @green;
+				.rftBlockButton {
+					.blockButtonColorMixin ("green");
+				}
+			}
+		}
+	}
+}
Index: Dev/trunk/client/qed/css/LESS/questionEditor.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/questionEditor.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/questionEditor.less	(revision 424)
@@ -0,0 +1,43 @@
+#rft {
+	&.claro {
+
+		.dojoxTitleGroup {
+			.dijitTitlePane {
+				.noMargin;
+
+				.dijitTitlePaneTitle {
+					.flatShading;
+					.noMargin;
+					background-color: @orange;
+					border: none;
+					padding: 0 @std_offset;
+					height: @std_height;
+
+					&.dijitTitlePaneTitleHover,
+					&.dijitTitlePaneTitleFocused {
+						background-color: @orange_light;
+					}
+
+				}
+
+				.dijitTitlePaneTextNode {
+					color: @text;
+					font-size: @font_size;
+					line-height: @std_height;
+				}
+
+				.dijitTitlePaneContentOuter {
+					background-color: @base1;
+					border: none;
+				}
+
+				.dijitTitlePaneTitleFocus {
+					.noMargin;
+				}
+			}
+
+
+		}
+
+	}
+}
Index: Dev/trunk/client/qed/css/LESS/rftButtons.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/rftButtons.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/rftButtons.less	(revision 424)
@@ -0,0 +1,166 @@
+#rft {
+	&.claro {
+		
+		//LARGEBUTTON---------------------------------
+		.rftLargeButton {
+
+			.flatShading;
+			margin-right: @button_large_spacing;
+			height: @button_large_height;
+
+			&*, * {
+				-webkit-user-select: none;
+				-moz-user-select: none;
+				-ms-user-select: none;
+				user-select: none;
+			}
+
+			.dijitButtonNode {
+
+				.flatShading;
+				border: none;
+				height: @button_large_height;
+				background: transparent;
+				color: @headers;
+				font-size: @button_large_font_size;
+				.transition(0.3s);
+
+				.rftIcon {
+					.setIcon(24px);
+				}
+
+				.dijitButtonText {
+					line-height: @button_large_height;
+					.noMargin;
+					padding-left: @std_offset_big;
+				}
+			}
+			
+			&.black .dijitButtonNode .rftIcon {
+				.setIcon(24px, black);
+			}
+
+			&.rftLargeButtonHover .dijitButtonNode,
+			&.rftLargeButtonActive .dijitButtonNode {
+				.transition (0.1s);
+			}
+		}
+
+		//colors on hover
+		span.blue.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+		.blue .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+			color: @blue_light;
+		}
+		span.orange.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+		.orange .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+			color: @orange_light;
+		}
+		span.green.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+		.green .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+			color: @green_light;
+		}
+		span.red.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+		.red .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+			color: @red_light;
+		}
+		span.purple.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+		.purple .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+			color: @purple_light;
+		}
+
+		//BLOCKBUTTON---------------------------------
+		.rftBlockButton {
+			
+			.flatShading;
+			.noMargin;
+			height: @button_block_height;
+			vertical-align: top;
+
+			.dijitButtonContents {
+				height: 24px;
+			}
+
+			.dijitButtonNode {
+				.flatShading;
+				.transition (0.3s);
+				line-height: @button_block_height;
+				vertical-align: top;
+				height: @button_block_height;
+				padding: 0 @std_offset;
+				border: none;
+				color: @text;
+				font-size: @button_block_font_size;
+
+				.dijitButtonText {
+					line-height: @button_block_height;
+				}
+
+				.rftIcon {
+					.setIcon(16px);
+				}
+			}
+
+			&.rftBlockButtonHover, 
+			&.rftBlockButtonActive {
+				.transition (0.1s);
+				.rftIcon {
+					vertical-align: top;
+					.setIcon(16px, black);
+				}
+			}
+
+			//Disabled because this is presumably useless
+			// &.blue {
+			// 	.blockButtonColorMixin ("blue");
+			// }
+			// &.green {
+			// 	.blockButtonColorMixin ("green");
+			// }
+			// &.orange {
+			// 	.blockButtonColorMixin ("orange");
+			// }
+			// &.red {
+			// 	.blockButtonColorMixin ("red");
+			// }
+			// &.purple {
+			// 	.blockButtonColorMixin ("purple");
+			// }
+		}
+
+		
+
+		
+
+
+		//INLINEBUTTON---------------------------------
+		.rftInlineButton {
+			float: right;
+			height: @button_inline_height;
+			width: @button_inline_height;
+
+			.dijitButtonNode {
+				.noOffset;
+				.flatShading;
+				width: @button_inline_height;
+				height: @button_inline_height;
+				border: none;
+			}
+
+			.rftIcon {
+				.setIcon(16px);
+			}
+			&.white .rftIcon {
+				.setIcon(16px);
+			}
+			&.black .rftIcon {
+				.setIcon(16px, black);
+			}
+
+			&.dijitHover {
+				.rftIcon {
+					// outline: @headers solid thin;
+				}
+			}
+		}
+	}
+}
Index: Dev/trunk/client/qed/css/LESS/rftIcons.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/rftIcons.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/rftIcons.less	(revision 424)
@@ -0,0 +1,168 @@
+#rft {
+	&.claro {
+		.rftIcon {
+			.noOffset;
+			float: left;
+			display: inline-block;
+			border: none;
+			background-color: transparent;
+			background-repeat: no-repeat;
+		}
+	}
+
+	.rftIconApplication {
+		background-position: 0px 0px;
+	}
+	.rftIconDashboard {
+		background-position: -32px 0px;
+	}
+	.rftIconSession {
+		background-position: -64px 0px;
+	}
+	.rftIconSessionActive {
+		background-position: -96px 0px;
+	}
+	.rftIconSessionTemplate {
+		background-position: -128px 0px;
+	}
+	.rftIconSurvey {
+		background-position: -160px 0px;
+	}
+	.rftIconQuestion {
+		background-position: -192px 0px;
+	}
+	.rftIconQuestionFill {
+		background-position: -224px 0px;
+	}
+	.rftIconRespondent {
+		background-position: -256px 0px;
+	}
+	.rftIconAnswer {
+		background-position: -288px 0px;
+	}
+	.rftIconAnswerSet {
+		background-position: -320px 0px;
+	}
+	.rftIconGameData {
+		background-position: -352px 0px;
+	}
+	.rftIconUser {
+		background-position: -384px 0px;
+	}
+		//Actions
+	.rftIconAccept {
+		background-position: -416px 0px;
+	}
+	.rftIconCancel {
+		background-position: -448px 0px;
+	}
+	.rftIconPlus {
+		background-position: -480px 0px;
+	}
+	.rftIconMinus {
+		background-position: -512px 0px;
+	}
+	.rftIconIncrease {
+		background-position: -544px 0px;
+	}
+	.rftIconDecrease {
+		background-position: -576px 0px;
+	}
+	.rftIconDelete {
+		background-position: -608px 0px;
+	}
+	.rftIconHome {
+		background-position: -640px 0px;
+	}
+	.rftIconPreview {
+		background-position: -672px 0px;
+	}
+	.rftIconSave {
+		background-position: -704px 0px;
+	}
+	.rftIconDiscard {
+		background-position: -736px 0px;
+	}
+	.rftIconProperties {
+		background-position: -768px 0px;
+	}
+	.rftIconUndo {
+		background-position: -800px 0px;
+	}
+	.rftIconRedo {
+		background-position: -832px 0px;
+	}
+	.rftIconBack {
+		background-position: -864px 0px;
+	}
+	.rftIconForward {
+		background-position: -896px 0px;
+	}
+	.rftIconRefresh {
+		background-position: -928px 0px;
+	}
+	.rftIconHelp {
+		background-position: -960px 0px;
+	}
+	.rftIconInspect {
+		background-position: -992px 0px;
+	}
+	.rftIconTag {
+		background-position: -1024px 0px;
+	}
+	.rftIconImage {
+		background-position: -1056px 0px;
+	}
+	.rftIconEdit {
+		background-position: -1088px 0px;
+	}
+	.rftIconLock {
+		background-position: -1120px 0px;
+	}
+	.rftIconUnlock {
+		background-position: -1152px 0px;
+	}
+	.rftIconPreset {
+		background-position: -1184px 0px;
+	}
+	.rftIconTextBlock {
+		background-position: -1216px 0px;
+	}
+	.rftIconPageBreak {
+		background-position: -1248px 0px;
+	}
+	.rftIconExternal {
+		background-position: -1280px 0px;
+	}
+	.rftIconInput {
+		background-position: -1312px 0px;
+	}
+	.rftIconPublish {
+		background-position: -1344px 0px;
+	}
+	//Arrows
+	.rftIconFullArrowUp {
+		background-position: -1696px 0px;
+	}
+	.rftIconFullArrowDown {
+		background-position: -1728px 0px;
+	}
+	.rftIconFullArrowLeft {
+		background-position: -1760px 0px;
+	}
+	.rftIconFullArrowRight {
+		background-position: -1792px 0px;
+	}
+	.rftIconHalfArrowUp {
+		background-position: -1824px 0px;
+	}
+	.rftIconHalfArrowDown {
+		background-position: -1856px 0px;
+	}
+	.rftIconHalfArrowLeft {
+		background-position: -1888px 0px;
+	}
+	.rftIconHalfArrowRight {
+		background-position: -1920px 0px;
+	}
+}
Index: Dev/trunk/client/qed/css/LESS/rftLineWithActions.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/rftLineWithActions.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/rftLineWithActions.less	(revision 424)
@@ -0,0 +1,61 @@
+@dndBorderSize: 6px;
+
+#rft {	//rft nameSpace, apply this to base page! Adds 1000 to specificity by default, so easier overrides of Claro
+	&.claro {
+
+		.rftLineWithActions {
+			.flatShading();
+			position: relative;
+			height: @std_height;
+			white-space: nowrap;
+			margin: @std_offset 0;
+			color: @text;
+			.bgColor("blue");
+
+			&.dojoDndItem {
+				.transition;
+
+				&.dojoDndItemBefore {
+					margin-top: @dndBorderSize;
+					border-top: @dndBorderSize solid @text;
+				}
+				&.dojoDndItemAfter {
+					margin-bottom: @dndBorderSize;
+					border-bottom: @dndBorderSize solid @text;
+				}
+				&.dojoDndItemover, &.dojoDndItemAnchor {
+					background-image: none;
+					border: none;
+					padding: 2px;
+					background-color: fade(#fff, 10%);	// Not sure if this will work.
+					// This is an attempt to lighten the rftLWA's colour by overlaying with transparent white.
+				}
+			}
+
+			.rftLineWithActionsTitle {
+				float: left;
+				margin: 0 8px;
+				overflow: hidden;
+				white-space: nowrap;
+				word-wrap: break-word;
+				line-height: 24px;
+			}
+
+			.rftLineWithActionsButtons {
+				.noOffset();
+				line-height: @std_height;
+				height: @std_height;
+				position: absolute;
+				right: 0;
+				float: left;
+			}
+		}
+
+		// Make the currently lineWithActions draggable "wipe out" when dragging, so only the Avatar is visible!
+		.dojoDndSourceMoved {
+			.rftLineWithActions.dojoDndItemAnchor {
+				height: 0;
+			}
+		}	
+	}
+}
Index: Dev/trunk/client/qed/css/LESS/rftLineWithButtons.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/rftLineWithButtons.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/rftLineWithButtons.less	(revision 424)
@@ -0,0 +1,60 @@
+@dndBorderSize: 6px;
+
+#rft {	//rft nameSpace, apply this to base page! Adds 1000 to specificity by default, so easier overrides of Claro
+	&.claro {
+
+		.rftLineWithActions {
+			.flatShading();
+			position: relative;
+			height: @std_height;
+			white-space: nowrap;
+			margin: @std_offset 0;
+			//Color ("blue");
+
+			&.dojoDndItem {
+				.transition;
+
+				&.dojoDndItemBefore {
+					margin-top: @dndBorderSize;
+					border-top: @dndBorderSize solid @text;
+				}
+				&.dojoDndItemAfter {
+					margin-bottom: @dndBorderSize;
+					border-bottom: @dndBorderSize solid @text;
+				}
+				&.dojoDndItemover, &.dojoDndItemAnchor {
+					background-image: none;
+					border: none;
+					padding: 2px;
+					* {
+						background-color: fade(#fff, 10%);	// Not sure if this will work.
+						// This is an attempt to lighten the rftLWB's colour by overlaying with transparent white.
+					}
+				}
+			}
+
+			.rftLineWithActionsTitle {
+				float: left;
+				margin: 0 8px;
+				overflow: hidden;
+				white-space: nowrap;
+				word-wrap: break-word;
+			}
+
+			.rftLineWithActionsButtons {
+				.noOffset();
+				line-height: @std_height;
+				height: @std_height;
+				position: absolute;
+				right: 0;
+				float: left;
+			}
+		}
+		
+		.dojoDndSourceMoved {
+			.rftLineWithActions.dojoDndItemAnchor {
+				height: 0;
+			}
+		}	
+	}
+}
Index: Dev/trunk/client/qed/css/LESS/rftObjectBox.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/rftObjectBox.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/rftObjectBox.less	(revision 424)
@@ -0,0 +1,17 @@
+#rft {
+	&.claro {
+
+		.rftObjectBox {
+			margin: @std_offset_big 0;
+
+			.typeIcon {
+				// .setIcon (32px);
+				// margin: 20px @std_offset_big;
+			}
+
+			.rftLineWithActions {
+				.noOffset;
+			}
+		}
+	}
+}
Index: Dev/trunk/client/qed/css/LESS/rftSelector.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/rftSelector.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/rftSelector.less	(revision 424)
@@ -0,0 +1,58 @@
+//Variables
+@indicatorWidth: 8px;
+@colorConflict: #ff0000;
+@colorPending: #ff8000;
+@colorSuccess: #00ff00;
+
+#rft {
+	&.claro {
+		
+		.rftSelector {
+			.noOffset;
+			margin: @std_offset;
+
+			.rftLineWithActions {
+				.noOffset;
+			}
+
+			.rftSelectorSelected {
+				// Operation indicator styling
+				.rftSelectorIndicator {
+					.noOffset;
+					float: left;
+					width: @indicatorWidth;
+					height: @std_height;
+					background-color: #bedead;
+
+					&.conflict {
+						background-color: @colorConflict;
+					}
+					&.pending {
+						background-color: @colorPending;
+					}
+					&.success {
+						background-color: @colorSuccess;
+					}
+				}
+			}
+			// Set dropdown background and text color to black on white
+			.rftSelectorOptions, .rftSelectorSelected {
+
+				.rftLineWithActions {
+					background-color: @text;
+					color: @darkest;
+				}
+			}
+
+			.rftSelectorOptions {
+				.rftLineWithActions {
+					.rftInlineButton {
+						.rftIcon {
+							.setIcon (16px, black);
+						}
+					}
+				}
+			}
+		}
+	}
+}
Index: Dev/trunk/client/qed/css/LESS/sessionEditor.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/sessionEditor.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/sessionEditor.less	(revision 424)
@@ -0,0 +1,53 @@
+#rft {
+	&.claro {
+
+		.rftSessionObject {
+			.noOffset;
+			width: @sessionobject_size;
+			height: @sessionobject_size;
+			background: @headers;
+			margin: @std_offset_big;
+			display: inline-block;
+
+
+			.rftIcon {
+				.setIcon (32px);
+				@iconOffsetX: ((@sessionobject_size - 32px)/2);
+				margin: @std_offset_big @iconOffsetX 0 @iconOffsetX;
+			}
+
+			label {
+				.noOffset;
+				float: left;
+				clear: both;
+				width: @sessionobject_size;
+				text-align: center;
+				color: @text;
+				overflow: hidden;
+			}
+
+
+
+
+			&.blue {
+				background-color: @blue;
+				&.selected {
+					background-color: @blue_light;
+				}
+			}
+			&.green {
+				background-color: @green;
+				&.selected {
+					background-color: @green_light;
+				}
+			}
+			&.red {
+				background-color: @red;
+				&.selected {
+					background-color: @red_light;
+				}
+			}
+			
+		}
+	}
+}
Index: Dev/trunk/client/qed/css/LESS/surveyEditor.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/surveyEditor.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/surveyEditor.less	(revision 424)
@@ -0,0 +1,16 @@
+#rft {
+	&.claro {
+
+		.rftSurveyListView {
+
+			.rftSurveyListViewContent {
+				min-height: 300px;
+				background: @base1;
+				overflow: auto;
+			}
+		}
+
+		
+
+	}
+}
Index: Dev/trunk/client/qed/css/LESS/tutorial.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/tutorial.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/tutorial.less	(revision 424)
@@ -0,0 +1,142 @@
+//Variables and operations
+@variable: value;
+@variable2; @variable + value;	// /*-+, etc...
+//Variables are a constant!
+
+//You can use variables in varnames - eval()??
+@varName: "This is the value";
+@var: "varName";
+property: @@var; // read this as: Paste @var into X for the expression 'property is variable X'
+//property = variable(variable(a));
+
+//Mixins
+.mixin {
+	border-top: 1px solid #fff;	//Compilation preserves, so can be used as actual class in HTML
+}
+.mixin () {
+	border-top: 1px solid #fff;	//Compilation does not preserve, only for LESS purposes.
+}
+.mixin (@color: #default) {
+	border-top: 1px solid @color;	//Arguments.
+}
+.mixin (@x: 0, @y: 0) {
+	margin: @arguments;	//Use this to get space-separated list of all arguments!
+}
+
+// The following two mixins use a switch argument, behaving like an if/else or switch(arg1){}.
+.mixin (black, @color) {
+	border-top: 1px solid #fff;
+	background-color: black;
+}
+.mixin (white, @color) {
+	border-top: 1px solid #fff;
+	background-color: white;
+}
+
+//Match on arity (argument count):
+.mixin (@a) {
+	content: "Only if one arg: @{a}";
+}
+.mixin (@a, @b) {
+	content: "When two args: @{a}, @{b}";
+}
+
+//GUARDS! When you want to match on expressions!
+.mixin (@a) when (lightness(@a) >= 50%) {
+	background-color: black;
+}
+
+.mixin (@a) when (isnumber(@a)), (isstring(@a)) {
+	//This matches when @a is a string OR number (comma separated guards)
+}
+.mixin (@a) when (iscolor(@a)) and (lightness(@a) < 50%) {
+	// This matches when @a is a color with lightness under 50% (AND separated guards)
+}
+.mixin (@a) when not (@a > 0) {
+	//derp. Not keyword werkt ook
+}
+
+/*Expressions:
+- iscolor
+- isnumber
+- isstring
+- iskeyword?
+- isurl
+
+isnumber specifiek:
+- ispixel
+- ispercentage
+- isem
+*/
+
+.parent {
+	.descendant {
+		//descendant selector, evaluates to .parent .descendant{}
+	}
+	&.concat {
+		//concatenate selector, evaluates to .parent.concat{}
+	}
+	&[dojo-type="Button"] {
+		// works as well, evaluates to .parent[dojo-type="Button"]{}
+	}
+	&:hover {
+		//sets hover property for .parent:hover !!
+	}
+}
+
+// Operations: Can be applied to all numbers, color and variables. //These can be nested as well!
+@base: 5%;
+@other: @base + #aaa; //apaarently, LESS understands and converts these units?
+@var123: 1px + 5; // Output will be in px as well, since you specified them.
+border: (@width * 2) solid black; // Use brackets in compound statements!
+
+// Color operations: all colours are first converted to HSL space
+lighten/darken	//lightness (%)
+saturate/desaturate	//saturation (%)
+fadein/fadeout/fade	//transparency. fade sets absolute alpha, the others are relative to @color passed in (%)
+spin //hue, degrees spun on colour wheel (unitless number)
+mix // mix two colours.
+
+hue/saturation/lightness/alpha //return these for @color passed as argument
+@new = hsl(hue(@old), 45%, 90%); // generate new colour
+
+//Math functions!
+round, ceil, floor	//do what you'd expect.
+percentage	//returns rational as percentage
+
+//NAMESPACES
+#nameSpace {
+	.button() {
+		//stuff
+	}
+}
+
+.header a {
+	#nameSpace > .button;	// Access namespace variables:) CANNOT DO THIS WITH VARIABLES!!!!
+}
+
+/* These will be added to compiled CSS */
+// These won't, and are for use in LESS sheet only
+
+@import "lib.less";
+@import "lib";	//assumed to be LESS file
+@import "file.css";	//normal css imports
+
+
+//String interpolation: Same as DOJO templates, with @ instead of $
+@base-url: "http://assets.fnord.com";
+background-image: url("@{base-url}/images/bg.png");
+
+//String escapes:
+~"stuffffff"; //Will be added to compiled CSS as-is. Useful for retarded MS-specific (invalid CSS) statements/hacks
+
+//Wait, WHUT
+//JAVASCRIPT EVALUATION?!?!?!?!
+
+@var: `"hello".toUpperCase() + '!'`; // Wrap stuff in backticks and it will eval before compilation! :D
+@str: "hello";
+@var: ~`"@{str}".toUpperCase() + '!'`;	//You can still use string interp for this! Why the ~ though?
+
+@height: `document.body.clientHeight`; //WTF. How does this even work if it is compiled serverside?
+@color: color(`window.colors.baseColor`);	//Use color() to parse JS colours as CSS colours
+@darkcolor: darken(@color, 10%);
Index: Dev/trunk/client/qed/css/LESS/variables.less
===================================================================
--- Dev/trunk/client/qed/css/LESS/variables.less	(revision 424)
+++ Dev/trunk/client/qed/css/LESS/variables.less	(revision 424)
@@ -0,0 +1,78 @@
+// Graytones
+@darkest: #111111;
+@base: #333333;
+@base1: #444444;
+@base2: #555555;
+@headers: #999999;
+@text: #ffffff;
+
+// Colours
+@blue: #0072bc;
+@blue_light: #0794d1;
+// @green: #3aa605;					For now use the newer colours. Almost negligible difference, but looks better on non-calibrated monitors
+// @green_light: #79ca0a;
+@green: #25a000;
+@green_light: #63c400;
+
+@orange: #ff5b12;
+@orange_light: #ff9140;
+@purple: #6529b7;
+@purple_light: #993dec;
+@red: #8c0310;
+@red_light: #bd0013;
+
+// Layout related
+@std_height: 24px;
+@std_offset: 4px;
+@std_offset_big: 8px;
+@transition_time: 0.2s;
+@tab_height: 30px;
+@tab_width: 200px;
+
+// Headers and fonts
+@h1Size: 48px;
+@h2Size: 22px;
+@h3Size: 18px;
+@h4Size: 16px;
+@font_size: 13px;
+@font: 'Segoe UI', Helvetica, Verdana, Arial, sans-serif;
+
+// Icons
+@icon_mainSize: 32px;
+@icon_midSize: 24px;
+@icon_smallSize: 16px;
+
+// IndexMenu
+@indexmenu_blockheight: 400px;
+@indexmenu_blockwidth: 400px;
+@indexmenu_blockmargin: 16px;
+@indexmenu_font_size: 32px;
+
+// Mainmenu
+@button_mainmenu_height: 30px;
+@button_mainmenu_spacing: 5px;
+@button_mainmenu_padding: 4px;
+@button_mainmenu_font_size: 24px;
+@button_mainmenu_font_grow: @button_mainmenu_font_size / 12;
+
+// Index menu
+@button_indexmenu_height: 32px;
+@button_indexmenu_content_size: 24px;
+@button_indexmenu_font_size: @h1Size;
+
+// SessionObject
+@sessionobject_size: 100px;
+@sessionObject_spacing: 2 * @std_offset_big;
+
+// Buttons
+@button_large_height: 24px;
+@button_large_spacing: @std_offset_big * 2;
+@button_large_font_size: @button_large_height / 1.2;
+
+@button_block_height: 24px;
+@button_block_spacing: 0;
+@button_block_font_size: @font_size;
+
+@button_inline_height: 24px;
+@button_inline_spacing: 0;
+@button_inline_font_size: @font_size;
Index: Dev/trunk/client/qed/css/backup old css/claroOverride.css
===================================================================
--- Dev/trunk/client/qed/css/backup old css/claroOverride.css	(revision 424)
+++ Dev/trunk/client/qed/css/backup old css/claroOverride.css	(revision 424)
@@ -0,0 +1,108 @@
+/* This stylesheet compensates for the restoration of the claro style to its original specs. (21-6-2012)
+ * These changes should be moved to relevant stylesheets as soon as possible!
+*/
+
+
+/* Menu.css */
+.claro .topbar .dijitMenuitem {
+    width: 90px;
+    background-image: none;
+    background-position: top;
+    text-align: center;
+}
+.claro .dijitMenuPassive .dijitMenuItemHover, .claro .dijitMenuPassive .dijitMenuItemSelected {
+    background-color: transparent;
+    color: #ffffff;
+    border: none;
+    padding: 0 4px;
+}
+.claro .dijitMenuPassive .dijitMenuItemActive {
+    background-position: top;
+}
+
+/* layout/BorderContainer.css */
+.claro .dijitSplitContainer-child, .claro .dijitBorderContainer-child {
+    border: none;
+}
+.claro .dijitTabContainerTop-dijitContentPane,
+.claro .dijitTabContainerLeft-dijitContentPane,
+.claro .dijitTabContainerBottom-dijitContentPane,
+.claro .dijitTabContainerRight-dijitContentPane,
+.claro .dijitAccordionContainer-dijitContentPane {
+    background-color: transparent;
+}
+.claro .dijitSplitContainer-dijitContentPane,
+.claro .dijitBorderContainer-dijitContentPane {
+    background-color: transparent;
+}
+
+/* layout/TabContainer.css */
+.claro .dijitTabPaneWrapper {
+    background: transparent;
+}
+.claro .dijitTabInnerDiv {
+    background-color: transparent;
+    color: #999999;
+    border: none;
+}
+.claro .dijitTabContent {
+    border: none;
+}
+.claro .dijitTabHover .dijitTabInnerDiv {
+    background-color: transparent;
+    color: #ffffff;
+}
+.claro .dijitTabActive .dijitTabInnerDiv {
+    color: #0072bc;
+}
+.claro .dijitTabChecked .dijitTabInnerDiv {
+    background-color: transparent;
+    color: #ffffff;
+}
+.claro .dijitTabContent {
+    border: 1px solid #999999;
+}
+.claro .dijitTabHover .dijitTabContent {
+    border-color: #ffffff;
+}
+.claro .dijitTabActive .dijitTabContent {
+    border-color: transparent;
+}
+.claro .dijitTabChecked .dijitTabContent {
+    color: #ffffff;
+    border-color: #0072bc;
+}
+/*lefttabs*/
+.claro .dijitTabContainerLeft-tabs .dijitTab {
+    border-width: 1px;
+    left: 0;
+    margin-bottom: 4px;
+    margin-right: 8px;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabInnerDiv {
+    border: none;
+    background: transparent;
+    background-image: none;
+    background-position: top;
+    background-repeat: no-repeat;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabContent {
+    padding: 3px 8px 4px 8px;
+    background-image: none;
+
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabChecked .dijitTabContent {
+    padding-right: 8px;
+    background-image: none;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabChecked .dijitTabInnerDiv {
+    -webkit-box-shadow: none;
+    -moz-box-shadow: none;
+    box-shadow: none;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabInnerDiv,
+.claro .dijitTabContainerLeft-tabs .dijitTabContent {
+    -moz-border-radius: 0;
+    border-radius: 0;
+    border: none;
+}
Index: Dev/trunk/client/qed/css/backup old css/general.css
===================================================================
--- Dev/trunk/client/qed/css/backup old css/general.css	(revision 424)
+++ Dev/trunk/client/qed/css/backup old css/general.css	(revision 424)
@@ -0,0 +1,6 @@
+/* General.css contains general fixes that are not strongly related to any other stylesheets.
+They are typically small fixes or tweaks to adjust spacing and/or borders/colours */
+
+.claro .dijitTabPaneWrapper {
+    border: none;
+}
Index: Dev/trunk/client/qed/css/backup old css/layout.css
===================================================================
--- Dev/trunk/client/qed/css/backup old css/layout.css	(revision 424)
+++ Dev/trunk/client/qed/css/backup old css/layout.css	(revision 424)
@@ -0,0 +1,607 @@
+*:focus {
+    /* Disabled Chrome focus outlines! */
+    outline: none;
+}
+html,body {
+    width: 100%;
+    height: 100%;
+    font-size: 13px;
+    background-color: #333333;
+}
+.claro {
+    font-family: 'Segoe UI', Verdana, Arial, Helvetica, sans-serif;
+    color: #000000;
+}
+
+/* Headings */
+.claro h1 {   
+    float: left;
+    clear: left;
+    font-size: 48px;
+    color: #999999;
+    margin: 0 10px 8px 10px;
+    padding: 0;
+    line-height: 48px;
+    font-weight: normal !important;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+}
+.claro h2 {
+    /* Content pane title */
+    color: #ffffff;
+    font-size: 22px;
+    line-height: 30px;
+    margin: 0;
+    padding: 0;
+}
+.claro h2 .rftIcon {
+    float: left;
+    width: 32px;
+    height: 32px;
+    background-image: url('images/icons/rftIcons32.png');
+    margin-right: 8px;
+}
+.claro h3 {
+    /* Section headers */
+    font-size: 18px;
+    margin: 0 0 4px 0;
+}
+.claro h4 {
+    /* Small text headers/paragraph headers */
+    font-size: 16px;
+}
+
+/* Topbar  */
+.claro .topbar {
+    overflow-y: hidden;
+}
+.claro .topbar .dijitMenuBar {
+    border: none;
+    background-color: transparent;
+    background-image: none;    
+    float: right;
+    clear: right;
+    margin-top: 16px;
+}
+
+/* Breadcrumbs */
+.claro .breadcrumbs {
+    float: left;
+    clear: left;
+    width: 100%;
+    text-align: center;
+    height: 16px;
+    line-height: 16px;
+    margin: 0 0 4px 0;
+}
+.claro .breadcrumbs .breadcrumb {
+    color: #999999;
+    font-size: 13px;
+}
+.claro .breadcrumbs .breadcrumb.breadcrumbCurrent {
+    color: #ffffff;
+    font-size: 14px;
+}
+.claro .breadcrumbs .breadcrumb.breadcrumbHover {
+    color: #0072bc;
+}
+
+/* Content */
+.claro .dijitContentPane.page {
+    padding: 0;
+}
+.claro .content.dijitContentPane {
+    display: block;
+    clear: both;
+    padding: 0;
+    background-color: #555555;
+    /* Background gradient time! */
+    background: -webkit-radial-gradient(
+        50% 50%, 
+        circle, 
+        #666666 1%,
+        #444444 100%
+        );
+    background: -moz-radial-gradient(
+        50% 50%, 
+        circle, 
+        #666666 1%,
+        #444444 100%
+        );
+}
+.claro .content.dijitContentPane .dijitBorderContainer {
+    padding: 2px;
+}
+
+
+
+
+
+
+
+
+
+
+/* General */
+.loginLabel {
+    float: left;
+    clear: left;
+    width: 100px;
+}
+.loginInput {
+    float: left;
+    clear: right;
+    width: 150px;
+}
+.rftMultipleChoiceWidget {
+    display: table;
+}
+.rftMultipleChoiceWidget .row {
+    display: table-row;
+}
+.rftMultipleChoiceWidget .rowBox {
+    display: table-cell;
+}
+.rftMultipleChoiceWidget .rowText {
+    display: table-cell;
+    width: 100px;
+}
+.rftMultipleChoiceWidget .rowBtn {
+    display: table-cell;
+    width: 30px;
+}
+.verticalTabList {
+    width: 190px;
+}
+
+/* Tabs */
+.claro .dijitTabContainerLeft-tabs {
+    border: none;
+    padding: 4px 16px 4px 4px;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTab {
+    margin: 4px 0;
+    width: 200px;
+    min-height: 30px;
+    border: 1px solid #888888;
+}
+.claro .dijitTab {
+    background-color: transparent;
+    padding: 2px 8px;
+    color: #999999;
+    white-space: normal;
+    overflow: hidden;
+    transition: all 0.3s;
+    -moz-transition: all 0.3s;
+    -webkit-transition: all 0.3s;
+    -o-transition: all 0.3s;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTab .dijitTabContent {
+    height: 48px;
+    line-height: 24px;
+    width: 190px;
+}
+.claro .dijitTab.dijitTabHover {
+    color: #ffffff;
+    border-color: #ffffff;
+    transition: all 0.1s;
+    -moz-transition: all 0.1s;
+    -webkit-transition: all 0.1s;
+    -o-transition: all 0.1s;
+}
+.claro .dijitTab.dijitTabActive {
+    color: #0072bc;
+    transition: all 0.1s;
+    -moz-transition: all 0.1s;
+    -webkit-transition: all 0.1s;
+    -o-transition: all 0.1s;
+}
+.claro .dijitTab.dijitTabChecked {
+    color: #ffffff;
+    border: 1px solid transparent;
+    transition: all 0.1s;
+    -moz-transition: all 0.1s;
+    -webkit-transition: all 0.1s;
+    -o-transition: all 0.1s;
+}
+.claro .dijitTabContainer.blue .dijitTab.dijitTabChecked {
+    background-color: #0072bc;
+}
+.claro .dijitTabContainer.orange .dijitTab.dijitTabChecked {
+    background-color: #ff5b12;
+}
+.claro .dijitTabContainer.red .dijitTab.dijitTabChecked {
+    background-color: #8c0310;
+}
+.claro .dijitTabContainer.purple .dijitTab.dijitTabChecked {
+    background-color: #6529b7;
+}
+.claro .dijitTabContainer.green .dijitTab.dijitTabChecked {
+    background-color: #3aa605;
+}
+.claro .dijitTabContainer.blue .dijitTab.dijitTabActive {
+    color: #0072bc;
+}
+.claro .dijitTabContainer.orange .dijitTab.dijitTabActive {
+    color: #ff5b12;
+}
+.claro .dijitTabContainer.red .dijitTab.dijitTabActive {
+    color: #8c0310;
+}
+.claro .dijitTabContainer.purple .dijitTab.dijitTabActive {
+    color: #6529b7;
+}
+.claro .dijitTabContainer.green .dijitTab.dijitTabActive {
+    color: #3aa605;
+}
+
+/* Index Menu */
+.claro .rftIndexMenuBlock {
+    width: 400px;
+    height: 400px;
+    background: #444444;
+    float: left;
+    margin: 16px;
+    overflow: hidden;
+}
+.claro .rftIndexMenuMask {
+    height: 400px;
+    width: 400px;
+    background: #444444;
+    color: #999999;
+    margin-top: 0;
+}
+.claro .rftIndexMenuBlock:hover .rftIndexMenuMask {
+    margin-top: -400px;
+}
+.claro .rftIndexMenuMask .label {
+    color: #999999;
+    font-size: 32px;
+    line-height: 28px;
+    height: 32px;
+    margin: 184px 0;
+    float: left;
+}
+.claro .rftIndexMenuMask .rftIcon {
+    width: 32px;
+    height: 32px;
+    background-image: url('images/icons/rftIcons32.png');
+    margin: 184px 8px 0 8px;
+    float: left;
+}
+
+
+/* Inputs */
+fieldset {
+    border: none;
+}
+fieldset.align input,
+fieldset.align .dijitTextBox,
+fieldset.align textarea {
+    margin-left: 0;
+}
+fieldset.align label {
+    color: #ffffff;
+    display: inline-block;
+    width: 100px !important;
+}
+
+.claro .newline {
+    display: block;
+}
+
+/* Question editor/Survey Advanced editor */
+.claro .QuestionEditor .PreviewWindow {
+    /* Nothing yet, put preview window styling options here after we've decided on a format to follow! */
+}
+.claro .dijitAccordionContainer {
+    /* No styling for now, use this for margins and other layout-related business. This class does not affect the look of the AccordionContainer currently! */
+}
+.claro .dijitAccordionInnerContainer {
+    /* This contains a title and a childWrapper. The two of these make up one "item" in the Accordion element */
+    border: none;
+    border-color: #333333;
+    background-color: #0072bc;
+    margin-bottom: 0;
+}
+.claro .dijitAccordionInnerContainer {
+    background-color: transparent;
+}
+.claro .dijitAccordionTitle, .claro .dijitAccordionTitleSelected {
+    background-color: #0072bc;
+    background-image: none;
+    color: #ffffff;
+}
+.claro .dijitAccordionTitle .rftIcon {
+    width: 16px;
+    height: 16px;
+    background-image: url('images/icons/rftIcons16b.png');
+    margin: 0 4px 2px 0;
+}
+.claro .dijitAccordionTitleSelected .rftIcon {
+    background-image: url('images/icons/rftIcons16.png');
+}
+.claro .dijitAccordionContainer.blue .dijitAccordionTitle, .claro .dijitAccordionContainer.blue .dijitAccordionTitleSelected {
+    background-color: #0072bc;
+}
+.claro .dijitAccordionContainer.blue .dijitAccordionTitleHover {
+    background-color: #0794d1;
+}
+.claro .dijitAccordionContainer.orange .dijitAccordionTitle, .claro .dijitAccordionContainer.orange .dijitAccordionTitleSelected {
+    background-color: #ff5b12;
+}
+.claro .dijitAccordionContainer.orange .dijitAccordionTitleHover {
+    background-color: #ff9140;
+}
+.claro .dijitAccordionText {
+    color: #ffffff;
+}
+.claro .dijitAccordionContainer .dijitAccordionChildWrapper {
+    background-color: #444444;
+    border: none !important;
+    padding: 0;
+    margin: 0;
+}
+.claro .dijitAccordionContainer .dijitAccordionInnerContainerSelectedHover .dijitAccordionChildWrapper,
+.claro .dijitAccordionContainer .dijitAccordionInnerContainerSelectedActive .dijitAccordionChildWrapper {
+    border: none;
+    box-shadow: none;
+    -moz-box-shadow: none;
+    -webkit-box-shadow: none;
+    /* Override the box shadow and offset on hover */
+}
+
+/* DojoX.TitleGroup, replacement of AccordionContainer in Question Editor */
+.claro .dojoxTitleGroup {
+    /* No styling yet */
+}
+.claro .dojoxTitleGroup .dijitTitlePane {
+    margin: 0;
+}
+.claro .orange .dojoxTitleGroup .dijitTitlePaneTitle {
+    background-color: #ff5b12;
+    background-image: none;
+    border: none;
+    padding: 0 4px;
+    height: 24px;
+    margin: 0;
+}
+.claro .orange .dojoxTitleGroup .dijitTitlePaneTitleHover, 
+.claro .orange .dojoxTitleGroup .dijitTitlePanelTitleFocused {
+    background-color: #ff9140;
+}
+.claro .dojoxTitleGroup .dijitTitlePaneTextNode {
+    color: #ffffff;
+    font-size: 13px;
+    line-height: 24px;
+}
+.claro .dojoxTitleGroup .dijitTitlePaneContentOuter {
+    background-color: #444;
+    border: none;
+}
+.claro .dojoxTitleGroup .dijitTitlePaneTitleFocus {
+    margin: 0;
+}
+
+/****************************************************
+/*  Self- and Inherit Colours
+/***************************************************/
+
+/* InheritColours */
+.claro .inheritBgColor,
+.claro .bg {
+    transition: all 0.2s;
+    -moz-transition: all 0.2s;
+    -webkit-transition: all 0.2s;
+}
+.claro .blue .inheritBgColor {
+    background-color: #0072bc;
+    color: #ffffff;
+}
+.claro .blue.light .inheritBgColor,
+.claro .blue .light.inheritBgColor {
+    background-color: #0794d1;
+    color: #ffffff;
+}
+.claro .green .inheritBgColor {
+    background-color: #3aa605;
+    color: #ffffff;
+}
+.claro .green.light .inheritBgColor,
+.claro .green .light.inheritBgColor {
+    background-color: #79ca0a;
+    color: #ffffff;
+}
+.claro .orange .inheritBgColor {
+    background-color: #ff5b12;
+    color: #ffffff;
+}
+.claro .orange.light .inheritBgColor,
+.claro .orange .light.inheritBgColor {
+    background-color: #ff9140;
+    color: #ffffff;
+}
+.claro .red .inheritBgColor {
+    background-color: #8c0310;
+    color: #ffffff;
+}
+.claro .red.light .inheritBgColor,
+.claro .red .light.inheritBgColor {
+ background-color: #bd0013;
+ color: #ffffff;   
+}
+.claro .purple .inheritBgColor {
+    background-color: #6529b7;
+    color: #ffffff;
+}
+.claro .purple.light .inheritBgColor,
+.claro .purple .light.inheritBgColor {
+    background-color: #993dec;
+    color: #ffffff;
+}
+.claro .white .inheritBgColor {
+    background-color: #ffffff;
+    color: #000000;
+}
+.claro .black .inheritBgColor {
+    background-color: #000000;
+    color: #ffffff;
+}
+.claro .trans .inheritBgColor,
+.claro .trans.bg {
+    background: transparent;
+    color: #ffffff;
+}
+
+/*SelfColours! */
+.claro .blue.bg {
+    background-color: #0072bc;
+    color: #ffffff;
+}
+.claro .blue.light.bg {
+    background-color: #0794d1;
+    color: #ffffff;
+}
+.claro .green.bg {
+    background-color: #3aa605;
+    color: #ffffff;
+}
+.claro .green.light.bg {
+    background-color: #79ca0a;
+    color: #ffffff;
+}
+.claro .orange.bg {
+    background-color: #ff5b12;
+    color: #ffffff;
+}
+.claro .orange.light.bg {
+    background-color: #ff9140;
+    color: #ffffff;
+}
+.claro .red.bg {
+    background-color: #8c0310;
+    color: #ffffff;
+}
+.claro .red.light.bg {
+    background-color: #bd0013;
+    color: #ffffff;   
+}
+.claro .purple.bg {
+    background-color: #6529b7;
+    color: #ffffff;
+}
+.claro .purple.light.bg {
+    background-color: #993dec;
+    color: #ffffff;
+}
+.claro .white.bg {
+    background-color: #ffffff;
+    color: #000000;
+}
+.claro .black.bg {
+    background-color: #000000;
+    color: #ffffff;
+}
+.claro .trans.bg {
+    background: transparent;
+    color: #ffffff;
+}
+
+/*************************************/
+/*  Dropdown menu on MenuBar
+/*************************************/
+.claro .dijitMenuPopup {
+
+}
+.claro .dijitMenuPopup .dijitMenu {
+    border: none;
+    background-color: #333333;
+    background-image: none;
+    color: #999999;   
+}
+.claro .dijitMenuPopup .dijitMenu .dijitMenuItem {
+    color: #999999;
+    background-image: none;
+    background-color: transparent;
+}
+.claro .dijitMenuPopup .dijitMenu .dijitMenuItemHover.blue,
+.claro .dijitMenuPopup .dijitMenu .dijitMenuItemSelected.blue {
+    background-color: #0072bc;
+}
+.claro .dijitMenuPopup .dijitMenu .dijitMenuItemHover.orange,
+.claro .dijitMenuPopup .dijitMenu .dijitMenuItemSelected.orange {
+    background-color: #ff5b12;
+}
+.claro .dijitMenuPopup .dijitMenu .dijitMenuItemHover.purple,
+.claro .dijitMenuPopup .dijitMenu .dijitMenuItemSelected.purple {
+    background-color: #6529b7;
+}
+.claro .dijitMenuPopup .dijitMenu .dijitMenuItemHover.green,
+.claro .dijitMenuPopup .dijitMenu .dijitMenuItemSelected.green {
+    background-color: #3aa605;
+}
+.claro .dijitMenuPopup .dijitMenu .dijitMenuItemHover.red,
+.claro .dijitMenuPopup .dijitMenu .dijitMenuItemSelected.red {
+    background-color: #8c0310;
+}
+.claro .dijitMenuPopup .dijitMenu .dijitMenuItemHover .dijitMenuItemLabel,
+.claro .dijitMenuPopup .dijitMenu .dijitMenuItemActive .dijitMenuItemLabel,
+.claro .dijitMenuPopup .dijitMenu .dijitMenuItemSelected .dijitMenuItemLabel {
+    color: #ffffff;
+}
+.claro .dijitMenuPopup .dijitMenu .dijitMenuItem .rftIcon {
+    height: 16px;
+    width: 16px;
+    margin: 0;
+    margin-right: 4px;
+    background-image: url('images/icons/rftIcons16.png');
+} 
+.claro .dijitMenuPopup .dijitMenu .dijitMenuItemActive .rftIcon {
+    background-image: url('images/icons/rftIcons16b.png');
+}
+
+
+/* Alignment */
+.claro .floatRight {
+    float: right;
+    margin: 0;
+    padding: 0;
+}
+
+
+/* SurveyListView */
+.claro .rftSurveyListView {
+}
+.claro .rftSurveyListView .rftSurveyListViewContent {
+    height: 300px;
+    background: #444444;
+    overflow: auto;
+}
+.claro .rftSurveyListView .rftLineWithActions .rftLineWithActionsTitle {
+    max-width: 200px;
+    overflow: hidden;
+}
+
+/* AccountListView */
+.claro .rftAccountListView .rftLineWithActions .rftLineWithActionsTitle {
+    max-width: 400px;
+    overflow: auto;
+}
+/* Generic list with lines */
+.claro .rftLineListView {
+    max-width: 200px;
+    max-height: 500px;
+}
+.claro .rftLineListView .rftLineListViewContent {
+    max-width: 200px;
+    overflow: auto;
+}
+
+
+/* Two column tables */
+.labelsAndValues-labelCell {
+  padding-left: 5px;
+}
+.labelsAndValues-valueCell {
+  padding-left: 20px;
+}
Index: Dev/trunk/client/qed/css/backup old css/main.css
===================================================================
--- Dev/trunk/client/qed/css/backup old css/main.css	(revision 424)
+++ Dev/trunk/client/qed/css/backup old css/main.css	(revision 424)
@@ -0,0 +1,13 @@
+@import url('external.css');
+@import url('claroOverride.css');
+
+@import url('layout.css');
+@import url('general.css');
+
+@import url('rftLineWithActions.css');
+@import url('rftButtons.css');
+@import url('rftIcons.css');
+@import url('rftSelector.css');
+@import url('rftObjectBox.css');
+@import url('sessionEditor.css');
+@import url('surveyEditor.css');
Index: Dev/trunk/client/qed/css/backup old css/rftButtons.css
===================================================================
--- Dev/trunk/client/qed/css/backup old css/rftButtons.css	(revision 424)
+++ Dev/trunk/client/qed/css/backup old css/rftButtons.css	(revision 424)
@@ -0,0 +1,408 @@
+/****************************************************
+/*  LargeButton
+/***************************************************/
+.claro .rftLargeButton, 
+.claro .rftLargeButton * {
+    user-select: none;
+    -webkit-user-select: none;
+}
+.claro .rftLargeButton {
+    margin-right: 16px;
+    height: 30px;
+}
+.claro .rftLargeButton .dijitButtonNode {
+    border: none;
+    height: 24px;
+    background-image: none;
+    background: transparent;
+    color: #999999;
+    font-size: 20px;
+    box-shadow: none;
+    transition: color 0.3s;
+    -moz-transition: color 0.3s;
+    -webkit-transition: color 0.3s;
+    -o-transition: color 0.3s;
+}
+.claro .rftLargeButton .rftIcon {
+    width: 24px;
+    height: 24px;
+    background-image: url('images/icons/rftIcons24.png');
+}
+.claro .rftLargeButton.black .rftIcon {
+    background-image: url('images/icons/rftIcons24b.png');
+}
+.claro .rftLargeButton .dijitButtonText {
+    line-height: 24px;
+    margin-left: 6px;
+    padding: 0;
+}
+.claro .rftLargeButton.rftLargeButtonHover .dijitButtonNode {
+    transition: color 0.1s;
+    -moz-transition: color 0.1s;
+    -webkit-transition: color 0.1s;
+    -o-transition: color 0.1s;
+    color: #ffffff;
+}
+.claro .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+    transition: color 0.1s;
+    -moz-transition: color 0.1s;
+    -webkit-transition: color 0.1s;
+    -o-transition: color 0.1s;
+}
+.claro span.blue.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+.claro .blue .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+    color: #0794d1;
+}
+.claro span.orange.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+.claro .orange .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+    color: #ff9140;
+}
+.claro span.green.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+.claro .green .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+    color: #79ca0a;
+}
+.claro span.red.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+.claro .red .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+    color: #bd0013;
+}
+.claro span.purple.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+.claro .purple .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+    color: #993dec;
+}
+
+/****************************************************
+/*  BlockButton
+/***************************************************/
+
+.claro .rftBlockButton {
+    height: 24px;
+    margin: 0;
+    line-height: 20px;
+}
+.claro .rftBlockButton .dijitButtonNode {
+    height: 24px;
+    padding: 0 4px;
+    border: none;
+    background-image: none;
+    color: #ffffff;
+    font-size: 13px;
+    border-radius: 0;
+    -moz-border-radius: 0;
+    transition: background-color 0.3s;
+    -moz-transition: background-color 0.3s;
+    -webkit-transition: background-color 0.3s;
+    -o-transition: background-color 0.3s;
+}
+.claro .rftBlockButton .rftIcon {
+    height: 16px !important;
+    width: 16px !important;
+    background-image: url('images/icons/rftIcons16.png') !important;
+}
+.claro .rftBlockButton .rftIcon.black {
+    background-image: url('images/icons/rftIcons16b.png') !important;
+}
+.claro .rftBlockButton.rftBlockButtonHover .rftIcon {
+    background-image: url('images/icons/rftIcons16b.png') !important;
+}
+.claro .rftBlockButton.rftBlockButtonActive .rftIcon {
+    background-image: url('images/icons/rftIcons16b.png') !important;
+}
+.claro .rftBlockButton.rftBlockButtonHover .dijitButtonNode {
+    /*background: #999999 !important;*/
+    /* Currently not used, only applicable when all the different colours of BlockButton need the same background colour on hover */
+    transition: background-color 0.1s;
+    -moz-transition: background-color 0.1s;
+    -webkit-transition: background-color 0.1s;
+    -o-transition: background-color 0.1s;
+}
+
+/* Hover effects */
+/*Normal*/
+.claro span.blue.bg.rftBlockButtonHover,
+.claro .blue .inheritBgColor.rftBlockButtonHover {
+    background-color: #0794d1;
+}
+.claro span.orange.bg.rftBlockButtonHover,
+.claro .orange .inheritBgColor.rftBlockButtonHover {
+    background-color: #ff9140;
+}
+.claro span.green.bg.rftBlockButtonHover,
+.claro .green .inheritBgColor.rftBlockButtonHover {
+    background-color: #79ca0a;
+}
+.claro span.red.bg.rftBlockButtonHover,
+.claro .red .inheritBgColor.rftBlockButtonHover {
+    background-color: #bd0013;
+}
+.claro span.purple.bg.rftBlockButtonHover,
+.claro .purple .inheritBgColor.rftBlockButtonHover {
+    background-color: #993dec;
+}
+.claro span.trans.bg.rftBlockButtonHover,
+.claro .trans .inheritBgColor.rftBlockButtonHover {
+    background-color: #ffffff;
+}
+.claro span.trans.bg.rftBlockButtonHover .dijitButtonNode,
+.claro .trans .inheritBgColor.rftBlockButtonHover .dijitButtonNode {
+    color: #000000;
+}
+/*Light*/
+.claro span.blue.light.bg.rftBlockButtonHover .dijitButtonNode,
+.claro .blue .light.inheritBgColor.rftBlockButtonHover .dijitButtonNode {
+    color: #0072bc;
+}
+.claro span.orange.light.bg.rftBlockButtonHover .dijitButtonNode,
+.claro .orange .light.inheritBgColor.rftBlockButtonHover .dijitButtonNode {
+    color: #ff5b12;
+}
+.claro span.green.light.bg.rftBlockButtonHover .dijitButtonNode,
+.claro .green .light.inheritBgColor.rftBlockButtonHover .dijitButtonNode {
+    color: #3aa605;
+}
+.claro span.red.light.bg.rftBlockButtonHover .dijitButtonNode,
+.claro .red .light.inheritBgColor.rftBlockButtonHover .dijitButtonNode {
+    color: #8c0310;
+}
+.claro span.purple.light.bg.rftBlockButtonHover .dijitButtonNode,
+.claro .purple .light.inheritBgColor.rftBlockButtonHover .dijitButtonNode {
+    color: #6529b7;
+}
+/* Set all .light .bg/.inheritBgColors hover to White background! */
+.claro span.light.bg.rftBlockButtonHover,
+.claro .light.inheritBgColor.rftBlockButtonHover {
+    background-color: #ffffff;
+}
+
+/* Active effects */
+/*Normal*/
+.claro span.blue.bg.rftBlockButtonActive .dijitButtonNode,
+.claro .blue .inheritBgColor.rftBlockButtonActive .dijitButtonNode {
+    color: #0072bc;
+}
+.claro span.orange.bg.rftBlockButtonActive .dijitButtonNode,
+.claro .orange .inheritBgColor.rftBlockButtonActive .dijitButtonNode {
+    color: #ff5b12;
+}
+.claro span.green.bg.rftBlockButtonActive .dijitButtonNode,
+.claro .green .inheritBgColor.rftBlockButtonActive .dijitButtonNode {
+    color: #3aa605;
+}
+.claro span.red.bg.rftBlockButtonActive .dijitButtonNode,
+.claro .red .inheritBgColor.rftBlockButtonActive .dijitButtonNode {
+    color: #8c0310;
+}
+.claro span.purple.bg.rftBlockButtonActive .dijitButtonNode,
+.claro .purple .inheritBgColor.rftBlockButtonActive .dijitButtonNode {
+    color: #6529b7;
+}
+/* Set bg color to white for all normal .bg/.inheritBgColors on active! */
+.claro span.bg.rftBlockButtonActive,
+.claro .inheritBgColor.rftBlockButtonActive {
+    background-color: #ffffff;
+}
+/*Light*/
+.claro span.blue.light.bg.rftBlockButtonActive,
+.claro .blue .light.inheritBgColor.rftBlockButtonActive {
+    background-color: #0072bc;
+}
+.claro span.orange.light.bg.rftBlockButtonActive,
+.claro .orange .light.inheritBgColor.rftBlockButtonActive {
+    background-color: #ff5b12;
+}
+.claro span.green.light.bg.rftBlockButtonActive,
+.claro .green .light.inheritBgColor.rftBlockButtonActive {
+    background-color: #3aa605;
+}
+.claro span.red.light.bg.rftBlockButtonActive,
+.claro .red .light.inheritBgColor.rftBlockButtonActive {
+    background-color: #8c0310;
+}
+.claro span.purple.light.bg.rftBlockButtonActive,
+.claro .purple .light.inheritBgColor.rftBlockButtonActive {
+    background-color: #6529b7;
+}
+/* Set text color to white for all .light.bg/.light.inheritBgColor on active! */
+.claro span.light.bg.rftBlockButtonActive .dijitButtonNode,
+.claro .light.inheritBgColor.rftBlockButtonActive .dijitButtonNode {
+    color: #ffffff;
+}
+
+/****************************************************
+/*  InlineButton
+/***************************************************/
+.claro .rftInlineButton {
+    float: right;
+    height: 24px;
+    width: 24px;
+}
+.claro .rftInlineButton .dijitButtonNode {
+    width: 24px;
+    height: 24px;
+    margin: 0;
+    padding: 0;
+    background: transparent;
+    border: none;
+}
+.claro .rftInlineButton .rftIcon {
+    width: 16px;
+    height: 16px;
+    background-image: url('images/icons/rftIcons16.png');
+}
+.claro .rftInlineButton.white .rftIcon {
+    background-image: url('images/icons/rftIcons16.png');
+}
+.claro .rftInlineButton.black .rftIcon {
+    background-image: url('images/icons/rftIcons16b.png');
+}
+.claro .rftInlineButton .rftIcon.black {
+    background-image: url('images/icons/rftIcons16b.png');
+}
+.claro .rftInlineButton .rftIcon.white {
+    background-image: url('images/icons/rftIcons16.png');
+}
+.claro .rftInlineButton.rftInlineButtonHover .rftIcon {
+    /* We should use either the displacement or the background image change, not both! */
+    /*background-image: url('../../icons/images/rftIcons16c.png');*/
+    margin-top: 1px;
+}
+.claro .rftInlineButton.rftInlineButtonActive .rftIcon {
+    /* This "afterclick" is optional. Check to see if people like it or not! */
+    /* Good, the displacement on click does not come from these settings! */
+}
+
+/****************************************************
+/*  MainMenuButton
+/***************************************************/
+.claro .dijitMenuBar .rftMainMenuButton {
+    border: none;
+    height: 30px;
+    width: auto;
+    background-image: none;
+    background: transparent;
+    text-align: center;
+    color: #999999;
+    font-size: 24px;
+    line-height: 30px;
+    padding: 0 4px;
+    margin: 0 5px;
+    box-shadow: none;
+    transition: all 0.3s;
+    -moz-transition: all 0.3s;
+    -webkit-transition: all 0.3s;
+    -o-transition: all 0.3s;
+}
+.claro .dijitMenuBar .rftMainMenuButton.dijitMenuItemHover {
+    color: #ffffff;
+    font-size: 26px;
+    transition: all 0.1s;
+    -moz-transition: all 0.1s;
+    -webkit-transition: all 0.1s;
+    -o-transition: all 0.1s;
+}
+.claro .dijitMenuBar .rftMainMenuButton.dijitMenuItemActive {
+    color: #0794d1 !important;
+    font-size: 26px;
+    transition: all 0.1s;
+    -moz-transition: all 0.1s;
+    -webkit-transition: all 0.1s;
+    -o-transition: all 0.1s;
+}
+.claro .dijitMenuBar .rftMainMenuButton.dijitMenuItemSelected {
+    color: #ffffff;
+    font-size: 26px;
+}
+
+/****************************************************
+/*  IndexMenuButton
+/***************************************************/
+.claro .rftIndexMenuButton {
+    display: block;
+    margin: 0;
+    padding: 0;
+    height: 32px;
+    line-height: 32px;
+    vertical-align: middle;
+    text-align: left;
+    transition: all 0.3s;
+    -moz-transition: all 0.3s;
+    -webkit-transition: all 0.3s;
+    -o-transition: all 0.3s;
+}
+.claro .rftIndexMenuButton .dijitButtonNode {
+    border: none;
+    color: #999999;
+    font-size: 24px;
+    font-weight: normal;
+}
+.claro .rftIndexMenuButton .dijitButtonText {
+    padding-bottom: 10px;
+    line-height: 20px;
+    transition: all 0.3s;
+    -moz-transition: all 0.3s;
+    -webkit-transition: all 0.3s;
+    -o-transition: all 0.3s;
+}
+.claro .rftIndexMenuButton .dijitButtonContents {
+    vertical-align: top;
+}
+.claro .rftIndexMenuButton .rftIcon {
+    height: 32px;
+    width: 32px;
+    margin: 0 8px;
+    padding: 0;
+    background-image: url('images/icons/rftIcons32.png');
+    vertical-align: top;
+}
+.claro .oneHeight {
+    height: 100px;
+}
+.claro .oneHeight .dijitButtonNode {
+    margin: 34px 0 0 0;
+}
+.claro .twoHeight {
+    height: 200px;
+}
+.claro .twoHeight .dijitButtonNode {
+    margin: 82px 0 0 0;
+}
+.claro .fourHeight {
+    height: 400px;
+}
+.claro .fourHeight .dijitButtonNode {
+    margin: 184px 0 0 0;
+}
+.claro .rftIndexMenuButton.rftIndexMenuButtonHover,
+.claro .rftIndexMenuButton.rftIndexMenuButtonHover .dijitButtonText {
+    color: #ffffff;
+    transition: all 0.1s;
+    -moz-transition: all 0.1s;
+    -webkit-transition: all 0.1s;
+    -o-transition: all 0.1s;
+}
+.claro .rftIndexMenuButton.rftIndexMenuButtonHover.blue {
+    background: #0072bc;
+}
+.claro .rftIndexMenuButton.rftIndexMenuButtonHover.green {
+    background: #3aa605;
+}
+.claro .rftIndexMenuButton.rftIndexMenuButtonHover.red {
+    background: #8c0310;
+}
+.claro .rftIndexMenuButton.rftIndexMenuButtonHover.purple {
+    background: #6529b7;
+}
+.claro .rftIndexMenuButton.rftIndexMenuButtonHover.orange {
+    background: #ff5b12;
+}
+.claro .rftIndexMenuButton.rftIndexMenuButtonActive {
+    color: #000000;
+    background: #ffffff;
+    transition: all 0.3s;
+    -moz-transition: all 0.3s;
+    -webkit-transition: all 0.3s;
+    -o-transition: all 0.3s;
+}
+.claro .rftIndexMenuButton.rftIndexMenuButtonActive .rftIcon {
+    background-image: url('images/icons/rftIcons32b.png');
+}
+
Index: Dev/trunk/client/qed/css/backup old css/rftIcons.css
===================================================================
--- Dev/trunk/client/qed/css/backup old css/rftIcons.css	(revision 424)
+++ Dev/trunk/client/qed/css/backup old css/rftIcons.css	(revision 424)
@@ -0,0 +1,182 @@
+/*The icon's parent element class decides the icon size and url. (.rftLargeButton .rftIcon / .rftInlineButton .rftIcon, for example)*/
+/*The icon gets two classes: .rftIcon (which sets general spacing/positioning, etc), */
+/*and an icon identifier such as .rftIconAccept (Which sets the background offset.*/
+	.rftIcon {
+		display: inline-block;
+		margin: 0;
+		padding: 0;
+		border: none;
+		background-color: transparent;
+		background-repeat: no-repeat;
+	}
+	
+	/*Settings for different icon sizes and contexts */
+	.rftIcon.rftMainIcon {
+		float: left;
+		width: 32px;
+		height: 32px;
+		background-image: url('images/icons/rftIcons32.png');
+	}
+
+	/*Specific icon indices */
+	/*If extra icons are added to the spritesheets, make sure that shared icons retain the same index!*/
+	/*Also, if possible put common/shared icons at the start of the list to prevent excessively large spritesheets.*/
+
+
+	/*Types */
+	.rftIconApplication {
+		background-position: 0px 0px;
+	}
+	.rftIconDashboard {
+		background-position: -32px 0px;
+	}
+	.rftIconSession {
+		background-position: -64px 0px;
+	}
+	.rftIconSessionActive {
+		background-position: -96px 0px;
+	}
+	.rftIconSessionTemplate {
+		background-position: -128px 0px;
+	}
+	.rftIconSurvey {
+		background-position: -160px 0px;
+	}
+	.rftIconQuestion {
+		background-position: -192px 0px;
+	}
+	.rftIconQuestionFill {
+		background-position: -224px 0px;
+	}
+	.rftIconRespondent {
+		background-position: -256px 0px;
+	}
+	.rftIconAnswer {
+		background-position: -288px 0px;
+	}
+	.rftIconAnswerSet {
+		background-position: -320px 0px;
+	}
+	.rftIconGameData {
+		background-position: -352px 0px;
+	}
+	.rftIconUser {
+		background-position: -384px 0px;
+	}
+	/*Actions*/
+	.rftIconAccept {
+		background-position: -416px 0px;
+	}
+	.rftIconCancel {
+		background-position: -448px 0px;
+	}
+	.rftIconPlus {
+		background-position: -480px 0px;
+	}
+	.rftIconMinus {
+		background-position: -512px 0px;
+	}
+	.rftIconIncrease {
+		background-position: -544px 0px;
+	}
+	.rftIconDecrease {
+		background-position: -576px 0px;
+	}
+	.rftIconDelete {
+		background-position: -608px 0px;
+	}
+	.rftIconHome {
+		background-position: -640px 0px;
+	}
+	.rftIconPreview {
+		background-position: -672px 0px;
+	}
+	.rftIconSave {
+		background-position: -704px 0px;
+	}
+	.rftIconDiscard {
+		background-position: -736px 0px;
+	}
+	.rftIconProperties {
+		background-position: -768px 0px;
+	}
+	.rftIconUndo {
+		background-position: -800px 0px;
+	}
+	.rftIconRedo {
+		background-position: -832px 0px;
+	}
+	.rftIconBack {
+		background-position: -864px 0px;
+	}
+	.rftIconForward {
+		background-position: -896px 0px;
+	}
+	.rftIconRefresh {
+		background-position: -928px 0px;
+	}
+	.rftIconHelp {
+		background-position: -960px 0px;
+	}
+	.rftIconInspect {
+		background-position: -992px 0px;
+	}
+	.rftIconTag {
+		background-position: -1024px 0px;
+	}
+	.rftIconImage {
+		background-position: -1056px 0px;
+	}
+	.rftIconEdit {
+		background-position: -1088px 0px;
+	}
+	.rftIconLock {
+		background-position: -1120px 0px;
+	}
+	.rftIconUnlock {
+		background-position: -1152px 0px;
+	}
+	.rftIconPreset {
+		background-position: -1184px 0px;
+	}
+	.rftIconTextBlock {
+		background-position: -1216px 0px;
+	}
+	.rftIconPageBreak {
+		background-position: -1248px 0px;
+	}
+	.rftIconExternal {
+		background-position: -1280px 0px;
+	}
+	.rftIconInput {
+		background-position: -1312px 0px;
+	}
+	.rftIconPublish {
+		background-position: -1344px 0px;
+	}
+
+	/*Arrows */
+	.rftIconFullArrowUp {
+		background-position: -1696px 0px;
+	}
+	.rftIconFullArrowDown {
+		background-position: -1728px 0px;
+	}
+	.rftIconFullArrowLeft {
+		background-position: -1760px 0px;
+	}
+	.rftIconFullArrowRight {
+		background-position: -1792px 0px;
+	}
+	.rftIconHalfArrowUp {
+		background-position: -1824px 0px;
+	}
+	.rftIconHalfArrowDown {
+		background-position: -1856px 0px;
+	}
+	.rftIconHalfArrowLeft {
+		background-position: -1888px 0px;
+	}
+	.rftIconHalfArrowRight {
+		background-position: -1920px 0px;
+	}
Index: Dev/trunk/client/qed/css/backup old css/rftLineWithButtons.css
===================================================================
--- Dev/trunk/client/qed/css/backup old css/rftLineWithButtons.css	(revision 424)
+++ Dev/trunk/client/qed/css/backup old css/rftLineWithButtons.css	(revision 424)
@@ -0,0 +1,92 @@
+.claro .rftLineWithActions {
+    position: relative;
+    height: 24px;
+    line-height: 24px;
+    font-size: 13px;
+    margin: 4px 0;
+    white-space: nowrap;
+}
+.claro .rftLineWithActions .rftLineWithActionsButtons {
+    position: absolute;
+    right: 0;
+    height: 24px;
+    line-height: 24px;
+    margin: 0;
+    padding: 0;
+}
+.claro .rftLineWithActions .rftLineWithActionsButtons .rftBlockButton {
+    float: right;
+    clear: none;
+}
+.claro .rftLineWithActions .rftLineWithActionsTitle {
+    float: left;
+    margin: 0 8px 0 8px;
+    overflow: hidden;
+}
+
+/* SurveyListView stuff */
+/*
+.claro div.blue.inheritBgColor.dojoDndItemAnchor,
+.claro .blue .inheritBgColor.dojoDndItemAnchor,
+.claro.blue .inheritBgColor.dojoDndItemAnchor {
+    background-color: #0794d1;
+    color: #ffffff;
+}
+.claro div.green.inheritBgColor.dojoDndItemAnchor,
+.claro .green .inheritBgColor.dojoDndItemAnchor,
+.claro.green .inheritBgColor.dojoDndItemAnchor {
+    background-color: #79ca0a;
+    color: #ffffff;
+}
+.claro div.orange.inheritBgColor.dojoDndItemAnchor,
+.claro .orange .inheritBgColor.dojoDndItemAnchor,
+.claro.orange .inheritBgColor.dojoDndItemAnchor {
+    background-color: #ff9140;
+    color: #ffffff;
+}
+.claro div.purple.inheritBgColor.dojoDndItemAnchor,
+.claro .purple .inheritBgColor.dojoDndItemAnchor,
+.claro.purple .inheritBgColor.dojoDndItemAnchor {
+    background-color: #993dec;
+    color: #ffffff;
+}
+.claro div.red.inheritBgColor.dojoDndItemAnchor,
+.claro .red .inheritBgColor.dojoDndItemAnchor,
+.claro.red .inheritBgColor.dojoDndItemAnchor {
+    background-color: #bd0013;
+    color: #ffffff;
+}*/
+
+.claro .rftLineWithActions.dojoDndItem {
+    transition: all 0.2s;
+    -moz-transition: all 0.2s;
+    -webkit-transition: all 0.2s;
+    -o-transition: all 0.2s;
+}
+.claro .rftLineWithActions.dojoDndItem.dojoDndItemBefore {
+    margin-top: 6px;
+    border-top: 6px solid #ffffff;
+}
+.claro .rftLineWithActions.dojoDndItem.dojoDndItemAfter {
+    margin-bottom: 6px;
+    border-bottom: 6px solid #ffffff;
+}
+.claro .dojoDndAvatar {
+    color: #000000;
+}
+.claro .dojoDndSourceMoved .rftLineWithActions.dojoDndItemAnchor {
+    height: 0;
+    overflow: hidden;
+}
+
+
+.claro .rftLineWithActions.dojoDndItemOver {
+    background-image: none;
+    border: none;
+    padding: 2px;
+}
+.claro .rftLineWithActions.dojoDndItemAnchor {
+    background-image: none;
+    padding: 2px;
+    border: none;
+}
Index: Dev/trunk/client/qed/css/backup old css/rftObjectBox.css
===================================================================
--- Dev/trunk/client/qed/css/backup old css/rftObjectBox.css	(revision 424)
+++ Dev/trunk/client/qed/css/backup old css/rftObjectBox.css	(revision 424)
@@ -0,0 +1,15 @@
+/* rftObjectBox */
+.claro .rftObjectBox {
+    margin: 8px 0;
+}
+.claro .rftObjectBox .rftIcon.typeIcon {
+    background-image: url('images/icons/rftIcons32.png');
+    height: 32px;
+    width: 32px;
+    margin: 20px 8px;
+    float: left;
+}
+.claro .rftObjectBox .rftLineWithActions {
+    margin: 0;
+    padding: 0;
+}
Index: Dev/trunk/client/qed/css/backup old css/rftSelector.css
===================================================================
--- Dev/trunk/client/qed/css/backup old css/rftSelector.css	(revision 424)
+++ Dev/trunk/client/qed/css/backup old css/rftSelector.css	(revision 424)
@@ -0,0 +1,34 @@
+.claro .rftSelector {
+    margin: 4px;
+    font-size: 13px;
+}
+.claro .rftSelector .rftLineWithActions {
+    margin: 0;
+}
+.claro .rftSelectorSelected .rftSelectorColor {
+    width: 8px;
+    height: 24px;
+    float: left;
+    margin: 0;
+}
+
+/* Black-on-white setting for non-header lines in the rftSelector */
+.claro .rftSelector .rftSelectorSelected .rftLineWithActions {
+    background-color: #ffffff;
+    color: #000000;
+}
+.claro .rftSelector .rftSelectorOptions .rftLineWithActions {
+    background-color: #ffffff;
+    color: #000000;
+}
+
+/* Colour settings for the rftSelectorColor status indicator */
+.claro .rftSelectorSelected .rftSelectorColor.conflict {
+    background-color: #ff0000;
+}
+.claro .rftSelectorSelected .rftSelectorColor.pending {
+    background-color: #ff8000;
+}
+.claro .rftSelectorSelected .rftSelectorColor.success {
+    background-color: #00ff00;
+}
Index: Dev/trunk/client/qed/css/backup old css/sessionEditor.css
===================================================================
--- Dev/trunk/client/qed/css/backup old css/sessionEditor.css	(revision 424)
+++ Dev/trunk/client/qed/css/backup old css/sessionEditor.css	(revision 424)
@@ -0,0 +1,37 @@
+.rftSessionObject {
+    width: 100px;
+    height: 100px;
+    background: #999999;
+    margin: 16px;
+    display: inline-block;
+}
+.rftSessionObject .rftIcon {
+    width: 32px;
+    height: 32px;
+    margin: 8px 34px 0 34px;
+    background-image: url('images/icons/rftIcons32.png');
+}
+.rftSessionObject label {
+    float: left;
+    clear: both;
+    width: 100px;
+    margin: 0;
+    padding: 0;
+    text-align: center;
+    color: #ffffff;
+    overflow: hidden;
+}
+
+/* Colours */
+.rftSessionObject.blue {
+    background: #0072bc;
+}
+.rftSessionObject.blue.selected {
+    background: #0794d1;
+}
+.rftSessionObject.green {
+    background: #3aa605;
+}
+.rftSessionObject.green.selected {
+    background: #79ca0a;
+}
Index: Dev/trunk/client/qed/css/backup old css/surveyEditor.css
===================================================================
--- Dev/trunk/client/qed/css/backup old css/surveyEditor.css	(revision 424)
+++ Dev/trunk/client/qed/css/backup old css/surveyEditor.css	(revision 424)
@@ -0,0 +1,80 @@
+.claro .surveyEditorPreview .surveyEditorPreviewItem {
+	margin: 8px;
+	display: block;
+	color: #ffffff;
+	/*padding: 0 8px;*/
+}
+
+.claro .surveyEditorPreviewItem .topBorder,
+.claro .surveyEditorPreviewItem .bottomBorder {
+	height: 24px;
+	line-height: 20px;
+}
+
+.claro .surveyEditorPreviewItem .topBorder .title {
+	margin: 0 16px 0 16px;
+	font-weight: bold;
+}
+
+.claro .surveyEditorPreviewItem .topBorderButtons {
+	float: right;
+	margin: 0;
+	padding: 0;
+}
+
+.claro .surveyEditorPreviewItemInner {
+	margin: 0;
+	padding: 0;
+	overflow: hidden;
+}
+
+.claro .surveyEditorPreviewItemContent {
+	padding: 8px;
+	border: 1px solid #ffffff;
+	border-top-width: 0;
+	color: #ffffff;
+}
+
+/* PreviewItem border colours */
+.claro div.orange .surveyEditorPreviewItemContent {
+	border-color: #ff5b12;
+}
+.claro div.blue .surveyEditorPreviewItemContent {
+	border-color: #0794d1;
+}
+.claro div.green .surveyEditorPreviewItemContent {
+	border-color: #79ca0a;
+}
+.claro div.red .surveyEditorPreviewItemContent {
+	border-color: #bd0013;
+}
+.claro div.purple .surveyEditorPreviewItemContent {
+	border-color: #993dec;
+}
+
+/* Drag and drop anchor highlighting */
+.claro .dojoDndItemAnchor, .claro .dojoDndItemOver {
+    background-color: inherit;
+}
+/*
+.claro div.blue.dojoDndItemAnchor .topBorder,
+.claro .blue .dojoDndItemAnchor .topBorder {
+	background-color: #0794d1;
+}
+.claro div.orange.dojoDndItemAnchor .topBorder,
+.claro .orange .dojoDndItemAnchor .topBorder {
+	background-color: #ff9140;
+}
+.claro div.green.dojoDndItemAnchor .topBorder,
+.claro .green .dojoDndItemAnchor .topBorder {
+	background-color: #79ca0a;
+}
+.claro div.red.dojoDndItemAnchor .topBorder,
+.claro .red .dojoDndItemAnchor .topBorder {
+	background-color: #bd0013;
+}
+.claro div.purple.dojoDndItemAnchor .topBorder,
+.claro .purple .dojoDndItemAnchor .topBorder {
+	background-color: #993dec;
+}
+*/
Index: Dev/trunk/client/qed/css/external.css
===================================================================
--- Dev/trunk/client/qed/css/external.css	(revision 424)
+++ Dev/trunk/client/qed/css/external.css	(revision 424)
@@ -0,0 +1,4 @@
+@import url('../../dijit/themes/claro/claro.css');
+@import url('../../dojox/grid/resources/Grid.css');
+@import url('../../dojox/grid/resources/claroGrid.css');
+@import url('../../dojox/widget/Toaster/Toaster.css');
Index: Dev/trunk/client/qed/css/hva-mods.css
===================================================================
--- Dev/trunk/client/qed/css/hva-mods.css	(revision 424)
+++ Dev/trunk/client/qed/css/hva-mods.css	(revision 424)
@@ -0,0 +1,27 @@
+a {
+    color: inherit;
+}
+
+#rft.claro .qedInfo {
+    max-width: 500px;
+}
+
+#rft.claro .qedLabel {
+    display: inline-block;
+    float: left;
+    width: 150px;
+}
+
+#rft.claro .qedField {
+    max-width: 350px;
+    display: inline-block;
+}
+
+#rft.claro .qedField.qedFill {
+    width: 350px;
+}
+
+#rft.claro .qedFieldset {
+    margin: 1em 0px;
+    border: 1px solid grey;
+}
Index: Dev/trunk/client/qed/css/main.css
===================================================================
--- Dev/trunk/client/qed/css/main.css	(revision 424)
+++ Dev/trunk/client/qed/css/main.css	(revision 424)
@@ -0,0 +1,1286 @@
+/* Menu.css */
+@import "external.css";
+@import "hva-mods.css";
+DESCRIPTION {
+  /*
+How to use colour system:
+Apply a combination of at most 1 "colour" class and one or more "modifier" classes.
+Colour classes: Red, Blue, Green, Orange, Purple
+Modifer classes:
+- textColor: Change the font colour of element to the "colour" class combined with.
+- bgColor: Change the background colour to the "colour" class combined with.
+- doesHover: If present in combination with one of the above two modifiers, 
+the element will shift it's background- or text colour to a lighter version on hover.
+- hoverTextColor: Same as .textColor, but only affects elements being hovered over.
+- hoverBgColor: Same as .bgColor, but only affects elements being hovered over.
+NOTE: .doesHover does nothing in combination with the above two modifiers!
+*/
+
+}
+#rft.claro .blue.textColor {
+  color: #0072bc;
+}
+#rft.claro .blue.textColor.doesHover:hover {
+  color: #0794d1;
+}
+#rft.claro .blue.bgColor {
+  background-color: #0072bc;
+  color: #ffffff;
+}
+#rft.claro .blue.bgColor.doesHover:hover {
+  background-color: #0794d1;
+  color: #111111;
+}
+#rft.claro .blue.hoverTextColor:hover {
+  color: #0072bc;
+}
+#rft.claro .blue.hoverBgColor:hover {
+  background-color: #0072bc;
+}
+#rft.claro .red.textColor {
+  color: #8c0310;
+}
+#rft.claro .red.textColor.doesHover:hover {
+  color: #bd0013;
+}
+#rft.claro .red.bgColor {
+  background-color: #8c0310;
+  color: #ffffff;
+}
+#rft.claro .red.bgColor.doesHover:hover {
+  background-color: #bd0013;
+  color: #111111;
+}
+#rft.claro .red.hoverTextColor:hover {
+  color: #8c0310;
+}
+#rft.claro .red.hoverBgColor:hover {
+  background-color: #8c0310;
+}
+#rft.claro .orange.textColor {
+  color: #ff5b12;
+}
+#rft.claro .orange.textColor.doesHover:hover {
+  color: #ff9140;
+}
+#rft.claro .orange.bgColor {
+  background-color: #ff5b12;
+  color: #ffffff;
+}
+#rft.claro .orange.bgColor.doesHover:hover {
+  background-color: #ff9140;
+  color: #111111;
+}
+#rft.claro .orange.hoverTextColor:hover {
+  color: #ff5b12;
+}
+#rft.claro .orange.hoverBgColor:hover {
+  background-color: #ff5b12;
+}
+#rft.claro .green.textColor {
+  color: #25a000;
+}
+#rft.claro .green.textColor.doesHover:hover {
+  color: #63c400;
+}
+#rft.claro .green.bgColor {
+  background-color: #25a000;
+  color: #ffffff;
+}
+#rft.claro .green.bgColor.doesHover:hover {
+  background-color: #63c400;
+  color: #111111;
+}
+#rft.claro .green.hoverTextColor:hover {
+  color: #25a000;
+}
+#rft.claro .green.hoverBgColor:hover {
+  background-color: #25a000;
+}
+#rft.claro .purple.textColor {
+  color: #6529b7;
+}
+#rft.claro .purple.textColor.doesHover:hover {
+  color: #993dec;
+}
+#rft.claro .purple.bgColor {
+  background-color: #6529b7;
+  color: #ffffff;
+}
+#rft.claro .purple.bgColor.doesHover:hover {
+  background-color: #993dec;
+  color: #111111;
+}
+#rft.claro .purple.hoverTextColor:hover {
+  color: #6529b7;
+}
+#rft.claro .purple.hoverBgColor:hover {
+  background-color: #6529b7;
+}
+#rft.claro .textColor,
+#rft.claro .hoverTextColor {
+  transition: color 0.2s;
+}
+#rft.claro .bgColor,
+#rft.claro .hoverBgColor {
+  transition: background-color 0.2s;
+}
+/* This stylesheet compensates for the restoration of the claro style to its original specs. (21-6-2012)
+ * These changes should be moved to relevant stylesheets as soon as possible!
+*/
+/* Menu.css */
+.claro .topbar .dijitMenuitem {
+  width: 90px;
+  background-image: none;
+  background-position: top;
+  text-align: center;
+}
+.claro .dijitMenuPassive .dijitMenuItemHover,
+.claro .dijitMenuPassive .dijitMenuItemSelected {
+  background-color: transparent;
+  color: #ffffff;
+  border: none;
+  padding: 0 4px;
+}
+.claro .dijitMenuPassive .dijitMenuItemActive {
+  background-position: top;
+}
+/* layout/BorderContainer.css */
+.claro .dijitSplitContainer-child,
+.claro .dijitBorderContainer-child {
+  border: none;
+}
+.claro .dijitTabContainerTop-dijitContentPane,
+.claro .dijitTabContainerLeft-dijitContentPane,
+.claro .dijitTabContainerBottom-dijitContentPane,
+.claro .dijitTabContainerRight-dijitContentPane,
+.claro .dijitAccordionContainer-dijitContentPane {
+  background-color: transparent;
+}
+.claro .dijitSplitContainer-dijitContentPane,
+.claro .dijitBorderContainer-dijitContentPane {
+  background-color: transparent;
+}
+/* layout/TabContainer.css */
+.claro .dijitTabPaneWrapper {
+  background: transparent;
+}
+.claro .dijitTabInnerDiv {
+  background-color: transparent;
+  color: #999999;
+  border: none;
+}
+.claro .dijitTabContent {
+  border: none;
+}
+.claro .dijitTabHover .dijitTabInnerDiv {
+  background-color: transparent;
+  color: #ffffff;
+}
+.claro .dijitTabActive .dijitTabInnerDiv {
+  color: #0072bc;
+}
+.claro .dijitTabChecked .dijitTabInnerDiv {
+  background-color: transparent;
+  color: #ffffff;
+}
+.claro .dijitTabContent {
+  border: 1px solid #999999;
+}
+.claro .dijitTabHover .dijitTabContent {
+  border-color: #ffffff;
+}
+.claro .dijitTabActive .dijitTabContent {
+  border-color: transparent;
+}
+.claro .dijitTabChecked .dijitTabContent {
+  color: #ffffff;
+  border-color: #0072bc;
+}
+/*lefttabs*/
+.claro .dijitTabContainerLeft-tabs .dijitTab {
+  border-width: 1px;
+  left: 0;
+  margin-bottom: 4px;
+  margin-right: 8px;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabInnerDiv {
+  border: none;
+  background: transparent;
+  background-image: none;
+  background-position: top;
+  background-repeat: no-repeat;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabContent {
+  padding: 3px 8px 4px 8px;
+  background-image: none;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabChecked .dijitTabContent {
+  padding-right: 8px;
+  background-image: none;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabChecked .dijitTabInnerDiv {
+  -webkit-box-shadow: none;
+  -moz-box-shadow: none;
+  box-shadow: none;
+}
+.claro .dijitTabContainerLeft-tabs .dijitTabInnerDiv,
+.claro .dijitTabContainerLeft-tabs .dijitTabContent {
+  -moz-border-radius: 0;
+  border-radius: 0;
+  border: none;
+}
+*:focus {
+  outline: none;
+}
+html,
+body {
+  width: 100%;
+  height: 100%;
+  background-color: #333333;
+}
+#rft.claro {
+  font-family: 'Segoe UI', Helvetica, Verdana, Arial, sans-serif;
+  font-size: 13px;
+  color: #111111;
+}
+#rft.claro .dijitBorderContainer,
+#rft.claro .dijitContentPane,
+#rft.claro .dijitTabContainer,
+#rft.claro .dijitTabPaneWrapper {
+  background: transparent;
+  border: none;
+}
+#rft.claro h1 {
+  margin: 0 0 0 0;
+  padding: 0 10px 8px 10px;
+  float: left;
+  clear: left;
+  font-size: 48px;
+  color: #999999;
+  line-height: 48px;
+  font-weight: normal;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+#rft.claro h2 {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  color: #999999;
+  font-size: 22px;
+  line-height: 30px;
+}
+#rft.claro h2 .rftIcon {
+  width: 32px;
+  height: 32px;
+  margin: 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons32.png');
+  margin-right: 8px;
+}
+#rft.claro h3 {
+  margin: 0 0 0 0;
+  font-size: 18px;
+  margin-bottom: 4px;
+}
+#rft.claro h4 {
+  font-size: 16px;
+}
+#rft.claro .topbar {
+  overflow-y: hidden;
+}
+#rft.claro .topbar .dijitMenuBar {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  background-color: transparent;
+  float: right;
+  clear: right;
+  margin-top: 16px;
+}
+#rft.claro .topbar .breadcrumbs {
+  color: #999999;
+}
+#rft.claro .topbar .breadcrumbs .breadcrumb {
+  font-size: 13px;
+}
+#rft.claro .topbar .breadcrumbs .breadcrumb.breadcrumbCurrent {
+  color: #ffffff;
+  font-size: 15px;
+}
+#rft.claro .topbar .breadcrumbs .breadcrumb.breadcrumbHover {
+  color: #0072bc;
+}
+#rft.claro .dijitContentPane.page {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+}
+#rft.claro .dijitContentPane.content {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  display: block;
+  clear: both;
+  background-color: #555555;
+  background-image: -webkit-gradient(50% 50%, circle, #666666 1%, #444444 100%);
+  -moz-background-image: gradient(50% 50%, circle, #666666 1%, #444444 100%);
+  -o-background-image: gradient(50% 50%, circle, #666666 1%, #444444 100%);
+  -ms-background-image: gradient(50% 50%, circle, #666666 1%, #444444 100%);
+  background-image: gradient(50% 50%, circle, #666666 1%, #444444 100%);
+}
+#rft.claro .dijitContentPane.content .dijitBorderContainer {
+  padding: 4px;
+}
+#rft.claro .loginLabel {
+  float: left;
+  clear: left;
+  width: 100px;
+}
+#rft.claro .loginInput {
+  width: 150px;
+}
+#rft.claro .rftMultipleChoiceWidget {
+  display: table;
+}
+#rft.claro .rftMultipleChoiceWidget .row {
+  display: table-row;
+}
+#rft.claro .rftMultipleChoiceWidget .rowBox {
+  display: table-cell;
+}
+#rft.claro .rftMultipleChoiceWidget .rowText {
+  display: table-cell;
+  width: 100px;
+}
+#rft.claro .rftMultipleChoiceWidget .rowBtn {
+  display: table-cell;
+  width: 30px;
+}
+#rft.claro .verticalTabList {
+  width: 190px;
+}
+#rft.claro .dijitTab {
+  -webkit-transition: all 0.2s;
+  -moz-transition: all 0.2s;
+  -o-transition: all 0.2s;
+  -ms-transition: all 0.2s;
+  transition: all 0.2s;
+  background-color: transparent;
+  padding: 4px 8px;
+  color: #999999;
+  overflow: hidden;
+}
+#rft.claro .dijitTabContainerLeft-tabs {
+  border: none;
+  padding: 4px;
+}
+#rft.claro .dijitTabContainerLeft-tabs .dijitTab {
+  margin: 4px;
+  width: 200px;
+  min-height: 30px;
+  border: 1px solid #999999;
+}
+#rft.claro .dijitTabContainerLeft-tabs .dijitTab .dijitTabContent {
+  min-height: 30px;
+  line-height: 30px;
+  width: 190px;
+}
+#rft.claro .dijitTabContainerLeft-tabs .dijitTab.dijitTabChecked {
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+  color: #ffffff;
+  border: 1px solid transparent;
+}
+#rft.claro .dijitTabContainerLeft-tabs .dijitTab.dijitTabChecked.dijitTabHover {
+  border: 1px solid transparent;
+}
+#rft.claro .dijitTabContainerLeft-tabs .dijitTab.dijitTabHover {
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+  color: #ffffff;
+  border-color: #ffffff;
+}
+#rft.claro .dijitTabContainerLeft-tabs .dijitTab.dijitTabActive {
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+  color: #999999;
+}
+#rft.claro.blue .dijitTabChecked,
+#rft.claro .blue .dijitTabChecked,
+#rft.claro div.blue.dijitTabChecked {
+  background-color: #0072bc;
+}
+#rft.claro.green .dijitTabChecked,
+#rft.claro .green .dijitTabChecked,
+#rft.claro div.green.dijitTabChecked {
+  background-color: #25a000;
+}
+#rft.claro.red .dijitTabChecked,
+#rft.claro .red .dijitTabChecked,
+#rft.claro div.red.dijitTabChecked {
+  background-color: #8c0310;
+}
+#rft.claro.orange .dijitTabChecked,
+#rft.claro .orange .dijitTabChecked,
+#rft.claro div.orange.dijitTabChecked {
+  background-color: #ff5b12;
+}
+#rft.claro.purple .dijitTabChecked,
+#rft.claro .purple .dijitTabChecked,
+#rft.claro div.purple.dijitTabChecked {
+  background-color: #6529b7;
+}
+#rft.claro fieldset {
+  border: none;
+}
+#rft.claro fieldset.align input,
+#rft.claro fieldset.align .dijitTextBox,
+#rft.claro fieldset.align textarea {
+  margin-left: 0;
+}
+#rft.claro fieldset.align label {
+  color: #ffffff;
+  display: inline-block;
+  width: 100px !important;
+}
+#rft.claro .newline {
+  float: left;
+  clear: left;
+  display: block;
+}
+#rft.claro .floatRight {
+  float: right;
+  margin: 0 0 0 0;
+}
+#rft.claro .rftLineListView {
+  max-width: 200px;
+  max-height: 500px;
+}
+#rft.claro .rftLineListView .rftLineListViewContent {
+  width: auto;
+  overflow: auto;
+}
+#rft.claro .rftIcon {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  float: left;
+  display: inline-block;
+  border: none;
+  background-color: transparent;
+  background-repeat: no-repeat;
+}
+#rft .rftIconApplication {
+  background-position: 0px 0px;
+}
+#rft .rftIconDashboard {
+  background-position: -32px 0px;
+}
+#rft .rftIconSession {
+  background-position: -64px 0px;
+}
+#rft .rftIconSessionActive {
+  background-position: -96px 0px;
+}
+#rft .rftIconSessionTemplate {
+  background-position: -128px 0px;
+}
+#rft .rftIconSurvey {
+  background-position: -160px 0px;
+}
+#rft .rftIconQuestion {
+  background-position: -192px 0px;
+}
+#rft .rftIconQuestionFill {
+  background-position: -224px 0px;
+}
+#rft .rftIconRespondent {
+  background-position: -256px 0px;
+}
+#rft .rftIconAnswer {
+  background-position: -288px 0px;
+}
+#rft .rftIconAnswerSet {
+  background-position: -320px 0px;
+}
+#rft .rftIconGameData {
+  background-position: -352px 0px;
+}
+#rft .rftIconUser {
+  background-position: -384px 0px;
+}
+#rft .rftIconAccept {
+  background-position: -416px 0px;
+}
+#rft .rftIconCancel {
+  background-position: -448px 0px;
+}
+#rft .rftIconPlus {
+  background-position: -480px 0px;
+}
+#rft .rftIconMinus {
+  background-position: -512px 0px;
+}
+#rft .rftIconIncrease {
+  background-position: -544px 0px;
+}
+#rft .rftIconDecrease {
+  background-position: -576px 0px;
+}
+#rft .rftIconDelete {
+  background-position: -608px 0px;
+}
+#rft .rftIconHome {
+  background-position: -640px 0px;
+}
+#rft .rftIconPreview {
+  background-position: -672px 0px;
+}
+#rft .rftIconSave {
+  background-position: -704px 0px;
+}
+#rft .rftIconDiscard {
+  background-position: -736px 0px;
+}
+#rft .rftIconProperties {
+  background-position: -768px 0px;
+}
+#rft .rftIconUndo {
+  background-position: -800px 0px;
+}
+#rft .rftIconRedo {
+  background-position: -832px 0px;
+}
+#rft .rftIconBack {
+  background-position: -864px 0px;
+}
+#rft .rftIconForward {
+  background-position: -896px 0px;
+}
+#rft .rftIconRefresh {
+  background-position: -928px 0px;
+}
+#rft .rftIconHelp {
+  background-position: -960px 0px;
+}
+#rft .rftIconInspect {
+  background-position: -992px 0px;
+}
+#rft .rftIconTag {
+  background-position: -1024px 0px;
+}
+#rft .rftIconImage {
+  background-position: -1056px 0px;
+}
+#rft .rftIconEdit {
+  background-position: -1088px 0px;
+}
+#rft .rftIconLock {
+  background-position: -1120px 0px;
+}
+#rft .rftIconUnlock {
+  background-position: -1152px 0px;
+}
+#rft .rftIconPreset {
+  background-position: -1184px 0px;
+}
+#rft .rftIconTextBlock {
+  background-position: -1216px 0px;
+}
+#rft .rftIconPageBreak {
+  background-position: -1248px 0px;
+}
+#rft .rftIconExternal {
+  background-position: -1280px 0px;
+}
+#rft .rftIconInput {
+  background-position: -1312px 0px;
+}
+#rft .rftIconPublish {
+  background-position: -1344px 0px;
+}
+#rft .rftIconFullArrowUp {
+  background-position: -1696px 0px;
+}
+#rft .rftIconFullArrowDown {
+  background-position: -1728px 0px;
+}
+#rft .rftIconFullArrowLeft {
+  background-position: -1760px 0px;
+}
+#rft .rftIconFullArrowRight {
+  background-position: -1792px 0px;
+}
+#rft .rftIconHalfArrowUp {
+  background-position: -1824px 0px;
+}
+#rft .rftIconHalfArrowDown {
+  background-position: -1856px 0px;
+}
+#rft .rftIconHalfArrowLeft {
+  background-position: -1888px 0px;
+}
+#rft .rftIconHalfArrowRight {
+  background-position: -1920px 0px;
+}
+#rft.claro .rftSelector {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  margin: 4px;
+}
+#rft.claro .rftSelector .rftLineWithActions {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+}
+#rft.claro .rftSelector .rftSelectorSelected .rftSelectorIndicator {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  float: left;
+  width: 8px;
+  height: 24px;
+  background-color: #bedead;
+}
+#rft.claro .rftSelector .rftSelectorSelected .rftSelectorIndicator.conflict {
+  background-color: #ff0000;
+}
+#rft.claro .rftSelector .rftSelectorSelected .rftSelectorIndicator.pending {
+  background-color: #ff8000;
+}
+#rft.claro .rftSelector .rftSelectorSelected .rftSelectorIndicator.success {
+  background-color: #00ff00;
+}
+#rft.claro .rftSelector .rftSelectorOptions .rftLineWithActions,
+#rft.claro .rftSelector .rftSelectorSelected .rftLineWithActions {
+  background-color: #ffffff;
+  color: #111111;
+}
+#rft.claro .rftSelector .rftSelectorOptions .rftLineWithActions .rftInlineButton .rftIcon {
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16b.png');
+}
+#rft.claro .rftLineWithActions {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  position: relative;
+  height: 24px;
+  white-space: nowrap;
+  margin: 4px 0;
+  color: #ffffff;
+  background-color: #0072bc;
+}
+#rft.claro .rftLineWithActions.dojoDndItem {
+  -webkit-transition: all 0.2s;
+  -moz-transition: all 0.2s;
+  -o-transition: all 0.2s;
+  -ms-transition: all 0.2s;
+  transition: all 0.2s;
+}
+#rft.claro .rftLineWithActions.dojoDndItem.dojoDndItemBefore {
+  margin-top: 6px;
+  border-top: 6px solid #ffffff;
+}
+#rft.claro .rftLineWithActions.dojoDndItem.dojoDndItemAfter {
+  margin-bottom: 6px;
+  border-bottom: 6px solid #ffffff;
+}
+#rft.claro .rftLineWithActions.dojoDndItem.dojoDndItemover,
+#rft.claro .rftLineWithActions.dojoDndItem.dojoDndItemAnchor {
+  background-image: none;
+  border: none;
+  padding: 2px;
+  background-color: rgba(255, 255, 255, 0.1);
+}
+#rft.claro .rftLineWithActions .rftLineWithActionsTitle {
+  float: left;
+  margin: 0 8px;
+  overflow: hidden;
+  white-space: nowrap;
+  word-wrap: break-word;
+  line-height: 24px;
+}
+#rft.claro .rftLineWithActions .rftLineWithActionsButtons {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  line-height: 24px;
+  height: 24px;
+  position: absolute;
+  right: 0;
+  float: left;
+}
+#rft.claro .dojoDndSourceMoved .rftLineWithActions.dojoDndItemAnchor {
+  height: 0;
+}
+#rft.claro .rftIndexMenuBlock {
+  width: 400px;
+  height: 400px;
+  background: #444444;
+  float: left;
+  margin: 16px;
+  overflow: hidden;
+}
+#rft.claro .rftIndexMenuBlock:hover .rftIndexMenuMask {
+  margin-top: -400px;
+}
+#rft.claro .rftIndexMenuMask {
+  width: 400px;
+  height: 400px;
+  background: #444444;
+  color: #999999;
+  margin-top: 0;
+}
+#rft.claro .rftIndexMenuMask .label {
+  color: #999999;
+  font-size: 32px;
+  height: 32px;
+  line-height: 32px;
+  margin-top: 184px;
+  float: left;
+}
+#rft.claro .rftIndexMenuMask .rftIcon {
+  width: 32px;
+  height: 32px;
+  margin: 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons32.png');
+  float: left;
+  margin: 184px 8px 0 8px;
+}
+#rft.claro .rftIndexMenuButton {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  -webkit-transition: all 0.3s;
+  -moz-transition: all 0.3s;
+  -o-transition: all 0.3s;
+  -ms-transition: all 0.3s;
+  transition: all 0.3s;
+  line-height: 32px;
+  border: none;
+}
+#rft.claro .rftIndexMenuButton .dijitButtonNode {
+  border: none;
+  color: #999999;
+  font-size: 22px;
+}
+#rft.claro .rftIndexMenuButton .dijitButtonNode .dijitButtonContents {
+  vertical-align: top;
+}
+#rft.claro .rftIndexMenuButton .dijitButtonNode .dijitButtonContents .dijitButtonText {
+  padding-bottom: 10px;
+  line-height: 20px;
+}
+#rft.claro .rftIndexMenuButton .dijitButtonNode .dijitButtonContents .rftIcon {
+  width: 32px;
+  height: 32px;
+  margin: 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons32.png');
+  margin: 0 8px;
+}
+#rft.claro .rftIndexMenuButton.oneHeight {
+  height: 100px;
+  width: 400px;
+}
+#rft.claro .rftIndexMenuButton.oneHeight .dijitButtonNode {
+  margin: 38px 0 0 0;
+}
+#rft.claro .rftIndexMenuButton.twoHeight {
+  height: 200px;
+  width: 400px;
+}
+#rft.claro .rftIndexMenuButton.twoHeight .dijitButtonNode {
+  margin: 88px 0 0 0;
+}
+#rft.claro .rftIndexMenuButton.fourHeight {
+  height: 400px;
+  width: 400px;
+}
+#rft.claro .rftIndexMenuButton.fourHeight .dijitButtonNode {
+  margin: 188px 0 0 0;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonHover {
+  color: #ffffff;
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonHover .dijitButtonText {
+  color: #ffffff;
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonHover.blue {
+  background-color: #0072bc;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonHover.red {
+  background-color: #8c0310;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonHover.green {
+  background-color: #25a000;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonHover.orange {
+  background-color: #ff5b12;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonHover.purple {
+  background-color: #6529b7;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonActive {
+  -webkit-transition: all 0.3s;
+  -moz-transition: all 0.3s;
+  -o-transition: all 0.3s;
+  -ms-transition: all 0.3s;
+  transition: all 0.3s;
+  color: #111111;
+  background: #ffffff;
+}
+#rft.claro .rftIndexMenuButton.rftIndexMenuButtonActive .rftIcon {
+  width: 32px;
+  height: 32px;
+  margin: 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons32b.png');
+}
+#rft.claro .dijitMenuPopup .dijitMenu {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  color: #999999;
+  background-color: #333333;
+  border: none;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem {
+  color: #999999;
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  background-color: #333333;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemHover .dijitMenuItemLabel,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemActive .dijitMenuItemLabel,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemSelected .dijitMenuItemLabel {
+  color: #ffffff;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemHover.red,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemActive.red,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemSelected.red {
+  background-color: #8c0310;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemHover.blue,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemActive.blue,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemSelected.blue {
+  background-color: #0072bc;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemHover.green,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemActive.green,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemSelected.green {
+  background-color: #25a000;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemHover.orange,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemActive.orange,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemSelected.orange {
+  background-color: #ff5b12;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemHover.purple,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemActive.purple,
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemSelected.purple {
+  background-color: #6529b7;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem .rftIcon {
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16.png');
+  margin: 0 0 0 0;
+  margin-right: 8px;
+}
+#rft.claro .dijitMenuPopup .dijitMenu .dijitMenuItem.dijitMenuItemActive .rftIcon {
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16b.png');
+}
+#rft.claro .dijitMenuBar .rftMainMenuButton {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+  border: none;
+  height: 30px;
+  width: auto;
+  background: transparent;
+  color: #999999;
+  text-align: center;
+  font-size: 24px;
+  line-height: 30px;
+  padding: 0 4px;
+  margin: 0 5px;
+}
+#rft.claro .dijitMenuBar .rftMainMenuButton.dijitMenuItemHover,
+#rft.claro .dijitMenuBar .rftMainMenuButton.dijitMenuitemActive {
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+}
+#rft.claro .dijitMenuBar .rftMainMenuButton.dijitMenuItemHover {
+  color: #ffffff;
+  font-size: 26px;
+}
+#rft.claro .dijitMenuBar .rftMainMenuButton.dijitMenuItemActive {
+  color: #0072bc;
+  font-size: 26px;
+}
+#rft.claro .dijitMenuBar .rftMainMenuButton.dijitMenuItemSelected {
+  font-size: 26px;
+  color: #ffffff;
+}
+#rft.claro .dojoxTitleGroup .dijitTitlePane {
+  margin: 0 0 0 0;
+}
+#rft.claro .dojoxTitleGroup .dijitTitlePane .dijitTitlePaneTitle {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  margin: 0 0 0 0;
+  background-color: #ff5b12;
+  border: none;
+  padding: 0 4px;
+  height: 24px;
+}
+#rft.claro .dojoxTitleGroup .dijitTitlePane .dijitTitlePaneTitle.dijitTitlePaneTitleHover,
+#rft.claro .dojoxTitleGroup .dijitTitlePane .dijitTitlePaneTitle.dijitTitlePaneTitleFocused {
+  background-color: #ff9140;
+}
+#rft.claro .dojoxTitleGroup .dijitTitlePane .dijitTitlePaneTextNode {
+  color: #ffffff;
+  font-size: 13px;
+  line-height: 24px;
+}
+#rft.claro .dojoxTitleGroup .dijitTitlePane .dijitTitlePaneContentOuter {
+  background-color: #444444;
+  border: none;
+}
+#rft.claro .dojoxTitleGroup .dijitTitlePane .dijitTitlePaneTitleFocus {
+  margin: 0 0 0 0;
+}
+#rft.claro .rftSurveyListView .rftSurveyListViewContent {
+  min-height: 300px;
+  background: #444444;
+  overflow: auto;
+}
+#rft.claro .rftLargeButton {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  margin-right: 16px;
+  height: 24px;
+}
+#rft.claro .rftLargeButton*,
+#rft.claro .rftLargeButton * {
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+#rft.claro .rftLargeButton .dijitButtonNode {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  border: none;
+  height: 24px;
+  background: transparent;
+  color: #999999;
+  font-size: 20px;
+  -webkit-transition: all 0.3s;
+  -moz-transition: all 0.3s;
+  -o-transition: all 0.3s;
+  -ms-transition: all 0.3s;
+  transition: all 0.3s;
+}
+#rft.claro .rftLargeButton .dijitButtonNode .rftIcon {
+  width: 24px;
+  height: 24px;
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons24.png');
+}
+#rft.claro .rftLargeButton .dijitButtonNode .dijitButtonText {
+  line-height: 24px;
+  margin: 0 0 0 0;
+  padding-left: 8px;
+}
+#rft.claro .rftLargeButton.black .dijitButtonNode .rftIcon {
+  width: 24px;
+  height: 24px;
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons24b.png');
+}
+#rft.claro .rftLargeButton.rftLargeButtonHover .dijitButtonNode,
+#rft.claro .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+}
+#rft.claro span.blue.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+#rft.claro .blue .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+  color: #0794d1;
+}
+#rft.claro span.orange.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+#rft.claro .orange .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+  color: #ff9140;
+}
+#rft.claro span.green.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+#rft.claro .green .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+  color: #63c400;
+}
+#rft.claro span.red.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+#rft.claro .red .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+  color: #bd0013;
+}
+#rft.claro span.purple.rftLargeButton.rftLargeButtonActive .dijitButtonNode,
+#rft.claro .purple .rftLargeButton.rftLargeButtonActive .dijitButtonNode {
+  color: #993dec;
+}
+#rft.claro .rftBlockButton {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  margin: 0 0 0 0;
+  height: 24px;
+  vertical-align: top;
+}
+#rft.claro .rftBlockButton .dijitButtonContents {
+  height: 24px;
+}
+#rft.claro .rftBlockButton .dijitButtonNode {
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  -webkit-transition: all 0.3s;
+  -moz-transition: all 0.3s;
+  -o-transition: all 0.3s;
+  -ms-transition: all 0.3s;
+  transition: all 0.3s;
+  line-height: 24px;
+  vertical-align: top;
+  height: 24px;
+  padding: 0 4px;
+  border: none;
+  color: #ffffff;
+  font-size: 13px;
+}
+#rft.claro .rftBlockButton .dijitButtonNode .dijitButtonText {
+  line-height: 24px;
+}
+#rft.claro .rftBlockButton .dijitButtonNode .rftIcon {
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16.png');
+}
+#rft.claro .rftBlockButton.rftBlockButtonHover,
+#rft.claro .rftBlockButton.rftBlockButtonActive {
+  -webkit-transition: all 0.1s;
+  -moz-transition: all 0.1s;
+  -o-transition: all 0.1s;
+  -ms-transition: all 0.1s;
+  transition: all 0.1s;
+}
+#rft.claro .rftBlockButton.rftBlockButtonHover .rftIcon,
+#rft.claro .rftBlockButton.rftBlockButtonActive .rftIcon {
+  vertical-align: top;
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16b.png');
+}
+#rft.claro .rftInlineButton {
+  float: right;
+  height: 24px;
+  width: 24px;
+}
+#rft.claro .rftInlineButton .dijitButtonNode {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  border: none;
+  background-image: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  border-radius: 0;
+  width: 24px;
+  height: 24px;
+  border: none;
+}
+#rft.claro .rftInlineButton .rftIcon {
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16.png');
+}
+#rft.claro .rftInlineButton.white .rftIcon {
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16.png');
+}
+#rft.claro .rftInlineButton.black .rftIcon {
+  width: 16px;
+  height: 16px;
+  margin: 4px 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons16b.png');
+}
+#rft.claro .rftObjectBox {
+  margin: 8px 0;
+}
+#rft.claro .rftObjectBox .rftLineWithActions {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+}
+#rft.claro .rftSessionObject {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  width: 100px;
+  height: 100px;
+  background: #999999;
+  margin: 8px;
+  display: inline-block;
+}
+#rft.claro .rftSessionObject .rftIcon {
+  width: 32px;
+  height: 32px;
+  margin: 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons32.png');
+  margin: 8px 34px 0 34px;
+}
+#rft.claro .rftSessionObject label {
+  margin: 0 0 0 0;
+  padding: 0 0 0 0;
+  float: left;
+  clear: both;
+  width: 100px;
+  text-align: center;
+  color: #ffffff;
+  overflow: hidden;
+}
+#rft.claro .rftSessionObject.blue {
+  background-color: #0072bc;
+}
+#rft.claro .rftSessionObject.blue.selected {
+  background-color: #0794d1;
+}
+#rft.claro .rftSessionObject.green {
+  background-color: #25a000;
+}
+#rft.claro .rftSessionObject.green.selected {
+  background-color: #63c400;
+}
+#rft.claro .rftSessionObject.red {
+  background-color: #8c0310;
+}
+#rft.claro .rftSessionObject.red.selected {
+  background-color: #bd0013;
+}
+#rft.claro .page_questions .rftSelector .rftSelectorCategory .rftLineWithActions {
+  background-color: #ff5b12;
+}
+#rft.claro .page_questions .rftSelector .rftSelectorSelected .rftLineWithActions {
+  background-color: #ffffff;
+  color: #111111;
+}
+#rft.claro .page_questions .rftSelector .rftSelectorSelected .rftBlockButton {
+  background-color: #ff00ff;
+}
+#rft.claro .page_questions .rftSelector .rftSelectorSelected .rftBlockButton .dijitButtonNode {
+  background-color: #ff5b12;
+}
+#rft.claro .page_questions .rftSelector .rftSelectorSelected .rftBlockButton.dijitHover .dijitButtonNode {
+  background-color: #ffffff;
+  color: #111111;
+}
+#rft.claro .page_questions .rftSelector .rftSelectorSelected .rftBlockButton.dijitActive .dijitButtonNode {
+  background-color: #ff9140;
+  color: #ffffff;
+}
+#rft.claro .page_sessions .rftObjectBox {
+  padding: 0 0 0 0;
+  color: #ffffff;
+}
+#rft.claro .page_sessions .rftObjectBox .typeIcon.rftIcon {
+  width: 32px;
+  height: 32px;
+  margin: 0;
+  padding: 0 0 0 0;
+  background-image: url('images/icons/rftIcons32.png');
+}
+#rft.claro .page_sessions .rftObjectBox .rftLineWithActions {
+  background-color: #25a000;
+}
+#rft.claro .page_sessions .rftObjectBox .rftLineWithActions .rftBlockButton .dijitButtonNode {
+  background-color: #25a000;
+}
+#rft.claro .page_sessions .rftObjectBox .rftLineWithActions .rftBlockButton.dijitHover .dijitButtonNode {
+  background-color: #ffffff;
+  color: #111111;
+}
+#rft.claro .page_sessions .rftObjectBox .rftLineWithActions .rftBlockButton.dijitActive .dijitButtonNode {
+  background-color: #63c400;
+  color: #ffffff;
+}
Index: Dev/trunk/client/qed/elastic/ElasticReadStore.js
===================================================================
--- Dev/trunk/client/qed/elastic/ElasticReadStore.js	(revision 424)
+++ Dev/trunk/client/qed/elastic/ElasticReadStore.js	(revision 424)
@@ -0,0 +1,53 @@
+define([
+    'dojo/_base/declare',
+    "dojo/_base/json",
+    'dojo/_base/lang',
+    'dojo/_base/xhr',
+    'dojox/data/QueryReadStore'
+    ],function(declare, json, lang, xhr, QueryReadStore) {
+
+    return declare(QueryReadStore, {
+        fetch:function(request){
+            var attr = Object.keys(request.query)[0];
+            if (request.query[attr].length == 0) {
+                return 0;
+            }
+            var q = request.query[attr];
+
+            request.serverQuery = json.toJson({ 
+                query: {
+                    query_string: {
+                        default_field: attr, 
+                        query: q
+                    }
+                }
+            });
+            return this.inherited(arguments);
+          },
+        _fetchItems: function(request, fetchHandler, errorHandler){
+            var serverQuery = request.serverQuery;
+            var xhrHandler = xhr.post({
+                url: this.url,
+                handleAs: "json",
+                postData: serverQuery
+            }).then(lang.hitch(this, function(data){
+                this._xhrFetchHandler(data, request, fetchHandler, errorHandler);
+            }),function(error){
+                errorHandler(error, request);
+            });
+            request.abort = function(){
+                xhrHandler.cancel();
+            };
+        },
+        _xhrFetchHandler: function(data, request, fetchHandler, errorHandler) {
+            data = this._filterResponse(data);
+            this._items = [];
+            var numHits = data.hits.total || -1;
+            if(numHits > 0) {
+                this._items.push({i:data.hits.hits[0]._source, r:this, n:0});
+            }
+            fetchHandler(this._items, request, data.hits.total);
+            this._numRows = data.hits.total;
+        }
+    });
+})
Index: Dev/trunk/client/qed/elastic/ElasticSearchFilteringSelect.js
===================================================================
--- Dev/trunk/client/qed/elastic/ElasticSearchFilteringSelect.js	(revision 424)
+++ Dev/trunk/client/qed/elastic/ElasticSearchFilteringSelect.js	(revision 424)
@@ -0,0 +1,18 @@
+define([
+    'dojo/_base/declare',
+    'dijit/form/FilteringSelect'
+], function(declare, FilteringSelect) {
+    return declare(FilteringSelect, {
+         // custom min input character count to trigger search
+         minKeyCount: 3,
+
+         // override search method, count the input length
+         _startSearch: function (/*String*/key) {
+             if (!key || key.length < this.minKeyCount) {
+                 this.closeDropDown();
+                 return;
+             }
+             this.inherited(arguments);
+         }
+    });
+})
Index: Dev/trunk/client/qed/lib/async.js
===================================================================
--- Dev/trunk/client/qed/lib/async.js	(revision 424)
+++ Dev/trunk/client/qed/lib/async.js	(revision 424)
@@ -0,0 +1,128 @@
+define([
+     'dojo/_base/array',
+     'dojo/_base/lang',
+     'dojo/when',
+     'dojo/Deferred'
+],function(array,lang,when,Deferred){
+
+    /** Execute possible async functions in sequence
+     * Execute functions in order. When a function returns a Promise,
+     * the next function is only executed when the promise resolves.
+     * If the function returns a value, the next function is executed
+     * synchronously. The return value of every function is passed as argument
+     * to the next.
+     * Returns the return value of the last function in the chain.
+     */
+    function seq(functions,ctx) {
+        var d = new Deferred();
+
+        var cancelled = false;
+        var running = null;
+        function cancel(err) {
+            if ( cancelled ) return;
+            cancelled = true;
+            running && running.cancel && !running.isFulfilled() && running.cancel();
+            d.reject(err);
+        }
+
+        function update(fs,arg) {
+            if ( cancelled ) return;
+            if ( fs.length > 0 ) {
+                try {
+                    var f = fs.shift();
+                    running = when(f.call(ctx,arg))
+                    .then(function(res){
+                        update(fs,res);
+                    },function(err){
+                        cancel(err);
+                    });
+                } catch(err) {
+                    cancel(err);
+                }
+            } else {
+                d.resolve(arg);
+            }
+        }
+
+        update(functions);
+
+        return d.promise;
+    }
+
+    /** Execute possible async functions in parallel
+     * Execute all functions in parallel, resolve only when all have resolved.
+     * NB. When a function is not async, it will fully complete before the next
+     * async function is started. If you mix async and non async functions, put
+     * the sync functions last to fully exploit the async ones.
+     * Return an array with all the return values of the functions.
+     */
+    function par(functions,ctx) {
+        var d = new Deferred(cancel);
+
+        var cancelled = false;
+        var running = [];
+        function cancel(err) {
+            if (cancelled) return;
+            cancelled = true;
+            array.forEach(running,function(running){
+                running && running.cancel && !running.isFulfilled() && running.cancel();
+            });
+            d.reject(err);
+        }
+
+        var results = [];
+        var left = functions.length;
+        function update(res,idx) {
+            if (cancelled) return;
+            results[idx] = res;
+            left -= 1; // Works because/as long as AJAX/JS is single-threaded.
+            if ( left === 0 ) {
+                d.resolve(results);
+            }
+        }
+
+        array.forEach(functions,function(f,idx){
+            if (cancelled) return;
+            try {
+                running.push(when(f.call(ctx)).then(function(res){
+                    update(res,idx);
+                },function(err){
+                    cancel(err);
+                }));
+            } catch (err) {
+                cancel();
+            }
+        });
+
+        return d.promise;
+    }
+
+    /** Iterate over an array with async callback
+     * Execute the callback and if it's async, wait until it's finished before
+     * executing the next one.
+     */
+    function forEach(list,callback,ctx) {
+        var fs = array.map(list,function(item,index,items){
+            return lang.hitch(ctx,callback,item,index,items);
+        });
+        return seq(fs);
+    }
+
+    /** Map a list, possible async
+     * Map every element of a list, returning a promise to the mapped list.
+     */
+    function map(list,callback,ctx) {
+        var fs = array.map(list,function(item,index,items){
+            return lang.hitch(ctx,callback,item,index,items);
+        });
+        return par(fs);
+    }
+
+    return {
+        seq: seq,
+        par: par,
+        forEach: forEach,
+        map: map
+    };
+
+});
Index: Dev/trunk/client/qed/lib/func.js
===================================================================
--- Dev/trunk/client/qed/lib/func.js	(revision 424)
+++ Dev/trunk/client/qed/lib/func.js	(revision 424)
@@ -0,0 +1,21 @@
+define(['dojo/_base/lang'],function(lang){
+
+    Function.prototype.compose = function(g) {
+        var f = this;
+        return function(){
+            return f(g.apply(arguments));
+        };
+    };
+
+    function modPropIf(object,prop,pred,map) {
+        var value = object[prop];
+        if ( pred(value) ) {
+            object[prop] = map(value);
+        }
+        return object;
+    }
+
+    return {
+        modPropIf: modPropIf
+    };
+});
Index: Dev/trunk/client/qed/main-admin.js
===================================================================
--- Dev/trunk/client/qed/main-admin.js	(revision 424)
+++ Dev/trunk/client/qed/main-admin.js	(revision 424)
@@ -0,0 +1,28 @@
+require([
+    'dojo/_base/array',
+    'dojo/parser',
+    'qed/app/Content',
+    'qed/app/Page',
+    'qed/app/Router',
+    'qed/ui/MainMenu',
+    'qed/routes-admin',
+    'qed/store',
+    'qed/stddeps',
+    'dojo/domReady!'
+],function(array,parser,Content,Page,Router,MainMenu,routes,store) {
+    parser.parse();
+
+    store.info()
+    .then(function(){
+        new MainMenu({},"menu").startup();
+        array.forEach(routes,function(route){
+            Router.register(route);
+        });
+        Router.startup();
+    },function(){
+        Content.startup();
+        Content.set(new Page({
+            templateString: "<div>Application database is not properly configured. Contact your system administrator.</div>"
+        }));
+    });
+});
Index: Dev/trunk/client/qed/main-response.js
===================================================================
--- Dev/trunk/client/qed/main-response.js	(revision 424)
+++ Dev/trunk/client/qed/main-response.js	(revision 424)
@@ -0,0 +1,82 @@
+require([
+    'dojo/date',
+    'dojo/date/locale',
+    'dojo/hash',
+    'dojo/parser',
+    'qed/store',
+    'qed/app/Content',
+    'qed/app/Page',
+    'qed/app/Path',
+    'qed/lib/async',
+    'qed/model/classes/Response',
+    'qed/model/classes/SurveyRun',
+    'qed/pages/response',
+    'dojo/domReady!',
+    'qed/stddeps'
+],function(date,locale,hash,parser,store,Content,Page,Path,async,Response,SurveyRun,response) {
+    parser.parse();
+    Content.startup();
+
+    function error(msg) {
+        Content.set(new Page({
+            templateString: "<div>"+msg+"</div>"
+        }));
+    }
+
+    var path = new Path('/:surveyRunId');
+    var params = path.match(hash());
+    params.options = params.options || {};
+
+    if ( !params || !params.surveyRunId ) {
+        error("Something is wrong with the URL, don't know what survey to show you. Sorry.");
+        return;
+    }
+
+    var surveyRunId = params.surveyRunId;
+
+    function checkDates(surveyRun) {
+        var now = new Date();
+        var startDate = SurveyRun.StartDate.get(surveyRun);
+        var endDate = SurveyRun.EndDate.get(surveyRun);
+        if ( startDate && date.compare(startDate,now) > 0 ) {
+            error("This survey will start on "+locale.format(startDate,'date'));
+            throw false;
+        }
+        if ( endDate && date.compare(now,endDate) > 0 ) {
+            error("This survey ended on "+locale.format(endDate,'date'));
+            throw false;
+        }
+    }
+
+    store.get(surveyRunId)
+    .then(function(surveyRun){
+        checkDates(surveyRun);
+        if ( params.options.id ) {
+            return params.options.id;
+        } else {
+            if ( surveyRun.mode === "open") {
+                var response = Response.create();
+                response.surveyRunId = surveyRunId;
+                return store.put(response).then(function(res){
+                    return store.getIdentity(res);
+                });
+            } else {
+                error("Cannot respond to closed survey without response id. Sorry.");
+                throw false;
+            }
+        }
+        return surveyRun;
+    },function(){
+        error("No running survey found for the given id. Sorry.");
+        throw false;
+    })
+    .then(function(responseId){
+        hash(Path.format("/"+surveyRunId,{ id: responseId }));
+        Content.set(new response({
+            surveyRunId: surveyRunId,
+            options: {
+                id: responseId
+            }
+        }));
+    });
+});
Index: Dev/trunk/client/qed/model/classes/Question.js
===================================================================
--- Dev/trunk/client/qed/model/classes/Question.js	(revision 424)
+++ Dev/trunk/client/qed/model/classes/Question.js	(revision 424)
@@ -0,0 +1,20 @@
+define(function(){
+    return {
+        create: function(){
+            return { type:'Question' };
+        },
+        DisplayTitle: {
+            get: function(q) {
+                return q.title || '';
+            }
+        },
+        Content: {
+            get: function(q) {
+                return q.content || [];
+            },
+            set: function(q,content) {
+                q.content = content;
+            }
+        }
+    };
+});
Index: Dev/trunk/client/qed/model/classes/Response.js
===================================================================
--- Dev/trunk/client/qed/model/classes/Response.js	(revision 424)
+++ Dev/trunk/client/qed/model/classes/Response.js	(revision 424)
@@ -0,0 +1,17 @@
+define([],function(){
+    var SurveyRun = {
+        create: function(){
+            return { type:'Response' };
+        },
+        SurveyRun: {
+            get: function(r) {
+                return r.surveyRunId || null;
+            },
+            set: function(r,sr) {
+                r.surveyRunId = sr;
+                return r;
+            }
+        }
+    };
+    return SurveyRun;
+});
Index: Dev/trunk/client/qed/model/classes/SessionTemplate.js
===================================================================
--- Dev/trunk/client/qed/model/classes/SessionTemplate.js	(revision 424)
+++ Dev/trunk/client/qed/model/classes/SessionTemplate.js	(revision 424)
@@ -0,0 +1,12 @@
+define(function(){
+    return {
+        create: function(){
+            return { type:'SessionTemplate' };
+        },
+        DisplayTitle: {
+            get: function(st) {
+                return st.title || '';
+            }
+        }
+    };
+});
Index: Dev/trunk/client/qed/model/classes/Survey.js
===================================================================
--- Dev/trunk/client/qed/model/classes/Survey.js	(revision 424)
+++ Dev/trunk/client/qed/model/classes/Survey.js	(revision 424)
@@ -0,0 +1,20 @@
+define(function(){
+    return {
+        create: function(){
+            return { type:'Survey' };
+        },
+        DisplayTitle: {
+            get: function(s) {
+                return s.title || '';
+            }
+        },
+        Questions: {
+            get: function(s) {
+                return s.questions || [];
+            },
+            set: function(s,questions) {
+                s.questions = questions;
+            }
+        }
+    };
+});
Index: Dev/trunk/client/qed/model/classes/SurveyRun.js
===================================================================
--- Dev/trunk/client/qed/model/classes/SurveyRun.js	(revision 424)
+++ Dev/trunk/client/qed/model/classes/SurveyRun.js	(revision 424)
@@ -0,0 +1,47 @@
+define(['dojo/_base/lang','dojo/date/locale','dojo/date/stamp'],function(lang,locale,stamp){
+    var SurveyRun = {
+        create: function(){
+            return { type:'SurveyRun' };
+        },
+        StartDate: {
+            get: function(sr) {
+                var d;
+                if ( sr.startDate ) {
+                    d = lang.isString(sr.startDate) ? stamp.fromISOString(sr.startDate) : sr.startDate;
+                }
+                return d;
+            }
+        },
+        EndDate: {
+            get: function(sr) {
+                var d;
+                if ( sr.endDate ) {
+                    d = lang.isString(sr.endDate) ? stamp.fromISOString(sr.endDate) : sr.endDate;
+                }
+                return d;
+            }
+        },
+        DisplayTitle: {
+            get: function(sr) {
+                var t = "Run of '"+sr.survey.title+"'";
+                if ( sr.startDate ) {
+                    t += " from "+locale.format(SurveyRun.StartDate.get(sr));
+                }
+                if ( sr.endDate ) {
+                    t += " until "+locale.format(SurveyRun.EndDate.get(sr));
+                }
+                return t;
+            }
+        },
+        Survey: {
+            get: function(sr) {
+                return sr.survey || null;
+            },
+            set: function(sr,s) {
+                sr.survey = s;
+                return sr;
+            }
+        }
+    };
+    return SurveyRun;
+});
Index: Dev/trunk/client/qed/model/schema.js
===================================================================
--- Dev/trunk/client/qed/model/schema.js	(revision 424)
+++ Dev/trunk/client/qed/model/schema.js	(revision 424)
@@ -0,0 +1,157 @@
+define(['dojo/_base/lang'],function(lang){
+
+    /** Note on dojox.json.schema
+     * This implementation is not according to the version 03 of the json-schema
+     * draft. Differences:
+     * - doesn't support the 'required' property, but uses 'optional' (which is
+     *   false by default).
+     */
+
+    ////////////////////////////////////////
+    // Base schema types
+    //
+
+    var dateRe = "\\d{4}-\\d{2}-\\d{2}"; // YYYY-MM-DD
+    var timeRe = "\\d{2}:\\d{2}:\\d{2}"; // hh:mm:ss 
+    var datetimeRe = dateRe+"T"+timeRe+"Z"; // YYYY-MM-DDThh:mm:ssZ
+
+    function mixin(obj1,obj2) {
+        return lang.mixin({},obj1||{},obj2||{});
+    }
+    function mkType(base) {
+        return function(props) {
+            return mixin(base,props);
+        };
+    }
+
+    var nestring = mkType({ type:'string', minLength:1 });
+    var string = mkType({ type:'string' });
+    var integer = mkType({ type: 'integer' });
+    var boolean = mkType({ type: 'boolean' });
+    var pattern = function(p){
+        return mixin({
+            type: 'string',
+            pattern: p
+        });
+    };
+    var date = mkType(pattern(dateRe));
+    var time = mkType(pattern(timeRe));
+    var datetime = mkType(pattern(datetimeRe));
+    var array = function(items,props) {
+        return mixin({
+            type: 'array',
+            items: items
+        },props);
+    };
+    var object = function(properties,props) {
+        return mixin({
+            type: 'object',
+            properties: properties,
+            additionalProperties: false
+        },props);
+    };
+    var optional = mkType({ optional: true });
+
+    ////////////////////////////////////////
+    // Domain specific
+    //
+
+    var typedobject = function(type,properties,props) {
+        return object(mixin(properties,{
+            type: pattern(type)
+        }),props);
+    };
+
+    var dbobject = function(type,properties,props) {
+        return typedobject(type,mixin(properties,{
+            _id: nestring(optional()),
+            _rev: nestring(optional())
+        }),props);
+    };
+
+    ////////////////////////////////////////
+    // The QED schema
+    //
+
+    var Respondent = dbobject('Respondent',{
+        secret: nestring()
+    });
+
+    var Question = dbobject('Question',{
+        code:nestring(),
+        title: nestring(),
+        description: string(optional()),
+        topic: string(optional()),
+        categories: array(nestring(),optional()),
+        content: array([
+            typedobject('Header',{
+                content:string(optional())
+            }),
+            typedobject('Text',{
+                content:string(optional())
+            }),
+            typedobject('Divider'),
+            typedobject('StringInput'),
+            typedobject('TextInput',{
+                maxLength:integer()
+            }),
+            typedobject('IntegerInput',{
+                min:integer(),
+                max:integer(),
+                step:integer()
+            }),
+            typedobject('MultipleChoiceInput',{
+                multiple:boolean(),
+                items:array(nestring())
+            })
+        ],optional()),
+        publicationDate:datetime(optional())
+    });
+
+    var Survey = dbobject('Survey',{
+        title: nestring(),
+        description: string(optional()),
+        questions: array(Question,optional()),
+        publicationDate:datetime(optional())
+    });
+
+    var SurveyRun = dbobject('SurveyRun',{
+        description: string(optional()),
+        survey: Survey,
+        publicationDate:datetime(optional()),
+        startDate:datetime(optional()),
+        endDate:datetime(optional()),
+        mode:{type:'string',enum:['open','closed'],optional:true},
+        metadata:string(optional())
+    });
+
+    var Response = dbobject('Response',{
+        surveyRunId: nestring(),
+        answers:{type:'object',optional:true},
+        publicationDate:datetime(optional())
+    });
+
+    var Session = dbobject('Session',{
+        title: nestring(),
+        description: string(optional()),
+        publicationDate: datetime(optional())
+    });
+
+    var SessionTemplate = dbobject('SessionTemplate',{
+        title: nestring(),
+        description: string(optional()),
+        publicationDate: datetime(optional()),
+        plannedDate: datetime(optional())
+    });
+
+    var schema = {type:[
+        Question,
+        Survey,
+        SurveyRun,
+        Response,
+        Session,
+        SessionTemplate
+    ]};
+
+    return schema;
+});
Index: Dev/trunk/client/qed/model/widgets/AccountListView.js
===================================================================
--- Dev/trunk/client/qed/model/widgets/AccountListView.js	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/AccountListView.js	(revision 424)
@@ -0,0 +1,42 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/dom-construct',
+    '../../widgets/LineWithActionsWidget',
+    '../../widgets/list/OrderedList'
+],function(
+    declare,
+    lang,
+    domConstruct,
+    LineWithActionsWidget,
+    OrderedList
+) {
+    return declare([OrderedList],{
+        baseClass: 'rftAccountListView',
+        type: 'account',
+
+        _createAvatarNode: function(item){
+            return domConstruct.create("div",{
+                'class': 'dragAvatar',
+                innerHTML: item.title
+            });
+        },
+        _createListNode: function(item) {
+            var w = new LineWithActionsWidget({
+                title: item.title,
+                'class': "green",
+                actions: {
+                    "Remove" : {
+                        callback: lang.hitch(this, 'removeItem', item),
+                        properties: {
+                            blockButton: false,
+                            icon: "Delete"
+                        }
+                    }
+                }
+            });
+            w.startup();
+            return w.domNode;
+        }
+    });
+});
Index: Dev/trunk/client/qed/model/widgets/CategoryListView.js
===================================================================
--- Dev/trunk/client/qed/model/widgets/CategoryListView.js	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/CategoryListView.js	(revision 424)
@@ -0,0 +1,43 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    '../../widgets/LineWithActionsWidget',
+    '../../widgets/list/List'
+],function(
+    declare,
+    lang,
+    LineWithActionsWidget,
+    List
+) {
+    return declare([List],{
+        baseClass: 'rftLineListView',
+
+        _createAvatarNode: function(item) {
+            var node = document.createElement("div");
+            node.className = "dragAvatar";
+            node.innerHTML = item.title;
+            return node;
+        },
+
+        _createListNode: function(item) {
+            var w = new LineWithActionsWidget({
+                title: item,
+                'class': "orange",
+                actions: {
+                    "Remove" : {
+                        callback: lang.hitch(this, function() {
+                            this.removeItem(item, w);
+                        }),
+                        properties: {
+                            blockButton: false,
+                            icon: "Delete"
+                        }
+                    }
+                }
+            });
+            w.startup();
+            return w.domNode;
+        }
+
+    });
+});
Index: Dev/trunk/client/qed/model/widgets/QuestionEditorPreview.js
===================================================================
--- Dev/trunk/client/qed/model/widgets/QuestionEditorPreview.js	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/QuestionEditorPreview.js	(revision 424)
@@ -0,0 +1,36 @@
+define([
+    'dojo/_base/array',
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/dom-construct',
+    'dijit/registry',
+    './QuestionEditorPreviewItem',
+    '../../widgets/list/OrderedList'
+], function(array, declare, lang, domConstruct, registry, QuestionEditorPreviewItem, OrderedList) {
+    return declare([OrderedList], {
+        baseClass: 'surveyEditorPreview',
+        type: 'questionContent',
+        withHandles: true,
+
+        _createAvatarNode: function(item) {
+            return domConstruct.create("span",{
+                innerHTML: item.type || "Dragging!!!"
+            });
+        },
+        _createListNode: function(item) {
+            var previewItem = new QuestionEditorPreviewItem({
+                item: item
+            });
+            previewItem.on('close',lang.hitch(this,'removeItem',item));
+            previewItem.startup();
+            return previewItem.domNode;
+        },
+        getItems: function() {
+            return array.map(
+                this.source.getAllNodes(),
+                function(node){
+                    return registry.byNode(node).get('value');
+                },this);
+        }
+    });
+});
Index: Dev/trunk/client/qed/model/widgets/QuestionEditorPreviewItem.js
===================================================================
--- Dev/trunk/client/qed/model/widgets/QuestionEditorPreviewItem.js	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/QuestionEditorPreviewItem.js	(revision 424)
@@ -0,0 +1,139 @@
+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
+){
+    return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, _Container], {
+        version: "full",
+        templateString: template,
+        baseClass: "surveyEditorPreviewItem",
+        previousContentHeight: 200,
+        item: null,
+        innerWidget: null,
+        foldDuration: [250, 250],
+        animation: null,
+        _editing: false,
+
+        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();
+            } 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;
+        },
+        _setValueAttr: function(value) {
+            this.item = value;
+            this._destroyInnerWidget();
+            if ( this._editing ) {
+                this._showEditWidget();
+            } else {
+                this._showViewWidget();
+            }
+        },
+        toggleEdit: function() {
+            if(this._editing) {
+                if ( this.innerWidget !== null ) {
+                    this.item = this.innerWidget.get('value');
+                }
+                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() {
+            if (!this.animation) {
+                if (!domClass.contains(this.domNode, "fold")) {
+                    this.previousContentHeight = domGeom.getMarginBox(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: Dev/trunk/client/qed/model/widgets/QuestionEditorToolkit.js
===================================================================
--- Dev/trunk/client/qed/model/widgets/QuestionEditorToolkit.js	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/QuestionEditorToolkit.js	(revision 424)
@@ -0,0 +1,166 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/dnd/Source',
+    'dojo/dom-construct',
+    'dojo/store/Memory',
+    'dijit/_Container',
+    'dijit/_TemplatedMixin',
+    'dijit/_WidgetBase',
+    'dijit/_WidgetsInTemplateMixin',
+    'dijit/form/Button',
+    'dijit/form/ComboBox',
+    '../../store',
+    './CategoryListView',
+    'dojo/text!./templates/QuestionEditorToolkit.html'
+    ], function(declare, lang, Source, domConstruct, Memory, _Container, _TemplatedMixin, _WidgetBase, _WidgetsInTemplateMixin, Button, ComboBox, store, CategoryListView, template) {
+        return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, _Container], {
+
+            templateString: template,
+            _list: null,
+            _categorySelect: null,
+            _categoryStore: null,
+            _topicSelect: null,
+            _topicStore: null,
+            _categories : null,
+
+            _contentItems: [
+                { type: "Header" },
+                { type: "Text" },
+                { type: "Image" },
+                { type: "ExternalMedia" },
+                { type: "Divider" }
+            ],
+            _inputsItems: [
+                { type: "StringInput" },
+                { type: "TextInput" },
+                { type: "IntegerInput" },
+                { type: "ScaleInput" },
+                { type: "MultipleChoiceInput" }
+            ],
+            _labelMap: {
+                "Header": "Header",
+                "Text": "Text",
+                "Image": "Image",
+                "ExternalMedia": "External media",
+                "Divider": "Divider",
+                "StringInput": "Text line",
+                "TextInput": "Free text",
+                "IntegerInput": "Integer number",
+                "ScaleInput": "Scale",
+                "MultipleChoiceInput": "Multiple choice"
+            },
+            _iconMap: {
+                "Header": "Header",
+                "Text": "TextBox",
+                "Image": "Image",
+                "ExternalMedia": "External",
+                "Divider": "Divider",
+                "StringInput": "Text",
+                "TextInput": "Text",
+                "IntegerInput": "Integer",
+                "ScaleInput": "Scale",
+                "MultipleChoiceInput": "MultipleChoice"
+            },
+
+            postCreate: function(){
+                this.inherited(arguments);
+                var creator = lang.hitch(this,"_creator");
+                this.contentSource = new Source(this.ToolkitContentSourceNode, {
+                    accept: [],
+                    copyOnly: true,
+                    selfAccept: false,
+                    singular: true,
+                    creator: creator
+                });
+                this.inputsSource = new Source(this.ToolkitInputsSourceNode, {
+                    accept: [],
+                    copyOnly: true,
+                    selfAccept: false,
+                    singular: true,
+                    creator: creator
+                });
+                this.contentSource.insertNodes(false, this._contentItems);
+                this.inputsSource.insertNodes(false, this._inputsItems);
+            },
+            _setValueAttr: function(question) {
+                this.propertiesForm.set('value', question);
+                this._categories = question.categories || [];
+                this._setupListView();
+                this._setupCategories();
+                this._setupTopic(question.topic);
+            },
+            _getValueAttr: function() {
+                var value = this.propertiesForm.get('value');
+                value.categories = this._categories;
+                return value;
+            },
+            onCategoryAdd: function() {
+                this._addCategory(this._categorySelect.get('displayedValue')); 
+                this._categorySelect.reset();
+            },
+            _creator: function(item, hint) {
+                var node;
+                if (hint == "avatar") {
+                    node = domConstruct.create('span',{
+                        innerHTML: this._labelMap[item.type] || item.type
+                    });
+                } else {
+                    var w = new Button({
+                        baseClass: "rftLargeButton",
+                        iconClass: "rftIcon rftIcon"+(this._iconMap[item.type]||"Unknown"),
+                        label: this._labelMap[item.type] || item.type,
+                        showLabel: true,
+                        'class': "newline"
+                    });
+                    node = w.domNode;
+                }
+                return {node: node, data: item, type: ["questionContent"]};
+            },
+            _setupListView: function() {
+                this._list = new CategoryListView( {
+                    removeCallback: lang.hitch(this, this._removeCategory)
+                }).placeAt(this.listNode);
+                this._list.startup();                
+                for (var category in this._categories) {
+                    this._list.appendItem(this._categories[category]);
+                }    
+            },
+            _setupCategories: function() {
+                this._categoryStore = new Memory({data: [] });
+                store.query("_design/questions/_view/all", {reduce:true, group:false, group_level:1})
+                .forPairs(lang.hitch(this, function(value, key) {
+                    this._categoryStore.put({ id: key[0] });
+                }));
+                this._categorySelect = new ComboBox( {
+                    name: "categories",
+                    store: this._categoryStore,
+                    searchAttr: "id"
+                }, this.categoriesBoxNode);
+                this._supportingWidgets.push(this._categorySelect);
+
+            },
+            _setupTopic: function(topic) {
+                this._topicStore = new Memory( {data: [] });
+                store.query("_design/questions/_view/all_topics", {reduce:true, group:true})
+                .forPairs(lang.hitch(this, function(value, key) {
+                    this._topicStore.put({ id: key });
+                }));
+                this._topicSelect = new ComboBox( {
+                    name: "topic",
+                    store: this._topicStore,
+                    searchAttr: "id",
+                    value: topic
+                }, this.topicBoxNode);
+                this._supportingWidgets.push(this._topicSelect);
+            },
+            _addCategory: function(item) {
+                this._categories.push(item);
+                this._list.appendItem(item);
+            },
+            _removeCategory: function(item) {
+                this._categories.splice(this._categories.indexOf(item), 1);
+            }
+
+        });
+    });
Index: Dev/trunk/client/qed/model/widgets/QuestionListView.js
===================================================================
--- Dev/trunk/client/qed/model/widgets/QuestionListView.js	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/QuestionListView.js	(revision 424)
@@ -0,0 +1,51 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/dom-construct',
+    '../../widgets/LineWithActionsWidget',
+    '../../widgets/list/OrderedList'
+],function(
+    declare,
+    lang,
+    domConstruct,
+    LineWithActionsWidget,
+    OrderedList
+){
+    return declare([OrderedList],{
+        baseClass: 'rftSurveyListView',
+        type: 'question',
+
+        _createAvatarNode: function(item){
+            return domConstruct.create("div",{
+                'class': 'dragAvatar',
+                innerHTML: item.title
+            });
+        },
+        _createListNode: function(item) {
+            var w = new LineWithActionsWidget({
+                title: item.title,
+                'class': "inheritBgColor",
+                actions: {
+                    "Remove" : {
+                        callback: lang.hitch(this, 'removeItem', item),
+                        properties: {
+                            blockButton: false,
+                            icon: "Delete",
+                            label: "Remove"
+                        }
+                    },
+                    "Info" : {
+                        callback: function(){ item.description && alert(item.description); },
+                        properties: {
+                            blockButton: false,
+                            icon: "Inspect",
+                            label: "Show info"
+                        }
+                    }
+                }
+            });
+            w.startup();
+            return w.domNode;
+        }
+    });
+});
Index: Dev/trunk/client/qed/model/widgets/QuestionWidget.js
===================================================================
--- Dev/trunk/client/qed/model/widgets/QuestionWidget.js	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/QuestionWidget.js	(revision 424)
@@ -0,0 +1,74 @@
+define(['dojo/_base/declare','dojo/_base/lang','dojo/dom-construct','dijit/_WidgetBase',
+    'dijit/_TemplatedMixin','dijit/_WidgetsInTemplateMixin',
+    'dojo/text!./templates/QuestionWidget.html','dijit/form/TextBox',
+    'dijit/form/Textarea','../../widgets/MultipleChoiceWidget'],
+    function(declare,lang,domConstruct,_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,templateString,TextBox,Textarea,MultipleChoiceWidget){
+        return declare([_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin],{
+            templateString: templateString,
+            mode: 'view', // view || edit
+            name: '',
+            value: null,
+            _scale: null,
+            _widgetCache: null,
+            constructor: function() {
+                this.inherited(arguments);
+                this.value = {};
+                this._widgetCache = {};
+            },
+            postCreate: function() {
+                this._resetValue = this.value;
+                this.scaleSelector.set('disabled', this.mode == 'edit');
+            },
+            _setValueAttr: function(value) {
+                this.value = value;
+                this._onTypeChange(value.scale || 'string');
+                this.ourForm.set('value',value);
+            },
+            _getValueAttr: function() {
+                var value = this.ourForm.get('value');
+                lang.mixin(this.value,value);
+                return this.value;
+            },
+            _onTypeChange: function(scale) {
+                if ( this._scale == scale ) return;
+                this._scale = scale;
+                domConstruct.empty(this.scaleDetails);
+                var widget = this._getTypeWidget(scale);
+                widget && widget.placeAt(this.scaleDetails,'only');
+            },
+            _getTypeWidget: function(scale) {
+                var widget = this._widgetCache[scale];
+                if (!widget) {
+                    switch(scale) {
+                        case 'string':
+                            widget = new TextBox({
+                                name: 'answers',
+                                disabled: this.mode == 'view'
+                            });
+                            break;
+                        case 'text':
+                            widget = new Textarea({
+                                name: 'answers',
+                                disabled: this.mode == 'view',
+                                style: 'min-height: 120px'
+                            });
+                            break;
+                        case 'singleChoice':
+                        case 'multipleChoice':
+                            widget = new MultipleChoiceWidget({
+                                name: 'answers',
+                                mode: this.mode,
+                                allowMultiple: scale == 'multipleChoice'
+                            });
+                            break;
+                    }
+                    this._widgetCache[scale] = widget;
+                }
+                return widget;
+            },
+            reset: function() {
+                this.ourForm.reset();
+                this._setValueAttr(this._resetValue);
+            }
+        });
+    });
Index: Dev/trunk/client/qed/model/widgets/QuestionWidgetFactory.js
===================================================================
--- Dev/trunk/client/qed/model/widgets/QuestionWidgetFactory.js	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/QuestionWidgetFactory.js	(revision 424)
@@ -0,0 +1,401 @@
+define([
+    'dojo/_base/array',
+    'dojo/_base/declare',
+    'dojo/_base/lang', 
+    'dojo/dom-construct', 
+    'dijit/_TemplatedMixin',
+    'dijit/_WidgetBase',
+    'dijit/_Container',
+    'dijit/form/Button',
+    'dijit/form/CheckBox',
+    'dijit/form/Form',
+    'dijit/form/NumberSpinner',
+    'dijit/form/RadioButton',
+    'dijit/form/Textarea',
+    'dijit/form/TextBox',
+    'dojox/layout/TableContainer',
+    '../../widgets/list/_EditableListMixin',
+    '../../widgets/list/OrderedList'
+],function(array, declare, lang, domConstruct, _TemplatedMixin, _WidgetBase, _Container, Button, CheckBox, Form, NumberSpinner, RadioButton, Textarea, TextBox, TableContainer, _EditableListMixin, OrderedList) {
+    var factory = declare(null, {
+        createViewWidget: function(/*Object*/options) {
+            // options: Object
+            //            type: "header", "text", textinput, etc.
+            //            other type specific fields
+            var fun = this['create'+options.type+'ViewWidget'];
+            var view = fun !== undefined ? fun(options) : null;
+            return view;
+        },
+        createEditWidget: function(/*Object*/options) {
+            var fun = this['create'+options.type+'EditWidget'];
+            var view = fun !== undefined ? fun() : null;
+            if(view)
+                view.set('value', options);
+            return view;
+        },
+
+        createHeaderViewWidget: function(options) {
+            return new HeaderView({
+                options: options
+            });
+        },
+        createHeaderEditWidget: function() {
+            return new HeaderEdit();
+        },
+
+        createTextViewWidget: function(options) {
+            return new TextView({
+                options: options
+            });
+        },
+        createTextEditWidget: function() {
+            return new TextEdit();
+        },
+
+        createDividerViewWidget: function(options) {
+            return new DividerView({
+                options: options
+            });
+        },
+
+        createStringInputViewWidget: function(options) {
+            return new StringInputView({
+                options: options
+            });
+        },
+        createStringInputEditWidget: function() {
+            return new StringInputEdit();
+        },
+
+        createTextInputViewWidget: function(options) {
+            return new TextInputView({
+                options: options
+            });
+        },
+        createTextInputEditWidget: function() {
+            return new TextInputEdit();
+        },
+
+        createIntegerInputViewWidget: function(options) {
+            return new IntegerInputView({
+                options: options
+            });
+        },
+        createIntegerInputEditWidget: function() {
+            return new IntegerInputEdit();
+        },
+
+        createMultipleChoiceInputViewWidget: function(options) {
+            return new MultipleChoiceInputView({
+                options: options
+            });
+        },
+        createMultipleChoiceInputEditWidget: function() {
+            return new MultipleChoiceInputEdit();
+        }
+    });
+
+    var DefaultEdit = declare([Form,_Container],{
+        type: null,
+        addChild: function(widget) {
+            domConstruct.create("label",{
+                innerHTML: widget.title || ''
+            },this.containerNode,'last');
+            this.inherited(arguments,[widget]);
+        },
+        _getValueAttr: function() {
+            var val = this.inherited(arguments);
+            val.type = this.type;
+            return val;
+        }
+    });
+
+    var HeaderView = declare([_WidgetBase], {
+        postCreate: function() {
+            this.domNode.innerHTML = "<h2>"+this.options.content+"</h2>";
+        }
+    });
+
+    var HeaderEdit = declare([DefaultEdit], {
+        type: 'Header',
+        postCreate: function() {
+            this.inherited(arguments);
+            this.addChild(new TextBox({
+                title: 'Content',
+                name: 'content'
+            }));
+        }
+    });
+
+    var TextView = declare([_WidgetBase], {
+        postCreate: function() {
+            this.domNode.innerHTML = "<p>"+this.options.content+"</p>";
+        }
+    });
+
+    var TextEdit = declare([DefaultEdit], {
+        type: 'Text',
+        postCreate: function() {
+            this.inherited(arguments);
+            this.addChild(new Textarea({
+                title: 'Content',
+                name: 'content'
+            }));
+        }
+    });
+
+    var DividerView = declare([_WidgetBase], {
+        postCreate: function() {
+            this.domNode.innerHTML = "<hr>";
+        }
+    });
+
+    var DefaultInputEdit = declare([DefaultEdit],{
+        postCreate: function() {
+            this.inherited(arguments);
+            this.addChild(new TextBox({
+                title: 'Text',
+                name: 'text'
+            }));
+        }
+    });
+
+    var StringInputView = declare([_WidgetBase, _Container],{
+        _textBox: null,
+        postCreate: function() {
+            this._textBox = new TextBox({
+                name: this.options.code || ''
+            });
+            this.addChild(this._textBox);
+            this._textBox.startup();
+        },
+        _setReadOnlyAttr: function(value) {
+            this._textBox.set('readOnly', value);
+        },
+        _getCodeAttr: function() {
+            return this.options.code;
+        },
+        _getValueAttr: function() {
+            return this._textBox.get('value') || "";
+        },
+        _setValueAttr: function(value) {
+            this._textBox.set('value',value || "");
+        }
+    });
+
+    var StringInputEdit = declare([DefaultInputEdit],{
+        type: 'StringInput'
+    });
+
+    var TextInputView = declare([_WidgetBase, _Container], {
+        _textArea: null,
+        postCreate: function() {
+            this._textArea = new Textarea({
+                name: this.options.code
+            });
+            this._textArea.set('maxLength', this.options.maxLength || 1000);
+            this._textArea.set('value', this.options.defaultValue || "");
+            this.addChild(this._textArea);
+            this._textArea.startup();
+        },
+        _getCodeAttr: function() {
+            return this.options.code;
+        },
+        _getValueAttr: function() {
+            return this._textArea.get('value');
+        },
+        _setReadOnlyAttr: function(value) {
+            this._textArea.set('readOnly', value);
+        }
+    });
+
+    var TextInputEdit = declare([DefaultInputEdit], {
+        type: 'TextInput',
+        postCreate: function() {
+            this.inherited(arguments);
+            this.addChild(new NumberSpinner({
+                name: 'maxLength',
+                title: "Maximum length",
+                constraints: {
+                    min: 0
+                }
+            }));
+        }
+    });
+
+    var IntegerInputView = declare([_WidgetBase, _Container], {
+        _numberInput: null,
+        postCreate: function() {
+            this._numberInput = new NumberSpinner({
+                name: this.options.code || '',
+                constraints: {
+                    min: this.options.min,
+                    max: this.options.max,
+                    smallDelta: this.options.step
+                }
+            });
+            this.addChild(this._numberInput);
+            this._numberInput.startup();
+        },
+        _getCodeAttr: function() {
+            return this.options.code;
+        },
+        _getValueAttr: function() {
+            return this._numberInput.get('value');
+        },
+        _setReadOnlyAttr: function(value) {
+            this._numberInput.set('readOnly', value);
+        }
+    });
+
+    var IntegerInputEdit = declare([DefaultInputEdit], {
+        type: 'IntegerInput',
+        postCreate: function() {
+            this.inherited(arguments);
+            this.addChild(new NumberSpinner({
+                title: "Minimum",
+                name: 'min'
+            }));
+            this.addChild(new NumberSpinner({
+                title: "Maximum",
+                name: 'max'
+            }));
+            this.addChild(new NumberSpinner({
+                title: "Step",
+                name: 'step'
+            }));
+        }
+    });
+
+    var MultipleChoiceInputView = declare([_WidgetBase, _Container], {
+        postCreate: function() {
+            var table = new TableContainer({ cols: 1, customClass: "labelsAndValues"} );
+
+            var ctor = this.options.multiple === true ? CheckBox : RadioButton;
+            array.forEach(this.options.items || [],function(item){
+                table.addChild(new ctor({
+                        name: this.options.code || '',
+                        title: item
+                }));
+            },this);
+
+            this.addChild(table);
+            table.startup();
+        },
+        _getCodeAttr: function() {
+            return this.options.code;
+        },
+        _getValueAttr: function() {
+            var checked = array.filter(this.getChildren(),function(child){
+                return child.get('checked');
+            });
+            if ( this.options.multiple ) {
+                return array.map(checked,function(child){
+                    return child.get('value');
+                });
+            } else {
+                return checked.length > 0 ? checked[0].get('value') : null;
+            }
+        },
+        _setReadOnlyAttr: function(value) {
+            array.forEach(this.getChildren(),function(child){
+                child.set('readOnly', value);
+            },this);
+        }
+    });
+
+    var MCOptionItem = declare([_WidgetBase,_TemplatedMixin,_Container],{
+        templateString: '<div><span class="dojoDndHandle">=</span></div>',
+        _textBox: null,
+        postCreate: function() {
+            this._textBox = new TextBox({});
+            this.addChild(this._textBox);
+            this._textBox.startup();
+
+            var del = new Button({
+                label: "X",
+                onClick: lang.hitch(this,'onDelete')
+            });
+            this.addChild(del);
+            del.startup();
+        },
+        _getValueAttr: function() {
+            return this._textBox.set('value');
+        },
+        _setValueAttr: function(value) {
+            this._textBox.set('value',value);
+        },
+        onDelete: function(){}
+    });
+
+    var MCOptionList = declare([OrderedList,_EditableListMixin],{
+        type: 'multipleChoiceOption',
+        withHandles: true,
+        _createAvatarNode: function(item){
+            return domConstruct.create("div",{
+                'class': 'dragAvatar',
+                innerHTML: item
+            });
+        },
+        _createListNode: function(item) {
+            var w = new MCOptionItem();
+            w.startup();
+            w.set('value',item);
+            w.on('delete',lang.hitch(this,'_onRemove',w));
+            return w.domNode;
+        },
+        _onRemove: function(w) {
+            w.destroyRecursive();
+            this.removeCallback && this.removeCallback(item);
+            this.source.sync();
+        }
+    });
+
+    var MultipleChoiceInputEdit = declare([_WidgetBase, _Container], {
+        _multipleInput: null,
+        postCreate: function() {
+            var table = new TableContainer({ cols: 1, customClass: "labelsAndValues"} );
+
+            this._multipleInput = new CheckBox({
+                title: "Allow multiple"
+            });
+            table.addChild(this._multipleInput);
+            this._multipleInput.startup();
+
+            var add = new Button({
+                label: "Add",
+                onClick: lang.hitch(this,'_addOption',"")
+            });
+            table.addChild(add);
+            add.startup();
+
+            this._optionsList = new MCOptionList();
+            table.addChild(this._optionsList);
+            this._optionsList.startup();
+
+            this.addChild(table);
+            table.startup();
+        },
+
+        _addOption: function() {
+            this._optionsList.appendItems([""]);
+        },
+
+        _setValueAttr: function(value) {
+            this._multipleInput.set('checked', value.multiple);
+            this._optionsList.deleteItems();
+            this._optionsList.appendItems(value.items || []);
+        },
+        _getValueAttr: function() {
+            return {
+                type: "MultipleChoiceInput",
+                multiple: this._multipleInput.get('checked'),
+                items: array.map(this._optionsList.getItems(),function(item){
+                    return item.get('value');
+                },this)
+            };
+        }
+    });
+
+    return factory;
+});
Index: Dev/trunk/client/qed/model/widgets/SurveyFieldset.js
===================================================================
--- Dev/trunk/client/qed/model/widgets/SurveyFieldset.js	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/SurveyFieldset.js	(revision 424)
@@ -0,0 +1,13 @@
+define([
+    'dojo/_base/declare',
+    'dijit/_Container',
+    'dijit/_WidgetBase',
+    'dijit/_TemplatedMixin',
+    'dijit/_WidgetsInTemplateMixin',
+    'dojo/text!./templates/SurveyFieldset.html'
+],function(declare,_Container,_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,template){
+    return declare([_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container],{
+        templateString: template,
+        baseClass: "rftSurveyFieldset"
+    });
+});
Index: Dev/trunk/client/qed/model/widgets/SurveyRunFieldset.js
===================================================================
--- Dev/trunk/client/qed/model/widgets/SurveyRunFieldset.js	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/SurveyRunFieldset.js	(revision 424)
@@ -0,0 +1,13 @@
+define([
+    'dojo/_base/declare',
+    'dijit/_Container',
+    'dijit/_WidgetBase',
+    'dijit/_TemplatedMixin',
+    'dijit/_WidgetsInTemplateMixin',
+    'dojo/text!./templates/SurveyRunFieldset.html'
+],function(declare,_Container,_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,template){
+    return declare([_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container],{
+        templateString: template,
+        baseClass: "rftSurveyRunFieldset"
+    });
+});
Index: Dev/trunk/client/qed/model/widgets/SurveySummary.js
===================================================================
--- Dev/trunk/client/qed/model/widgets/SurveySummary.js	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/SurveySummary.js	(revision 424)
@@ -0,0 +1,22 @@
+define([
+    'dojo/_base/declare',
+    'dijit/_WidgetBase',
+    'dijit/_TemplatedMixin',
+    'dojo/text!./templates/SurveySummary.html'
+],function(declare,_WidgetBase,_TemplatedMixin,template){
+    return declare([_WidgetBase,_TemplatedMixin],{
+        templateString: template,
+        survey: null,
+        startup: function() {
+            this.inherited(arguments);
+            if ( this.survey ) {
+                this._setValueAttr(this.survey);
+            }
+        },
+        _setValueAttr: function(survey) {
+            this.titleNode.innerHTML = survey.title;
+            this.descriptionNode.innerHTML = survey.description;
+            this.questionsNode.innerHTML = (survey.questions || []).length;
+        }
+    });
+});
Index: Dev/trunk/client/qed/model/widgets/SurveyWidget.js
===================================================================
--- Dev/trunk/client/qed/model/widgets/SurveyWidget.js	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/SurveyWidget.js	(revision 424)
@@ -0,0 +1,38 @@
+define([
+    'dojo/_base/array',
+    'dojo/_base/declare',
+    'dijit/_Container',
+    'dijit/_WidgetBase',
+    'dijit/_TemplatedMixin',
+    'dijit/_WidgetsInTemplateMixin',
+    '../classes/Survey',
+    '../widgets/QuestionWidgetFactory',
+    'dojo/text!./templates/SurveyWidget.html'
+],function(array,declare,_Container,_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,Survey,QuestionWidgetFactory,template){
+    return declare([_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container],{
+        templateString: template,
+        survey: null,
+        startup: function() {
+            if ( this._started ) { return; }
+            this.inherited(arguments);
+            if ( this.survey ) {
+                this._setSurveyAttr(this.survey);
+            }
+        },
+        _setSurveyAttr: function(survey) {
+            this.domNode.innerHTML = "";
+            this.survey = survey;
+            var f = new QuestionWidgetFactory();
+            array.forEach(Survey.Questions.get(this.survey),function(question){
+                array.forEach(question.content || [],function(item,index){
+                    // The dot causes values to be grouped in an object!
+                    item.code = question.code.toString()+'.'+index.toString();
+                    var w = f.createViewWidget(item);
+                    if ( w !== null ) {
+                        w.placeAt(this.domNode);
+                    }
+                },this);
+            },this);
+        }
+    });
+});
Index: Dev/trunk/client/qed/model/widgets/TabbedQuestionBrowser.js
===================================================================
--- Dev/trunk/client/qed/model/widgets/TabbedQuestionBrowser.js	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/TabbedQuestionBrowser.js	(revision 424)
@@ -0,0 +1,127 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/_base/window',
+    'dijit/layout/ContentPane',
+    'dijit/layout/TabContainer',
+    'dojox/widget/Standby',
+    '../../store',
+    '../../widgets/Selector',
+    'dojo/domReady!'
+],function(declare,lang,win,ContentPane,TabContainer,Standby,store,Selector){
+    return declare([TabContainer],{
+        tabPosition: 'left-h',
+        include: 'all',
+
+        selectedActions: null,
+        itemActions: null,
+
+        _dataMap: null,
+        _busyCount: 0,
+        constructor: function(){
+            this.inherited(arguments);
+            this._dataMap = {};
+        },
+        postCreate: function() {
+            this.inherited(arguments);
+            this._query = '_design/questions/_view/'+this.include;
+        },
+        startup: function() {
+            if ( this._started ){ return; }
+            this.inherited(arguments);
+            this._busyWidget = new Standby({
+                target: this.domNode,
+                duration: 200
+            }).placeAt(win.body());
+            this._busyWidget.startup();
+            this.watch("selectedChildWidget",lang.hitch(this,function(name,oldTab,newTab){
+                this._fillCategoryTab(newTab.__category);
+            }));
+            store.query(this._query, {reduce:true,group:true,group_level:1})
+            .forPairs(lang.hitch(this,function(value,key){
+                this._createCategoryTab(key[0],value);
+            }));
+        },
+        _createCategoryTab: function(category,count) {
+            if (this._dataMap[category] === undefined) {
+                var categoryTab = new ContentPane({
+                    __category: category,
+                    title: (category || '[No category]')+" ("+count+")"
+                });
+                categoryTab.startup();
+                this._dataMap[category] = {
+                    _widget: categoryTab
+                };
+                this.addChild(categoryTab);
+            }
+        },
+        _fillCategoryTab: function(category) {
+            var categoryMap = this._dataMap[category];
+            if (!categoryMap._filled) {
+                this._busy();
+                categoryMap._filled = true;
+                store.query(this._query, {reduce:true,group:true,group_level:2,startkey:[category],endkey:[category,{}]})
+                .forPairs(lang.hitch(this,function(value,key){
+                    this._createTopicSelector(key[1],category,value);
+                })).then(lang.hitch(this,function(){
+                    this._done();
+                }));
+            }
+        },
+        _createTopicSelector: function(topic,category,count){
+            var categoryMap = this._dataMap[category];
+            if (categoryMap[topic] === undefined) {
+                var w = new Selector({
+                    __category: category,
+                    __topic: topic,
+                    title: (topic || '[No topic]')+" ("+count+")",
+                    selectedActions: this.selectedActions,
+                    itemActions: this.itemActions
+                }).placeAt(categoryMap._widget.containerNode);
+                w.startup();
+                categoryMap[topic] = {
+                    _widget: w
+                };
+                this._fillTopicSelector(topic,category);
+            }
+        },
+        _fillTopicSelector: function(topic,category) {
+            var categoryMap = this._dataMap[category];
+            var topicMap = categoryMap[topic];
+            if (!topicMap._filled) {
+                topicMap._filled = true;
+                this._busy();
+                store.query(this._query, {reduce:false,include_docs:true,key:[category,topic]})
+                .forEach(lang.hitch(this,function(value){
+                    var title;
+                    if ( this.include === 'all' ) {
+                        title = value.title+(value.publicationDate?' (published on '+value.publicationDate+')':' (unpublished)');
+                    }
+                    topicMap._widget.addItem(value,title);
+                })).then(lang.hitch(this,function(){
+                    this._done();
+                }));
+            }
+        },
+        _busy: function() {
+            if ( this._busyCount === 0 ) {
+                this._busyWidget.show();
+            }
+            this._busyCount++;
+        },
+        _done: function() {
+            if ( this._busyCount > 0 ) {
+                this._busyCount--;
+                if ( this._busyCount === 0 ) {
+                    this._busyWidget.hide();
+                }
+            } else {
+                console.warn('_done() was called more times than _busy().');
+            }
+        },
+        destroy: function() {
+            this._busyWidget.destroyRecursive();
+            this.inherited(arguments);
+        }
+    });
+});
Index: Dev/trunk/client/qed/model/widgets/templates/QuestionEditorPreviewItem.html
===================================================================
--- Dev/trunk/client/qed/model/widgets/templates/QuestionEditorPreviewItem.html	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/templates/QuestionEditorPreviewItem.html	(revision 424)
@@ -0,0 +1,15 @@
+<div>
+	<div class="topBorder inheritBgColor bg dojoDndHandle">
+		<span class="title" data-dojo-attach-point="titleNode">Default title</span>
+		<span class="floatRight" data-dojo-attach-point="buttonsNode">
+			<button class="trans bg inheritBgColor" data-dojo-type="dijit/form/Button" data-dojo-attach-point="editButtonNode" data-dojo-props="baseClass: 'rftBlockButton', iconClass: 'rftIcon rftIconEdit'">Edit</button>
+			<button class="trans bg inheritBgColor" data-dojo-type="dijit/form/Button" data-dojo-attach-point="foldButtonNode" data-dojo-props="baseClass: 'rftBlockButton', showLabel: false, iconClass: 'rftIcon rftIconHalfArrowUp'">Fold</button>
+			<button class="trans bg inheritBgColor" data-dojo-type="dijit/form/Button" data-dojo-attach-point="removeButtonNode" 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" data-dojo-attach-point="containerNode">
+		</div>
+	</div>
+</div>
Index: Dev/trunk/client/qed/model/widgets/templates/QuestionEditorToolkit.html
===================================================================
--- Dev/trunk/client/qed/model/widgets/templates/QuestionEditorToolkit.html	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/templates/QuestionEditorToolkit.html	(revision 424)
@@ -0,0 +1,31 @@
+<div>
+	<div data-dojo-type="dojox/widget/TitleGroup">
+		<div data-dojo-type="dijit/TitlePane" class="orange" data-dojo-props="open:true" title="Properties" data-dojo-props="iconClass:'rftIcon rftIconProperties'">
+            <div data-dojo-type="dijit/form/Form" data-dojo-attach-point="propertiesForm">
+				<fieldset class="align">
+					<label>Title:</label><input data-dojo-type="dijit/form/TextBox" name="title"/>
+					<label>Code:</label><input data-dojo-type="dijit/form/TextBox" name= "code"/>
+					<label>Categories:</label>
+					<div data-dojo-attach-point="listNode" class="rftLineListView"></div> 
+					<div data-dojo-attach-point="categoriesBoxNode"></div>
+					<button class="inheritBgColor" data-dojo-type="dijit/form/Button" data-dojo-attach-event="onClick:onCategoryAdd" data-dojo-props="baseClass:'rftBlockButton', iconClass: 'rftIcon rftIconPlus'">Add</button><br>
+					<label>Topic:</label>
+					<div data-dojo-attach-point="topicBoxNode"></div>
+					<label>Description:</label><textarea data-dojo-type="dijit/form/Textarea" name="description"></textarea>
+				</fieldset>
+			</div>
+		</div>
+
+		<div data-dojo-type="dijit/TitlePane" title="Content" data-dojo-props="iconClass:'rftIcon rftIconPlus', open:false">
+			<div data-dojo-attach-point="ToolkitContentSourceNode">
+				
+			</div>
+		</div>
+
+		<div data-dojo-type="dijit/TitlePane" title="Inputs" data-dojo-props="iconClass:'rftIcon rftIconInput', open:false">
+			<div data-dojo-attach-point="ToolkitInputsSourceNode">
+				
+			</div>
+		</div>
+	</div>
+</div>
Index: Dev/trunk/client/qed/model/widgets/templates/QuestionWidget.html
===================================================================
--- Dev/trunk/client/qed/model/widgets/templates/QuestionWidget.html	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/templates/QuestionWidget.html	(revision 424)
@@ -0,0 +1,23 @@
+<div>
+    <form data-dojo-type="dijit/form/Form" data-dojo-attach-point="ourForm">
+        <fieldset>
+            <label for="code" class="loginLabel">Code</label>
+            <input data-dojo-type="dijit/form/TextBox" name="code" type="text" class="loginInput" />
+            <label for="question" class="loginLabel">Title</label>
+            <input data-dojo-type="dijit/form/TextBox" name="title" type="text" class="loginInput" />
+            <label for="question" class="loginLabel">Description</label>
+            <input data-dojo-type="dijit/form/Textarea" name="description" type="text" class="loginInput"/>
+            <label for="category" class="loginLabel">Category</label>
+            <input data-dojo-type="dijit/form/TextBox" name="category" type="text" class="loginInput" />
+        </fieldset>
+        <fieldset>
+            <select data-dojo-type="dijit/form/Select" data-dojo-attach-point="scaleSelector" data-dojo-attach-event="onChange:_onTypeChange" name="scale">
+                <option value="string" selected>String</option>
+                <option value="text">Text</option>
+                <option value="singleChoice">Single choice</option>
+                <option value="multipleChoice">Multiple choice</option>
+            </select>
+            <div data-dojo-attach-point="scaleDetails"></div>
+        </fieldset>
+    </form>
+</div>
Index: Dev/trunk/client/qed/model/widgets/templates/SurveyFieldset.html
===================================================================
--- Dev/trunk/client/qed/model/widgets/templates/SurveyFieldset.html	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/templates/SurveyFieldset.html	(revision 424)
@@ -0,0 +1,6 @@
+<fieldset class="${baseClass}">
+    <label for="title">Title</label>
+    <input data-dojo-type="dijit/form/TextBox" name="title"/><br/>
+    <label for="description">Description</label>
+    <input data-dojo-type="dijit/form/Textarea" name="description"/><br/>
+</fieldset>
Index: Dev/trunk/client/qed/model/widgets/templates/SurveyRunFieldset.html
===================================================================
--- Dev/trunk/client/qed/model/widgets/templates/SurveyRunFieldset.html	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/templates/SurveyRunFieldset.html	(revision 424)
@@ -0,0 +1,26 @@
+<fieldset class="${baseClass} qedFieldset">
+
+    <div>
+    <label for="mode" class="qedLabel">Description</label>
+    <textarea name="description" class="qedField" data-dojo-type="dijit/form/Textarea"></textarea>
+    </div>
+
+    <div>
+    <label for="startDate" class="qedLabel">Start date</label>
+    <input type="text" name="startDate" class="qedField" data-dojo-type="dijit/form/DateTextBox" data-dojo-attach-point="startDateBox" />
+    </div>
+
+    <div>
+    <label for="endDate" class="qedLabel">End date</label>
+    <input type="text" name="endDate" class="qedField" data-dojo-type="dijit/form/DateTextBox" data-dojo-attach-point="endDateBox" />
+    </div>
+
+    <div>
+    <label for="mode" class="qedLabel">Mode</label>
+    <select name="mode" class="qedField" data-dojo-type="dijit/form/Select">
+        <option value="open" selected="selected">Open</option>
+        <option value="closed">Closed</option>
+    </select>
+    </div>
+
+</fieldset>
Index: Dev/trunk/client/qed/model/widgets/templates/SurveySummary.html
===================================================================
--- Dev/trunk/client/qed/model/widgets/templates/SurveySummary.html	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/templates/SurveySummary.html	(revision 424)
@@ -0,0 +1,6 @@
+<fieldset class="qedFieldset">
+    <legend>Survey</legend>
+    <div><div class="qedLabel">Title</div><div class="qedField" data-dojo-attach-point="titleNode"></div></div>
+    <div><div class="qedLabel">Description</div><div class="qedField" data-dojo-attach-point="descriptionNode"></div></div>
+    <div><div class="qedLabel">Questions</div><div class="qedField" data-dojo-attach-point="questionsNode"></div></div>
+</fieldset>
Index: Dev/trunk/client/qed/model/widgets/templates/SurveyWidget.html
===================================================================
--- Dev/trunk/client/qed/model/widgets/templates/SurveyWidget.html	(revision 424)
+++ Dev/trunk/client/qed/model/widgets/templates/SurveyWidget.html	(revision 424)
@@ -0,0 +1,2 @@
+<div class="${baseClass}">
+</div>
Index: Dev/trunk/client/qed/package.js
===================================================================
--- Dev/trunk/client/qed/package.js	(revision 424)
+++ Dev/trunk/client/qed/package.js	(revision 424)
@@ -0,0 +1,15 @@
+var profile = (function(){
+    return {
+        resourceTags: {
+            amd: function (filename, mid) {
+                return /\.js$/.test(filename);
+            },
+            declarative: function (filename, mid) {
+                return /\.html$/.test(filename);
+            },
+            copyOnly: function(filename,mid) {
+                return false;
+            }
+        }
+    };
+})();
Index: Dev/trunk/client/qed/package.json
===================================================================
--- Dev/trunk/client/qed/package.json	(revision 424)
+++ Dev/trunk/client/qed/package.json	(revision 424)
@@ -0,0 +1,10 @@
+{
+    "name": "rft",
+    "description": "Research Facilitator Tool",
+    "dependencies": {
+        "dojo": "~1.8.0",
+        "dijit": "~1.8.0",
+        "dojox": "~1.8.0"
+    },
+    "dojoBuild": "package.js"
+}
Index: Dev/trunk/client/qed/pages/index.js
===================================================================
--- Dev/trunk/client/qed/pages/index.js	(revision 424)
+++ Dev/trunk/client/qed/pages/index.js	(revision 424)
@@ -0,0 +1,22 @@
+define([
+    'dojo/_base/declare',
+    '../app/Router',
+    '../app/Page',
+    'dojo/text!./templates/index.html'
+],function(declare,Router,Page,template){
+    return declare([Page],{
+        templateString: template,
+        selectedObject: null,
+        startup: function() {
+            if ( this._started ) { return; }
+            this.inherited(arguments);
+            this.btnContentCreate.on("click",function(){ Router.go("/sessions"); });
+            this.btnContentFacilitate.on("click",function(){ Router.go("/run"); });
+            this.btnSurveys.on("click",function(){ Router.go("/surveys"); });
+            this.btnQuestions.on("click",function(){ Router.go("/questions"); });
+            this.btnApplications.on("click",function(){ Router.go("/applications"); });
+            this.btnDashboards.on("click",function(){ Router.go("/dashboards"); });
+            this.btnResults.on("click",function(){ Router.go("/results"); });
+        }
+    });
+});
Index: Dev/trunk/client/qed/pages/previewSurvey.js
===================================================================
--- Dev/trunk/client/qed/pages/previewSurvey.js	(revision 424)
+++ Dev/trunk/client/qed/pages/previewSurvey.js	(revision 424)
@@ -0,0 +1,26 @@
+define([
+    'dojo/_base/array',
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/when',
+    '../store',
+    '../app/Page',
+    'dojo/text!./templates/previewSurvey.html'
+],function(array,declare,lang,when,store,Page,template){
+    return declare([Page],{
+        templateString: template,
+        startup: function() {
+            if ( this._started ) { return; }
+            this.inherited(arguments);
+            if ( this.surveyId ) {
+                when(store.get(this.surveyId))
+                .then(lang.hitch(this,function(survey){
+                    this.titleNode.innerHTML = survey.title;
+                    this.surveyWidget.set('survey',survey);
+                }));
+            } else {
+                throw new Error("No valid uid or survey passed!");
+            }
+        }
+    });
+});
Index: Dev/trunk/client/qed/pages/question.js
===================================================================
--- Dev/trunk/client/qed/pages/question.js	(revision 424)
+++ Dev/trunk/client/qed/pages/question.js	(revision 424)
@@ -0,0 +1,75 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/event',
+    'dojo/_base/lang',
+    'dojo/when',
+    '../store',
+    '../app/Content',
+    '../app/Router',
+    '../app/Page',
+    '../model/classes/Question',
+    '../model/widgets/QuestionEditorPreview',
+    '../model/widgets/QuestionEditorToolkit',
+    'dojo/text!./templates/question.html'
+],function(declare, event, lang, when, store, Content, Router, Page, Question, QuestionEditorPreview, QuestionEditorToolkit, template){
+    return declare([Page], {
+        templateString: template,
+        question: null,
+        _toolkit: null,
+        _preview: null,
+        
+        startup: function() {
+            if ( this._started ) { return; }
+            this.inherited(arguments);
+            if ( !this.questionId ) {
+                throw new Error("Error: no reference to object set!");
+            }
+            this._setupEditor();
+            if (this.questionId === "new") {
+                this.question = Question.create();
+                this._refresh();
+            } else {
+                when(store.get(this.questionId))
+                .then(lang.hitch(this, function(obj) {
+                    this.question = obj;
+                    this._refresh();
+                }));
+            }
+        },
+        onLeave: function() {
+            this.inherited(arguments);
+        },
+        _refresh: function () {
+            this.titleNode.innerHTML = Question.DisplayTitle.get(this.question);
+            this._toolkit.set('value',this.question);
+            this._preview.appendItems(Question.Content.get(this.question));
+        },
+        _onSave: function(evt) {
+            lang.mixin(this.question, this._toolkit.get('value'));
+            Question.Content.set(this.question, this._preview.getItems());
+            store.put(this.question)
+            .then(function() {
+                Router.go('/questions');
+            },function(err){
+                Content.notify(err,'error');
+            });
+            evt && event.stop( evt );
+            return false;
+        },
+        _onDiscard: function() {
+            Router.go('/questions');
+            return true;
+        },
+        _setupEditor: function() {
+            this._toolkit = new QuestionEditorToolkit({
+            },this.QuestionEditorToolkitNode);
+            this._toolkit.on('submit',lang.hitch(this,"_onSave"));
+            this._toolkit.startup();
+
+            this._preview = new QuestionEditorPreview({ 
+            },this.QuestionEditorPreviewNode);
+            this._preview.startup();
+            this._supportingWidgets.push(this._toolkit, this._preview);
+        }
+    });
+});
Index: Dev/trunk/client/qed/pages/questions.js
===================================================================
--- Dev/trunk/client/qed/pages/questions.js	(revision 424)
+++ Dev/trunk/client/qed/pages/questions.js	(revision 424)
@@ -0,0 +1,65 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/Deferred',
+    'dojo/_base/event',
+    'dojo/_base/lang',
+    '../store',
+    '../app/Content',
+    '../app/Router',
+    '../app/Page',
+    '../model/widgets/TabbedQuestionBrowser',
+    'dojo/text!./templates/questions.html'
+],function(declare,Deferred,event,lang,store,Content,Router,Page,TabbedQuestionBrowser,template) {
+    return declare([Page],{
+        templateString: template,
+        startup: function() {
+            if ( this._started ) { return; }
+            this.inherited(arguments);
+            this.questionBrowser = new TabbedQuestionBrowser({
+                region: 'center',
+                'class': 'orange',
+                itemActions: {
+                    Delete: {
+                        callback: lang.hitch(this,"onDeleteQuestion"),
+                        icon: 'Delete',
+                        description: 'Delete question'
+                    },
+                    Edit: {
+                        callback: lang.hitch(this,"onEditQuestion"),
+                        icon: 'Edit',
+                        description: 'Edit question'
+                    },
+                    Publish: {
+                        callback: lang.hitch(this,"onPublishQuestion"),
+                        icon: 'Publish',
+                        description: 'Publish question'
+                    }
+                }
+            },this.questionBrowser);
+            this.questionBrowser.startup();
+        },
+        onNewQuestion: function() {
+            Router.go("/question/new");
+        },
+        onDeleteQuestion: function(question) {
+            store.remove(store.getIdentity(question),store.getRevision(question))
+            .then(function(){
+                Content.notify("Question deleted.");
+            },function(err){
+                Content.notify(err,'error');
+            });
+        },
+        onEditQuestion: function(question) {
+            Router.go("/question/"+question._id);
+        },
+        onPublishQuestion: function(question) {
+            question.publicationDate = store.timestamp();
+            store.put(question)
+            .then(function(){
+                Content.notify("Question published.");
+            },function(err){
+                Content.notify(err,'error');
+            });
+        }
+    });
+});
Index: Dev/trunk/client/qed/pages/response.js
===================================================================
--- Dev/trunk/client/qed/pages/response.js	(revision 424)
+++ Dev/trunk/client/qed/pages/response.js	(revision 424)
@@ -0,0 +1,78 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/event',
+    'dojo/_base/lang',
+    'dojo/promise/all',
+    'dojo/when',
+    '../store',
+    '../app/Page',
+    '../lib/async',
+    '../model/classes/Response',
+    '../model/classes/Survey',
+    '../model/classes/SurveyRun',
+    'dojo/text!./templates/response.html'
+],function(declare,event,lang,all,when,store,Page,async,Response,Survey,SurveyRun,template){
+    return declare([Page],{
+        templateString: template,
+        response: null,
+        postCreate: function(){
+            this.options = this.options || {};
+        },
+        startup: function() {
+            if ( this._started ) { return; }
+            this.inherited(arguments);
+            this._disableButtons();
+            var surveyRunId = this.surveyRunId;
+            var responseId = this.options && this.options.id;
+            if ( surveyRunId && responseId ) {
+                this._loadSurveyAndResponse(surveyRunId,responseId)
+                .then(lang.hitch(this,"_enableButtons"));
+            } else {
+                throw new Error("No valid uid or survey passed!");
+            }
+        },
+        _loadSurveyAndResponse: function(surveyRunId,responseId){
+            return all([store.get(surveyRunId),store.get(responseId)])
+            .then(lang.hitch(this,function(surveyAndResponse){
+                var surveyRun = surveyAndResponse[0];
+                this.response = surveyAndResponse[1];
+                if ( this.response.surveyRunId !== surveyRunId ) {
+                    throw "Survey does not match the response...";
+                }
+                this.titleNode.innerHTML = Survey.DisplayTitle.get(surveyRun.survey);
+                this.surveyWidget.set('survey',surveyRun.survey);
+                this.responseForm.set('value',this.response.answers || {});
+            }));
+        },
+        _enableButtons: function() {
+            this.submitButton.set('disabled',false);
+            this.continueButton.set('disabled',false);
+        },
+        _disableButtons: function() {
+            this.submitButton.set('disabled',true);
+            this.continueButton.set('disabled',true);
+        },
+        _getAnswersAndSaveResponse: function() {
+            this.response.answers = this.responseForm.get('value');
+            console.log(this.response);
+            return store.put(this.response);
+        },
+        _onSubmit: function(e) {
+            this.response.publicationDate = store.timestamp();
+            this._getAnswersAndSaveResponse();
+            this.content.domNode.innerHTML = "<div>Thanks for filling in the survey.</div>";
+            e && event.stop(e);
+            return false;
+        },
+        _onContinueLater: function(e) {
+            this._getAnswersAndSaveResponse();
+            this.content.domNode.innerHTML = "<div>To continue with this survey later, just save the URL in the location bar and revisit it later. Your answers will still be there.</div>";
+            e && event.stop(e);
+            return false;
+        },
+        _ignoreEvent: function(e) {
+            e && event.stop(e);
+            return false;
+        }
+    });
+});
Index: Dev/trunk/client/qed/pages/session.js
===================================================================
--- Dev/trunk/client/qed/pages/session.js	(revision 424)
+++ Dev/trunk/client/qed/pages/session.js	(revision 424)
@@ -0,0 +1,97 @@
+define([
+    'dojo/_base/array',
+    'dojo/_base/declare',
+    'dojo/_base/event',
+    'dojo/_base/lang',
+    'dojo/when',
+    '../search',
+    '../store',
+    '../app/Page',
+    '../app/Router',
+    '../widgets/ThresholdFilteringSelect',
+    '../model/classes/SessionTemplate',
+    '../model/widgets/AccountListView',
+    'dojo/text!./templates/session.html'
+],function(array,declare,event,lang,when,search,store,Page,Router,ThresholdFilteringSelect,SessionTemplate,AccountListView,template){
+    return declare([Page],{
+        templateString: template,
+        session: null,
+        _accountList: null,
+        _select: null,
+        startup: function() {
+            if ( this._started ) { return; }
+            this.inherited(arguments);
+            if ( this.sessionId ) {
+                this._loadSession();
+                this._setupAutoComplete();
+            } else {
+                throw "No valid uid or session passed!";
+            }
+        },
+        _loadSession: function() {
+            if ( this.sessionId === "new" ) {
+                this.session = SessionTemplate.create();
+            } else {
+                when(store.get(this.sessionId))
+                .then(lang.hitch(this,function(obj){
+                    this.session = obj;
+                    this._setupAccountList();
+                    this._refresh();
+                }));
+            }
+        },
+        _refresh: function() {
+            this.titleNode.innerHTML = SessionTemplate.DisplayTitle.get(this.session);
+            this.propertiesForm.set('value',this.session);
+        },
+        onInvite: function() {
+            this._addAccount(this._select.item.i);
+            this._select.reset();
+        },
+        onSave: function(evt) {
+            lang.mixin(this.session,this.propertiesForm.get('value'));
+            this.session.accounts = array.map(this._accountList.getItems(),function(item){
+                return store.getIdentity(item);
+            });
+            store.put(this.session)
+            .then(function(){
+                Router.go('/sessions');
+            });
+            event.stop(evt);
+            return false;
+        },
+        onDiscard: function(evt) {
+            this.propertiesForm.reset();
+            event.stop(evt);
+            Router.go('/sessions');
+            return false;
+        },
+        _addAccount: function(item) {
+            this._accountList.insertItem(item);
+        },
+        _setupAccountList: function() {
+            this._accountList = new AccountListView().placeAt(this.accountListNode);
+            this._accountList.startup();
+            for (var account in this.session.accounts) {
+                this._accountList.insertItem(this.session.accounts[account]);
+            }
+        },
+        _setupAutoComplete: function() {
+            this._select = new ThresholdFilteringSelect({
+                store: search,
+                autoComplete: false,
+                required: false,
+                labelType: "text",
+                placeHolder: "Enter email address here...",
+                pageSize: 10,
+                hasDownArrow: false,
+                style: "width: 400",
+                searchAttr: "title"
+            }, this.accountSelector);
+            this._select.startup();
+        }
+
+
+    });
+});
+
Index: Dev/trunk/client/qed/pages/sessions.js
===================================================================
--- Dev/trunk/client/qed/pages/sessions.js	(revision 424)
+++ Dev/trunk/client/qed/pages/sessions.js	(revision 424)
@@ -0,0 +1,76 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/date/stamp',
+    '../store',
+    '../app/Router',
+    '../app/Page',
+    '../widgets/ObjectBox',
+    'dojo/text!./templates/sessions.html'
+],function(declare,lang,dateStamp,store,Router,Page,ObjectBox,template){
+    return declare([Page],{
+        templateString: template,
+        templateActions: null,
+        sessionActions: null,
+        startup: function() {
+            if ( this._started ) { return; }
+            this.inherited(arguments);
+            this.templateActions = {
+                "Edit": function(obj){
+                    Router.go('/session/'+store.getIdentity(obj));
+                },
+                "Delete": lang.hitch(this,function(obj){
+                    store.remove(store.getIdentity(obj),store.getRevision(obj))
+                    .then(lang.hitch(this,function(){
+                        this._refresh();
+                    }));
+                }),
+                "Publish": lang.hitch(this,this._publishSession)
+            };
+            this.sessionActions = {
+                "Facilitate": function(obj){
+                    Router.go('run',{uid:store.getIdentity(obj)});
+                },
+                "Delete": lang.hitch(this,function(obj){
+                    store.remove(store.getIdentity(obj),store.getRevision(obj))
+                    .then(lang.hitch(this,function(){
+                        this._refresh();
+                    }));
+                })
+            };
+            this._refresh();
+        },
+        _refresh: function() {
+            this.containerTemplates.set('content','');
+            this.containerSessions.set('content','');
+            this._refreshByType('SessionTemplate',this.containerTemplates.domNode,this.templateActions);
+            this._refreshByType('SessionInstance',this.containerSessions.domNode,this.sessionActions);
+        },
+        _refreshByType: function(type,container,actions) {
+            store.query("_design/default/_view/by_type",{key:type})
+            .forEach(lang.hitch(this,function(obj){
+                var widget = new ObjectBox({
+                    actions: actions
+                }).placeAt(container, "last");
+                widget.startup();
+                widget.set('value',obj);
+            }));
+        },
+        onAddSessionTemplate: function(){
+            Router.go('/session/new');
+        },
+        _publishSession: function(sessionTemplate) {
+            var session = lang.clone(sessionTemplate);
+            delete session[store.idProperty];
+            delete session[store.revProperty];
+            session.type = "SessionInstance";
+            session.publicationDate = store.timestamp();
+            session.creator = "Igor Mayer";
+            store.add(session)
+            .then(lang.hitch(this,function(){
+                this._refresh();
+                this.tabContainer.selectChild(this.sessionsTab);
+            }));
+        }
+    });
+});
Index: Dev/trunk/client/qed/pages/survey.js
===================================================================
--- Dev/trunk/client/qed/pages/survey.js	(revision 424)
+++ Dev/trunk/client/qed/pages/survey.js	(revision 424)
@@ -0,0 +1,115 @@
+define([
+    'dojo/_base/array',
+    'dojo/_base/declare',
+    'dojo/_base/event',
+    'dojo/_base/lang',
+    'dojo/when',
+    '../app/Router',
+    '../store',
+    '../app/Page',
+    '../model/classes/Survey',
+    '../model/widgets/QuestionListView',
+    '../model/widgets/TabbedQuestionBrowser',
+    'dojo/text!./templates/survey.html'
+],function(array,declare,event,lang,when,Router,store,Page,Survey,
+         QuestionListView,TabbedQuestionBrowser,template){
+    return declare([Page],{
+        templateString: template,
+        survey: null,
+        questionList: null,
+        startup: function() {
+            if ( this._started ) { return; }
+            this.inherited(arguments);
+            if ( this.surveyId ) {
+                this._setupQuestionBrowser();
+                this._setupListView();
+                this._loadSurvey();
+            } else {
+                throw "No valid uid or survey passed!";
+            }
+        },
+        _setupQuestionBrowser: function() {
+            this.questionBrowser = new TabbedQuestionBrowser({
+                region: 'center',
+                'class': 'blue',
+                include: 'published',
+                selectedActions: {
+                    "Include": {
+                        callback: lang.hitch(this,this._includeQuestion),
+                        icon: "Accept",
+                        description: "Include in survey"
+                    }
+                },
+                itemActions: {
+                    "Info": {
+                        callback: function(item){ item.description && alert(item.description); },
+                        icon: "Inspect",
+                        description: "Show item description"
+                    }
+                }
+            },this.questionBrowser);
+            this.questionBrowser.startup();
+        },
+        _setupListView: function() {
+            this.questionList = new QuestionListView({
+                region: 'center'
+            },this.surveyListViewNode);
+            this.questionList.startup();
+        },
+        _loadSurvey: function() {
+            if ( this.surveyId === "new" ) {
+                this.survey = Survey.create();
+                this.refresh();
+            } else {
+                when(store.get(this.surveyId))
+                .then(lang.hitch(this,function(survey){
+                    this.survey = survey;
+                    array.forEach(Survey.Questions.get(this.survey),
+                        lang.hitch(this.questionList,'appendItem'));
+                    this.refresh();
+                }));
+            }
+        },
+        _includeQuestion: function(question) {
+            this.questionList.insertItem(question);
+        },
+        refresh: function() {
+            this.titleNode.innerHTML = Survey.DisplayTitle.get(this.survey) || "(set title in properties)";
+            this.propertiesDialog.set('value',this.survey);
+        },
+        _onShowProperties: function(evt) {
+            this.propertiesDialog.show();
+        },
+        _onPropertiesOk: function(evt) {
+            this.propertiesDialog.hide();
+            lang.mixin(this.survey, this.propertiesDialog.get('value'));
+            this.refresh();
+            event.stop(evt);
+            return false;
+        },
+        _onPropertiesCancel: function(evt) {
+            this.propertiesDialog.hide();
+            this.propertiesDialog.reset('value',this.survey);
+            event.stop(evt);
+            return false;
+        },
+        _onSave: function(evt) {
+            this.survey.questions = this.questionList.getItems();
+            store.put(this.survey)
+            .then(function() { 
+                Router.go('/surveys');
+            });
+            event.stop(evt);
+            return false;
+        },
+        _onDiscard: function(evt) {
+            Router.go('/surveys');
+        },
+        _onShowPreview: function() {
+            Router.go('/previewSurvey/'+store.getIdentity(this.survey),{
+                preview: true
+            });
+        }
+    });
+});
+
Index: Dev/trunk/client/qed/pages/surveyRun.js
===================================================================
--- Dev/trunk/client/qed/pages/surveyRun.js	(revision 424)
+++ Dev/trunk/client/qed/pages/surveyRun.js	(revision 424)
@@ -0,0 +1,105 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/event',
+    'dojo/_base/lang',
+    'dojo/when',
+    '../app/Content',
+    '../app/Router',
+    '../lib/func',
+    '../store',
+    '../app/Page',
+    '../model/classes/SurveyRun',
+    '../widgets/LineWithActionsWidget',
+    'dojo/text!./templates/surveyRun.html'
+],function(declare,event,lang,when,Content,Router,func,store,Page,SurveyRun,LineWithActionsWidget,template){
+    return declare([Page],{
+        templateString: template,
+        surveyRun: null,
+        startup: function() {
+            if ( this._started ) { return; }
+            this.inherited(arguments);
+            this.propertiesForm.on("blur",lang.hitch(this,'_onPropChange'));
+            if ( this.surveyRunId ) {
+                this._loadSurveyRun();
+                this._loadResponses();
+            } else {
+                throw "No valid uid or survey passed!";
+            }
+        },
+        _loadSurveyRun: function() {
+            when(store.get(this.surveyRunId))
+            .then(lang.hitch(this,function(surveyRun){
+                this.surveyRun = surveyRun;
+                this.refreshSurveyRun();
+            }));
+        },
+        refreshSurveyRun: function() {
+            this.titleNode.innerHTML = SurveyRun.DisplayTitle.get(this.surveyRun);
+            this.surveyNode.set('value',SurveyRun.Survey.get(this.surveyRun));
+            this.propertiesForm.set('value',this.surveyRun);
+            this._onPropChange();
+        },
+        _loadResponses: function() {
+            when(store.query("_design/responses/_view/by_surveyrun",{key:this.surveyRunId}))
+            .forEach(lang.hitch(this,function(response){
+                var actions = {
+                    view: {
+                        callback: function(){},
+                        properties: {
+                            title: "View response"
+                        }
+                    }
+                };
+                if ( !response.publicationDate ) {
+                    actions.remove = {
+                        callback: function(){},
+                        properties: {
+                            title: "Remove response"
+                        }
+                    };
+                }
+                var w = new LineWithActionsWidget({
+                    actions: actions
+                });
+                var responseId = store.getIdentity(response);
+                w.set('title',this._link(this._getResponseURL(this.surveyRunId,responseId),responseId));
+                w.placeAt(this.responsesNode);
+            }));
+        },
+        _onPropChange: function(e) {
+            var surveyRun = this.propertiesForm.get('value');
+            if ( surveyRun.mode === "open" ) {
+                this.runURLNode.innerHTML = this._link(this._getGeneralURL(store.getIdentity(this.surveyRun)));
+            } else {
+                this.runURLNode.innerHTML = "No general URL. Add individual respondents below.";
+            }
+        },
+        _getGeneralURL: function(surveyRunId) {
+            return 'response.html#!/'+surveyRunId;
+        },
+        _getResponseURL: function(surveyRunId,responseId) {
+            return 'response.html#!/'+surveyRunId+'!id='+responseId;
+        },
+        _link: function(url,label) {
+            return '<a target="_black" href="'+url+'">'+(label || url)+'</a>';
+        },
+        _onSave: function(evt) {
+            lang.mixin(this.surveyRun,this.propertiesForm.get('value'));
+            var not = function(p){ return !p; };
+            func.modPropIf(this.surveyRun,"startDate",not.compose(lang.isString),store.formatDate);
+            func.modPropIf(this.surveyRun,"endDate",not.compose(lang.isString),store.formatDate);
+            store.put(this.surveyRun)
+            .then(function() { 
+                Router.go('/surveys');
+            },function(err){
+                Content.notify(err);
+            });
+            event.stop(evt);
+            return false;
+        },
+        _onDiscard: function(evt) {
+            Router.go('/surveys');
+        }
+    });
+});
+
Index: Dev/trunk/client/qed/pages/surveys.js
===================================================================
--- Dev/trunk/client/qed/pages/surveys.js	(revision 424)
+++ Dev/trunk/client/qed/pages/surveys.js	(revision 424)
@@ -0,0 +1,161 @@
+define([
+    'dojo/_base/array',
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/when',
+    '../store',
+    '../app/Content',
+    '../app/Page',
+    '../app/Router',
+    '../model/classes/Survey',
+    '../model/classes/SurveyRun',
+    '../widgets/LineWithActionsWidget',
+    'dojo/text!./templates/surveys.html'
+],function(array,declare,lang,when,store,Content,Page,Router,Survey,SurveyRun,LineWithActionsWidget,template){
+    return declare([Page],{
+        templateString: template,
+        startup: function() {
+            if ( this._started ) { return; }
+            this.inherited(arguments);
+            this.refresh();
+        },
+        _onNewSurvey: function(){
+            Router.go('/survey/new');
+        },
+        _onPublishSurvey:function(survey){
+            var self = this;
+            survey.publicationDate = store.timestamp();
+            store.put(survey).then(function(){
+                self.refreshDrafts();
+                self.refreshPublished();
+            },function(err){
+                Content.notify(err,'error');
+            });
+        },
+        _onDeleteSurvey:function(survey){
+            var self = this;
+            store.remove(store.getIdentity(survey),store.getRevision(survey))
+            .then(function(){
+                self.refreshDrafts();
+            },function(err){
+                Content.notify(err,'error');
+            });
+        },
+        _onEditSurvey:function(survey){
+            Router.go('/survey/'+store.getIdentity(survey));
+        },
+        _onPreviewSurvey:function(survey){
+            Router.go('/previewSurvey/'+store.getIdentity(survey));
+        },
+        _onRunSurvey:function(survey){
+            var surveyRun = SurveyRun.create();
+            SurveyRun.Survey.set(surveyRun,survey);
+            store.put(surveyRun)
+            .then(lang.hitch(this,function(surveyRun){
+                this._onRunDetails(surveyRun);
+            }),function(err){
+                Content.notify(err);
+            });
+        },
+        _onRunDetails: function(surveyRun) {
+            Router.go('/surveyRun/'+store.getIdentity(surveyRun));
+        },
+        refresh: function() {
+            this.refreshDrafts();
+            this.refreshPublished();
+            this.refreshRuns();
+        },
+        refreshDrafts: function() {
+            this.draftsContainer.set('content','');
+            when(store.query("_design/surveys/_view/drafts")
+                    ,lang.hitch(this,function(surveys){
+                this.draftsTab.set('title','Drafts ('+surveys.length+')');
+                array.forEach(surveys,function(survey){
+                    var w = new LineWithActionsWidget({
+                        title: Survey.DisplayTitle.get(survey) || '(unnamed)',
+                        actions: [{
+                            callback: lang.hitch(this,'_onPublishSurvey',survey),
+                            properties: {
+                                label: 'Publish',
+                                tooltip: 'Publish survey',
+                                icon: 'Publish'
+                            }
+                        },{
+                            callback: lang.hitch(this,'_onPreviewSurvey',survey),
+                            properties: {
+                                label: 'Preview',
+                                tooltip: 'Preview survey',
+                                icon: 'Preview'
+                            }
+                        },{
+                            callback: lang.hitch(this,'_onDeleteSurvey',survey),
+                            properties: {
+                                label: 'Delete',
+                                tooltip: 'Delete survey',
+                                icon: 'Delete'
+                            }
+                        },{
+                            callback: lang.hitch(this,'_onEditSurvey',survey),
+                            properties: {
+                                label: 'Edit',
+                                tooltip: 'Edit survey',
+                                icon: 'Edit'
+                            }
+                        }]
+                    });
+                    this.draftsContainer.addChild(w);
+                },this);
+            }));
+        },
+        refreshPublished: function() {
+            this.publishedContainer.set('content','');
+            when(store.query("_design/surveys/_view/published")
+                    ,lang.hitch(this,function(surveys){
+                this.publishedTab.set('title','Published ('+surveys.length+')');
+                array.forEach(surveys,function(survey){
+                    var w = new LineWithActionsWidget({
+                        title: Survey.DisplayTitle.get(survey),
+                        actions:[{
+                            callback: lang.hitch(this,'_onPreviewSurvey',survey),
+                            properties: {
+                                label: 'Preview',
+                                tooltip: 'Preview survey',
+                                icon: 'Preview'
+                            }
+                        },{
+                            callback: lang.hitch(this,'_onRunSurvey',survey),
+                            properties: {
+                                label: 'Run',
+                                tooltip: 'Run survey',
+                                icon: 'Run'
+                            }
+                        }]
+                    });
+                    this.publishedContainer.addChild(w);
+                },this);
+            }));
+        },
+        refreshRuns: function() {
+            this.runsContainer.set('content','');
+            when(store.query("_design/default/_view/by_type",{key:'SurveyRun'})
+                    ,lang.hitch(this,function(surveyRuns){
+                this.runsTab.set('title','Runs ('+surveyRuns.length+')');
+                array.forEach(surveyRuns,function(surveyRun){
+                    var w = new LineWithActionsWidget({
+                        title: SurveyRun.DisplayTitle.get(surveyRun),
+                        actions:[{
+                            callback: lang.hitch(this,'_onRunDetails',surveyRun),
+                            properties: {
+                                label: 'Details',
+                                tooltip: 'Show details for this run',
+                                icon: 'Details'
+                            }
+                        }]
+                    });
+                    this.runsContainer.addChild(w);
+                },this);
+            }));
+        }
+    });
+});
+
Index: Dev/trunk/client/qed/pages/templates/index.html
===================================================================
--- Dev/trunk/client/qed/pages/templates/index.html	(revision 424)
+++ Dev/trunk/client/qed/pages/templates/index.html	(revision 424)
@@ -0,0 +1,37 @@
+<div>
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'">
+        <h2>
+            <span class="rftIcon rftIconUser"></span>
+            <span class="headerText">Main Menu</span>
+        </h2>
+    </div>
+
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'">
+
+        <div class="rftIndexMenuBlock" title="Sessions">
+            <div class="rftIndexMenuMask">
+                <span class="rftIcon rftIconSession"></span><span class="label">Sessions</span>
+            </div>
+            <button data-dojo-attach-point="btnContentCreate" data-dojo-type="dijit/form/Button" data-dojo-props="baseClass: 'rftIndexMenuButton', class: 'green twoHeight', iconClass: 'rftIcon rftIconPlus'">Create and edit</button>
+            <button data-dojo-attach-point="btnContentFacilitate" data-dojo-type="dijit/form/Button" data-dojo-props="baseClass: 'rftIndexMenuButton', class: 'green twoHeight', iconClass: 'rftIcon rftIconForward'">Facilitate</button>
+        </div>
+
+        <div class="rftIndexMenuBlock" title="Content">
+            <div class="rftIndexMenuMask">
+                <span class="rftIcon rftIconInspect"></span><span class="label">Content</span>
+            </div>
+            <button data-dojo-attach-point="btnSurveys" data-dojo-type="dijit/form/Button" data-dojo-props="baseClass: 'rftIndexMenuButton', class: 'blue oneHeight', iconClass: 'rftIcon rftIconSurvey'">Surveys</button>
+            <button data-dojo-attach-point="btnQuestions" data-dojo-type="dijit/form/Button" data-dojo-props="baseClass: 'rftIndexMenuButton', class: 'orange oneHeight', iconClass: 'rftIcon rftIconQuestion'">Questions</button>
+            <button data-dojo-attach-point="btnApplications" data-dojo-type="dijit/form/Button" data-dojo-props="baseClass: 'rftIndexMenuButton', class: 'purple oneHeight', iconClass: 'rftIcon rftIconApplication'">Applications</button>
+            <button data-dojo-attach-point="btnDashboards" data-dojo-type="dijit/form/Button" data-dojo-props="baseClass: 'rftIndexMenuButton', class: 'red oneHeight', iconClass: 'rftIcon rftIconDashboard'">Dashboards</button>
+        </div>
+
+        <div class="rftIndexMenuBlock" title="results">
+            <div class="rftIndexMenuMask">
+                <span class="rftIcon rftIconGameData"></span><span class="label">Results</span>
+            </div>
+            <button data-dojo-attach-point="btnResults" data-dojo-type="dijit/form/Button" data-dojo-props="baseClass: 'rftIndexMenuButton', class: 'blue fourHeight', iconClass: 'rftIcon rftIconGameData'">Results</button>
+        </div>
+    </div>
+
+</div>
Index: Dev/trunk/client/qed/pages/templates/previewSurvey.html
===================================================================
--- Dev/trunk/client/qed/pages/templates/previewSurvey.html	(revision 424)
+++ Dev/trunk/client/qed/pages/templates/previewSurvey.html	(revision 424)
@@ -0,0 +1,16 @@
+<div class="blue">
+
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'">
+        <h2>
+            <span class="rftIcon rftIconSurvey"></span>
+            <span class="headerText" data-dojo-attach-point="titleNode">Survey</span>
+        </h2>
+    </div>
+    
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'" data-dojo-attach-point="questionsPane">
+        <form data-dojo-type="dijit/form/Form" data-dojo-attach-point="questionsForm" style="overflow: auto">
+            <div data-dojo-type="qed/model/widgets/SurveyWidget" data-dojo-attach-point="surveyWidget"></div>
+        </form>
+    </div>
+    
+</div>
Index: Dev/trunk/client/qed/pages/templates/question.html
===================================================================
--- Dev/trunk/client/qed/pages/templates/question.html	(revision 424)
+++ Dev/trunk/client/qed/pages/templates/question.html	(revision 424)
@@ -0,0 +1,20 @@
+<div class="orange">
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'">
+        <h2>
+            <span class="rftIcon rftIconSurvey"></span>
+            <span class="headerText"><span data-dojo-attach-point="titleNode">Question title</span> [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 data-dojo-attach-point="QuestionEditorToolkitNode"></div>
+        </div>
+        <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'">
+            <button data-dojo-type="dijit/form/Button" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconCancel'" data-dojo-attach-event="onClick:_onDiscard">Discard</button>
+            <button data-dojo-type="dijit/form/Button" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconAccept'" data-dojo-attach-event="onClick:_onSave">Save and exit</button>
+        </div>
+    </div>
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'">
+        <div data-dojo-attach-point="QuestionEditorPreviewNode"></div>
+    </div>
+</div>
Index: Dev/trunk/client/qed/pages/templates/questions.html
===================================================================
--- Dev/trunk/client/qed/pages/templates/questions.html	(revision 424)
+++ Dev/trunk/client/qed/pages/templates/questions.html	(revision 424)
@@ -0,0 +1,18 @@
+<div class="blue page_questions">
+
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'">
+        <h2>
+            <span class="rftIcon rftIconQuestion"></span>
+            <span class="headerText">Questions</span>
+        </h2>
+    </div>
+    
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'">
+        <div data-dojo-attach-point="questionBrowser"></div>
+    </div>
+
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'bottom'">
+        <div data-dojo-type="dijit/form/Button" data-dojo-attach-event="onClick:onNewQuestion" data-dojo-props="baseClass: 'rftLargeButton', iconClass:'rftIcon rftIconQuestion'">New question</div>
+    </div>
+
+</div>
Index: Dev/trunk/client/qed/pages/templates/response.html
===================================================================
--- Dev/trunk/client/qed/pages/templates/response.html	(revision 424)
+++ Dev/trunk/client/qed/pages/templates/response.html	(revision 424)
@@ -0,0 +1,31 @@
+<div class="blue">
+
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'">
+        <h2>
+            <span class="rftIcon rftIconSurvey"></span>
+            <span class="headerText" data-dojo-attach-point="titleNode">Survey</span>
+        </h2>
+    </div>
+    
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'" data-dojo-attach-point="content">
+        <form data-dojo-type="dijit/form/Form" data-dojo-attach-point="responseForm"
+              data-dojo-attach-event="onSubmit:_ignoreEvent" style="overflow: auto">
+            <div data-dojo-type="qed/model/widgets/SurveyWidget" data-dojo-attach-point="surveyWidget"></div>
+        </form>
+    </div>
+    
+
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'bottom'">
+        <button data-dojo-type="dijit/form/Button"
+                type="submit"
+                data-dojo-attach-point="submitButton"
+                data-dojo-attach-event="onClick:_onSubmit">
+            Submit</button>
+        <button data-dojo-type="dijit/form/Button"
+                type="button"
+                data-dojo-attach-point="continueButton"
+                data-dojo-attach-event="onClick:_onContinueLater">
+            Continue later</button>
+    </div>
+
+</div>
Index: Dev/trunk/client/qed/pages/templates/session.html
===================================================================
--- Dev/trunk/client/qed/pages/templates/session.html	(revision 424)
+++ Dev/trunk/client/qed/pages/templates/session.html	(revision 424)
@@ -0,0 +1,55 @@
+<div>
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'">
+        <h2>
+            <span class="rftIcon rftIconSurvey"></span>
+            <span data-dojo-attach-point="titleNode" class="headerText">Untitled</span><span class="headerText"> [editing]</span>
+        </h2>
+    </div>
+    <div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="region:'center'">
+        <div data-dojo-type="dijit/layout/TabContainer" class="green" data-dojo-props="tabPosition:'left-h',region:'center'">
+            <div data-dojo-type="dijit/layout/ContentPane" title="Properties">
+                <div data-dojo-type="dijit/form/Form" data-dojo-attach-point="propertiesForm" data-dojo-attach-event="onSubmit:onSave">
+
+                    <h3>Basic</h3>
+                    <fieldset class="align">
+                        <label for="title">Title</label>
+                        <input type="text" name="title" data-dojo-type="dijit/form/TextBox" data-dojo-props="placeHolder: 'Enter title here'" />
+                        <br/>
+                        <label for="description">Description</label>
+                        <textarea name="description" rows="3" cols="54" data-dojo-type="dijit/form/SimpleTextarea" data-dojo-props="selectOnClick: true, placeHolder: 'Description shown in tooltips'"></textarea>
+                        <br/>
+                        <label for="plannedDate">Planned date</label>
+                        <input type="text" name="plannedDate" data-dojo-type="dijit/form/DateTextBox" required="required" />
+                    </fieldset>
+
+                    <h3>Accounts</h3>
+                    <fieldset class="align">
+                        <label for="accountSelector">Add new</label>
+                        <select data-dojo-attach-point="accountSelector"></select>
+                        <button data-dojo-attach-point="btnInvite" data-dojo-type="dijit/form/Button" data-dojo-attach-event="onClick:onInvite" data-dojo-props="baseClass: 'rftBlockButton', class: 'green', iconClass: 'rftIcon rftIconPlus'">Invite</button>
+                        <br/><br/>
+                        
+                        <div data-dojo-attach-point="accountListNode" class="rftAccountListView">
+                        </div>
+                    </fieldset>
+
+                    <button data-dojo-type="dijit/form/Button" data-dojo-attach-event="onClick:onDiscard" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconCancel'">Discard changes</button>
+                    <button data-dojo-type="dijit/form/Button" data-dojo-attach-event="onClick:onSave" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconAccept'">Save changes</button>
+
+                </div>
+
+            </div>
+            <div data-dojo-type="dijit/layout/ContentPane" title="Design">
+                <div class="rftSessionObject green">
+                    <div class="rftIcon rftIconSurvey"></div>
+                    <label>Survey name</label>
+                </div>
+                <div class="rftSessionObject green">
+                    <div class="rftIcon rftIconSurvey"></div>
+                    <label>Survey name, this one is really long.</label>
+                </div>
+
+            </div>
+        </div>
+    </div>
+</div>
Index: Dev/trunk/client/qed/pages/templates/sessions.html
===================================================================
--- Dev/trunk/client/qed/pages/templates/sessions.html	(revision 424)
+++ Dev/trunk/client/qed/pages/templates/sessions.html	(revision 424)
@@ -0,0 +1,26 @@
+<div class="page_sessions">
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'">
+        <h2>
+            <span class="rftIcon rftIconSession"></span>
+            <span class="headerText">Sessions</span>
+        </h2>
+    </div>
+    <div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="region:'center'">
+        <div data-dojo-attach-point="tabContainer" data-dojo-type="dijit/layout/TabContainer" class="green" data-dojo-props="tabPosition:'left-h',region:'center'">
+            <div data-dojo-type="dijit/layout/BorderContainer" title="Templates" data-dojo-attach-point="templatesTab">
+                <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'center'" data-dojo-attach-point="containerTemplates">
+                </div>
+                <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'bottom'" style="height: 40px;">
+                    <div data-dojo-type="dijit/form/Button" data-dojo-props="region: 'bottom', baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconSessionTemplate'" data-dojo-attach-event="onClick:onAddSessionTemplate">Create new template</div>
+                </div>
+            </div>
+            <div data-dojo-type="dijit/layout/ContentPane" title="Sessions" data-dojo-attach-point="sessionsTab">
+                <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'center'" data-dojo-attach-point="containerSessions">
+                </div>
+                <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'bottom'" style="height: 40px;">
+                    <!-- Buttons? -->
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
Index: Dev/trunk/client/qed/pages/templates/survey.html
===================================================================
--- Dev/trunk/client/qed/pages/templates/survey.html	(revision 424)
+++ Dev/trunk/client/qed/pages/templates/survey.html	(revision 424)
@@ -0,0 +1,52 @@
+<div class="blue">
+
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'">
+        <h2>
+            <span class="rftIcon rftIconSurvey"></span>
+            <span class="headerText" data-dojo-attach-point="titleNode">Survey Editor</span>
+        </h2>
+    </div>
+    
+    <div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="region:'center'">
+        <div data-dojo-attach-point="questionBrowser"></div>
+    </div>
+    
+    <div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="region:'right'" style="width: 300px">
+        <div data-dojo-attach-point="surveyListViewNode" class="rftSurveyListView">
+        </div>
+
+        <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'bottom'">
+            <button data-dojo-type="dijit/form/Button"
+                    data-dojo-attach-event="onClick:_onShowProperties"
+                    data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconProperties'">
+                Properties</button>
+            <button data-dojo-type="dijit/form/Button"
+                    data-dojo-attach-event="onClick:_onSave"
+                    data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconAccept'">
+                Save Changes</button>
+            <button data-dojo-type="dijit/form/Button"
+                    data-dojo-attach-event="onClick:_onDiscard"
+                    data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconCancel'">
+                Discard changes</button>
+            <button data-dojo-type="dijit/form/Button"
+                    data-dojo-attach-event="onClick:_onShowPreview"
+                    data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconPreview'">
+                Preview</button>
+        </div>
+
+    <div data-dojo-type="dijit/Dialog"
+         title="Survey properties"
+         data-dojo-attach-point="propertiesDialog"
+         data-dojo-attach-event="onSubmit:_onPropertiesOk">
+        <fieldset data-dojo-type="qed/model/widgets/SurveyFieldset"></fieldset>
+        <button data-dojo-type="dijit/form/Button"
+                type="submit"
+                data-dojo-attach-event="onClick:_onPropertiesOk">
+            OK</button>
+        <button data-dojo-type="dijit/form/Button"
+                type="button"
+                data-dojo-attach-event="onClick:_onPropertiesCancel">
+            Cancel</button>
+    </div>
+
+</div>
Index: Dev/trunk/client/qed/pages/templates/surveyRun.html
===================================================================
--- Dev/trunk/client/qed/pages/templates/surveyRun.html	(revision 424)
+++ Dev/trunk/client/qed/pages/templates/surveyRun.html	(revision 424)
@@ -0,0 +1,32 @@
+<div class="blue">
+
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'">
+        <h2>
+            <span class="rftIcon rftIconSurvey"></span>
+            <span class="headerText" data-dojo-attach-point="titleNode">SurveyRun Editor</span>
+        </h2>
+    </div>
+    
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'">
+        <div data-dojo-type="qed/model/widgets/SurveySummary" data-dojo-attach-point="surveyNode"></div>
+        <div data-dojo-type="dijit/form/Form"
+             data-dojo-attach-point="propertiesForm">
+            <fieldset data-dojo-type="qed/model/widgets/SurveyRunFieldset"></fieldset>
+        </div>
+        <fieldset class="qedFieldset">
+            <div><div class="qedLabel">General URL</div><div class="qedField" data-dojo-attach-point="runURLNode" style="overflow: ellipsis"></div></div>
+            <div><div class="qedLabel">Responses <span data-dojo-attach-point="responsesCountNode"></span></div><div class="qedField qedFill" data-dojo-attach-point="responsesNode"></div>
+        </fieldset>
+    </div>
+    
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'bottom'" style="height: 40px;">
+        <button data-dojo-type="dijit/form/Button"
+                class="blue"
+                data-dojo-props="baseClass: 'rftBlockButton', iconClass: 'rftIcon rftIconSave'"
+                data-dojo-attach-event="onClick:_onSave">Save &amp; Close</button>
+        <button data-dojo-type="dijit/form/Button"
+                class="blue"
+                data-dojo-props="baseClass: 'rftBlockButton', iconClass: 'rftIcon rftIconClose'"
+                data-dojo-attach-event="onClick:_onDiscard">Discard &amp; Close</button>
+    </div>
+</div>
Index: Dev/trunk/client/qed/pages/templates/surveys.html
===================================================================
--- Dev/trunk/client/qed/pages/templates/surveys.html	(revision 424)
+++ Dev/trunk/client/qed/pages/templates/surveys.html	(revision 424)
@@ -0,0 +1,38 @@
+<div>
+
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'">
+        <h2>
+            <span class="rftIcon rftIconSurvey"></span>
+            <span class="headerText">Surveys</span>
+        </h2>
+    </div>
+
+    <div data-dojo-attach-point="tabContainer" data-dojo-type="dijit/layout/TabContainer" class="blue" data-dojo-props="tabPosition:'left-h',region:'center'">
+
+        <div data-dojo-type="dijit/layout/BorderContainer" title="Drafts" data-dojo-attach-point="draftsTab">
+            <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'center'" data-dojo-attach-point="draftsContainer">
+            </div>
+            <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'bottom'" style="height: 40px;">
+            </div>
+        </div>
+
+        <div data-dojo-type="dijit/layout/BorderContainer" title="Published" data-dojo-attach-point="publishedTab">
+            <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'center'" data-dojo-attach-point="publishedContainer">
+            </div>
+            <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'bottom'" style="height: 40px;">
+            </div>
+        </div>
+
+        <div data-dojo-type="dijit/layout/BorderContainer" title="Runs" data-dojo-attach-point="runsTab">
+            <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'center'" data-dojo-attach-point="runsContainer">
+            </div>
+            <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'bottom'" style="height: 40px;">
+            </div>
+        </div>
+    </div>
+
+    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'bottom'" style="height: 40px;">
+        <button data-dojo-type="dijit/form/Button" class="blue" data-dojo-props="baseClass: 'rftBlockButton', iconClass: 'rftIcon rftIconNew'" data-dojo-attach-event="onClick:_onNewSurvey">New survey</button>
+    </div>
+
+</div>
Index: Dev/trunk/client/qed/routes-admin.js
===================================================================
--- Dev/trunk/client/qed/routes-admin.js	(revision 424)
+++ Dev/trunk/client/qed/routes-admin.js	(revision 424)
@@ -0,0 +1,26 @@
+define([
+    './pages/index',
+    './pages/questions',
+    './pages/question',
+    './pages/surveys',
+    './pages/survey',
+    './pages/surveyRun',
+    './pages/sessions',
+    './pages/session',
+    './pages/previewSurvey'
+],function(index,questions,question,surveys,survey,surveyRun,sessions,session,previewSurvey){
+
+    return [
+        { path: "/", redirect: "/index" },
+        { path: "/index", constructor: index },
+        { path: "/questions", constructor: questions },
+        { path: "/question/:questionId", constructor: question },
+        { path: "/surveys", constructor: surveys },
+        { path: "/survey/:surveyId", constructor: survey },
+        { path: "/surveyRun/:surveyRunId", constructor: surveyRun },
+        //{ path: "/sessions", constructor: sessions },
+        //{ path: "/session/:sessionId", constructor: session },
+        { path: "/previewSurvey/:surveyId", constructor: previewSurvey }
+    ];
+
+});
Index: Dev/trunk/client/qed/search.js
===================================================================
--- Dev/trunk/client/qed/search.js	(revision 424)
+++ Dev/trunk/client/qed/search.js	(revision 424)
@@ -0,0 +1,9 @@
+define([
+    './store/ElasticReadStore'
+],function(ElasticReadStore){
+    return new ElasticReadStore({
+        url: "data/elastic",
+        requestMethod: "POST"
+    });
+
+});
Index: Dev/trunk/client/qed/stddeps.js
===================================================================
--- Dev/trunk/client/qed/stddeps.js	(revision 424)
+++ Dev/trunk/client/qed/stddeps.js	(revision 424)
@@ -0,0 +1,46 @@
+define([
+    // dijit & rft widgets used declaratively in templates
+    'dijit/Dialog',
+    'dijit/DropDownMenu',
+    'dijit/InlineEditBox',
+    'dijit/MenuBar',
+    'dijit/MenuBarItem',
+    'dijit/PopupMenuBarItem',
+    'dijit/TitlePane',
+    'dijit/layout/AccordionContainer',
+    'dijit/layout/BorderContainer',
+    'dijit/layout/ContentPane',
+    'dijit/layout/TabContainer',
+    'dijit/form/Button',
+    'dijit/form/ComboBox',
+    'dijit/form/DateTextBox',
+    'dijit/form/Form',
+    'dijit/form/NumberSpinner',
+    'dijit/form/Select',
+    'dijit/form/SimpleTextarea',
+    'dijit/form/Textarea',
+    'dijit/form/TextBox',
+    'dijit/form/TimeTextBox',
+
+    'dojox/grid/DataGrid',
+
+    'qed/app/Notifications',
+
+    'qed/model/widgets/AccountListView',
+    'qed/model/widgets/QuestionWidget',
+    'qed/model/widgets/SurveyFieldset',
+    'qed/model/widgets/SurveyRunFieldset',
+    'qed/model/widgets/SurveySummary',
+    'qed/model/widgets/SurveyWidget',
+
+    'qed/ui/MainMenu',
+    'qed/ui/MenuBarLink',
+    'qed/ui/MenuLink',
+
+    'qed/widgets/LineWithActionsWidget',
+    'qed/widgets/ObjectBox',
+    'qed/widgets/Selector',
+    'qed/widgets/TitleGroup',
+    'qed/widgets/list/List',
+    'qed/widgets/list/OrderedList'
+],function(){});
Index: Dev/trunk/client/qed/store.js
===================================================================
--- Dev/trunk/client/qed/store.js	(revision 424)
+++ Dev/trunk/client/qed/store.js	(revision 424)
@@ -0,0 +1,45 @@
+define([
+    'dojo/date/stamp',
+    'dojo/store/Cache',
+    'dojo/store/Memory',
+    'dojox/json/schema',
+    './model/schema',
+    './store/CouchStore'
+],function(stamp,Cache,Memory,jsonSchema,schema,CouchStore){
+    
+    var couchStore = new CouchStore({
+        target: 'data/couch/',
+        validate: function(object) {
+            var result = jsonSchema.validate(object,schema);
+            if ( result.valid ) {
+                return true;
+            } else {
+                console.log("Found error ",result," for invalid object ",object);
+                return false;
+            }
+        }
+    });
+    var memoryStore = new Memory({
+        idProperty: couchStore.idProperty
+    });
+    var cacheStore = new Cache(couchStore,memoryStore,{
+        isLoaded: function(object) {
+            // Unfortunately we cannot determine of the full documents were
+            // loaded or not. Therefore never cache query results.
+            return false;
+        }
+    });
+
+    var store = cacheStore;
+    store.formatDate = function(date){
+        return stamp.toISOString(date,{zulu:true});
+    };
+    store.parseDate = function(dateString){
+        return stamp.fromISOString(dateString);
+    };
+    store.timestamp = function() {
+        return this.formatDate(new Date());
+    };
+    return store;
+
+});
Index: Dev/trunk/client/qed/store/CouchStore.js
===================================================================
--- Dev/trunk/client/qed/store/CouchStore.js	(revision 424)
+++ Dev/trunk/client/qed/store/CouchStore.js	(revision 424)
@@ -0,0 +1,294 @@
+define([
+    'dojo/_base/array',
+    'dojo/_base/declare',
+    'dojo/_base/Deferred',
+    'dojo/_base/json',
+    'dojo/_base/lang',
+    'dojo/_base/xhr',
+    'dojo/store/util/QueryResults'
+],function(array,declare,Deferred,json,lang,xhr,QueryResults){
+    
+    function getCouchError(err){
+        var reason = err.response &&
+                     err.response.data &&
+                     json.fromJson(err.response.data).reason;
+        return reason || "Unknown error.";
+    }
+
+    var CouchStore = declare(null, {
+        /** dojo Store implementation for CouchDB
+         *
+         * See for details on the REST API, the wiki
+         * at http://wiki.apache.org/couchdb/HTTP_Document_API.
+         */
+        target: "",
+        accepts: "application/json", 
+        idProperty: "_id",
+        revProperty: "_rev",
+        _responseIdProperty: "id",
+        _responseRevProperty: "rev",
+        constructor: function(options){
+            declare.safeMixin(this, options);
+        },
+        getIdentity: function(object){
+            return object[this.idProperty];
+        },
+        getRevision: function(object){
+            return object[this.revProperty];
+        },
+        info: function(){
+            var dfd = new Deferred();
+            xhr("GET", {
+                url: this.target,
+                handleAs: "json",
+                headers: {
+                    Accept: this.accepts
+                }
+            }).then(function(result){
+                if ( result.error ) {
+                    dfd.reject(result.reason);
+                } else {
+                    dfd.resolve(result);
+                }
+            }, function(err){
+                dfd.reject(getCouchError(err));
+            });
+            return dfd.promise;
+        },
+        get: function(id){
+            var dfd = new Deferred();
+            xhr("GET", {
+                url: this.target + id,
+                handleAs: "json",
+                headers: {
+                    Accept: this.accepts
+                }
+            }).then(function(result){
+                if ( result.error ) {
+                    dfd.reject(result.reason);
+                } else {
+                    dfd.resolve(result);
+                }
+            }, function(err){
+                dfd.reject(getCouchError(err));
+            });
+            return dfd.promise;
+        },
+        validate: function(object) {
+            return true;
+        },
+        put: function(object, options){
+             // summary:
+             //     put an object in CouchDB
+             // object: Object
+             //     The object to put
+             // options: Object
+             //     Options object as
+             //         id: String
+             //
+
+            if ( !this.validate(object) ) {
+                var dfd = new Deferred();
+                dfd.reject("Invalid document.");
+                return dfd.promise;
+            }
+            return this._putValid(object, options);
+
+        },
+        _putValid: function(object,options) {
+            var dfd = new Deferred();
+            options = options || {};
+            var id = options.id ? options.id : this.getIdentity(object);
+            var hasId = typeof id !== "undefined";
+            xhr(hasId ? "PUT" : "POST", {
+                url: hasId ? this.target + id : this.target,
+                postData: json.toJson(object),
+                handleAs: "json",
+                headers:{
+                    "Content-Type": "application/json",
+                    Accept: this.accepts
+                }
+            }).then(lang.hitch(this,function(result){
+                if ( result.error ) {
+                    dfd.reject(result.reason);
+                } else {
+                    object[this.idProperty] = result[this._responseIdProperty];
+                    object[this.revProperty] = result[this._responseRevProperty];
+                    dfd.resolve(object);
+                }
+            }), function(err){
+                dfd.reject(getCouchError(err));
+            });
+            return dfd.promise;
+        },
+        add: function(object, options){
+            return this.put(object,options);
+        },
+        remove: function(id,rev){
+            var dfd = new Deferred();
+            xhr("DELETE",{
+                url: this.target + id,
+                headers: {
+                    'If-Match': rev
+                }
+            }).then(function(result){
+                if ( result.error ) {
+                    dfd.reject(result.reason);
+                } else {
+                    dfd.resolve();
+                }
+            },function(err){
+                dfd.reject(getCouchError(err));
+            });
+            return dfd.promise;
+        },
+        query: function(query, options){
+            // summary:
+            //    query a couchdb view
+            // query: String
+            //    name of a couchdb view you want to query, relative to the current database
+            // options: Object
+            //     options object as
+            //        start: Number
+            //            Start results at this item
+            //        count: Number
+            //            Number of items to return
+            //        sort: [{attribute:'key',descending:true|false}]
+            //            CouchDB only support sorting by key, so only 'key'
+            //            is allowed as attribute value. Multiple sort items
+            //            are ignored.
+            //        key: String|Array|Object
+            //            Return only values with this key.
+            //            Excludes start/endkey usage.
+            //        startkey: String|Array|Object
+            //            Return values starting from this key.
+            //        endkey: String|Array|Object
+            //            Return values with key lower than this key.
+            //        include_docs: true|false
+            //            Return the full documents instead of the view
+            //            values.
+            //        reduce: true|false
+            //            Execute reduce on the view or not. Default depends
+            //            on if a reduce function is defined on the view.
+            //        group: true|false
+            //            Should values be grouped per key or not? Default
+            //            is false.
+            //        group_level: Number
+            //            When group = true and the key is an array,
+            //            determines which elements starting from the first
+            //            are used for grouping. Default is 0.
+            //        get_keys: true|false
+            //            Instead of returning the values or documents,
+            //            return the array of keys as the result.
+            //            This does not affect the forPairs function.
+            options = options || {};
+
+            var dfd = new Deferred();
+            var queryOpts = {};
+            if ( !query ) {
+                query = '_all_docs';
+            }
+
+            if (!lang.isString(query)) {
+                console.warn("Query must be a view name");
+            }
+
+            // Standard options
+            if (options.start >= 0) {
+                queryOpts.skip = options.start;
+            }
+            if (options.count >= 0) {
+                queryOpts.limit = options.count;
+            }
+            if (options.sort) {
+                if (options.sort[0]) {
+                    if (options.sort[0].attribute && options.sort[0].attribute !== "key") {
+                        console.warn("Can only sort on key");
+                    }
+                    if (options.sort[0].descending) {
+                        queryOpts.descending = true;
+                    }
+                }
+                if (options.sort.length > 1) {
+                    console.warn("multiple sort fields not supported");
+                }
+            }
+
+            // Custom options
+            if (options.key !== undefined) {
+                queryOpts.key = options.key;
+            } else if (options.keys !== undefined) {
+                queryOpts.keys = options.keys;
+            } else if (options.startkey !== undefined || options.endkey !== undefined) {
+                queryOpts.startkey = options.startkey;
+                queryOpts.endkey = options.endkey;
+            }
+            if (options.include_docs !== undefined) {
+                queryOpts.include_docs = options.include_docs;
+            }
+            if (options.reduce !== undefined) {
+                queryOpts.reduce = options.reduce;
+            }
+            if (options.group !== undefined) {
+                queryOpts.group = options.group;
+                if (options.group_level !== undefined) {
+                    queryOpts.group_level = options.group_level;
+                }
+            }
+
+            for (var qp in queryOpts) {
+                queryOpts[qp] = json.toJson(queryOpts[qp]);
+            }
+            query += '?' + xhr.objectToQuery(queryOpts);
+
+            xhr("GET", {
+                url: this.target + query,
+                handleAs: "json",
+                headers: {
+                    Accept: this.accepts
+                }
+            }).then(function(result){
+                if (result.error) {
+                    dfd.reject(result.reason);
+                } else  {
+                    var results;
+                    var values = array.map(result.rows,function(result){
+                        return options.include_docs === true ? result.doc : result.value;
+                    });
+                    var keys = array.map(result.rows,function(result){
+                        return result.key;
+                    });
+                    if (options.get_keys === true) {
+                        results = keys;
+                        results.values = values;
+                    } else {
+                        results = values;
+                        results.keys = keys;
+                    }
+                    dfd.resolve(results);
+                }
+            },function(err){
+                dfd.reject(getCouchError(err));
+            });
+            return CouchResults(dfd.promise);
+        }
+    });
+
+    function CouchResults(results) {
+        results = QueryResults(results);
+        results.forPairs = function(callback,thisObject) {
+            callback = lang.hitch(thisObject,callback);
+            return Deferred.when(results,function(results) {
+                var values = results.values || results;
+                var keys = results.keys || results;
+                return array.forEach(values, function(value,index) {
+                    callback(value,keys[index],index);
+                });
+            });
+        };
+        return results;
+    }
+
+    return CouchStore;
+
+});
Index: Dev/trunk/client/qed/store/ElasticReadStore.js
===================================================================
--- Dev/trunk/client/qed/store/ElasticReadStore.js	(revision 424)
+++ Dev/trunk/client/qed/store/ElasticReadStore.js	(revision 424)
@@ -0,0 +1,52 @@
+define([
+    'dojo/_base/declare',
+    "dojo/_base/json",
+    'dojo/_base/lang',
+    'dojo/_base/xhr',
+    'dojox/data/QueryReadStore'
+],function(declare, json, lang, xhr, QueryReadStore) {
+    return declare(QueryReadStore, {
+        fetch:function(request){
+            var attr = Object.keys(request.query)[0];
+            if (request.query[attr].length === 0) {
+                return 0;
+            }
+            var q = request.query[attr];
+
+            request.serverQuery = json.toJson({ 
+                query: {
+                    query_string: {
+                        default_field: attr, 
+                        query: q
+                    }
+                }
+            });
+            return this.inherited(arguments);
+          },
+        _fetchItems: function(request, fetchHandler, errorHandler){
+            var serverQuery = request.serverQuery;
+            var xhrHandler = xhr.post({
+                url: this.url,
+                handleAs: "json",
+                postData: serverQuery
+            }).then(lang.hitch(this, function(data){
+                this._xhrFetchHandler(data, request, fetchHandler, errorHandler);
+            }),function(error){
+                errorHandler(error, request);
+            });
+            request.abort = function(){
+                xhrHandler.cancel();
+            };
+        },
+        _xhrFetchHandler: function(data, request, fetchHandler, errorHandler) {
+            data = this._filterResponse(data);
+            this._items = [];
+            var numHits = data.hits.total || -1;
+            if(numHits > 0) {
+                this._items.push({i:data.hits.hits[0]._source, r:this, n:0});
+            }
+            fetchHandler(this._items, request, data.hits.total);
+            this._numRows = data.hits.total;
+        }
+    });
+});
Index: Dev/trunk/client/qed/ui/LoginDialog.js
===================================================================
--- Dev/trunk/client/qed/ui/LoginDialog.js	(revision 424)
+++ Dev/trunk/client/qed/ui/LoginDialog.js	(revision 424)
@@ -0,0 +1,45 @@
+define(['dojo/_base/declare','dojo/_base/lang','dojo/_base/event','dijit/Dialog',
+    'dijit/_WidgetsInTemplateMixin','../auth', 'dojo/text!./templates/LoginDialog.html',
+    '../app/Router','dijit/form/Form','dijit/form/Button','dijit/form/TextBox'],
+    function (declare, lang, event, Dialog, _WidgetsInTemplateMixin, auth, template, content) {
+        return declare([Dialog,_WidgetsInTemplateMixin], {
+            templateString: template,
+            widgetsInTemplate: true,
+            title: "Login/Register",
+            baseClass: "rftLoginDialog",
+            startup: function() {
+                if ( this._started ){ return; }
+                this.inherited(arguments);
+                this.loginForm.on('submit',lang.hitch(this,'onLogin'));
+            },
+            show: function() {
+                this.loginErrors.innerHTML = '';
+                this.loginForm.reset();
+                this.inherited(arguments);
+            },
+            onLogin: function(evt) {
+                this.loginErrors.innerHTML = '';
+                var data = this.loginForm.get('value');
+                auth.login(data.email,data.password)
+                .then(lang.hitch(this,function() {
+                    this.hide();
+                    content.initial();
+                }),lang.hitch(this,function() {
+                    this.loginErrors.innerHTML = 'Login failed.';
+                }));
+                event.stop(evt);
+                return false;
+            },
+            onRegister: function() {
+                this.loginErrors.innerHTML = '';
+                var data = this.loginForm.get('value');
+                auth.register(data.email,data.password)
+                .then(lang.hitch(this,function() {
+                    this.hide();
+                    content.initial();
+                }),lang.hitch(this,function() {
+                    this.loginErrors.innerHTML = 'Register failed.';
+                }));
+            }
+        });
+    });
Index: Dev/trunk/client/qed/ui/MainMenu.js
===================================================================
--- Dev/trunk/client/qed/ui/MainMenu.js	(revision 424)
+++ Dev/trunk/client/qed/ui/MainMenu.js	(revision 424)
@@ -0,0 +1,11 @@
+define([
+    'dojo/_base/declare',
+    'dijit/_WidgetBase',
+    'dijit/_TemplatedMixin',
+    'dijit/_WidgetsInTemplateMixin',
+    'dojo/text!./templates/MainMenu.html'
+],function(declare,_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,template){
+    return declare([_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin],{
+        templateString: template
+    });
+});
Index: Dev/trunk/client/qed/ui/MenuBarLink.js
===================================================================
--- Dev/trunk/client/qed/ui/MenuBarLink.js	(revision 424)
+++ Dev/trunk/client/qed/ui/MenuBarLink.js	(revision 424)
@@ -0,0 +1,11 @@
+define(['dojo/_base/declare','dijit/MenuBarItem','../app/Router'],
+function(declare,MenuBarItem,Router){
+    return declare([MenuBarItem],{
+        options:{
+            path: null
+        },
+        onClick: function(){
+            this.path && Router.go(this.path);
+        }
+    });
+});
Index: Dev/trunk/client/qed/ui/MenuLink.js
===================================================================
--- Dev/trunk/client/qed/ui/MenuLink.js	(revision 424)
+++ Dev/trunk/client/qed/ui/MenuLink.js	(revision 424)
@@ -0,0 +1,11 @@
+define(['dojo/_base/declare','dijit/MenuItem','../app/Router'],
+function(declare,MenuItem,Router){
+    return declare([MenuItem],{
+        options:{
+            path: null
+        },
+        onClick: function(){
+            this.path && Router.go(this.path);
+        }
+    });
+});
Index: Dev/trunk/client/qed/ui/templates/LoginDialog.html
===================================================================
--- Dev/trunk/client/qed/ui/templates/LoginDialog.html	(revision 424)
+++ Dev/trunk/client/qed/ui/templates/LoginDialog.html	(revision 424)
@@ -0,0 +1,23 @@
+<div class="dijitDialog" role="dialog" aria-labelledby="${id}_title">
+    <div data-dojo-attach-point="titleBar" class="dijitDialogTitleBar">
+        <span data-dojo-attach-point="titleNode" class="dijitDialogTitle"></span>
+        <span data-dojo-attach-point="closeButtonNode" class="dijitDialogCloseIcon" data-dojo-attach-event="ondijitclick: onCancel" title="${buttonCancel}" role="button" tabIndex="-1">
+            <span data-dojo-attach-point="closeText" class="closeText" title="${buttonCancel}">x</span>
+        </span>
+    </div>
+    <div data-dojo-attach-point="containerNode">
+        <form data-dojo-type="dijit/form/Form" data-dojo-attach-point="loginForm">
+            <fieldset>
+                <label for="email" class="loginLabel">Email</label>
+                <input data-dojo-type="dijit/form/TextBox" name="email" type="text" class="loginInput" />
+                <label for="password" class="loginLabel">Password</label>
+                <input data-dojo-type="dijit/form/TextBox" name="password" type="password" class="loginInput" />
+            </fieldset>
+            <div style="float: right;">
+                <button type="button" data-dojo-type="dijit/form/Button" data-dojo-attach-event="onClick:onRegister">Register</button>
+                <button type="submit" data-dojo-type="dijit/form/Button" data-dojo-attach-event="onClick:onLogin">Login</button>
+            </div>
+        </form>
+        <div data-dojo-attach-point="loginErrors" style="clear: both; color: red;"></div>
+    </div>
+</div>
Index: Dev/trunk/client/qed/ui/templates/MainMenu.html
===================================================================
--- Dev/trunk/client/qed/ui/templates/MainMenu.html	(revision 424)
+++ Dev/trunk/client/qed/ui/templates/MainMenu.html	(revision 424)
@@ -0,0 +1,16 @@
+<div class="mainMenu">
+    <div  data-dojo-type="dijit/MenuBar">
+        <div class="rftMainMenuButton" data-dojo-type="qed/ui/MenuBarLink" data-dojo-props="path:'/sessions'">Sessions</div>
+        <div class="rftMainMenuButton" data-dojo-type="dijit/PopupMenuBarItem">
+            <span>Content</span>
+            <div data-dojo-type="dijit/DropDownMenu">
+                <div data-dojo-type="qed/ui/MenuLink" class="blue bgColorHover" data-dojo-props="path:'/surveys', iconClass:'rftIcon rftIconSurvey'">Surveys</div>
+                <div data-dojo-type="qed/ui/MenuLink" class="orange bgColorHover" data-dojo-props="path:'/questions', iconClass:'rftIcon rftIconQuestion'">Questions</div>
+                <div data-dojo-type="qed/ui/MenuLink" class="purple bgColorHover" data-dojo-props="path:'/applications', iconClass: 'rftIcon rftIconApplication'">Applications</div>
+                <div data-dojo-type="qed/ui/MenuLink" class="red bgColorHover" data-dojo-props="path:'/dashboards', iconClass: 'rftIcon rftIconDashboard'">Dashboards</div>
+            </div>
+        </div>
+        <div class="rftMainMenuButton" data-dojo-type="qed/ui/MenuBarLink" data-dojo-props="path:'/results'">Results</div>
+        <div class="rftMainMenuButton" data-dojo-type="qed/ui/MenuBarLink">Logout</div>
+    </div>
+</div>
Index: Dev/trunk/client/qed/ui/templates/SessionBar.html
===================================================================
--- Dev/trunk/client/qed/ui/templates/SessionBar.html	(revision 424)
+++ Dev/trunk/client/qed/ui/templates/SessionBar.html	(revision 424)
@@ -0,0 +1,5 @@
+<div class="${baseClass}">
+    <span class="rftIcon rftIconSession" data-dojo-attach-point="iconNode"></span>
+    <div data-dojo-type="qed/widgets/LineWithActionsWidget" data-dojo-attach-point="upperNode" data-dojo-props="actions: {'inspect':{callback: inspect, properties: {blockButton: true}}}"></div>
+    <div data-dojo-type="qed/widgets/LineWithActionsWidget" data-dojo-attach-point="lowerNode"></div>
+</div>
Index: Dev/trunk/client/qed/widgets/LineWithActionsWidget.js
===================================================================
--- Dev/trunk/client/qed/widgets/LineWithActionsWidget.js	(revision 424)
+++ Dev/trunk/client/qed/widgets/LineWithActionsWidget.js	(revision 424)
@@ -0,0 +1,84 @@
+define(['dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/on',
+    'dojo/dom',
+    'dojo/_base/event',
+    'dojo/dom-class',
+    'dijit/form/Button',
+    'dijit/_WidgetBase',
+    'dijit/_TemplatedMixin',
+    'dijit/_WidgetsInTemplateMixin',
+    'dojo/text!./templates/LineWithActionsWidget.html'
+],function(declare,lang,on,dom,event,domClass,Button,_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,templateString){
+    return declare([_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin],{
+        templateString: templateString,
+        baseClass: 'rftLineWithActions',
+        title: '',
+        selectable: false,
+        userObject: null,
+
+        actions: null,
+        postCreate: function() {
+            dom.setSelectable(this.domNode, false); // Text selection, has nothing to do with object selection!
+            on(this.domNode,'click',lang.hitch(this,'_onClick'));
+        },
+        startup: function() {
+            if ( this._started ){ return; }
+            this.inherited(arguments);
+            this._setupActions();
+            this.refresh();
+        },
+        _setupActions: function() {
+            if ( this.actions === null ) {
+                return;
+            }
+            for (var action in this.actions) {
+                var properties;
+                if (this.actions[action].properties.blockButton === true) {
+                    properties = lang.mixin({
+                        baseClass: 'rftBlockButton',
+                        label: "Default",
+                        iconClass: 'rftIcon rftIcon'+this.actions[action].properties.icon,
+                        title: this.actions[action].properties.tooltip,
+                        onClick: lang.hitch(this, function(action, e){
+                            action.callback && action.callback(e);
+                            event.stop(e);
+                            return false;
+                        }, this.actions[action])
+                    }, this.actions[action].properties);
+                    new Button(properties).placeAt(this.buttonsNode);
+                } else {
+                    properties = lang.mixin({
+                        baseClass: 'rftInlineButton',
+                        label: "Default",
+                        showLabel: false,
+                        iconClass: 'rftIcon rftIcon'+this.actions[action].properties.icon,
+                        title: this.actions[action].properties.tooltip,
+                        onClick: lang.hitch(this, function(action, e){
+                            action.callback && action.callback(e);
+                            event.stop(e);
+                            return false;
+                        }, this.actions[action])
+                    }, this.actions[action].properties);
+                    new Button(properties).placeAt(this.buttonsNode);
+                }
+            }
+        },
+        refresh: function() {
+            this.titleNode.innerHTML = this.title;
+        },
+        _onClick: function(e){
+            var preventDefault = this.onClick(e) === false;
+            if (preventDefault) {
+                event.stop(e);
+            }
+            return !preventDefault;
+        },
+        onClick: function(e) {
+        },
+        _setTitleAttr: function(value){
+            this.title = value;
+            this.refresh();
+        }
+    });
+});
Index: Dev/trunk/client/qed/widgets/MultipleChoiceWidget.js
===================================================================
--- Dev/trunk/client/qed/widgets/MultipleChoiceWidget.js	(revision 424)
+++ Dev/trunk/client/qed/widgets/MultipleChoiceWidget.js	(revision 424)
@@ -0,0 +1,91 @@
+define(['dojo/_base/declare','dojo/_base/array','dojo/_base/lang',
+    'dojo/dom-construct','dijit/registry','dijit/_WidgetBase',
+    'dijit/_TemplatedMixin','dijit/_WidgetsInTemplateMixin','dijit/_Container',
+    'dojo/text!./templates/MultipleChoiceWidget.html',
+    'dijit/form/RadioButton','dijit/form/CheckBox','dijit/form/TextBox','dijit/form/Button'],
+    function(declare,array,lang,domConstruct,registry,_WidgetBase,_TemplatedMixin,
+        _WidgetsInTemplateMixin,_Container,
+        templateString,RadioButton,CheckBox,TextBox,Button){
+        return declare([_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container],{
+            templateString: templateString,
+            multiple: true,
+            baseClass: 'rftMultipleChoiceWidget',
+            
+            allowMultiple: false,
+            name: '',
+            value: null,
+            
+            _widgetCache: null,
+            constuctor: function() {
+                this.inherited(arguments);
+                this.value = [];
+                this._widgetCache = {};
+            },
+            _setValueAttr: function(value) {
+                this.reset();
+                this.value = value;
+                array.forEach(this.value,lang.hitch(this,function(val){
+                    this._addRow(val);
+                }));
+            },
+            _getValueAttr: function() {
+                var value = [];
+                registry.findWidgets(this.domNode).forEach(function(w){
+                    w.isInstanceOf(TextBox) && value.push(w.get('value'));
+                });
+                this.value = value;
+                return value;
+            },
+            reset: function() {
+                this._removeWidgetsBelowNode(this.rows);
+                domConstruct.empty(this.rows);
+            },
+            _onAddRow: function() {
+                this._addRow();
+            },
+            _addRow: function(value,tagRow,pos) {
+                var row = domConstruct.create('div',{'class':'row'});
+                if ( this.allowMultiple ) {
+                    new CheckBox({
+                        name:this.name,
+                        'class':'rowBox',
+                        disabled: this.mode == 'edit'
+                    }).placeAt(row);
+                } else {
+                    new RadioButton({
+                        name:this.name,
+                        'class':'rowBox',
+                        disabled: this.mode == 'edit'
+                    }).placeAt(row);
+                }
+                new TextBox({
+                    name:this.name,
+                    value:value || '',
+                    'class':'rowText'
+                }).placeAt(row);
+                new Button({
+                    label:'-',
+                    'class':'rowBtn',
+                    onClick:lang.hitch(this,'_removeNodeWithWidgets',row)
+                }).placeAt(row);
+                new Button({
+                    label:'+',
+                    'class':'rowBtn',
+                    onClick:lang.hitch(this,'_addRow','',row,'before')
+                }).placeAt(row);
+                domConstruct.place(row,tagRow || this.rows,pos||'last');
+            },
+            _removeNodeWithWidgets: function(node) {
+                this._removeWidgetsBelowNode(node);
+                domConstruct.destroy(node);
+            },
+            _removeWidgetsBelowNode: function(node) {
+                registry.findWidgets(node).forEach(function(w){
+                    w.destroyRecursive();
+                });
+            },
+            _onRowChange: function(row) {
+                
+            }
+        });
+    });
Index: Dev/trunk/client/qed/widgets/ObjectBox.js
===================================================================
--- Dev/trunk/client/qed/widgets/ObjectBox.js	(revision 424)
+++ Dev/trunk/client/qed/widgets/ObjectBox.js	(revision 424)
@@ -0,0 +1,75 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dijit/_WidgetBase',
+    'dijit/_TemplatedMixin',
+    'dijit/_WidgetsInTemplateMixin',
+    './LineWithActionsWidget',
+    'dojo/text!./templates/ObjectBox.html'
+], function(declare, lang, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, LineWithActionsWidget, template){
+    return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {
+        baseClass: "rftObjectBox",
+        templateString: template,
+        value: null,
+        actions: null,
+        startup: function() {
+            if ( this._started ){ return; }
+            this.inherited(arguments);
+            this.line1 = new LineWithActionsWidget({
+                actions: {
+                    "inspectIcon": {
+                        callback: lang.hitch(this, this._showInfoBox),
+                        properties: {
+                            blockButton: false,
+                            icon: "Inspect"
+                        }
+                    }
+                }
+            }).placeAt(this.line1Node);
+            this.line2 = new LineWithActionsWidget({
+            }).placeAt(this.line2Node);
+            var line3Actions = this._createLine3Actions();
+            this.line3 = new LineWithActionsWidget({
+                actions: line3Actions
+            }).placeAt(this.line3Node);
+            this.line1.startup();
+            this.line2.startup();
+            this.line3.startup();
+            this.inherited(arguments);
+        },
+        _createLine3Actions: function() {
+            var line3Actions = {};
+            for (var action in this.actions) {
+                line3Actions[action] = {
+                    callback: lang.hitch(this, function(callback){
+                        this.value && callback(this.value);
+                    }, this.actions[action]),
+                    properties: {
+                        blockButton: true,
+                        label: action,
+                        icon: action.charAt(0).toUpperCase()+action.slice(1)
+                    }
+                };
+            }
+            return line3Actions;
+        },
+        _showInfoBox: function() {
+            alert(this.value.description);
+        },
+        _setValueAttr: function(value) {
+            this.value = value;
+            this._refresh();
+        },
+        _getValueAttr: function(value) {
+            this.value = value;
+        },
+        _refresh: function() {
+            if ( this.value !== null ) {
+                this.iconNode.className = "rftIcon typeIcon rftIcon"+(this.value.type || '');
+                this.line1.set('title', this.value.title || '');
+                this.line2.set('title', this.value.subTitle || '');
+                this.line3.set('title', this.value.lowerTitle || '');
+            }
+        }
+    });
+});
Index: Dev/trunk/client/qed/widgets/Selector.js
===================================================================
--- Dev/trunk/client/qed/widgets/Selector.js	(revision 424)
+++ Dev/trunk/client/qed/widgets/Selector.js	(revision 424)
@@ -0,0 +1,178 @@
+define([
+    'dojo/_base/array',
+    'dojo/_base/declare',
+    'dojo/_base/event',
+    'dojo/_base/lang',
+    'dojo/dom-class',
+    'dojo/fx',
+    'dojo/query',
+    'dijit/_Container',
+    'dijit/_TemplatedMixin',
+    'dijit/_WidgetBase',
+    'dijit/_WidgetsInTemplateMixin',
+    'dijit/registry',
+    './LineWithActionsWidget',
+    'dojo/text!./templates/Selector.html'
+],function(
+    baseArray,
+    declare,
+    event,
+    lang,
+    domClass,
+    fx,
+    query,
+    _Container,
+    _TemplatedMixin,
+    _WidgetBase,
+    _WidgetsInTemplateMixin,
+    registry,
+    LineWithActionsWidget,
+    templateString
+){
+    return declare([_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container],{
+        templateString: templateString,
+        baseClass: 'rftSelector',
+
+        title: "",
+        selectedActions: null,
+        itemActions: null,
+        // main selector action: Object
+        //    title:
+        //    description:
+        //    icon:
+
+        _folded: true,
+        _titleLine: null,
+        _selectorLine: null,
+        _selectedItem: null,
+
+        startup: function() {
+            if ( this._started ){ return; }
+            this.inherited(arguments);
+            domClass.add(this.selectedColorNode, "pending");
+
+            this._createTitleLine();
+            this._createSelectorLine();
+
+            fx.wipeOut({
+                node: this.optionsNode
+            }).play();
+        },
+        _createTitleLine: function() {
+            var actions = {};
+            var action = null;
+            if ( this.selectedActions !== null ) {
+                for (var actionName in this.selectedActions) {
+                    action = this.selectedActions[actionName];
+                    actions[actionName] = {
+                        callback: action.callback &&
+                                lang.hitch(this,this._onSelectedAction,
+                                        action.callback),
+                        properties: {
+                             blockButton: true,
+                             label: action.title || actionName,
+                             icon: action.icon,
+                             tooltip: action.description
+                         }
+
+                    };
+                }
+            }
+
+            this._titleLine = new LineWithActionsWidget({
+                title: this.title,
+                actions: actions
+            },this.titleNode);
+            this._titleLine.startup();
+        },
+        _createSelectorLine: function() {
+            this._selectorLine = new LineWithActionsWidget({
+                title: 'None',
+                actions: {
+                    "Toggle dropdown" : {
+                        callback: lang.hitch(this, this.onToggle),
+                        properties: {
+                            blockButton: true,
+                            showLabel: false,
+                            icon: "HalfArrowDown"
+                        }
+                    }
+                }
+            },this.selectedItemNode);
+            this._selectorLine.startup();
+            this._selectorLine.on('click',lang.hitch(this, this.onToggle));
+        },
+        _onSelect: function(item, widget) {
+            this._selectedItem = item;
+            this.onToggle();
+            this._selectorLine.set("title", item.title);
+            baseArray.forEach(this.optionsNode.childNodes, function(node){
+                var line = registry.byNode(node);
+                if (line) {
+                    if (line === widget) {
+                        domClass.add(line.domNode, "inheritBgColor light");
+                    } else {
+                        domClass.remove(line.domNode, "inheritBgColor light");
+                    }
+                }
+            }, this);
+            this.onSelect(item);
+        },
+        _onSelectedAction: function(callback) {
+            if (this._selectedItem && callback) {
+                callback(this._selectedItem);
+            }
+        },
+
+        onToggle: function(evt) {
+            if (this._folded) {
+                var downArrowIcon = query(".rftBlockButton .rftIconHalfArrowDown", this._selectorLine.buttonsNode)[0];
+                if (downArrowIcon){
+                    domClass.replace(downArrowIcon, "rftIconHalfArrowUp", "rftIconHalfArrowDown");
+                }
+                fx.wipeIn({
+                    node: this.optionsNode
+                }).play();
+                this._folded = false;
+            } else {
+                var upArrowIcon = query(".rftBlockButton .rftIconHalfArrowUp", this._selectorLine.buttonsNode)[0];
+                if (upArrowIcon){
+                    domClass.replace(upArrowIcon, "rftIconHalfArrowDown", "rftIconHalfArrowUp");
+                }
+                fx.wipeOut({
+                    node: this.optionsNode
+                }).play();
+                this._folded = true;
+            }
+            evt && event.stop(evt);
+            return false;
+        },
+
+        addItem: function(item,displayTitle) {
+            var actions = {};
+            var action;
+            if (this.itemActions) {
+                for (var actionName in this.itemActions) {
+                    action = this.itemActions[actionName];
+                    actions[actionName] = {
+                        callback: action.callback && lang.partial(action.callback,item),
+                        properties: {
+                            blockButton: false,
+                            showLabel: false,
+                            icon: action.icon + " black",
+                            tooltip: action.description
+                        }
+                    };
+                }
+            }
+            var w = new LineWithActionsWidget({
+                title: displayTitle || item.title,
+                actions: actions
+            }).placeAt(this.optionsNode);
+            w.startup();
+            w.on("click", lang.hitch(this, this._onSelect, item, w));
+        },
+
+        onSelect: function(item) {}
+    });
+});
Index: Dev/trunk/client/qed/widgets/ThresholdFilteringSelect.js
===================================================================
--- Dev/trunk/client/qed/widgets/ThresholdFilteringSelect.js	(revision 424)
+++ Dev/trunk/client/qed/widgets/ThresholdFilteringSelect.js	(revision 424)
@@ -0,0 +1,18 @@
+define([
+    'dojo/_base/declare',
+    'dijit/form/FilteringSelect'
+], function(declare, FilteringSelect) {
+    return declare(FilteringSelect, {
+         // custom min input character count to trigger search
+         minKeyCount: 3,
+
+         // override search method, count the input length
+         _startSearch: function (/*String*/key) {
+             if (!key || key.length < this.minKeyCount) {
+                 this.closeDropDown();
+                 return;
+             }
+             this.inherited(arguments);
+         }
+    });
+});
Index: Dev/trunk/client/qed/widgets/TitleGroup.js
===================================================================
--- Dev/trunk/client/qed/widgets/TitleGroup.js	(revision 424)
+++ Dev/trunk/client/qed/widgets/TitleGroup.js	(revision 424)
@@ -0,0 +1,11 @@
+require(['dojo/_base/declare','dojo/_base/query','dijit/registry','dojox/widget/TitleGroup'],
+    function(declare,query,registry,TitleGroup){
+        return declare([TitleGroup],{
+            getChildren: function() {
+                return query("> .dijitTitlePane", this.domNode)
+                .map(function(node){
+                    return registry.byNode(node);
+                });
+            }
+        });
+    });
Index: Dev/trunk/client/qed/widgets/list/List.js
===================================================================
--- Dev/trunk/client/qed/widgets/list/List.js	(revision 424)
+++ Dev/trunk/client/qed/widgets/list/List.js	(revision 424)
@@ -0,0 +1,94 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/dnd/Source',
+    'dijit/_TemplatedMixin',
+    'dijit/_WidgetBase',
+    'dijit/_WidgetsInTemplateMixin',
+    'dijit/registry',
+    'dijit/layout/BorderContainer',
+    'dojo/text!./templates/List.html'
+],function(
+    declare,
+    lang,
+    Source,
+    _TemplatedMixin,
+    _WidgetBase,
+    _WidgetsInTemplateMixin,
+    registry,
+    BorderContainer,
+    templateString){
+    return declare([BorderContainer,_TemplatedMixin,_WidgetsInTemplateMixin],{
+        templateString: templateString,
+        baseClass: 'rftList',
+        removeCallback: null,
+        type: 'text',
+        withHandles: false,
+        source: null,
+
+        startup: function() {
+            if ( this._started ){ return; }
+            this.inherited(arguments);
+
+            if (this.title) {
+                this.titleNode.innerHTML = this.title;
+            }
+
+            this.source = new Source(this.sourceNode.domNode, {
+                accept: [this.type],
+                singular: true,
+                withHandles: this.withHandles,
+                creator: lang.hitch(this, this._createNode)
+            });
+        },
+
+        _createNode: function(item, hint) {
+            var node = hint === "avatar" ?
+                    this._createAvatarNode(item) : this._createListNode(item);
+            return node && {
+                node: node,
+                data: item,
+                type: this.type
+            };
+        },
+        _createListNode: function(item) {},
+        _createAvatarNode: function(item) {},
+
+        appendItem: function(item) {
+            this.source.insertNodes(false,[item]);
+        },
+        appendItems: function(items) {
+            this.source.insertNodes(false,items);
+        },
+
+        getItems: function() {
+            var items = [];
+            this.source.getAllNodes()
+            .forEach(function(node){
+                items.push(this.source.getItem(node.id).data);
+            },this);
+            return items;
+        },
+
+        deleteItems: function() {
+            this.source.getAllNodes()
+            .forEach(function(node){
+                registry.byNode(node).destroyRecursive();
+            });
+            this.source.sync();
+        },
+
+        removeItem: function(item){
+            this.source.getAllNodes()
+            .filter(lang.hitch(this,function(node){
+                return this.source.getItem(node.id).data === item;
+            }))
+            .forEach(lang.hitch(this,function(node){
+                registry.byNode(node).destroyRecursive();
+                this.removeCallback && this.removeCallback(item);
+            }));
+            this.source.sync();
+        }
+
+    });
+});
Index: Dev/trunk/client/qed/widgets/list/MultipleChoiceListView.js
===================================================================
--- Dev/trunk/client/qed/widgets/list/MultipleChoiceListView.js	(revision 424)
+++ Dev/trunk/client/qed/widgets/list/MultipleChoiceListView.js	(revision 424)
@@ -0,0 +1,42 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dojo/dom-construct',
+    '../LineWithActionsWidget',
+    './OrderedList'
+],function(
+    declare,
+    lang,
+    domConstruct,
+    LineWithActionsWidget,
+    OrderedList
+    ) {
+    return declare([OrderedList],{
+        baseClass: 'rftMultipleChoiceListView',
+        type: 'multipleChoiceOption',
+
+        _createAvatarNode: function(item){
+            return domConstruct.create("div",{
+                'class': 'dragAvatar',
+                innerHTML: item.title
+            });
+        },
+        _createListNode: function(item) {
+            var w = new LineWithActionsWidget({
+                title: item.title,
+                'class': "orange",
+                actions: {
+                    "Remove" : {
+                        callback: lang.hitch(this, 'removeItem', item),
+                        properties: {
+                            blockButton: false,
+                            icon: "Delete"
+                        }
+                    }
+                }
+            });
+            w.startup();
+            return w.domNode;
+        }
+    });
+});
Index: Dev/trunk/client/qed/widgets/list/OrderedList.js
===================================================================
--- Dev/trunk/client/qed/widgets/list/OrderedList.js	(revision 424)
+++ Dev/trunk/client/qed/widgets/list/OrderedList.js	(revision 424)
@@ -0,0 +1,79 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dijit/form/Button',
+    './List',
+    'dojo/text!./templates/OrderedList.html'
+    ],function(
+        declare,
+        lang,
+        Button,
+        List,
+        templateString
+        ){
+        return declare([List],{
+            templateString: templateString,
+            baseClass: 'rftLineListView',
+
+            startup: function() {
+                if ( this._started ){ return; }
+                this.inherited(arguments);
+
+                new Button({
+                    label: "Move up",
+                    showLabel: false,
+                    iconClass: "rftIcon rftIconFullArrowUp",
+                    baseClass: "rftBlockButton",
+                    'class': "trans",
+                    onClick: lang.hitch(this, function() {
+                        this._moveSelectedItem("up");
+                    })
+                }, this.btnListMoveUp).startup();
+
+                new Button({
+                    label: "Move down",
+                    showLabel: false,
+                    iconClass: "rftIcon rftIconFullArrowDown",
+                    baseClass: "rftBlockButton",
+                    'class': "trans",
+                    onClick: lang.hitch(this, function() {
+                        this._moveSelectedItem("down");
+                    })
+                }, this.btnListMoveDown).startup();
+            },
+
+            _moveSelectedItem: function(dir) {
+                var node = this.source.getSelectedNodes()[0];
+                if (node) {
+                    if (dir === "up") {
+                        if (node.previousSibling) {
+                            return node.parentNode.insertBefore(node, node.previousSibling);
+                        } else {
+                            return false;
+                        }
+
+                    } else if (dir === "down") {
+                        if (node.nextSibling) {
+                            return node.parentNode.insertBefore(node.nextSibling, node);
+                        } else {
+                            return false;
+                        }
+                    } else {
+                        throw "Invalid move direction passed!";
+                    }
+                } else {
+                    return false;
+                }
+            },
+
+            insertItem: function(item) {
+                var anchor = this.source.getSelectedNodes()[0];
+                if (anchor) {
+                    this.source.insertNodes(false,[item], false, anchor);
+                } else {
+                    this.appendItem(item);
+                }
+            }
+
+        });
+    });
Index: Dev/trunk/client/qed/widgets/list/_EditableListMixin.js
===================================================================
--- Dev/trunk/client/qed/widgets/list/_EditableListMixin.js	(revision 424)
+++ Dev/trunk/client/qed/widgets/list/_EditableListMixin.js	(revision 424)
@@ -0,0 +1,16 @@
+define([
+    'dojo/_base/declare',
+    'dojo/_base/lang',
+    'dijit/registry'
+],function(declare,lang,registry){
+    return declare(null,{
+        getItems: function() {
+            return this.source.getAllNodes()
+            .map(function(node){
+                var value = registry.byId(node.id).get('value');
+                this.source.setItem(node.id, value)
+                return value;
+            },this);
+        }
+    });
+});
Index: Dev/trunk/client/qed/widgets/list/templates/List.html
===================================================================
--- Dev/trunk/client/qed/widgets/list/templates/List.html	(revision 424)
+++ Dev/trunk/client/qed/widgets/list/templates/List.html	(revision 424)
@@ -0,0 +1,10 @@
+<div>
+        <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'top'">
+	        <h3 data-dojo-attach-point="titleNode"></h3>
+        </div>
+        <div data-dojo-type="dijit/layout/ContentPane"
+             data-dojo-props="region: 'center'"
+             data-dojo-attach-point="sourceNode"
+             class="${baseClass}Content">
+        </div>
+</div>
Index: Dev/trunk/client/qed/widgets/list/templates/OrderedList.html
===================================================================
--- Dev/trunk/client/qed/widgets/list/templates/OrderedList.html	(revision 424)
+++ Dev/trunk/client/qed/widgets/list/templates/OrderedList.html	(revision 424)
@@ -0,0 +1,15 @@
+<div>
+        <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'top'">
+	        <h3 data-dojo-attach-point="titleNode"></h3>
+        </div>
+        <div data-dojo-type="dijit/layout/ContentPane"
+             data-dojo-props="region: 'center'"
+             data-dojo-attach-point="sourceNode"
+             class="${baseClass}Content">
+        </div>
+        <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'bottom'" data-dojo-attach-point="buttonsNode">
+		    <span>Move selected: </span>
+		    <button data-dojo-attach-point="btnListMoveUp" ></button>
+		    <button data-dojo-attach-point="btnListMoveDown"></button>
+        </div>
+</div>
Index: Dev/trunk/client/qed/widgets/templates/DateTimeTextBox.html
===================================================================
--- Dev/trunk/client/qed/widgets/templates/DateTimeTextBox.html	(revision 424)
+++ Dev/trunk/client/qed/widgets/templates/DateTimeTextBox.html	(revision 424)
@@ -0,0 +1,4 @@
+<div class="${baseClass}">
+    <div data-dojo-type="dijit/form/DateTextBox" data-dojo-attach-point="dateBox"></div>
+    <div data-dojo-type="dijit/form/TimeTextBox" data-dojo-attach-point="timeBox"></div>
+</div>
Index: Dev/trunk/client/qed/widgets/templates/LineWithActionsWidget.html
===================================================================
--- Dev/trunk/client/qed/widgets/templates/LineWithActionsWidget.html	(revision 424)
+++ Dev/trunk/client/qed/widgets/templates/LineWithActionsWidget.html	(revision 424)
@@ -0,0 +1,4 @@
+<div class="${baseClass}">
+    <span class="${baseClass}Title" data-dojo-attach-point="titleNode"></span>
+    <span class="${baseClass}Buttons dijitReset" data-dojo-attach-point="buttonsNode"></span>
+</div>
Index: Dev/trunk/client/qed/widgets/templates/MultipleChoiceWidget.html
===================================================================
--- Dev/trunk/client/qed/widgets/templates/MultipleChoiceWidget.html	(revision 424)
+++ Dev/trunk/client/qed/widgets/templates/MultipleChoiceWidget.html	(revision 424)
@@ -0,0 +1,7 @@
+<div class="${baseClass}">
+    <div data-dojo-attach-point="rows">
+    </div>
+    <div data-dojo-attach-point="buttons" class="row">
+        <div><span class="rowBox"/><span class="rowText"/><span class="rowBtn"/><button data-dojo-type="dijit/form/Button" type="button" data-dojo-attach-event="onClick:_onAddRow" class="rowBtn">+</button></div>
+    </div>
+</div>
Index: Dev/trunk/client/qed/widgets/templates/ObjectBox.html
===================================================================
--- Dev/trunk/client/qed/widgets/templates/ObjectBox.html	(revision 424)
+++ Dev/trunk/client/qed/widgets/templates/ObjectBox.html	(revision 424)
@@ -0,0 +1,6 @@
+<div class="${baseClass}">
+    <div data-dojo-attach-point="iconNode"></div>
+    <div data-dojo-attach-point="line1Node"></div>
+    <div data-dojo-attach-point="line2Node"></div>
+    <div data-dojo-attach-point="line3Node"></div>
+</div>
Index: Dev/trunk/client/qed/widgets/templates/Selector.html
===================================================================
--- Dev/trunk/client/qed/widgets/templates/Selector.html	(revision 424)
+++ Dev/trunk/client/qed/widgets/templates/Selector.html	(revision 424)
@@ -0,0 +1,10 @@
+<div>
+    <div class="${baseClass}Category">
+        <div class="${baseClass}Title" data-dojo-attach-point="titleNode"></div>
+    </div>
+    <div class="${baseClass}Selected">
+        <div class="${baseClass}Indicator" data-dojo-attach-point="selectedColorNode"></div>
+        <div class="${baseClass}Item" data-dojo-attach-point="selectedItemNode"></div>
+    </div>
+    <div class="${baseClass}Options" data-dojo-attach-point="optionsNode"></div>
+</div>
Index: Dev/trunk/client/response.html
===================================================================
--- Dev/trunk/client/response.html	(revision 424)
+++ Dev/trunk/client/response.html	(revision 424)
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>QED - Respondent</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <link rel="stylesheet" type="text/css" href="qed/css/main.css" />
+    </head>
+    <body id="rft" class="dijitReset claro">
+        <script type="text/javascript" src="dojo/dojo.js" data-dojo-config="async: true, parseOnLoad: false, isDebug: true"></script>
+        <script type="text/javascript" src="qed/main-response.js"></script>
+        <div id="content" class="page" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="region:'center'" style="width: 100%; height: 100%;">
+        </div>
+        <div id="toaster" data-dojo-type="qed/app/Notifications">
+        </div>
+    </body>
+</html>
Index: Dev/trunk/client/run.sh
===================================================================
--- Dev/trunk/client/run.sh	(revision 424)
+++ Dev/trunk/client/run.sh	(revision 424)
@@ -0,0 +1,2 @@
+#!/bin/sh
+nodejs dojo/dojo load=$1
Index: Dev/trunk/client/test/async.js
===================================================================
--- Dev/trunk/client/test/async.js	(revision 424)
+++ Dev/trunk/client/test/async.js	(revision 424)
@@ -0,0 +1,38 @@
+define([
+    'dojo/_base/lang',
+    'dojo/Deferred',
+    'qed/lib/async'
+],function(lang,Deferred,async){
+
+    function delayed(i) {
+        var t = setTimeout(function(){
+            console.log("Delay fired after "+i+"s");
+            d.resolve(i);
+        },i*1000);
+        var d = new Deferred(function(){
+            t && clearTimeout(t);
+            d.reject(i);
+        });
+        return d.promise;
+    };
+
+    var is = [5,1,4,2,3];
+
+    async.seq([
+        function() {
+            console.log("foreach - items should appear in original order");
+            return async.forEach(is,delayed).then(console.log);
+        },
+        function () {
+            console.log("map - items should appear sorted");
+            return async.map(is,delayed).then(console.log);
+        }
+    ]).then(function(){
+        console.log("Done!");
+    },function(err){
+        console.log("Fail!",err);
+    });
+
+
+
+});
Index: Dev/trunk/client/test/promise.js
===================================================================
--- Dev/trunk/client/test/promise.js	(revision 424)
+++ Dev/trunk/client/test/promise.js	(revision 424)
@@ -0,0 +1,22 @@
+define([
+    'dojo/_base/lang',
+    'dojo/Deferred'
+],function(lang,Deferred){
+
+    var d = new Deferred();
+    d.then(function(){
+        console.log("Then 1 was called.");
+        throw "Fail";
+    })
+    .then(function(){
+        console.log("Then 2 was called.");
+    })
+    .then(function(){
+        console.log("Then 3 was called.");
+    },function(){
+        console.log("Otherwise 3 was called.");
+    });
+
+    d.resolve(true);
+
+});
Index: Dev/trunk/docs/jsonformat.txt
===================================================================
--- Dev/trunk/docs/jsonformat.txt	(revision 424)
+++ Dev/trunk/docs/jsonformat.txt	(revision 424)
@@ -0,0 +1,2 @@
+This file is now obsolete. Look in rft/schema for a JSON schema that we
+can use to actually verify our data.
Index: Dev/trunk/server/couchdb-admin/bootstrap.js
===================================================================
--- Dev/trunk/server/couchdb-admin/bootstrap.js	(revision 424)
+++ Dev/trunk/server/couchdb-admin/bootstrap.js	(revision 424)
@@ -0,0 +1,15 @@
+dojoConfig = {
+    packagePaths:{
+        '../../client':[
+            'dojo',
+            'dijit',
+            'dojox',
+            'qed'
+        ],
+        '.':[
+            'config',
+            'check'
+        ]
+    }
+};
+require('../../client/dojo/dojo');
Index: Dev/trunk/server/couchdb-admin/config/check.js
===================================================================
--- Dev/trunk/server/couchdb-admin/config/check.js	(revision 424)
+++ Dev/trunk/server/couchdb-admin/config/check.js	(revision 424)
@@ -0,0 +1,42 @@
+define([
+     'dojo/_base/array',
+     'dojo/_base/lang',
+     'dojox/json/schema',
+     'qed/lib/async',
+     './util/db',
+     'qed/model/schema'
+],function(array,lang,jsonSchema,async,db,schema){
+
+    async.seq([
+        function(){
+            console.log("Validating documents for QED:");
+            console.log("NOTE: referential integrity is not checked.");
+        },
+        function(){
+            console.log("Getting list of documents.");
+            return db.req('get','qed/_all_docs')
+            .then(function(docs){
+                return array.filter(docs.rows,function(doc){
+                    return doc.id.indexOf('_design/') !== 0;
+                });
+            });
+        },
+        function(docs){
+            console.log("Validating documents.");
+            return async.map(docs,function(doc){
+                var id = doc.id;
+                return db.req('get','qed/'+id)
+                .then(function(actualDoc){
+                    var result = jsonSchema.validate(actualDoc,schema);
+                    console.log("Document '"+id+"' is "+(result.valid ? "valid" : "invalid")+".");
+                });
+            });
+        }
+    ]).then(function() {
+        console.log("Done!");
+    },function(err){
+        console.log("Fail!",err.stack);
+    });
+
+
+});
Index: Dev/trunk/server/couchdb-admin/config/config.js
===================================================================
--- Dev/trunk/server/couchdb-admin/config/config.js	(revision 424)
+++ Dev/trunk/server/couchdb-admin/config/config.js	(revision 424)
@@ -0,0 +1,90 @@
+define([
+     'dojo/_base/json',
+     'dojo/_base/lang',
+     'dojox/lang/functional',
+     'qed/lib/async',
+     './util/db',
+     './data/design-docs'
+],function(json,lang,func,async,db,docs){
+
+    function serializeFunctions(value) {
+        if ( value === null ) {
+            return null;
+        } else if ( lang.isArray(value) ) {
+            return value;
+        } else if ( lang.isFunction(value) ) {
+            return value.toString();
+        } else if ( lang.isObject(value) ) {
+            return func.mapIn(value,serializeFunctions);
+        } else {
+            return value;
+        }
+    }
+
+    async.seq([
+        function(){
+            console.log("Configuring CouchDB for QED:");
+        },
+        function(){
+            console.log("Checking CouchDB version");
+            return db.req('get','')
+            .then(function(res){
+                if (res.version !== "1.2.0" ) {
+                    console.log("Found "+res.version+", only tested with CouchDB 1.2.0")
+                } else {
+                    console.log("CouchDB 1.2.0 found");
+                }
+            });
+        },function(){
+            console.log("Checking database 'qed'");
+            return db.req('get','qed')
+            .then(function(res){
+                if (res.error) {
+                    console.log("Creating database 'qed'");
+                    return db.req('put','/qed');
+                } else {
+                    console.log("Database 'qed' found.");
+                }
+            },function(res){
+                console.log("Creating database 'qed'");
+                return db.req('put','/qed');
+            });
+        },function(){
+            return serializeFunctions(docs);
+        },function(docs){
+            console.log("Putting documents in database.");
+            return async.forEach(func.keys(docs),function(docUrl){
+                var doc = docs[docUrl];
+                var configAction = doc.__configAction;
+                delete doc.__configAction;
+                switch (configAction) {
+                    case "ignore":
+                        console.log(docUrl+" ignored.");
+                    case "update":
+                        console.log(docUrl+" updating.");
+                        return db.req('get',docUrl)
+                        .then(function(oldDoc){
+                            lang.mixin(oldDoc,doc);
+                            return db.req('put',docUrl,oldDoc);
+                        },function(){
+                            return db.req('put',docUrl,doc);
+                        });
+                    case "replace":
+                    default:
+                        console.log(docUrl+" replacing.");
+                        return db.req('get',docUrl)
+                        .then(function(oldDoc){
+                            doc['_rev'] = oldDoc['_rev'];
+                            return db.req('put',docUrl,doc);
+                        },function(){
+                            return db.req('put',docUrl,doc);
+                        });
+                }
+            });
+        },function(){
+            console.log("Done!");
+        }
+    ]);
+
+
+});
Index: Dev/trunk/server/couchdb-admin/config/data/design-docs.js
===================================================================
--- Dev/trunk/server/couchdb-admin/config/data/design-docs.js	(revision 424)
+++ Dev/trunk/server/couchdb-admin/config/data/design-docs.js	(revision 424)
@@ -0,0 +1,117 @@
+define([],function(){
+    return {
+        "_users/qed_admin": {
+            __configAction: "ignore",
+            _id: "org.couchdb.user:qed_admin",
+            name: "qed_admin",
+            password: "Welkom01",
+            roles: [ "qed_admin" ],
+            type: "user"
+        },
+        "qed/_security": {
+            __configAction: "ignore",
+            admins: {
+                names: [],
+                roles: ["qed_admin"]
+            },
+            readers: {
+                names: [],
+                roles: ["qed_user"]
+            }
+        },
+        "qed/_design/default": {
+            __configAction: "replace",
+            _id: "_design/default",
+            language: "javascript",
+            validate_doc_update: function(newDoc, oldDoc, userCtx, secObj) {
+                if ( oldDoc && oldDoc.publicationDate ) { throw({forbidden:'Published documents cannot be modified.'}); }
+            },
+            views: {
+                by_type: {
+                    map: function(doc){
+                        emit(doc.type, doc);
+                    }
+                }
+            }
+        },
+        "qed/_design/questions": {
+            __configAction: "replace",
+            _id: "_design/questions",
+            language: "javascript",
+            views: {
+                all: {
+                    map: function(doc){
+                        if ( doc.type !== 'Question' ) { return; }
+                        if ( doc.categories && doc.categories.length > 0 ) {
+                            for ( var i = 0; i < doc.categories.length; i++ ) { 
+                                emit([doc.categories[i],doc.topic||null],1);
+                            } 
+                        } else { 
+                            emit([null,null],1); 
+                        } 
+                    },
+                    reduce: function(keys,values){ return sum(values); }
+                },
+                published: {
+                    map: function(doc){
+                        if ( doc.type!=='Question' || !doc.publicationDate ) { return; }
+                        if ( doc.categories && doc.categories.length > 0 ) {
+                            for ( var i = 0; i < doc.categories.length; i++ ) {
+                                emit([doc.categories[i],doc.topic||null],1);
+                            }
+                        } else {
+                            emit([null,null],1);
+                        }
+                    },
+                    reduce: function(keys,values){ return sum(values); }
+                },
+                all_topics: {
+                    map: function(doc){
+                        if( doc.type !== 'Question' ){ return; }
+                        emit(doc.topic);
+                    },
+                    reduce: function(key, values, rereduce) { return null; }
+                },
+                published_topics: {
+                    map: function(doc){
+                        if ( doc.type !== 'Question' || !doc.publicationDate ) { return; }
+                        emit(doc.topic);
+                    },
+                    reduce: function(key, values, rereduce) { return null; }
+                }
+            }
+        },
+        "qed/_design/surveys": {
+            __configAction: "replace",
+            _id: "_design/surveys",
+            language: "javascript",
+            views: {
+                drafts: {
+                    map: function(doc){
+                        if ( doc.type !== 'Survey' || doc.publicationDate ) { return; }
+                        emit(doc._id,doc);
+                    }
+                },
+                published: {
+                    map: function(doc){
+                        if ( doc.type !== 'Survey' || !doc.publicationDate ) { return; }
+                        emit(doc._id,doc);
+                    }
+                }
+            }
+        },
+        "qed/_design/responses": {
+            __configAction: "replace",
+            _id: "_design/responses",
+            language: "javascript",
+            views: {
+                by_surveyrun: {
+                    map: function(doc){
+                        if ( doc.type !== 'Response' ) { return; }
+                        emit(doc.surveyRunId, doc);
+                    }
+                }
+            }
+        }
+    };
+});
Index: Dev/trunk/server/couchdb-admin/config/util/db.js
===================================================================
--- Dev/trunk/server/couchdb-admin/config/util/db.js	(revision 424)
+++ Dev/trunk/server/couchdb-admin/config/util/db.js	(revision 424)
@@ -0,0 +1,20 @@
+define([
+     'dojo/_base/json',
+     'dojo/request'
+],function(json,request){
+    var dbUrl = "http://localhost:5984/";
+
+    function req(method,path,body) {
+        var args = {
+            contentType: 'application/json',
+            handleAs: 'json',
+            data: json.toJson(body || {})
+        };
+        return request[method](dbUrl+path,args);
+    }
+
+    return {
+        req:req
+    };
+
+});
Index: Dev/trunk/server/couchdb-admin/run.bat
===================================================================
--- Dev/trunk/server/couchdb-admin/run.bat	(revision 424)
+++ Dev/trunk/server/couchdb-admin/run.bat	(revision 424)
@@ -0,0 +1,1 @@
+"C:\\Program Files\\nodejs\\node" bootstrap.js load=%1%
Index: Dev/trunk/server/couchdb-admin/run.sh
===================================================================
--- Dev/trunk/server/couchdb-admin/run.sh	(revision 424)
+++ Dev/trunk/server/couchdb-admin/run.sh	(revision 424)
@@ -0,0 +1,2 @@
+#!/bin/sh
+nodejs bootstrap.js load=$1
