Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
removed not unique warning from attributes dialog as it's more common to have multi value
azivner09b610701dfd
diff --git a/src/public/javascripts/dialogs/attributes.js b/src/public/javascripts/dialogs/attributes.jsindex 3c8684fd08..52dbfa95c2 100644--- a/src/public/javascripts/dialogs/attributes.js+++ b/src/public/javascripts/dialogs/attributes.js@@ -208,24 +208,6 @@ function AttributesModel() {attribute.valueHasMutated();};- this.isNotUnique = function(index) {- const cur = self.ownedAttributes()[index]();-- if (cur.name.trim() === "") {- return false;- }-- for (let attributes = self.ownedAttributes(), i = 0; i < attributes.length; i++) {- const attribute = attributes[i]();-- if (index !== i && cur.name === attribute.name && cur.type === attribute.type) {- return true;- }- }-- return false;- };-this.isEmptyName = function(index) {const cur = self.ownedAttributes()[index]();diff --git a/src/views/index.ejs b/src/views/index.ejsindex b0ef4bc403..4fef027e83 100644--- a/src/views/index.ejs+++ b/src/views/index.ejs@@ -620,7 +620,6 @@<td><!-- Change to valueUpdate: blur is necessary because jQuery UI autocomplete hijacks change event --><input type="text" class="attribute-name form-control" data-bind="value: name, valueUpdate: 'blur', event: { blur: $parent.attributeChanged }"/>- <div style="color: yellowgreen" data-bind="if: $parent.isNotUnique($index())"><span class="glyphicon glyphicon-info-sign"></span> Duplicate attribute.</div><div style="color: red" data-bind="if: $parent.isEmptyName($index())">Attribute name can't be empty.</div></td><td>