Index: Dev/trunk/classes/PipelineInfoPanel.php
===================================================================
--- Dev/trunk/classes/PipelineInfoPanel.php	(revision 177)
+++ Dev/trunk/classes/PipelineInfoPanel.php	(revision 178)
@@ -17,9 +17,9 @@
         ?>
         <div>
-            <fieldset id="infoPanel">
-                <div class="fieldsetTitle">
-                    Title
+            <div id="infoPanel" class="largeFrame">
+                <div class="largeTitle">
+                    Info
                 </div>
-                <div id="infoPanelContent">
+                <div id="infoPanelContent" class="content">
                     
                 </div>
Index: Dev/trunk/classes/pipelineSequencer.php
===================================================================
--- Dev/trunk/classes/pipelineSequencer.php	(revision 177)
+++ Dev/trunk/classes/pipelineSequencer.php	(revision 178)
@@ -40,5 +40,35 @@
         }
         ?>
-        <br /><form name="sequencerForm" action="pipelineEditor.php" method="post">
+        <br />
+
+        <div id="sequencer" class="largeFrame">
+            <div class="largeTitle">Name <?php echo $this->loadedSession->title; ?></div>
+            
+            <div id="seqContent" class="innerLargeFrame">
+                <div id="seqContentWrapper"></div>
+            </div>
+
+            <div class="controls">
+                <input type="button" id="moveSelectedL" value="< Move" class="smallButton"  onClick="moveStep(-1);" />
+                <input type="button" id="moveSelectedR" value="Move >" class="smallButton"  onClick="moveStep(1);" />
+                <input type="button" id="editSelected" value="Edit step" class="smallButton" onClick="editStep();" />
+                <input type="button" id="deleteSelected" value="Delete step" class="smallButton" onClick="deleteStep();" />
+                <input type="submit" id ="clearPipeline" name="clearPipeline" value="Clear pipeline" class="smallButton dis" disabled="true"/>
+                <input type="checkbox" id="confirmClear" name="confirmClear" onChange="IsCheckEnabled(this, document.getElementById('clearPipeline'));" />Really clear?
+                <input type="button" value="debug_save" onClick="savePipeline(true);" />
+            </div>
+            
+            <div id="hiddenInputs">
+                <input type="hidden" name="selectedStep" id="selectedStepField" value="" />
+                <input type="hidden" name="pipelineString" id="pipelineStringField" value="<?php echo $stringPipeline; ?>" />
+                <input type="hidden" name="pipelineTypes" id="pipelineTypeField" value="<?php echo $stringPipelineType; ?>" />
+                <input type="hidden" name="pipelineUpDated" id="pipelineUpdatedField" value="<?php echo $stringPipelineUpdated; ?>" />
+                <input type="hidden" name="numSteps" id="numSteps" value="<?php echo $numberOfSteps; ?>" />
+                <input type="hidden" name="session" id="sessionField" value="<?php echo $this->loadedSession->uid; ?>" />
+            </div>
+        </div>
+
+        <!--
+        <form name="sequencerForm" action="pipelineEditor.php" method="post">
             <fieldset id="sequencer">
                 <div class="fieldsetTitle">Name: <?php echo $this->loadedSession->title; ?> </div>
@@ -67,8 +97,7 @@
             </fieldset>
         </form>
+        -->
         <?php
     }
