Changeset 66 for Dev/trunk


Ignore:
Timestamp:
08/02/11 15:43:10 (14 years ago)
Author:
fpvanagthoven
Message:

ApplicationCreationTool?.php and SessionCreationTool? (now can add survey to pipeline)

Location:
Dev/trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/applicationcreation.php

    r58 r66  
    1212        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    1313            <title>Application Creation</title>
    14             <link rel="stylesheet" type="text/css" href="css/style.css" />
     14            <?php new StyleSheet(); ?>
    1515    </head>
    1616    <body>
     
    2222            <div id="content">
    2323                <?php
    24                
     24                    new ApplicationCreationTool();
    2525                ?>
    2626            </div>
  • Dev/trunk/classes/SessionCreationTool.php

    r65 r66  
    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                                                                                                                        
     66                                                                                                                                       
    6767            }
    68                                                                                                                    
     68                                                                                                                                   
    6969            function Survey(title, id)
    7070            {
     
    7272                this.id = id;
    7373            }
    74                                                                                                                    
     74                                                                                                                                   
    7575            // =============================================================
    76                                                                                                                    
     76                                                                                                                                   
    7777            function addSurvey() {
    78                 var surveyList = document.createElement("select");
    79                 surveyList.size = 1000;
    80                 surveyList.style.height = "10em";
    81                 surveyList.style.width = "15em";
    82                                                
    83                 for (var i = 0; i < surveys.length; i++)
    84                 {
    85                     var option = document.createElement("option");
    86                     option.setAttribute("value", surveys[i].id);
    87                     option.innerHTML = surveys[i].title;
    88                     surveyList.appendChild(option);
    89                 }
    90 
    91                                                
    92 
    93                 var sessionCreation = document.getElementById("sessionCreationForm");
    94                 var pipelineOptions = document.getElementById("pipelineOptions");
    95                                                                                                                        
    96                 sessionCreation.replaceChild(surveyList, pipelineOptions);
     78                var pipeline = document.getElementById("pipeline");
     79                var surveysList = document.getElementById("surveysList");
     80                               
     81                var entry = document.createElement("option");
     82                entry.setAttribute("value", surveys[surveysList.selectedIndex].id);
     83                entry.innerHTML = surveys[surveysList.selectedIndex].title;
     84                       
     85                pipeline.appendChild(entry);
    9786            }
    98                                                                                                                            
     87                                                                                                                                           
    9988        </script>
    10089        <?php
     
    135124            <div id="surveysForPipelineWrapper">
    136125                <h2 class="pipelineHead">Surveys</h2>
    137                 <?php $this->surveysSelect(); ?>
     126                <?php
     127                $this->surveysSelect();
     128                $this->addSurveyToPipelineButton()
     129                ?>
    138130            </div>
    139131            <div id="applicationsForPipelineWrapper">
    140132                <h2 class="pipelineHead">Applications</h2>
    141                 <?php $this->applicationsSelect(); ?>
     133                <?php
     134                $this->applicationsSelect();
     135                $this->addApplicationToPipelineButton();
     136                ?>
    142137            </div>
    143138        </div>
     
    155150    private function surveysSelect() {
    156151        ?>
    157         <select size="5" class="width100p">
     152        <select id="surveysList" size="5" class="width100p">
    158153            <?php
    159154            foreach ($this->surveys as $survey) {
     
    178173    private function addSurveyToPipelineButton() {
    179174        ?>
    180         <input type="button" id="surveyToPipeline" class="surveyButton pipelineButton leftAlign leftPadding1" value="+ Survey" onclick="addSurvey()"/>
     175        <input type="button" id="surveyToPipeline" class="surveyButton pipelineButton leftAlign leftPadding1" value="<=====" onclick="addSurvey()"/>
    181176        <?php
    182177    }
     
    184179    private function addApplicationToPipelineButton() {
    185180        ?>
    186         <input type="button" class="surveyButton pipelineButton leftAlign leftPadding1" value="+ Application" />
     181        <input type="button" class="surveyButton pipelineButton leftAlign leftPadding1" value="<=====" />
    187182        <?php
    188183    }
  • Dev/trunk/css/awesome.css

    r65 r66  
    417417
    418418.pipelineButton {
    419     width: 15em;
     419   
    420420}
    421421
  • Dev/trunk/js/creation.js

    r64 r66  
    99            || input.value == "Untitled Question"
    1010            || input.value == "Untitled Session"
    11             || input.value == "Write a description for this session here."))
     11            || input.value == "Write a description for this session here."
     12            || input.value == "Untitled Application"
     13            || input.value == "Write a description for this application here."))
    1214            {
    1315        input.value = "";
     
    3941            input.value = "Write a description for this session here.";
    4042        }
     43        else if (input.id == "applicationTitle")
     44        {
     45            input.value = "Untitled Application";
     46        }
     47        else if (input.id == "applicationDescription")
     48        {
     49            input.value = "Write a description for this application here.";
     50        }
    4151           
    4252    }                           
Note: See TracChangeset for help on using the changeset viewer.