comparison core.js @ 1539:1d80719b81de

Feature #1302: Enter key bounded to button proceed of popup. Only triggered if popup is visible. All enter codes are captured though.
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Thu, 23 Jul 2015 11:10:36 +0100
parents b9546c7f809e
children 8834890e2b17
comparison
equal deleted inserted replaced
1538:b9546c7f809e 1539:1d80719b81de
103 this.popup.style.zIndex = 3; 103 this.popup.style.zIndex = 3;
104 this.popup.style.visibility = 'visible'; 104 this.popup.style.visibility = 'visible';
105 var blank = document.getElementsByClassName('testHalt')[0]; 105 var blank = document.getElementsByClassName('testHalt')[0];
106 blank.style.zIndex = 2; 106 blank.style.zIndex = 2;
107 blank.style.visibility = 'visible'; 107 blank.style.visibility = 'visible';
108 $(window).keypress(function(e){
109 if (e.keyCode == 13 && popup.popup.style.visibility == 'visible')
110 {
111 // Enter key pressed
112 popup.buttonProceed.onclick();
113 }
114 });
108 }; 115 };
109 116
110 this.hidePopup = function(){ 117 this.hidePopup = function(){
111 this.popup.style.zIndex = -1; 118 this.popup.style.zIndex = -1;
112 this.popup.style.visibility = 'hidden'; 119 this.popup.style.visibility = 'hidden';