Changeset 150 for Dev/trunk/classes/pipelineSequencer.php
- Timestamp:
- 11/07/11 18:02:38 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/classes/pipelineSequencer.php
r146 r150 13 13 14 14 // properties 15 private $pipeline = array();16 private $name = " testSequencer";15 private $pipeline; 16 private $name = "empty"; 17 17 private $numStepsInArray = 0; 18 18 private $maxNumStepsInArray = 10; 19 19 private $selectedStep; 20 20 21 public function __construct($ pipeline, $name, $id) {22 $ this->pipeline = $pipeline;23 $this-> name = $name;21 public function __construct($uid) { 22 $dbi = new DatabaseInterface(); 23 $this->pipeline = $dbi->get("pipeline", array("uid"=>$uid)); 24 24 } 25 25 26 public function DrawSequencer() {26 public function init() { 27 27 ?> 28 28 <br /><form name="sequencer" action="pipelineEditor.php" method="post"><fieldset id="sequencer"> 29 <div class="title">Name: <?php echo $this-> name; ?> </div>29 <div class="title">Name: <?php echo $this->pipeline->name; ?> </div> 30 30 31 31 <div class="seqContent"> … … 91 91 if ($this->numStepsInArray < $this->maxNumStepsInArray) { 92 92 //var_dump($step); 93 $step-> DrawStep();93 $step->init(); 94 94 $this->numStepsInArray++; 95 95 if ($this->numStepsInArray < $this->maxNumStepsInArray && $this->numStepsInArray < count($this->pipeline)) { … … 133 133 } 134 134 135 public function GetFromDB() {135 public function HandlePost() { 136 136 137 //this doesn't actually work, the sequencer doesn't know what the uid is yet. This data should be POSTed upon refresh! 138 139 140 137 141 if (isset($_POST['destroy'])) { 138 142 unset($_POST['destroy']); … … 171 175 } 172 176 177 private function Javascript() { 178 ?> 179 <!-- 180 Add JS code for selecting steps, highlighting them, reordering, etc. 181 Is a refresh of the page (with subsequent querying of database really necessary? 182 183 --> 184 <script type="text/javascript"> 185 function selectStep(step) { 186 step.addClass("selected"); 187 document.sequencer.controls.selectedStep.value = step.name; 188 } 189 </script> 190 191 192 <?php 193 } 194 173 195 } 174 196 ?>
Note: See TracChangeset
for help on using the changeset viewer.