Skip to content
Snippets Groups Projects
Commit 5c77282f authored by florian's avatar florian
Browse files

ENH: Add build property for ext_prop_display

parent e3c5fc6e
No related branches found
No related tags found
2 merge requests!89Release v0.10.0,!86F hide properties
Pipeline #31200 passed
...@@ -62,6 +62,7 @@ BUILD_MODULE_EXT_RESOLVE_REFERENCES=ENABLED ...@@ -62,6 +62,7 @@ BUILD_MODULE_EXT_RESOLVE_REFERENCES=ENABLED
BUILD_EXT_REFERENCES_CUSTOM_RESOLVER=caosdb_default_person_reference BUILD_EXT_REFERENCES_CUSTOM_RESOLVER=caosdb_default_person_reference
BUILD_MODULE_EXT_EDITMODE_WYSIWYG_TEXT=DISABLED BUILD_MODULE_EXT_EDITMODE_WYSIWYG_TEXT=DISABLED
BUILD_MODULE_EXT_PROPERTY_DISPLAY=DISABLED
############################################################################## ##############################################################################
# Navbar properties # Navbar properties
......
...@@ -135,12 +135,21 @@ var prop_display = new function ($, getEntityName, getPropertyElements, getPrope ...@@ -135,12 +135,21 @@ var prop_display = new function ($, getEntityName, getPropertyElements, getPrope
}; };
} }
this._unhide_all_properties = function () {
// Just show all initially hidden properties
$(".caosdb-v-hidden-property").removeClass("caosdb-v-hidden-property");
}
this.init = async function () { this.init = async function () {
console.log("initializing ext_prop_display.js"); console.log("initializing ext_prop_display.js");
const conf = await this.load_config(); const conf = await this.load_config();
if (("${BUILD_MODULE_EXT_PROPERTY_DISPLAY}" == "ENABLED") && conf) {
const allTypes = await this._getRecordTypes(conf); const allTypes = await this._getRecordTypes(conf);
var entities = this._get_entities_in_view(); var entities = this._get_entities_in_view();
this._unhide_properties(entities, conf, allTypes) this._unhide_properties(entities, conf, allTypes);
} else {
this._unhide_all_properties();
}
} }
}($, getEntityName, getPropertyElements, getPropertyName, getUserName, getUserRoles, log.getLogger("ext_prop_display"), load_config, query); }($, getEntityName, getPropertyElements, getPropertyName, getUserName, getUserRoles, log.getLogger("ext_prop_display"), load_config, query);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment