diff options
author | Marc Delisle <marc@infomarc.info> | 2014-04-12 15:27:53 +0400 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2014-04-12 15:27:53 +0400 |
commit | d6592b5eb268f2fa64819aea88d6616edce7fa89 (patch) | |
tree | da68d74d23e3598abea3e9a9c6d2ba103ec2585b /js | |
parent | 8ef8fbfbc8663a8dab6c5ea58530df63d919c555 (diff) | |
parent | 6e241b841184c0e23c8eeb4a3766e06f858934bc (diff) |
Fix merge conflicts
Signed-off-by: Marc Delisle <marc@infomarc.info>
Diffstat (limited to 'js')
-rw-r--r-- | js/functions.js | 20 | ||||
-rw-r--r-- | js/rte.js | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/js/functions.js b/js/functions.js index a315214d02..38470bd5e2 100644 --- a/js/functions.js +++ b/js/functions.js @@ -3871,17 +3871,19 @@ AJAX.registerOnload('functions.js', function () { * Attach Ajax event handlers for input fields in the editor * and used to submit the Ajax request when the ENTER key is pressed. */ - $('#createViewDialog').find('input, select').live('keydown', function (e) { - if (e.which === 13) { // 13 is the ENTER key - e.preventDefault(); + if ($('#createViewDialog').length !== 0) { + $('#createViewDialog').find('input, select').live('keydown', function (e) { + if (e.which === 13) { // 13 is the ENTER key + e.preventDefault(); - // with preventing default, selection by <select> tag - // was also prevented in IE - $(this).blur(); + // with preventing default, selection by <select> tag + // was also prevented in IE + $(this).blur(); - $(this).closest('.ui-dialog').find('.ui-button:first').click(); - } - }); // end $.live() + $(this).closest('.ui-dialog').find('.ui-button:first').click(); + } + }); // end $.live() + } var $elm = $('textarea[name="view[as]"]'); if ($elm.length > 0) { @@ -757,8 +757,6 @@ RTE.ROUTINE = { /** * Attach Ajax event handlers for the Routines, Triggers and Events editor - * - * FIXME: submit on ENTER keypress in dialog */ $(function () { /** |