Ignore:
Timestamp:
11/03/11 10:30:40 (13 years ago)
Author:
fpvanagthoven
Message:

Fixed mkdir call in ApplicationConnector?.php, now actually makes a directory instead of errors.
Cleaning up of pipeline Sequencer, smaller icons, etc. Trying to get non-db version of editor working properly, then integrate db calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/pipelineEditor.php

    r142 r144  
    22require 'classes/master.php'; //should be at top of every page
    33
    4 /*
    5   if(isset($_SESSION['username'])){   //user is logged in
    6   //get pipeline contents from database, and store in displayObject() array "pipelineSteps"
    7   //nu nog even gewoon een hardcoded workaround
    8   foreach ()
    94
    10   }
    11  * */
     5$pipeline = $_SESSION['currentPipeline'];
    126
    13 // generate a random array of pipeline contents
    14 $displaySteps = array();    // array containing a number of random-generated stings "$type", to fill up the sequencer
    15 $numSteps = 9;              // number of steps to random-generate for testing purposes.
    16 $maxNumSteps = 9;           // maximum number of steps that can be displayed in the sequencer (without scrollbars, at current)
     7// generate a set array of pipeline contents, in lieue of working database interface
     8//if (isset($pipeline)){
     9//$pipeline = array(new Step("Questionnaire", "Questionnaire 1", 1), new Step("Dashboard", "Dashboard 1", 2), new Step("Application", "Application 1", 3));
     10//}
     11//else {
     12    $pipeline = $_SESSION['currentPipeline'];
     13//}
    1714
    18 for ($n = 1; $n <= $numSteps; $n++) {   // fill the array of types
    19     $rnd = rand(1, 4);
    20     switch ($rnd) {
    21         case 1:
    22             $type = "Dashboard";
    23             break;
    24         case 2:
    25             $type = "Questionnaire";
    26             break;
    27         case 3:
    28             $type = "Notice";
    29             break;
    30         case 4:
    31             $type = "Application";
    32             break;
    33         default:
    34             $type = "Questionnaire";
    35             break;
    36     }
    37     $displaySteps[] = $type;
     15if (isset($_POST['objectToCreate'])){
     16    $pipeline[] = new Step($_POST['objectToCreate'], $_POST['objectToCreate']." NEW", 4);
     17    unset($_POST);
    3818}
    3919
     20$_SESSION['currentPipeline'] = $pipeline;
     21
     22$pipelineCount = 3;
    4023$pipelineName = "Test pipeline";
     24
     25$dbi = new DatabaseInterface();       //mkdir error?!?!?!
    4126?>
    4227
     
    4631-->
    4732<!DOCTYPE html>
     33
    4834<html>
    4935    <head>
     
    5339        <script type="text/javascript" src="js/menu.js"></script>
    5440        <script type="text/javascript" src="js/jquery.jps"></script>
     41        <script type="text/javascript" src="js/editorScripts.js"></script>
    5542    </head>
    5643    <body>
    57         <div id="logo">
     44        <div id="header">
    5845            <?php new Logo(); ?>
    5946        </div>
     
    6148        <div id="wrapper">
    6249            <div id="content">
    63                 <form action="pipelineEditor.php" method="POST">
    64                    
    65                     <fieldset id="sequencer">
    66                        
    67                         <div class="title">Name: <?php echo $pipelineName; ?></div>
    68 
    69                         <div id="seqContent">
    70                             <?php
    71                             $n = 0;
    72                             foreach ($displaySteps as $displayStep) {
    73                                 if ($n <= $maxNumSteps) {
    74                                     $n++;
    75                                     new DisplayStep($displayStep, null, "Step " . $n);
    76                                     if ($n != $numSteps){
    77                                         echo "<div class='divider'></div>";
    78                                     }
    79                                 }
    80                             }
    81                             ?>                               
    82                         </div>
    83 
    84                         <div id="controls">
    85                             <input type="submit" name="moveSelectedLeft" value="< Move" class="surveyButton" />
    86                             <input type="submit" name="moveSelectedRight" value="Move >" class="surveyButton" />
    87                             <input type="submit" name="editSelected" value="Edit step" class="surveyButton" />
    88                             <input type="submit" name="deleteSelected" value="Delete step" class="surveyButton" />
    89                             <input type="hidden" name="selectedStep" />
    90                         </div>
    91 
    92                     </fieldset>
    93                    
    94                     <br />
    95                     <fieldset id="toolbox">
    96                         <div class="title">Toolbox</div>
    97                         <?php
    98                             new DisplayStep("Questionnaire", null, "Questionnaire");
    99                             new DisplayStep("Notice", null, "Notice");
    100                             new DisplayStep("Application", null, "Application");
    101                             new DisplayStep("Dashboard", null, "Dashboard");
    102                         ?>
    103                     </fieldset>
    104                 </form>
     50                <?php new pipelineSequencer($pipeline); ?>
     51                <?php new Toolbox(); ?>
    10552            </div>
    10653    </body>
Note: See TracChangeset for help on using the changeset viewer.