-
-    
 
     public function Javascript() {
Index: Dev/trunk/classes/surveyEditorWidget.php
===================================================================
--- Dev/trunk/classes/surveyEditorWidget.php	(revision 178)
+++ Dev/trunk/classes/surveyEditorWidget.php	(revision 178)
@@ -0,0 +1,102 @@
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * The PHP class that implements the survey editor interface
+ *
+ * @author Thijs Schipper
+ */
+class surveyEditorWidget {
+
+    private $loadedSession;
+
+    public function __construct() {
+        // Set basic variables
+        // Should probably include a default empty survey for the sake of safety
+    }
+
+    public function handlePost() {
+        // Get POSTed data and store variables to class instance properties
+        // Most important: loadedSession!
+
+        //var_dump($_POST);
+
+        $dbi = new DatabaseInterface();
+        if (isset($_POST['objectUid']) && !empty($_POST['objectUid'])) {
+            $surveyResults = $dbi->get("Survey", array("uid" => $_POST['objectUid']));
+            if (count($surveyResults) > 0) {
+                $this->loadedSurvey = $surveyResults[0];
+            } else {
+                var_dump("No surveys found!");
+            }
+        } else {
+            var_dump("Incorrect or null uid passed!");
+        }
+    }
+
+    public function init() {
+        // echo the HTML markup to display the editor on the screen
+        ?>
+
+        <div id="surveyEditor" class="largeFrame">
+            <div class="largeTitle">
+                Survey name
+            </div>
+            <div id="surveyEditorContent" class="innerLargeFrame">
+
+                <div id="questionUID" class="smallFrame">
+                    <div class="smallTitle"><div class="listNumber">1</div>#QUESTION-IDENT-NO</div>
+                    <div class="content">
+                        <p class="questionBody">
+                            This is the question body text. This is what the user will read when he is answering the survey.This is the question body text. This is what the user will read when he is answering the survey.This is the question body text. This is what the user will read when he is answering the survey.
+                        </p>
+                        <div class="questionParamsView">
+                            PARAMETERS GO HERE, probably in one line (Only answer type and identifier?) Tags?
+                        </div>
+                    </div>
+                    <div id="questionDisplayControls" class="controls">
+                        <input type="button" value="Edit" onClick="javascript:alert('editing not yet supported');" class =" smallButton"/>
+                        <input type="button" value="Remove" onClick="javascript:alert('removing not yet supported');" class =" smallButton"/>
+                    </div>
+                </div>
+
+
+            </div>
+            <div id="surveyEditorControls" class="controls">
+                <input type="button" value="Discard survey" onClick="javascript:alert('discard not yet supported');" class="smallButton" />
+                <input type="button" value="Save survey" onClick="javascript:alert('save not yet supported');" class="smallButton" />
+            </div>
+
+        </div>
+
+
+        <form name="hiddenFields">
+            <input type="hidden" id="surveyUid" value="<?php echo $this->loadedSurvey->uid; ?>" />
+            <input type="hidden" id="questionUids" value="<?php echo $this->loadedSurvey->questions; ?>" />
+            <input type="hidden" id="surveyTitle" value="<?php echo $this->loadedSurvey->title; ?>" />
+            <input type="hidden" id="numQuestions" value="<?php echo count($this->loadedSurvey->questions); ?>" />
+            <input type="hidden" id="surveyDescription" value="<?php echo $this->loadedSurvey->description; ?>" />
+        </form>
+
+
+        <?php
+    }
+
+    public function javascript() {
+        // output the javascript tags and needed functions in the head of the page
+        ?>
+        <script type="text/javascript" src="js/surveyEditorScripts.js"></script>
+        <script type="text/javascript" src="js/jquery.js"></script>
+        <script type="text/javascript">
+            $(document).ready(function() {
+                loadSurvey();
+            });
+        </script>
+        <?php
+    }
+
+}
+?>
Index: Dev/trunk/css/visualeditors.css
===================================================================
--- Dev/trunk/css/visualeditors.css	(revision 177)
+++ Dev/trunk/css/visualeditors.css	(revision 178)
@@ -34,16 +34,4 @@
     padding: 2em 0;
 }
-
-#surveyEditor {
-    background-color: #0000FF;
-}
-
-
-
-
-
-
-
-
 
 
@@ -202,6 +190,6 @@
     margin: 0.25em;
     border: 1px solid #555;
-    border-radius: 0.5em;
-    -moz-border-radius: 0.5em;
+    border-radius: 0.25em;
+    -moz-border-radius: 0.25em;
     background-color: transparent;
 }
@@ -286,8 +274,10 @@
 }
 
-.displayStep.selected {
-    -moz-box-shadow: 0 0 50px #FFF;
+.displayStep.selected .displayStepIcon{
+    background-color: #bbbbbb;
+    /*-moz-box-shadow: 0 0 50px #FFF;
     -webkit-box-shadow: 0 0 50px #FFF;
-    box-shadow: 0 0 50px #FFF;
+    box-shadow: 0 0 50px #FFF;*/
+    border-color: #1c94c4;
 
 }
@@ -296,5 +286,5 @@
     width: 50px;
     height: 50px;
-    border: 2px solid #444444;
+    border: 2px solid #555;
     color: #FFF;
 }
