From 0c7705beff27d170ab4aad86d146cb18b6016033 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 6 Jan 2017 11:23:19 +0000 Subject: [PATCH] Allow quoted property expressions Fixes #1101 --- Gruntfile.js | 2 +- editor/js/ui/common/typedInput.js | 77 ++--------------------------- editor/js/ui/utils.js | 81 +++++++++++++++++++++++++++++++ nodes/core/core/20-inject.html | 2 +- red/runtime/util.js | 14 ++++-- test/red/runtime/util_spec.js | 7 +++ 6 files changed, 105 insertions(+), 78 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 60b474103..fc881ddee 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -110,13 +110,13 @@ module.exports = function(grunt) { "editor/js/nodes.js", "editor/js/history.js", "editor/js/validators.js", + "editor/js/ui/utils.js", "editor/js/ui/common/editableList.js", "editor/js/ui/common/menu.js", "editor/js/ui/common/popover.js", "editor/js/ui/common/searchBox.js", "editor/js/ui/common/tabs.js", "editor/js/ui/common/typedInput.js", - "editor/js/ui/utils.js", "editor/js/ui/actions.js", "editor/js/ui/deploy.js", "editor/js/ui/diff.js", diff --git a/editor/js/ui/common/typedInput.js b/editor/js/ui/common/typedInput.js index e7a26cf3d..06359a9ec 100644 --- a/editor/js/ui/common/typedInput.js +++ b/editor/js/ui/common/typedInput.js @@ -14,82 +14,13 @@ * limitations under the License. **/ (function($) { - function validateExpression(str) { - var length = str.length; - var start = 0; - var inString = false; - var inBox = false; - var quoteChar; - var v; - for (var i=0;i