File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -636,6 +636,7 @@ <h3>Notes</h3>
636636 </ div >
637637{% endblock %}
638638{% block postscript %}
639+ < script type ="application/javascript " src ="{% static "jquery.hotkeys /jquery.hotkeys.js" %}"> </ script >
639640 < script type ="text/javascript " src ="{% static "jquery-highlight /jquery.highlight.js" %}"> </ script >
640641 < script type ="text/javascript ">
641642 var checkbox_count = 0 ;
@@ -655,18 +656,20 @@ <h3>Notes</h3>
655656 $ ( 'div#bulk_edit_menu' ) . removeClass ( 'hidden' ) ;
656657 }
657658 }
659+
660+ $ ( document ) . on ( 'keypress' , null , 'e' , function ( ) {
661+ window . location . assign ( '{% url ' edit_test ' test.id %}' ) ;
662+ } ) ;
663+
664+ $ ( document ) . on ( 'keypress' , null , 'a' , function ( ) {
665+ window . location . assign ( '{% url ' add_findings ' test.id %}' ) ;
666+ } ) ;
667+
658668 $ ( function ( ) {
659669 $ ( document ) . ready ( function ( ) {
660670 $ ( '[data-toggle="tooltip"]' ) . tooltip ( ) ;
661671 } ) ;
662- $ ( document ) . on ( 'keypress' , function ( e ) {
663- var key = String . fromCharCode ( e . which ) ;
664- if ( key == 'e' ) {
665- window . location . assign ( '{% url ' edit_test ' test.id %}' ) ;
666- } else if ( key === 'a' ) {
667- window . location . assign ( '{% url ' add_findings ' test.id %}' ) ;
668- }
669- } ) ;
672+
670673 check_checked_finding ( ) ;
671674 $ ( '#id_status' ) . on ( 'click' , function ( e ) {
672675 var checked = this . checked ;
You can’t perform that action at this time.
0 commit comments