comparison core.js @ 1422:5a4425dbb77e

Bug #1490: Popup button 'enter' key grab only bound once. APE Multi-interface has default metric response if only one axis used.
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Fri, 11 Dec 2015 11:42:28 +0000
parents 56b1f84f967b
children 9ed3abe54604
comparison
equal deleted inserted replaced
1421:56b1f84f967b 1422:5a4425dbb77e
226 this.buttonProceed = null; 226 this.buttonProceed = null;
227 this.buttonPrevious = null; 227 this.buttonPrevious = null;
228 this.popupOptions = null; 228 this.popupOptions = null;
229 this.currentIndex = null; 229 this.currentIndex = null;
230 this.responses = null; 230 this.responses = null;
231 $(window).keypress(function(e){
232 if (e.keyCode == 13 && popup.popup.style.visibility == 'visible')
233 {
234 console.log(e);
235 popup.buttonProceed.onclick();
236 }
237 });
231 238
232 this.createPopup = function(){ 239 this.createPopup = function(){
233 // Create popup window interface 240 // Create popup window interface
234 var insertPoint = document.getElementById("topLevelBody"); 241 var insertPoint = document.getElementById("topLevelBody");
235 var blank = document.createElement('div'); 242 var blank = document.createElement('div');
303 this.popup.style.zIndex = 3; 310 this.popup.style.zIndex = 3;
304 this.popup.style.visibility = 'visible'; 311 this.popup.style.visibility = 'visible';
305 var blank = document.getElementsByClassName('testHalt')[0]; 312 var blank = document.getElementsByClassName('testHalt')[0];
306 blank.style.zIndex = 2; 313 blank.style.zIndex = 2;
307 blank.style.visibility = 'visible'; 314 blank.style.visibility = 'visible';
308 $(window).keypress(function(e){
309 if (e.keyCode == 13 && popup.popup.style.visibility == 'visible')
310 {
311 popup.buttonProceed.onclick();
312 }
313 });
314 }; 315 };
315 316
316 this.hidePopup = function(){ 317 this.hidePopup = function(){
317 this.popup.style.zIndex = -1; 318 this.popup.style.zIndex = -1;
318 this.popup.style.visibility = 'hidden'; 319 this.popup.style.visibility = 'hidden';
319 var blank = document.getElementsByClassName('testHalt')[0]; 320 var blank = document.getElementsByClassName('testHalt')[0];
320 blank.style.zIndex = -2; 321 blank.style.zIndex = -2;
321 blank.style.visibility = 'hidden'; 322 blank.style.visibility = 'hidden';
322 this.buttonPrevious.style.visibility = 'inherit'; 323 this.buttonPrevious.style.visibility = 'inherit';
323 $(window).keypress(function(e){});
324 }; 324 };
325 325
326 this.postNode = function() { 326 this.postNode = function() {
327 // This will take the node from the popupOptions and display it 327 // This will take the node from the popupOptions and display it
328 var node = this.popupOptions[this.currentIndex]; 328 var node = this.popupOptions[this.currentIndex];