Ignore:
Timestamp:
08/02/11 14:13:36 (14 years ago)
Author:
fpvanagthoven
Message:

Register correct stylesheet. SessionCreationTool? adjusted.

File:
1 edited

Legend:

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

    r64 r65  
    4242        <script type="text/javascript">
    4343            var surveys = new Array();
    44                                                                                    
     44                                                                                                                   
    4545            init();
    46                                                                                                
     46                                                                                                                               
    4747            function init() {
    4848                loadSurveys();
    4949                loadApplications();
    5050            }
    51                                                                                                
     51                                                                                                                               
    5252            function loadSurveys() {
    5353        <?php
     
    6262        ?>
    6363            }
    64                                                                                    
     64                                                                                                                   
    6565            function loadApplications() {
    66                                                                                        
    67             }
    68                                                                                    
     66                                                                                                                       
     67            }
     68                                                                                                                   
    6969            function Survey(title, id)
    7070            {
     
    7272                this.id = id;
    7373            }
    74                                                                                    
     74                                                                                                                   
    7575            // =============================================================
    76                                                                                    
     76                                                                                                                   
    7777            function addSurvey() {
    7878                var surveyList = document.createElement("select");
    79                 surveyList.setAttribute("size", "1000");
    80                 surveyList.className = "toLoad";
    81                
     79                surveyList.size = 1000;
     80                surveyList.style.height = "10em";
     81                surveyList.style.width = "15em";
     82                                               
    8283                for (var i = 0; i < surveys.length; i++)
    8384                {
     
    8788                    surveyList.appendChild(option);
    8889                }
    89                                                                                        
     90
     91                                               
     92
    9093                var sessionCreation = document.getElementById("sessionCreationForm");
    9194                var pipelineOptions = document.getElementById("pipelineOptions");
    92                                                                                        
     95                                                                                                                       
    9396                sessionCreation.replaceChild(surveyList, pipelineOptions);
    9497            }
    95                                                                                            
     98                                                                                                                           
    9699        </script>
    97100        <?php
     
    120123    private function pipeline() {
    121124        ?>
    122         <h2 id="pipelineHead">Pipeline</h2>
    123         <div id="pipeline" class="padding2em">
    124             <i>-Empty- </i>
     125        <div id="pipelineWrapper">
     126            <h2 class="pipelineHead">Pipeline</h2>
     127            <?php $this->pipelineSelect(); ?>
     128            <div id="pipelineOptions">
     129                <?php
     130                $this->addDashboardToPipelineButton();
     131                ?>
     132            </div>
    125133        </div>
    126         <div id="pipelineOptions">
     134        <div id="surveysApplicationsWrapper">
     135            <div id="surveysForPipelineWrapper">
     136                <h2 class="pipelineHead">Surveys</h2>
     137                <?php $this->surveysSelect(); ?>
     138            </div>
     139            <div id="applicationsForPipelineWrapper">
     140                <h2 class="pipelineHead">Applications</h2>
     141                <?php $this->applicationsSelect(); ?>
     142            </div>
     143        </div>
     144        <?php
     145    }
     146
     147    private function pipelineSelect() {
     148        ?>
     149        <select id="pipeline" size="5">
     150
     151        </select>
     152        <?php
     153    }
     154
     155    private function surveysSelect() {
     156        ?>
     157        <select size="5" class="width100p">
    127158            <?php
    128             $this->addSurveyToPipelineButton();
    129             $this->addApplicationToPipelineButton();
    130             $this->addDashboardToPipelineButton();
    131             ?></div>
     159            foreach ($this->surveys as $survey) {
     160                ?>
     161                <option value="<?php echo $survey->id; ?>">
     162                    <?php echo $survey->title; ?>
     163                </option>
     164                <?php
     165            }
     166            ?>
     167        </select>
     168        <?php
     169    }
     170
     171    private function applicationsSelect() {
     172        ?>
     173        <select size="5" class="width100p">
     174        </select>
    132175        <?php
    133176    }
     
    135178    private function addSurveyToPipelineButton() {
    136179        ?>
    137         <input type="button" id="surveyToPipeline" class="surveyButton nextLine pipelineButton leftAlign leftPadding1" value="+ Survey" onclick="addSurvey()"/>
     180        <input type="button" id="surveyToPipeline" class="surveyButton pipelineButton leftAlign leftPadding1" value="+ Survey" onclick="addSurvey()"/>
    138181        <?php
    139182    }
     
    141184    private function addApplicationToPipelineButton() {
    142185        ?>
    143         <input type="button" class="surveyButton nextLine pipelineButton leftAlign leftPadding1" value="+ Application" />
     186        <input type="button" class="surveyButton pipelineButton leftAlign leftPadding1" value="+ Application" />
    144187        <?php
    145188    }
Note: See TracChangeset for help on using the changeset viewer.