Merge pull request #7100 from imgntn/edit_props

Hide hyperlink property for web entities
This commit is contained in:
Brad Hefta-Gaub 2016-02-12 18:29:35 -08:00
commit 376c23f1a3

View file

@ -308,6 +308,11 @@
allSections.push(elWebSections); allSections.push(elWebSections);
var elWebSourceURL = document.getElementById("property-web-source-url"); var elWebSourceURL = document.getElementById("property-web-source-url");
var elHyperlinkHref = document.getElementById("property-hyperlink-href");
var elHyperlinkDescription = document.getElementById("property-hyperlink-description");
var elHyperlinkSections = document.querySelectorAll(".hyperlink-section");
var elParticleSections = document.querySelectorAll(".particle-section"); var elParticleSections = document.querySelectorAll(".particle-section");
allSections.push(elParticleSections); allSections.push(elParticleSections);
var elParticleIsEmitting = document.getElementById("property-particle-is-emitting"); var elParticleIsEmitting = document.getElementById("property-particle-is-emitting");
@ -370,9 +375,6 @@
var elYTextureURL = document.getElementById("property-y-texture-url"); var elYTextureURL = document.getElementById("property-y-texture-url");
var elZTextureURL = document.getElementById("property-z-texture-url"); var elZTextureURL = document.getElementById("property-z-texture-url");
var elHyperlinkHref = document.getElementById("property-hyperlink-href");
var elHyperlinkDescription = document.getElementById("property-hyperlink-description");
var elPreviewCameraButton = document.getElementById("preview-camera-button"); var elPreviewCameraButton = document.getElementById("preview-camera-button");
if (window.EventBridge !== undefined) { if (window.EventBridge !== undefined) {
@ -492,8 +494,12 @@
for (var j = 0; j < allSections[i].length; j++) { for (var j = 0; j < allSections[i].length; j++) {
allSections[i][j].style.display = 'none'; allSections[i][j].style.display = 'none';
} }
}
for (var i = 0; i < elHyperlinkSections.length; i++) {
elHyperlinkSections[i].style.display = 'block';
} }
if (properties.type == "Box" || properties.type == "Sphere" || properties.type == "ParticleEffect") { if (properties.type == "Box" || properties.type == "Sphere" || properties.type == "ParticleEffect") {
elColorSection.style.display = 'block'; elColorSection.style.display = 'block';
elColorRed.value = properties.color.red; elColorRed.value = properties.color.red;
@ -526,6 +532,9 @@
for (var i = 0; i < elWebSections.length; i++) { for (var i = 0; i < elWebSections.length; i++) {
elWebSections[i].style.display = 'block'; elWebSections[i].style.display = 'block';
} }
for (var i = 0; i < elHyperlinkSections.length; i++) {
elHyperlinkSections[i].style.display = 'none';
}
elWebSourceURL.value = properties.sourceUrl; elWebSourceURL.value = properties.sourceUrl;
} else if (properties.type == "Text") { } else if (properties.type == "Text") {
@ -1158,17 +1167,17 @@
</div> </div>
<div class="section-header"> <div class="section-header hyperlink-section">
<label>Hyperlink</label> <label>Hyperlink</label>
</div> </div>
<div class="property"> <div class="hyperlink-section property">
<div class="label">Href - Hifi://address</div> <div class="label">Href - Hifi://address</div>
<div class="value"> <div class="value">
<input id="property-hyperlink-href" class="url"> <input id="property-hyperlink-href" class="url">
</div> </div>
</div> </div>
<div class="property"> <div class="hyperlink-section property">
<div class="label">Description</div> <div class="label">Description</div>
<div class="value"> <div class="value">
<input id="property-hyperlink-description" class="url"> <input id="property-hyperlink-description" class="url">