Changeset 66 for Dev/trunk/classes/SessionCreationTool.php
- Timestamp:
- 08/02/11 15:43:10 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/classes/SessionCreationTool.php
r65 r66 42 42 <script type="text/javascript"> 43 43 var surveys = new Array(); 44 44 45 45 init(); 46 46 47 47 function init() { 48 48 loadSurveys(); 49 49 loadApplications(); 50 50 } 51 51 52 52 function loadSurveys() { 53 53 <?php … … 62 62 ?> 63 63 } 64 64 65 65 function loadApplications() { 66 66 67 67 } 68 68 69 69 function Survey(title, id) 70 70 { … … 72 72 this.id = id; 73 73 } 74 74 75 75 // ============================================================= 76 76 77 77 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); 97 86 } 98 87 99 88 </script> 100 89 <?php … … 135 124 <div id="surveysForPipelineWrapper"> 136 125 <h2 class="pipelineHead">Surveys</h2> 137 <?php $this->surveysSelect(); ?> 126 <?php 127 $this->surveysSelect(); 128 $this->addSurveyToPipelineButton() 129 ?> 138 130 </div> 139 131 <div id="applicationsForPipelineWrapper"> 140 132 <h2 class="pipelineHead">Applications</h2> 141 <?php $this->applicationsSelect(); ?> 133 <?php 134 $this->applicationsSelect(); 135 $this->addApplicationToPipelineButton(); 136 ?> 142 137 </div> 143 138 </div> … … 155 150 private function surveysSelect() { 156 151 ?> 157 <select size="5" class="width100p">152 <select id="surveysList" size="5" class="width100p"> 158 153 <?php 159 154 foreach ($this->surveys as $survey) { … … 178 173 private function addSurveyToPipelineButton() { 179 174 ?> 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()"/> 181 176 <?php 182 177 } … … 184 179 private function addApplicationToPipelineButton() { 185 180 ?> 186 <input type="button" class="surveyButton pipelineButton leftAlign leftPadding1" value=" + Application" />181 <input type="button" class="surveyButton pipelineButton leftAlign leftPadding1" value="<=====" /> 187 182 <?php 188 183 }
Note: See TracChangeset
for help on using the changeset viewer.