Changeset 178


Ignore:
Timestamp:
12/07/11 14:36:09 (13 years ago)
Author:
fpvanagthoven
Message:
  • returnQuestionDisplay.php is vergelijkbaar met returnStep.php. Stuur "uids=blablablabla" erheen en je krijgt de HTML markup voor de question display terug als plain text. Deze gaat worden gebruikt in de surveyEditor, zelfde principe als pipelineSequencer/returnStep.php
  • Nieuwe icons, alpha channel. Betere styling mee mogelijk, formaat/cropping is nog wel een beetje weird.
  • surveyEditorWidget.php is de survey versie van pipelineSequencer.php. (Ook hier weer een consistent naming scheme toepassen? Als in: pipelineEditor->pipelineEditorWidget, surveyEditor->surveyEditorWidget, etc...?
  • layout van pipelineEditor.php klopt nu weer en werkt nu helemaal op de nieuwe stylesheet, visualeditors.css. Logo, header en navbar stuff moet nog wel gemaakt worden.
  • surveyEditorScripts.js: scripts voor, verrassing, surveyEditor.php. loadSurvey werkt, drawQuestions ook bijna. BELANGRIJK! Deze editor werkt met global variables ipv de hidden fields die in pipelineSequencer.php gebruikt worden. Om conflicten te voorkomen wordt alles opgeslagen in een object literal "surveyEditor".
Location:
Dev/trunk
Files:
8 added
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/classes/PipelineInfoPanel.php

    r168 r178  
    1717        ?>
    1818        <div>
    19             <fieldset id="infoPanel">
    20                 <div class="fieldsetTitle">
    21                     Title
     19            <div id="infoPanel" class="largeFrame">
     20                <div class="largeTitle">
     21                    Info
    2222                </div>
    23                 <div id="infoPanelContent">
     23                <div id="infoPanelContent" class="content">
    2424                   
    2525                </div>
  • Dev/trunk/classes/pipelineSequencer.php

    r169 r178  
    4040        }
    4141        ?>
    42         <br /><form name="sequencerForm" action="pipelineEditor.php" method="post">
     42        <br />
     43
     44        <div id="sequencer" class="largeFrame">
     45            <div class="largeTitle">Name <?php echo $this->loadedSession->title; ?></div>
     46           
     47            <div id="seqContent" class="innerLargeFrame">
     48                <div id="seqContentWrapper"></div>
     49            </div>
     50
     51            <div class="controls">
     52                <input type="button" id="moveSelectedL" value="< Move" class="smallButton"  onClick="moveStep(-1);" />
     53                <input type="button" id="moveSelectedR" value="Move >" class="smallButton"  onClick="moveStep(1);" />
     54                <input type="button" id="editSelected" value="Edit step" class="smallButton" onClick="editStep();" />
     55                <input type="button" id="deleteSelected" value="Delete step" class="smallButton" onClick="deleteStep();" />
     56                <input type="submit" id ="clearPipeline" name="clearPipeline" value="Clear pipeline" class="smallButton dis" disabled="true"/>
     57                <input type="checkbox" id="confirmClear" name="confirmClear" onChange="IsCheckEnabled(this, document.getElementById('clearPipeline'));" />Really clear?
     58                <input type="button" value="debug_save" onClick="savePipeline(true);" />
     59            </div>
     60           
     61            <div id="hiddenInputs">
     62                <input type="hidden" name="selectedStep" id="selectedStepField" value="" />
     63                <input type="hidden" name="pipelineString" id="pipelineStringField" value="<?php echo $stringPipeline; ?>" />
     64                <input type="hidden" name="pipelineTypes" id="pipelineTypeField" value="<?php echo $stringPipelineType; ?>" />
     65                <input type="hidden" name="pipelineUpDated" id="pipelineUpdatedField" value="<?php echo $stringPipelineUpdated; ?>" />
     66                <input type="hidden" name="numSteps" id="numSteps" value="<?php echo $numberOfSteps; ?>" />
     67                <input type="hidden" name="session" id="sessionField" value="<?php echo $this->loadedSession->uid; ?>" />
     68            </div>
     69        </div>
     70
     71        <!--
     72        <form name="sequencerForm" action="pipelineEditor.php" method="post">
    4373            <fieldset id="sequencer">
    4474                <div class="fieldsetTitle">Name: <?php echo $this->loadedSession->title; ?> </div>
     
    6797            </fieldset>
    6898        </form>
     99        -->
    69100        <?php
    70101    }
    71 
    72    
    73102
    74103    public function Javascript() {
  • Dev/trunk/css/visualeditors.css

    r177 r178  
    3434    padding: 2em 0;
    3535}
    36 
    37 #surveyEditor {
    38     background-color: #0000FF;
    39 }
    40 
    41 
    42 
    43 
    44 
    45 
    46 
    47 
    4836
    4937
     
    202190    margin: 0.25em;
    203191    border: 1px solid #555;
    204     border-radius: 0.5em;
    205     -moz-border-radius: 0.5em;
     192    border-radius: 0.25em;
     193    -moz-border-radius: 0.25em;
    206194    background-color: transparent;
    207195}
     
    286274}
    287275
    288 .displayStep.selected {
    289     -moz-box-shadow: 0 0 50px #FFF;
     276.displayStep.selected .displayStepIcon{
     277    background-color: #bbbbbb;
     278    /*-moz-box-shadow: 0 0 50px #FFF;
    290279    -webkit-box-shadow: 0 0 50px #FFF;
    291     box-shadow: 0 0 50px #FFF;
     280    box-shadow: 0 0 50px #FFF;*/
     281    border-color: #1c94c4;
    292282
    293283}
     
    296286    width: 50px;
    297287    height: 50px;
    298     border: 2px solid #444444;
     288    border: 2px solid #555;
    299289    color: #FFF;
    300290}
     
    321311}
    322312
     313#infoPanel {
     314    margin-top: 2em;
     315    margin-left: 2em;
     316    clear: right;
     317}
     318
     319#infoPanel .content {
     320    clear: both;
     321    min-height: 10em;
     322    width: 30em;
     323}
     324
     325.content .property {
     326    float: left;
     327    clear: left;
     328    font-weight: bold;
     329    width: 8em;
     330    color: #FFF;
     331}
     332
     333.content .value {
     334    float: left;
     335}
     336
     337/**************************/
     338/* Survey Editor Specific */
     339/**************************/
     340
     341
     342#surveyEditor {
     343    background-color: #0000FF;
     344}
  • Dev/trunk/getInfo.php

    r168 r178  
    2222if (count($results) > 0) {      // check if DB object exists and assign it to variable
    2323    if ($results[0] != null) {
    24         $returnString = "<table border='0'>";
     24        $returnString = "";
    2525        $result = $results[0];
    2626    } else
     
    3131switch ($type) {
    3232    case "Session":
    33         $returnString .= "<tr> <td>Name</td> <td>$result->title</td> </tr>";
    34         $returnString .= "<tr><td>Created</td><td>" . $result->datetime->format("H:i:s, d-m-Y") . " by " . $result->creator[0]->name . "</td></tr>";
     33        $returnString .= "<span class='property'>Title: </span><span class='value'>$result->title</span>";
     34        $returnString .= "<span class='property'>Created: </span><span class='value'>" . $result->datetime->format("H:i:s, d-m-Y") . " by " . $result->creator[0]->name . "</span>";
    3535        $cS = 0; $cD = 0; $cA = 0;
    3636        foreach ($result->pipeline as $step) {
     
    5050            }
    5151        }
    52         $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>";
     52        $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>";
    5353        break;
    5454    case "Survey":
    55         $returnString .= "<tr> <td>Name</td><td>$result->title</td> </tr>";
    56         $returnString .= "<tr> <td>Creator</td> <td>LOLOL ME!!!</td> </tr>";
     55        $returnString .= "<span class='property'>Title: </span><span class='value'>$result->title</span>";
     56        $returnString .= "<span class='property'>Creator: </span><span class='value'>LOLOL ME!!!</span>";
    5757        $qCount = 0;
    58         foreach ($result->questions as $q) {
    59             $qCount++;
    60         }
    61         $returnString .= "<tr> <td>Questions</td> <td>$qCount</td> </tr>";
    62         $returnString .= "<tr> <td>Description</td> <td>$result->description</td> </tr>";
    63        
     58        $qCount = count($result->questions);
     59        $returnString .= "<span class='property'>Questions: </span><span class='value'>$qCount</span>";
     60        $returnString .= "<span class='property'>Description: </span><span class='value'>$result->description</span>";
    6461        break;
    6562    case "Application":
    66         $returnString .= "<tr> <td>Name</td> <td>$result->title</td> </tr>";
    67         $returnString .= "<tr> <td>Location</td> <td>C:/folder_of_awesomeness/epicgame.exe</td> </tr>";
    68         $returnString .= "<tr> <td>Description</td> <td>$result->description</td> </tr>";
     63        $returnString .= "<span class='property'>Title: </span><span class='value'>$result->title</span>";
     64        $returnString .= "<span class='property'>Path: </span><span class='value'>C:/folder_of_awesomeness/epicgame.exe</span>";
     65        $returnString .= "<span class='property'>Description: </span><span class='value'>$result->description</span>";
    6966        break;
    7067    case "Dashboard":
     
    8077}
    8178
    82 $returnString .= "</table>";
    8379echo $returnString;
    8480?>
  • Dev/trunk/js/sequencerScripts.js

    r169 r178  
    460460        newAjaxRequest(requestString, "savesession.php", function(result){
    461461            success = result.responseText;
    462         }, false);
     462        }, true);
    463463        console.log(success);
    464464    }
     
    523523    pipelineTypes = stringToArray(pipelineTypes, ",");
    524524    var stepType = pipelineTypes[pipeline.indexOf(selectedStep)];
    525    
    526525    var postForm = document.createElement("form");
    527526    postForm.action = stepType.toLowerCase()+"Editor.php";      //redirect to "type"editor.php
     
    529528    var objectUid = document.createElement("input");
    530529    objectUid.type = "hidden";
     530    objectUid.name = "objectUid";
    531531    objectUid.value = selectedStep;
    532532    postForm.appendChild(objectUid);
  • Dev/trunk/pipelineEditor.php

    r177 r178  
    66}
    77
    8 $sequencer = new PipelineSequencer_1();
     8$sequencer = new PipelineSequencer();
    99$sequencer->LoadSession($_SESSION['currentSession']); //load session into php part of the sequencer
    1010$sequencer->HandlePostData();
  • Dev/trunk/surveyEditor.php

    r177 r178  
    11<?php
    22require "classes/master.php";
     3
     4$surveyEditor = new surveyEditorWidget();
     5$surveyEditor->handlePost();
    36?>
    47
     
    1114    <head>
    1215        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    13         <title></title>
    14         <?php new StyleSheet("visualeditors"); ?>
     16        <title>Edit survey</title>
     17        <?php
     18        $surveyEditor->javascript();
     19        new StyleSheet("visualeditors");
     20        ?>
    1521    </head>
    1622    <body>
    1723        <div id="wrapper">
    1824            <div id="content">
    19                 <div id="surveyEditor" class="largeFrame">
    20                     <div class="largeTitle">
    21                         Survey name
    22                     </div>
    23                     <div id="surveyEditorContent" class="innerLargeFrame">
    24 
    25                         <div id="questionUID" class="smallFrame">
    26                             <div class="smallTitle"><div class="listNumber">1</div>#QUESTION-IDENT-NO</div>
    27                             <div class="content">
    28                                 <p class="questionBody">
    29                                     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.
    30                                 </p>
    31                                 <div class="questionParamsView">
    32                                     PARAMETERS GO HERE, probably in one line (Only answer type and identifier?) Tags?
    33                                 </div>
    34                             </div>
    35                             <div id="questionDisplayControls" class="controls">
    36                                 <input type="button" value="Edit" onClick="javascript:alert('editing not yet supported');" class =" smallButton"/>
    37                                 <input type="button" value="Remove" onClick="javascript:alert('removing not yet supported');" class =" smallButton"/>
    38                             </div>
    39                         </div>
    40                        
    41 
    42                     </div>
    43                     <div id="surveyEditorControls" class="controls">
    44                         <input type="button" value="Discard survey" onClick="javascript:alert('discard not yet supported');" class="smallButton" />
    45                         <input type="button" value="Save survey" onClick="javascript:alert('save not yet supported');" class="smallButton" />
    46                     </div>
    47 
    48                 </div>
     25                <?php $surveyEditor->init(); ?>
    4926            </div>
    5027        </div>
Note: See TracChangeset for help on using the changeset viewer.