Add serverScripts property support to edit.js

This commit is contained in:
Ryan Huffman 2017-01-13 09:18:50 -08:00
parent b0c2a9d614
commit 142c7da523
2 changed files with 7 additions and 0 deletions

View file

@ -318,6 +318,10 @@
<input type="text" id="property-script-url">
<input type="button" id="reload-script-button" class="glyph" value="F">
</div>
<div class="behavior-group property url">
<label for="property-server-scripts">Server Script URLs</label>
<input type="text" id="property-server-scripts">
</div>
<div class="section-header model-group model-section zone-section">
<label>Model</label><span>M</span>
</div>

View file

@ -591,6 +591,7 @@ function loaded() {
var elScriptURL = document.getElementById("property-script-url");
var elScriptTimestamp = document.getElementById("property-script-timestamp");
var elReloadScriptButton = document.getElementById("reload-script-button");
var elServerScripts = document.getElementById("property-server-scripts");
var elUserData = document.getElementById("property-user-data");
var elClearUserData = document.getElementById("userdata-clear");
var elSaveUserData = document.getElementById("userdata-save");
@ -847,6 +848,7 @@ function loaded() {
elLifetime.value = properties.lifetime;
elScriptURL.value = properties.script;
elScriptTimestamp.value = properties.scriptTimestamp;
elServerScripts.value = properties.serverScripts;
var json = null;
try {
@ -1143,6 +1145,7 @@ function loaded() {
elLifetime.addEventListener('change', createEmitNumberPropertyUpdateFunction('lifetime'));
elScriptURL.addEventListener('change', createEmitTextPropertyUpdateFunction('script'));
elScriptTimestamp.addEventListener('change', createEmitNumberPropertyUpdateFunction('scriptTimestamp'));
elServerScripts.addEventListener('change', createEmitTextPropertyUpdateFunction('serverScripts'));
elClearUserData.addEventListener("click", function() {
deleteJSONEditor();