@@ -321,2 +311,34 @@
 }
 
+#infoPanel {
+    margin-top: 2em;
+    margin-left: 2em;
+    clear: right;
+}
+
+#infoPanel .content {
+    clear: both;
+    min-height: 10em;
+    width: 30em;
+}
+
+.content .property {
+    float: left;
+    clear: left;
+    font-weight: bold;
+    width: 8em;
+    color: #FFF;
+}
+
+.content .value {
+    float: left;
+}
+
+/**************************/
+/* Survey Editor Specific */
+/**************************/
+
+
+#surveyEditor {
+    background-color: #0000FF;
+}
Index: Dev/trunk/getInfo.php
===================================================================
--- Dev/trunk/getInfo.php	(revision 177)
+++ Dev/trunk/getInfo.php	(revision 178)
@@ -22,5 +22,5 @@
 if (count($results) > 0) {      // check if DB object exists and assign it to variable
     if ($results[0] != null) {
-        $returnString = "<table border='0'>";
+        $returnString = "";
         $result = $results[0];
     } else
@@ -31,6 +31,6 @@
 switch ($type) {
     case "Session":
-        $returnString .= "<tr> <td>Name</td> <td>$result->title</td> </tr>";
-        $returnString .= "<tr><td>Created</td><td>" . $result->datetime->format("H:i:s, d-m-Y") . " by " . $result->creator[0]->name . "</td></tr>";
+        $returnString .= "<span class='property'>Title: </span><span class='value'>$result->title</span>";
+        $returnString .= "<span class='property'>Created: </span><span class='value'>" . $result->datetime->format("H:i:s, d-m-Y") . " by " . $result->creator[0]->name . "</span>";
         $cS = 0; $cD = 0; $cA = 0;
         foreach ($result->pipeline as $step) {
@@ -50,21 +50,18 @@
             }
         }
-        $returnString .= "<tr><td>Number of steps</td><td><ul style='list-style-type: none;'><li style='margin-left: -40px;'>$cS Surveys<li style='margin-left: -40px;'>$cA Applications<li style='margin-left: -40px;'>$cD Dashboards</ul></td></tr>";
+        $returnString .= "<span class='property'>Number of steps: </span><span class='value'><ul style='list-style-type: none;'><li style='margin-left: -40px;'>$cS Surveys<li style='margin-left: -40px;'>$cA Applications<li style='margin-left: -40px;'>$cD Dashboards</ul></span>";
         break;
     case "Survey":
-        $returnString .= "<tr> <td>Name</td><td>$result->title</td> </tr>";
-        $returnString .= "<tr> <td>Creator</td> <td>LOLOL ME!!!</td> </tr>";
+        $returnString .= "<span class='property'>Title: </span><span class='value'>$result->title</span>";
+        $returnString .= "<span class='property'>Creator: </span><span class='value'>LOLOL ME!!!</span>";
         $qCount = 0;
-        foreach ($result->questions as $q) {
-            $qCount++;
-        }
-        $returnString .= "<tr> <td>Questions</td> <td>$qCount</td> </tr>";
-        $returnString .= "<tr> <td>Description</td> <td>$result->description</td> </tr>";
-        
+        $qCount = count($result->questions);
+        $returnString .= "<span class='property'>Questions: </span><span class='value'>$qCount</span>";
+        $returnString .= "<span class='property'>Description: </span><span class='value'>$result->description</span>";
         break;
     case "Application":
-        $returnString .= "<tr> <td>Name</td> <td>$result->title</td> </tr>";
-        $returnString .= "<tr> <td>Location</td> <td>C:/folder_of_awesomeness/epicgame.exe</td> </tr>";
-        $returnString .= "<tr> <td>Description</td> <td>$result->description</td> </tr>";
+        $returnString .= "<span class='property'>Title: </span><span class='value'>$result->title</span>";
+        $returnString .= "<span class='property'>Path: </span><span class='value'>C:/folder_of_awesomeness/epicgame.exe</span>";
+        $returnString .= "<span class='property'>Description: </span><span class='value'>$result->description</span>";
         break;
     case "Dashboard":
@@ -80,5 +77,4 @@
 }
 
