From 93e819367b940917efa363f6584143122ebd8ff1 Mon Sep 17 00:00:00 2001 From: Aleksander Vines Date: Fri, 4 Nov 2016 10:50:00 +0100 Subject: [PATCH] Adding a function for the keypress enter on specify variable attributes --- .../js/SlickGrid/custom/variableSpecification.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/webapp/frontEndResources/js/SlickGrid/custom/variableSpecification.js b/src/main/webapp/frontEndResources/js/SlickGrid/custom/variableSpecification.js index 3d1b8f5f..3aff3ead 100644 --- a/src/main/webapp/frontEndResources/js/SlickGrid/custom/variableSpecification.js +++ b/src/main/webapp/frontEndResources/js/SlickGrid/custom/variableSpecification.js @@ -302,6 +302,16 @@ function bindHeaderButtonsPluginEvent(headerButtonsPlugin, colNumber, grid, step $(this).dialog("close"); } + }, + open: function() { + $(document).on("keypress", (function(e) { + if(e.which == 13) { + $("button:contains('done')").trigger("click"); + } + })); + }, + close: function() { + $(document).off("keypress"); } });