From c09bea47106063e54fe4db96c1db9611220b14f0 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 12 May 2017 22:12:55 +0100 Subject: [PATCH] Add debug message menu --- editor/js/ui/common/menu.js | 17 +++--- editor/js/ui/utils.js | 7 +++ nodes/core/core/lib/debug/debug-utils.js | 76 ++++++++++++++++++------ nodes/core/locales/en-US/messages.json | 4 ++ 4 files changed, 77 insertions(+), 27 deletions(-) diff --git a/editor/js/ui/common/menu.js b/editor/js/ui/common/menu.js index 6f803a659..584baf5a4 100644 --- a/editor/js/ui/common/menu.js +++ b/editor/js/ui/common/menu.js @@ -92,7 +92,8 @@ RED.menu = (function() { menuItems[opt.id] = opt; if (opt.onselect) { - link.click(function() { + link.click(function(e) { + e.preventDefault(); if ($(this).parent().hasClass("disabled")) { return; } @@ -150,15 +151,13 @@ RED.menu = (function() { } function createMenu(options) { - var button = $("#"+options.id); + var menuParent = $("#"+options.id); - //button.click(function(event) { - // $("#"+options.id+"-submenu").show(); - // event.preventDefault(); - //}); + var topMenu = $("