-$returnString .= "</table>";
 echo $returnString;
 ?>
Index: Dev/trunk/js/sequencerScripts.js
===================================================================
--- Dev/trunk/js/sequencerScripts.js	(revision 177)
+++ Dev/trunk/js/sequencerScripts.js	(revision 178)
@@ -460,5 +460,5 @@
         newAjaxRequest(requestString, "savesession.php", function(result){
             success = result.responseText;
-        }, false);
+        }, true);
         console.log(success);
     }
@@ -523,5 +523,4 @@
     pipelineTypes = stringToArray(pipelineTypes, ",");
     var stepType = pipelineTypes[pipeline.indexOf(selectedStep)];
-    
     var postForm = document.createElement("form");
     postForm.action = stepType.toLowerCase()+"Editor.php";      //redirect to "type"editor.php
@@ -529,4 +528,5 @@
     var objectUid = document.createElement("input");
     objectUid.type = "hidden";
+    objectUid.name = "objectUid";
     objectUid.value = selectedStep;
     postForm.appendChild(objectUid);
Index: Dev/trunk/js/surveyEditorScripts.js
===================================================================
--- Dev/trunk/js/surveyEditorScripts.js	(revision 178)
+++ Dev/trunk/js/surveyEditorScripts.js	(revision 178)
@@ -0,0 +1,105 @@
+/* 
+ * Scripts needed for operation of the survey editor
+ */
+
+var surveyEditor = {
+    uid: "",                        // the uid of the currently opened survey
+    title: "No title",         // the name of the currently opened survey
+    description: "No description",  // the description of the currently opened survey
+    numQuestions: 0,                // the number of questions contained in this survey
+    questions: [],             // the array containing question objectliterals/uids
+    state: {                        // used for checks in onClick events
+        editing: false,             // whether or not a question is currently being edited
+        editUid: ""                 // the uid of the question being edited, if any
+    }
+}
+
+// Deze scripts worden gedeeld door bijna alle editors, en deze moeten dan ook in een common scripts
+// file komen te staan in plaats van in elk document weer opnieuw invoeren.
+// Dit gaat ongetwijfeld conflicten opleveren als er in een van de functies iets veranderd moet worden.
+
+function stringToArray(s, c) {
+    var a = s.split(c);
+    for (var i = 0; i < a.length; i++) {    // remove empty items
+        if (a[i] == "") {
+            a.splice(i, 1);
+            i--;
+        }
+    }
+    return a;
+}
+
+function arrayToString(a, c) {
+    var s = "";
+    for (var i = 0; i < a.length; i++) {
+        if (a[i] != "") {
+            s += a[i]+c;
+        }
+    }
+    return s;
+}
+
+
+
+function loadSurvey() {
+    
+    /*
+     * Take the values from the hiddenfields on the page, load them into the object literal defined at the top of this script,
+     * Then delete these fields from the HTML page, since they are not needed anymore.
+     * This is possibly more secure than leaving them on the page, and results in cleaner HTML markup
+     */
+
+    debugger;
+    var fTitle = document.getElementById("surveyTitle");
+    if (fTitle != undefined && fTitle.value != "") {
+        surveyEditor.title = fTitle.value;
+    }
+    else {
+        surveyEditor.title = "Undefined title";
+    }
+    
+    var fNumQuestions = document.getElementById("numQuestions");
+    if (fNumQuestions != undefined && fNumQuestions.value != "") {
+        surveyEditor.numQuestions = fNumQuestions;
+    }
+    else {
+        surveyEditor.numQuestions = 0;
+        return;
+    }
+    
+    var fQuestions = document.getElementById("questionUids");
+    if (fQuestions != undefined && surveyEditor.numQuestions > 0) {
+        surveyEditor.questions = stringToArray(fQuestions.value, ",");
+        if (surveyEditor.questions.length != surveyEditor.numQuestions) {
+            alert("numQuestions and the questions array passed do not match!");
+            return;
+        }
+    }
+    else {
+        alert("Questions field not found!");
+        return;
+    }
+}
+
+function drawQuestions(firstTime) {
+    var length = surveyEditor.questions.length;
+    if (length <= 0) return;
+    
+    var container = document.getElementById("surveyEditorContent");
+    
+    
+    if (firstTime == true) {
+        // Loop through questions, add a new smallFrame div for each question with id=question->uid
+        // do this via AJAX calls, returnQuestion.php
+        // dependencies: stringToArray/arrayToString
+        var requestString = "uids=";
+        requestString += arrayToString(surveyEditor.questions, ",");
+        newAjaxRequest(requestString, "returnQuestionDisplay.php", function(result) {
+            //var holderDiv = document.createElement("div");
+            //holderDiv.innerHTML = result.responseText;
+            container.innerHTML = result.responseText;
+        });
+    }
+    
+    
+}
Index: Dev/trunk/pipelineEditor.php
===================================================================
--- Dev/trunk/pipelineEditor.php	(revision 177)
+++ Dev/trunk/pipelineEditor.php	(revision 178)
@@ -6,5 +6,5 @@
 }
 
