Changeset 68


Ignore:
Timestamp:
08/03/11 15:30:50 (14 years ago)
Author:
fpvanagthoven
Message:

Pipeline now gets submitted

Location:
Dev/trunk
Files:
4 edited

Legend:

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

    r66 r68  
    6565    private function done() {
    6666        ?>
    67         <input type="submit" class="surveyButton" value="Done" />
     67        <input type="submit" class="surveyButton topRight" value="Done" />
    6868        <?php
    6969    }
  • Dev/trunk/classes/SessionCreationTool.php

    r67 r68  
    1717
    1818        $this->javascript();
     19        var_dump($_POST);
    1920        ?>
    2021
    2122        <div class="creation">
    22             <form id="sessionCreationForm" action="" method="post">
     23            <form id="sessionCreationForm" action="" onsubmit="submitPipeline()" method="post">
    2324                <?php
    2425                $this->title();
     
    4142        <script type="text/javascript" src="js/creation.js"></script>
    4243        <script type="text/javascript">
     44            var pipelineCount = 0;
    4345            var surveys = new Array();
    44                                                                                                                                            
     46                           
    4547            init();
    46                                                                                                                                                        
     48                                                                                                                                                                       
    4749            function init() {
    4850                loadSurveys();
    4951                loadApplications();
    5052            }
    51                                                                                                                                                        
     53                                                                                                                                                                       
    5254            function loadSurveys() {
    5355        <?php
     
    6264        ?>
    6365            }
    64                                                                                                                                            
     66                                                                                                                                                           
    6567            function loadApplications() {
    66                                                                                                                                                
    67             }
    68                                                                                                                                            
     68                                                                                                                                                               
     69            }
     70                                                                                                                                                           
    6971            function Survey(title, id)
    7072            {
     
    7274                this.id = id;
    7375            }
    74                                                                                                                                            
     76                                                                                                                                                           
    7577            // =============================================================
    76                                                                                                                                            
     78                                                                                                                                                           
    7779            function addSurvey() {
     80                pipelineCount++;
     81                               
    7882                var pipeline = document.getElementById("pipeline");
    7983                var surveysList = document.getElementById("surveysList");
    80                                        
     84                                                       
    8185                var entry = document.createElement("option");
    8286                entry.setAttribute("value", surveys[surveysList.selectedIndex].id);
    83                 entry.style.backgroundColor = "#88c5e4";
    84                 entry.innerHTML = surveys[surveysList.selectedIndex].title;
    85                                
     87                entry.style.backgroundColor = "#0090ac";
     88                entry.innerHTML = pipelineCount + ". " + surveys[surveysList.selectedIndex].title;
     89                entry.name = pipelineCount + "s";
     90                                               
    8691                pipeline.appendChild(entry);
    8792            }
    88                    
     93                                   
    8994            function addDashboard() {
     95                pipelineCount++;
    9096                var pipeline = document.getElementById("pipeline");
    91                        
     97                                       
    9298                var entry = document.createElement("option");
    9399                entry.setAttribute("value", "dashboard");
    94100                entry.style.backgroundColor = "#555";
    95101                entry.style.color = "white";
    96                 entry.innerHTML = "Dashboard";
    97                
     102                entry.innerHTML = pipelineCount + ". " + "Dashboard";
     103                entry.name = pipelineCount + "d";
     104                                       
     105                pipeline.appendChild(entry);
     106            }
     107                                                     
     108            function submitPipeline()
     109            {
     110                var form = document.getElementById("sessionCreationForm");
    98111                       
    99                 pipeline.appendChild(entry);
    100             }
    101                                                                                                                                                    
     112                var pipeline = document.getElementById("pipeline").options;
     113                               
     114                               
     115                for (var i = 0; i < pipeline.length; i++)
     116                {
     117                    var pipelineElem = document.createElement("input");
     118                    pipelineElem.name = pipeline[i].name;
     119                    pipelineElem.value = pipeline[i].value;
     120                    pipelineElem.type = "hidden";
     121                           
     122                    form.appendChild(pipelineElem);
     123                }
     124                               
     125            }
    102126        </script>
    103127        <?php
     
    205229    private function makeSessionButton() {
    206230        ?>
    207         <input type="submit" id="makeSessionButton" class="surveyButton" value="Make session" />
     231        <input type="submit" id="makeSessionButton" class="topRight surveyButton" value="Make session" />
    208232        <?php
    209233    }
  • Dev/trunk/classes/SurveyCreationTool.php

    r64 r68  
    1515        $this->survey = $survey;
    1616        $this->timeStamp = $timeStamp;
    17 
     17var_dump($_POST);
    1818        if (isset($this->survey->id))
    1919            SurveyCreationTool::javascript($this->survey->id);
  • Dev/trunk/css/awesome.css

    r67 r68  
    394394}
    395395
     396.topRight {
     397    position: absolute;
     398    top: 2.3em;
     399    right: 2.3em;
     400    padding-left: 1em;
     401    padding-right: 1em;
     402}
     403
    396404/* ##################################################################
    397405   ===================== STYLESHEET OF GLORY ======================== */
     
    429437}
    430438
    431 #makeSessionButton {
    432     position: absolute;
    433     top: 2.3em;
    434     right: 2.3em;
    435     padding-left: 1em;
    436     padding-right: 1em;
    437 }
    438 
    439439#surveysApplicationsWrapper {
    440440    float: left;
Note: See TracChangeset for help on using the changeset viewer.