Ignore:
Timestamp:
01/13/12 13:57:41 (13 years ago)
Author:
fpvanagthoven
Message:
 
Location:
Dev/branches/jos-branch/classes/widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/jos-branch/classes/widgets/SurveyEditorWidget.php

    r230 r233  
    1313
    1414    private $loadedSurvey;
    15     private $dbi;
    1615
    1716    public function __construct() {
    18         // Set basic variables
    19         // Should probably include a default empty survey for the sake of safety
    20         $dbi = new DatabaseInterface();
     17       
    2118    }
    2219
    2320    public function handlePost() {
    2421        // Get POSTed data and store variables to class instance properties
    25         $dbi = new DatabaseInterface();
     22       
    2623        if (isset($_POST['objectUid']) && !empty($_POST['objectUid'])) {
    27             $surveyResults = $dbi->get("Survey", array("uid" => $_POST['objectUid']));
     24            $surveyResults = Survey::get(array("uid" => $_POST['objectUid']));
    2825            if (!empty($surveyResults)) {
    2926                $this->loadedSurvey = $surveyResults[0];
     
    3936        $questionString = "";
    4037        foreach ($this->loadedSurvey->questions as $question) {
    41             $questionString .= $question->code . ",";
     38            $questionString .= $question->uid . ",";
    4239        }
    4340        // echo the HTML markup to display the editor on the screen
  • Dev/branches/jos-branch/classes/widgets/Toolbox.php

    r230 r233  
    2525                        <div class="bigButton toolbox" onclick="ddMenu.Open('toolbox_m1')"><img src="images/icons/survey.png" class="buttonIcon" /><p>Survey</p>
    2626                            <div id="toolbox_m1" onmouseover="ddMenu.CancelCloseTimer()" onmouseout="ddMenu.SetCloseTimer()">
    27                                 <a href="#" >+ Add new</a>
     27                                <a href="#" onclick="submitToolbox('Survey')">+ Add new</a>
    2828                                <a href="#">> Add existing</a>
    2929                            </div>
     
    3434                        <div class="bigButton toolbox" onClick="ddMenu.Open('toolbox_m2')"><img src="images/icons/application.png" class="buttonIcon" /><p>Application</p>
    3535                            <div id="toolbox_m2" onmouseover="ddMenu.CancelCloseTimer()" onmouseout="ddMenu.SetCloseTimer()">
    36                                 <a href="#">+ Add new</a>
     36                                <a href="#" onclick="submitToolbox('Application')">+ Add new</a>
    3737                                <a href="#">> Add existing</a>
    3838                            </div>
Note: See TracChangeset for help on using the changeset viewer.