Index: Dev/branches/jos-branch/classes/master.php
===================================================================
--- Dev/branches/jos-branch/classes/master.php	(revision 229)
+++ Dev/branches/jos-branch/classes/master.php	(revision 230)
@@ -20,4 +20,8 @@
 	else if (file_exists('classes/models/' . $class_name . '.php'))
 		require 'classes/models/' . $class_name . '.php';
+	else if (file_exists('classes/widgets/' . $class_name . '.php'))
+		require 'classes/widgets/' . $class_name . '.php';
+	else if (file_exists('classes/styles/' . $class_name . '.php'))
+		require 'classes/styles/' . $class_name . '.php';
 }
 
Index: Dev/branches/jos-branch/classes/styles/Logo.php
===================================================================
--- Dev/branches/jos-branch/classes/styles/Logo.php	(revision 230)
+++ Dev/branches/jos-branch/classes/styles/Logo.php	(revision 230)
@@ -0,0 +1,31 @@
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of Logo
+ *
+ * @author tschipper
+ */
+class Logo {
+
+    // hardcoded logo div, image is defined in stylesheet. (#logo background:"";)
+    public function __construct() {
+        ?>
+
+        <div id="logo">
+            <div id="logoImage">
+                Research Tool
+            </div>
+            <div id="logoControls">
+                Welcome, Igor! <a href="logout.php">Log out</a>
+            </div>
+        </div>
+
+        <?php
+    }
+
+}
+?>
Index: Dev/branches/jos-branch/classes/styles/StyleSheet.php
===================================================================
--- Dev/branches/jos-branch/classes/styles/StyleSheet.php	(revision 230)
+++ Dev/branches/jos-branch/classes/styles/StyleSheet.php	(revision 230)
@@ -0,0 +1,34 @@
+<?php
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Standard stylesheet class
+ *
+ * @author tschipper
+ */
+class StyleSheet {
+
+    public $filename; // includes path
+
+    public function __construct($styleName) {
+
+        // call new StyleSheet("standard") to load css/standard.css
+        $this->path = "css/" . $styleName . ".css";
+
+        echo '<link rel="Stylesheet" type="text/css" href="css/resetstyle.css" />';
+        echo '<link rel="Stylesheet" type="text/css" href="' . $this->path . '"/>';
+        
+        echo "\n";
+    }
+
+    public function ChangeStyle($styleName) {
+        $this->path = "css/" . $styleName . ".css";
+    }
+
+}
+
+?>
Index: Dev/branches/jos-branch/classes/widgets/DbDataSelectionWidget.php
===================================================================
--- Dev/branches/jos-branch/classes/widgets/DbDataSelectionWidget.php	(revision 230)
+++ Dev/branches/jos-branch/classes/widgets/DbDataSelectionWidget.php	(revision 230)
@@ -0,0 +1,36 @@
+<?php
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of dbDataSelectionWidget
+ *
+ * @author CPS
+ */
+class DbDataSelectionWidget {
+
+    //Properties
+    
+    public $sessions;
+    public $gamedata;
+
+    public function __construct() {
+        $dbi = new DatabaseInterface();
+        
+        $this->sessions = $dbi->get("Session", array());
+        $this->gamedata = $dbi->get("Application", array());
+    }
+
+    public function Javascript() {
+        ?>
+        <script type='text/javascript' src="js/generalScripts.js"></script>
+        <script type='text/javascript' src="js/dashboardScripts.js"></script>
+        <?php
+
+    }
+
+}
+?>
Index: Dev/branches/jos-branch/classes/widgets/PipelineInfoPanel.php
===================================================================
--- Dev/branches/jos-branch/classes/widgets/PipelineInfoPanel.php	(revision 230)
+++ Dev/branches/jos-branch/classes/widgets/PipelineInfoPanel.php	(revision 230)
@@ -0,0 +1,32 @@
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Info panel, to the side of the Toolbox, showing various stats and links for the current pipeline.
+ *
+ * @author Thijs Schipper
+ */
+class PipelineInfoPanel {
+
+    private $linkedSequencer;
+
+    public function __construct() {
+        ?>
+        <div>
+            <div id="infoPanel" class="largeFrame">
+                <div class="largeTitle">
+                    Info
+                </div>
+                <div id="infoPanelContent" class="content">
+                    
+                </div>
+            </fieldset>
+        </div>
+        <?php
+    }
+
+}
+?>
Index: Dev/branches/jos-branch/classes/widgets/SessionEditorWidget.php
===================================================================
--- Dev/branches/jos-branch/classes/widgets/SessionEditorWidget.php	(revision 230)
+++ Dev/branches/jos-branch/classes/widgets/SessionEditorWidget.php	(revision 230)
@@ -0,0 +1,115 @@
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * A visual interface object for editing and viewing a session's pipeline.
+ *
+ * @author Tschipper
+ */
+class SessionEditorWidget {
+
+    // properties
+    private $loadedSession;
+    private $selectedStep;
+
+    public function __construct() {
+    }
+
+    public function init() {
+        $stringPipeline = "";
+        $stringPipelineType = "";
+        $stringPipelineUpdated = "";
+        $numberOfSteps = 0;
+
+        if (is_array($this->loadedSession->pipeline)) {
+            foreach ($this->loadedSession->pipeline as $object) {
+                $stringPipeline .= "$object->uid,";
+                $stringPipelineType .= get_class($object) . ",";
+                $stringPipelineUpdated .= "0,";
+                $numberOfSteps++;
+            }
+        } else {
+            $stringPipeline = $this->loadedSession->pipeline;
+            $stringPipelineType = $_POST['pipelineTypes'];
+            $stringPipelineUpdated = $_POST['pipelineUpdatedField'];
+        }
+        ?>
+        <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" id="selectedStepField" value="" />
+                <input type="hidden" id="pipelineStringField" value="<?php echo $stringPipeline; ?>" />
+                <input type="hidden" id="pipelineTypeField" value="<?php echo $stringPipelineType; ?>" />
+                <input type="hidden" id="pipelineUpdatedField" value="<?php echo $stringPipelineUpdated; ?>" />
+                <input type="hidden" id="numSteps" value="<?php echo $numberOfSteps; ?>" />
+                <input type="hidden" id="sessionField" value="<?php echo $this->loadedSession->uid; ?>" />
+                <input type="hidden" id="sessionTitleField" value="<?php echo $this->loadedSession->title; ?>" />
+            </div>
+        </div>
+
+        
+        <?php
+    }
+
+    public function Javascript() {
+        ?>
+        <script type="text/javascript" src="js/generalScripts.js"></script>
+        <script type="text/javascript" src="js/sequencerScripts.js"></script>
+        <script type="text/javascript" src="js/jquery.js"></script>
+        <script type="text/javascript">
+
+            var ddMenu = new DDMenu();
+            
+            $(document).ready(function() {
+                loadSequencer();
+                ddMenu.Init();
+            });
+        </script>
+        <?php
+    }
+
+    public function LoadSession() {   // Initialize variables on page load.
+		// Redirect if no session is set
+        if (!isset($_SESSION['currentSession'])) {
+            redirect("selectSession.php");
+        }
+        // Store the current session in internal variable
+        $results = Session::get(array("uid"=> $_SESSION['currentSession']));
+		//print_r($results);
+        if (!empty($results)) {
+            if ($results[0]->evaluate()) {
+                $this->loadedSession = $results[0];
+            }
+        }
+        else {
+            // Throw error and quit if no results found
+            die("No session with that UID found!");
+        }
+    }
+
+    public function HandlePostData() {
+                
+    }
+
+}
+?>
Index: Dev/branches/jos-branch/classes/widgets/SurveyEditorWidget.php
===================================================================
--- Dev/branches/jos-branch/classes/widgets/SurveyEditorWidget.php	(revision 230)
+++ Dev/branches/jos-branch/classes/widgets/SurveyEditorWidget.php	(revision 230)
@@ -0,0 +1,107 @@
+<?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 $loadedSurvey;
+    private $dbi;
+
+    public function __construct() {
+        // Set basic variables
+        // Should probably include a default empty survey for the sake of safety
+        $dbi = new DatabaseInterface();
+    }
+
+    public function handlePost() {
+        // Get POSTed data and store variables to class instance properties
+        $dbi = new DatabaseInterface();
+        if (isset($_POST['objectUid']) && !empty($_POST['objectUid'])) {
+            $surveyResults = $dbi->get("Survey", array("uid" => $_POST['objectUid']));
+            if (!empty($surveyResults)) {
+                $this->loadedSurvey = $surveyResults[0];
+            } else {
+                die("No surveys found!");
+            }
+        } else {
+            die("Incorrect or null uid passed!");
+        }
+    }
+
+    public function init() {
+        $questionString = "";
+        foreach ($this->loadedSurvey->questions as $question) {
+            $questionString .= $question->code . ",";
+        }
+        // echo the HTML markup to display the editor on the screen
+        ?>
+
+        <div id="surveyEditor" class="largeFrame">
+            <div class="largeTitle" id="surveyTitle">
+                <?php echo $this->loadedSurvey->title; ?>
+            </div>
+            <div id="seqContent" class="innerLargeFrame">
+                <div id="seqContentWrapper">
+
+                </div>
+            </div>
+            <div id="surveyEditorVertControls" class="vertControls">
+                <div class="segment">
+                    <label>Move</label>
+                    <input type="button" id="vertControls_MoveUp" class="bigButton vertical" value="Ë" />
+                    <input type="button" id="vertControls_MoveDown" class="bigButton vertical" value="Ë
+" />
+                </div>
+                <input type="button" id="vertControls_Add" class="bigButton vertical" value="+" onClick="addQuestion_Click();" />
+            </div>
+            <div id="surveyEditorControls" class="controls">
+                <div id="pageControls">
+                    <input type="button" value="<<" id="pageControls_first" onClick="" />
+                    <input type="button" value="<" id="pageControls_previous" onClick="" />
+                    Page <input type="text" value="1" id="pageControls_current" onChange="" class="smallTextField" /> of 5
+                    <input type="button" value=">" id="pageControls_next" onClick="" />
+                    <input type="button" value=">>" id="pageControls_last" onClick="" />
+                </div>
+
+                <input type="button" value="Discard survey" onClick="javascript:alert('discard not yet supported');" class="smallButton" />
+                <input type="button" value="Save survey" onClick="saveSurvey(true);" class="smallButton" />
+            </div>
+
+        </div>
+
+
+        <form id="hiddenInputs">
+            <input type="hidden" id="surveyUidField" value="<?php echo $this->loadedSurvey->uid; ?>" />
+            <input type="hidden" id="questionUidsField" value="<?php echo $questionString ?>" />
+            <input type="hidden" id="surveyTitleField" value="<?php echo $this->loadedSurvey->title; ?>" />
+            <input type="hidden" id="numQuestionsField" value="<?php echo count($this->loadedSurvey->questions); ?>" />
+            <input type="hidden" id="surveyDescriptionField" 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/sequencerScripts.js"></script>
+        <script type="text/javascript" src="js/generalscripts.js"></script>
+        <script type="text/javascript" src="js/jquery.js"></script>
+        <script type="text/javascript">
+            $(document).ready(function() {
+                loadSequencer();
+            });
+        </script>
+        <?php
+    }
+
+}
+?>
Index: Dev/branches/jos-branch/classes/widgets/Toolbox.php
===================================================================
--- Dev/branches/jos-branch/classes/widgets/Toolbox.php	(revision 230)
+++ Dev/branches/jos-branch/classes/widgets/Toolbox.php	(revision 230)
@@ -0,0 +1,56 @@
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of ToolBox
+ *
+ * @author HP
+ */
+class Toolbox {
+
+    public function __construct() {
+        ?>
+
+        <br />
+
+        <div id="toolbox" class="largeFrame">
+            <div class="largeTitle">Toolbox</div>
+            <div class="content">
+                <p style="float: left; clear:both; margin-bottom: 1em;">Add new:</p>
+                <ul id="toolboxMenu">
+                    <li>
+                        <div class="bigButton toolbox" onclick="ddMenu.Open('toolbox_m1')"><img src="images/icons/survey.png" class="buttonIcon" /><p>Survey</p>
+                            <div id="toolbox_m1" onmouseover="ddMenu.CancelCloseTimer()" onmouseout="ddMenu.SetCloseTimer()">
+                                <a href="#" >+ Add new</a>
+                                <a href="#">> Add existing</a>
+                            </div>
+
+                        </div>
+                    </li>
+                    <li>
+                        <div class="bigButton toolbox" onClick="ddMenu.Open('toolbox_m2')"><img src="images/icons/application.png" class="buttonIcon" /><p>Application</p>
+                            <div id="toolbox_m2" onmouseover="ddMenu.CancelCloseTimer()" onmouseout="ddMenu.SetCloseTimer()">
+                                <a href="#">+ Add new</a>
+                                <a href="#">> Add existing</a>
+                            </div>
+                        </div>
+                    </li>
+                    <li>
+                        <div class="bigButton toolbox" onClick="ddMenu.Open('toolbox_m3')"><img src="images/icons/dashboard.png" class="buttonIcon" /><p>Dashboard</p>
+                            <div id="toolbox_m3" onmouseover="ddMenu.CancelCloseTimer()" onmouseout="ddMenu.SetCloseTimer()">
+                                <a href="#">+ Add new</a>
+                                <a href="#">> Add existing</a>
+                            </div>
+                        </div>
+                    </li>
+                </ul>
+            </div>
+        </div>
+        <?php
+    }
+
+}
+?>
