1
0
mirror of https://github.com/salexdv/bsl_console.git synced 2024-11-28 08:48:48 +02:00

Доработка запрос на обновление метаданных для существующего текста

This commit is contained in:
salexdv 2021-01-27 20:45:45 +03:00
parent 8cd3f138a9
commit f663531412

View File

@ -1156,19 +1156,37 @@ class bslHelper {
if (value[this.nameField].toLowerCase() == metadataName) {
for (const [ikey, ivalue] of Object.entries(value.items)) {
if (Object.keys(value.items).length) {
if (ikey.toLowerCase() == metadataItem) {
for (const [ikey, ivalue] of Object.entries(value.items)) {
let methodDef = this.getMetadataMethodByName(value, metadataFunc);
let methodsName = (methodDef && methodDef.hasOwnProperty('ref') && methodDef.ref.indexOf(':obj') != -1) ? 'objMethods' : 'refMethods';
if (ikey.toLowerCase() == metadataItem) {
if (ivalue.hasOwnProperty('properties')) {
let methodDef = this.getMetadataMethodByName(value, metadataFunc);
let methodsName = (methodDef && methodDef.hasOwnProperty('ref') && methodDef.ref.indexOf(':obj') != -1) ? 'objMethods' : 'refMethods';
itemExists = true;
this.fillSuggestionsForMetadataItem(suggestions, ivalue);
this.getMetadataMethods(suggestions, value, methodsName, key, ikey);
}
else {
requestMetadata(metadataName.toLowerCase() + '.' + metadataItem.toLowerCase());
}
}
itemExists = true;
this.fillSuggestionsForMetadataItem(suggestions, ivalue);
this.getMetadataMethods(suggestions, value, methodsName, key, ikey);
}
}
else {
requestMetadata(metadataName.toLowerCase());
}
}