comparison test_create/test_core.js @ 543:f81c46b294a9 Dev_main

Bug #1607, #1608 and #1610 fixes.
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Mon, 22 Feb 2016 14:38:45 +0000
parents e23de2023941
children e53b143cea1e
comparison
equal deleted inserted replaced
542:e23de2023941 543:f81c46b294a9
139 this.proceedButton.className = "popup-button"; 139 this.proceedButton.className = "popup-button";
140 this.proceedButton.textContent = "Next"; 140 this.proceedButton.textContent = "Next";
141 this.proceedButton.onclick = function() 141 this.proceedButton.onclick = function()
142 { 142 {
143 popupObject.popupContent.innerHTML = null; 143 popupObject.popupContent.innerHTML = null;
144 popupObject.shownObject.continue(); 144 if(typeof popupObject.shownObject.continue == "function") {
145 popupObject.shownObject.continue();
146 } else {
147 popupObject.hide();
148 }
145 }; 149 };
146 this.object.appendChild(this.proceedButton); 150 this.object.appendChild(this.proceedButton);
147 151
148 this.backButton = document.createElement("button"); 152 this.backButton = document.createElement("button");
149 this.backButton.id = "popup-back"; 153 this.backButton.id = "popup-back";
195 this.shownObject = postObject; 199 this.shownObject = postObject;
196 if (typeof this.shownObject.back == "function") { 200 if (typeof this.shownObject.back == "function") {
197 this.backButton.style.visibility = "visible"; 201 this.backButton.style.visibility = "visible";
198 } else { 202 } else {
199 this.backButton.style.visibility = "hidden"; 203 this.backButton.style.visibility = "hidden";
204 }
205 if (typeof this.shownObject.continue == "function") {
206 this.proceedButton.textContent = "Next";
207 } else {
208 this.proceedButton.textContent = "Finish";
200 } 209 }
201 this.show(); 210 this.show();
202 } 211 }
203 212
204 this.resize(); 213 this.resize();