properly disable draggable numbers, fix disable script and collision sound

This commit is contained in:
David Back 2019-02-15 15:31:11 -08:00
parent b9356e22d8
commit e46b947913

View file

@ -1485,6 +1485,8 @@ const ENTITY_SCRIPT_STATUS = {
unloaded: "Unloaded" unloaded: "Unloaded"
}; };
const ENABLE_DISABLE_SELECTOR = "input, textarea, span, .dropdown dl, .color-picker";
const PROPERTY_NAME_DIVISION = { const PROPERTY_NAME_DIVISION = {
GROUP: 0, GROUP: 0,
PROPERTY: 1, PROPERTY: 1,
@ -1584,8 +1586,7 @@ function disableChildren(el, selector) {
} }
function enableProperties() { function enableProperties() {
enableChildren(document.getElementById("properties-list"), enableChildren(document.getElementById("properties-list"), ENABLE_DISABLE_SELECTOR);
"input, textarea, checkbox, .dropdown dl, .color-picker , .draggable-number.text");
enableChildren(document, ".colpick"); enableChildren(document, ".colpick");
let elLocked = getPropertyInputElement("locked"); let elLocked = getPropertyInputElement("locked");
@ -1596,8 +1597,7 @@ function enableProperties() {
} }
function disableProperties() { function disableProperties() {
disableChildren(document.getElementById("properties-list"), disableChildren(document.getElementById("properties-list"), ENABLE_DISABLE_SELECTOR);
"input, textarea, checkbox, .dropdown dl, .color-picker, .draggable-number.text");
disableChildren(document, ".colpick"); disableChildren(document, ".colpick");
for (let pickKey in colorPickers) { for (let pickKey in colorPickers) {
colorPickers[pickKey].colpickHide(); colorPickers[pickKey].colpickHide();
@ -3349,8 +3349,8 @@ function loaded() {
let shouldHide = selectedEntityProperties.certificateID !== ""; let shouldHide = selectedEntityProperties.certificateID !== "";
if (shouldHide) { if (shouldHide) {
propertyValue = "** Certified **"; propertyValue = "** Certified **";
property.elInput.disabled = true;
} }
property.elInput.disabled = shouldHide;
} }
let isPropertyNotNumber = false; let isPropertyNotNumber = false;