From 417a6f3fd2e8cb93fe61e6be2a496895401b9810 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 2 Feb 2017 10:48:29 +0100 Subject: [PATCH] =?utf8?q?PartPicker:=20enter=20hooks=20=C3=BCberlagerbar?= =?utf8?q?=20gemacht?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- js/kivi.Part.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/kivi.Part.js b/js/kivi.Part.js index 06f9591fd..898024d07 100644 --- a/js/kivi.Part.js +++ b/js/kivi.Part.js @@ -289,6 +289,11 @@ namespace('kivi.Part', function(ns) { limit: 20, delay: 50, fat_set_item: $real.hasClass(CLASSES.FAT_SET_ITEM), + action: { + on_enter_match_none: function(){}, + on_enter_match_one: function(){$('#update_button').click();}, + on_enter_match_many: function(){open_dialog();} + } }, options); var STATES = { PICKED: CLASSES.PICKED, @@ -487,8 +492,8 @@ namespace('kivi.Part', function(ns) { } if (event.which == KEY.ENTER) { handle_changed_text({ - match_one: function(){$('#update_button').click();}, - match_many: function(){open_dialog();} + match_one: o.action.on_enter_match_one, + match_many: o.action.on_enter_match_many }); return false; } -- 2.20.1