Index: Dev/trunk/classes/SurveyEditorWidget.php
===================================================================
--- Dev/trunk/classes/SurveyEditorWidget.php	(revision 200)
+++ Dev/trunk/classes/SurveyEditorWidget.php	(revision 200)
@@ -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/trunk/classes/surveyEditorWidget.php
===================================================================
--- Dev/trunk/classes/surveyEditorWidget.php	(revision 199)
+++ 	(revision )
@@ -1,107 +1,0 @@
-<?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
-    }
-
-}
-?>
