localStorage for i18n/access (#318)

* upd

* upd

* .

* enumtr

* cleanup

* upd

* update js

* update html

* hide buttons, if browser not comp, fix typo

[skip ci]

* fix empty effect name
This commit is contained in:
brindosch
2016-12-08 23:39:41 +01:00
committed by GitHub
parent 9804a9b05e
commit 0d114ca728
21 changed files with 353 additions and 151 deletions

View File

@@ -59,6 +59,7 @@
"default": 5000,
"append" : "edt_append_ms",
"minimum": 0,
"access" : "expert",
"propertOrder" : 4
}
},
@@ -1047,12 +1048,14 @@
"type" : "boolean",
"title" : "edt_conf_general_enable_title",
"default" : true,
"access" : "expert",
"propertyOrder" : 1
},
"document_root" :
{
"type" : "string",
"title" : "edt_conf_webc_docroot_title",
"access" : "expert",
"propertyOrder" : 2
},
"port" :
@@ -1062,6 +1065,7 @@
"minimum" : 0,
"maximum" : 65535,
"default" : 8099,
"access" : "expert",
"propertyOrder" : 3
}
},

View File

@@ -487,6 +487,12 @@ void JsonClientConnection::handleCreateEffectCommand(const QJsonObject& message,
if (effectArray.size() > 0)
{
if (message["name"].toString().trimmed().isEmpty())
{
sendErrorReply("Can't save new effect. Effect name is empty", command, tan);
return;
}
effectJson["name"] = message["name"].toString();
effectJson["script"] = message["script"].toString();
effectJson["args"] = message["args"].toObject();

View File

@@ -110,7 +110,7 @@ void QJsonSchemaChecker::validate(const QJsonValue & value, const QJsonObject &s
else if (attribute == "id")
; // references have already been collected
else if (attribute == "title" || attribute == "description" || attribute == "default" || attribute == "format"
|| attribute == "defaultProperties" || attribute == "propertyOrder" || attribute == "append")
|| attribute == "defaultProperties" || attribute == "propertyOrder" || attribute == "append" || attribute == "step" || attribute == "access")
; // nothing to do.
else
{