Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 18... Línea 18...
18
 *
18
 *
19
 * @module     gradingform_guide/comment_chooser
19
 * @module     gradingform_guide/comment_chooser
20
 * @copyright  2015 Jun Pataleta <jun@moodle.com>
20
 * @copyright  2015 Jun Pataleta <jun@moodle.com>
21
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
21
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
22
 */
22
 */
23
define(['jquery', 'core/templates', 'core/notification', 'core/yui'], function($, templates, notification) {
23
define(['jquery', 'core/templates', 'core/key_codes', 'core/notification', 'core/yui'],
-
 
24
        function($, templates, keycodes, notification) {
Línea 24... Línea 25...
24
 
25
 
Línea 25... Línea 26...
25
    // Private variables and functions.
26
    // Private variables and functions.
26
 
27
 
Línea 87... Línea 88...
87
 
88
 
88
                    // Handle keypress on list items.
89
                    // Handle keypress on list items.
89
                    $(document).off('keypress', commentOptionId).on('keypress', commentOptionId, function() {
90
                    $(document).off('keypress', commentOptionId).on('keypress', commentOptionId, function() {
Línea 90... Línea 91...
90
                        var keyCode = event.which || event.keyCode;
91
                        var keyCode = event.which || event.keyCode;
91
 
92
 
92
                        // Enter or space key.
-
 
93
                        if (keyCode == 13 || keyCode == 32) {
93
                        // Trigger click event when user presses space.
94
                            // Trigger click event.
94
                        if (keyCode === keycodes.space) {
95
                            $(commentOptionId).click();
95
                            $(commentOptionId).click();
96
                        }
96
                        }