From d9a39553bd2321abad94b01a472a3f087afa6d9e Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Tue, 23 Aug 2016 00:14:53 -0700 Subject: [PATCH] style edits and saved message --- scripts/system/html/css/edit-style.css | 6 ++++++ scripts/system/html/css/jsoneditor.css | 2 +- scripts/system/html/entityProperties.html | 2 +- scripts/system/html/js/entityProperties.js | 14 ++++++++++++++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/scripts/system/html/css/edit-style.css b/scripts/system/html/css/edit-style.css index 58f8833db3..8a6c7786bf 100644 --- a/scripts/system/html/css/edit-style.css +++ b/scripts/system/html/css/edit-style.css @@ -1096,4 +1096,10 @@ input#reset-to-natural-dimensions { margin-top:5px; margin-bottom:10px; background-color: #2e2e2e; +} + +#userdata-saved{ + margin-top:5px; + font-size:16px; + display:none; } \ No newline at end of file diff --git a/scripts/system/html/css/jsoneditor.css b/scripts/system/html/css/jsoneditor.css index aea0696609..4d63380a62 100644 --- a/scripts/system/html/css/jsoneditor.css +++ b/scripts/system/html/css/jsoneditor.css @@ -212,7 +212,6 @@ div.jsoneditor { position: relative; padding: 0; line-height: 100%; - min-height: 200px; } div.jsoneditor-tree table.jsoneditor-tree { @@ -225,6 +224,7 @@ div.jsoneditor-tree table.jsoneditor-tree { div.jsoneditor-outer { width: 100%; height: 100%; + min-height: 150px; margin: -35px 0 0 0; padding: 0 0 0 0; -moz-box-sizing: border-box; diff --git a/scripts/system/html/entityProperties.html b/scripts/system/html/entityProperties.html index c39fa00cec..0eeb817640 100644 --- a/scripts/system/html/entityProperties.html +++ b/scripts/system/html/entityProperties.html @@ -70,7 +70,7 @@ - + Saved!
diff --git a/scripts/system/html/js/entityProperties.js b/scripts/system/html/js/entityProperties.js index 825ae0e72d..81c13b63e9 100644 --- a/scripts/system/html/js/entityProperties.js +++ b/scripts/system/html/js/entityProperties.js @@ -1064,8 +1064,16 @@ function loaded() { }); + var savedJSONTimer = null; elSaveUserData.addEventListener("click", function() { setUserDataFromEditor(); + $('#userdata-saved').show(); + if (savedJSONTimer !== null) { + clearTimeout(savedJSONTimer); + } + savedJSONTimer = setTimeout(function() { + $('#userdata-saved').hide(); + }, 1500) }); elUserData.addEventListener('change', createEmitTextPropertyUpdateFunction('userData')); @@ -1080,6 +1088,12 @@ function loaded() { showSaveUserDataButton(); }); + elJSONEditor.addEventListener('mouseenter', function() { + console.log('mouse in the json editor') + }) + elJSONEditor.addEventListener('mouseleave', function() { + console.log('mouse leaves the json editor') + }) var colorChangeFunction = createEmitColorPropertyUpdateFunction( 'color', elColorRed, elColorGreen, elColorBlue); elColorRed.addEventListener('change', colorChangeFunction);