-$sequencer = new PipelineSequencer_1();
+$sequencer = new PipelineSequencer();
 $sequencer->LoadSession($_SESSION['currentSession']); //load session into php part of the sequencer
 $sequencer->HandlePostData();
Index: Dev/trunk/returnQuestionDisplay.php
===================================================================
--- Dev/trunk/returnQuestionDisplay.php	(revision 178)
+++ Dev/trunk/returnQuestionDisplay.php	(revision 178)
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+if (!isset($_POST['uids']) || empty($_POST['uids'])) {
+    return;
+}
+
+$uids = explode(",", $_POST['uids']);
+$dbi = new DatabaseInterface();
+$output = "";
+foreach ($uids as $uid) {
+    $results = $dbi->get("Question", array("uid" => $uid));
+    (is_array($results)) ? $result = $results[0] : $result = $results;  //ternary operation!
+    $output += "HTML CODE HERE!";
+}
+
+echo $output;
+?>
Index: Dev/trunk/surveyEditor.php
===================================================================
--- Dev/trunk/surveyEditor.php	(revision 177)
+++ Dev/trunk/surveyEditor.php	(revision 178)
@@ -1,4 +1,7 @@
 <?php
 require "classes/master.php";
+
+$surveyEditor = new surveyEditorWidget();
+$surveyEditor->handlePost();
 ?>
 
@@ -11,40 +14,14 @@
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-        <title></title>
-        <?php new StyleSheet("visualeditors"); ?>
+        <title>Edit survey</title>
+        <?php
+        $surveyEditor->javascript();
+        new StyleSheet("visualeditors");
+        ?>
     </head>
     <body>
         <div id="wrapper">
             <div id="content">
-                <div id="surveyEditor" class="largeFrame">
-                    <div class="largeTitle">
-                        Survey name
-                    </div>
-                    <div id="surveyEditorContent" class="innerLargeFrame">
-
-                        <div id="questionUID" class="smallFrame">
-                            <div class="smallTitle"><div class="listNumber">1</div>#QUESTION-IDENT-NO</div>
-                            <div class="content">
-                                <p class="questionBody">
-                                    This is the question body text. This is what the user will read when he is answering the survey.This is the question body text. This is what the user will read when he is answering the survey.This is the question body text. This is what the user will read when he is answering the survey.
-                                </p>
-                                <div class="questionParamsView">
-                                    PARAMETERS GO HERE, probably in one line (Only answer type and identifier?) Tags?
-                                </div>
-                            </div>
-                            <div id="questionDisplayControls" class="controls">
-                                <input type="button" value="Edit" onClick="javascript:alert('editing not yet supported');" class =" smallButton"/>
-                                <input type="button" value="Remove" onClick="javascript:alert('removing not yet supported');" class =" smallButton"/>
-                            </div>
-                        </div>
-                        
-
-                    </div>
-                    <div id="surveyEditorControls" class="controls">
-                        <input type="button" value="Discard survey" onClick="javascript:alert('discard not yet supported');" class="smallButton" />
-                        <input type="button" value="Save survey" onClick="javascript:alert('save not yet supported');" class="smallButton" />
-                    </div>
-
-                </div>
+                <?php $surveyEditor->init(); ?>
             </div>
         </div>
