diff --git a/editor/js/ui/tab-context.js b/editor/js/ui/tab-context.js index 863dacc76..6f084ed64 100644 --- a/editor/js/ui/tab-context.js +++ b/editor/js/ui/tab-context.js @@ -56,6 +56,7 @@ RED.sidebar.context = (function() { }); nodeSection.expand(); nodeSection.content.css({height:"100%"}); + nodeSection.timestamp = $('').appendTo(nodeSection.content); var table = $('
').appendTo(nodeSection.content); nodeSection.table = $('').appendTo(table); var bg = $('
').appendTo(nodeSection.header); @@ -89,6 +90,7 @@ RED.sidebar.context = (function() { }); flowSection.expand(); flowSection.content.css({height:"100%"}); + flowSection.timestamp = $('').appendTo(flowSection.content); var table = $('
').appendTo(flowSection.content); flowSection.table = $('').appendTo(table); bg = $('
').appendTo(flowSection.header); @@ -106,6 +108,7 @@ RED.sidebar.context = (function() { }); globalSection.expand(); globalSection.content.css({height:"100%"}); + globalSection.timestamp = $('').appendTo(globalSection.content); var table = $('
').appendTo(globalSection.content); globalSection.table = $('').appendTo(table); @@ -185,10 +188,10 @@ RED.sidebar.context = (function() { $(nodeSection.table).empty(); if (node) { $('refresh to load').appendTo(nodeSection.table); - } else { $('none selected').appendTo(nodeSection.table); } + nodeSection.timestamp.html(" "); } } @@ -244,6 +247,7 @@ RED.sidebar.context = (function() { if (l === 0) { $('empty').appendTo(container); } + $(section.timestamp).text(new Date().toLocaleString()); }); } function updateEntry(section,baseUrl,id) { diff --git a/editor/sass/palette.scss b/editor/sass/palette.scss index e83f929e2..b81f97740 100644 --- a/editor/sass/palette.scss +++ b/editor/sass/palette.scss @@ -92,6 +92,7 @@ font-weight: bold; padding-left: 30px; overflow: hidden; + user-select: none; } .palette-header > i { position: absolute; diff --git a/editor/sass/tab-context.scss b/editor/sass/tab-context.scss index 917b0dc48..0c63a4794 100644 --- a/editor/sass/tab-context.scss +++ b/editor/sass/tab-context.scss @@ -39,3 +39,9 @@ display: inline-block; } } +.sidebar-context-updated { + text-align: right; + font-size: 11px; + color: #bbb; + padding: 1px 3px; +} diff --git a/red/runtime/nodes/context.js b/red/runtime/nodes/context.js index 2d6e7ba32..19c929649 100644 --- a/red/runtime/nodes/context.js +++ b/red/runtime/nodes/context.js @@ -73,7 +73,7 @@ function clean(flowConfig) { var contextId; var node; for (var id in contexts) { - if (contexts.hasOwnProperty(id)) { + if (contexts.hasOwnProperty(id) && id !== "global") { var idParts = id.split(":"); if (!flowConfig.allNodes.hasOwnProperty(idParts[0])) { delete contexts[id];