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
nice icons for add / remove attribute
azivnerc568ef2f8af1
diff --git a/src/public/javascripts/services/note_detail.js b/src/public/javascripts/services/note_detail.jsindex 2d3dd6ce80..31003c32e1 100644--- a/src/public/javascripts/services/note_detail.js+++ b/src/public/javascripts/services/note_detail.js@@ -297,7 +297,10 @@ async function loadAttributes() {}if (definition.multiplicityType === "multivalue") {- const addButton = $("<button>").addClass("btn btn-small").text("Add new").click(async () => {+ const addButton = $("<span>")+ .addClass("glyphicon glyphicon-plus pointer")+ .prop("title", "Add new attribute")+ .click(async () => {const $new = await createRow(definitionAttr, {attributeId: "",type: valueAttr.type,@@ -308,9 +311,10 @@ async function loadAttributes() {$tr.after($new);});- $multiplicityCell.append(addButton);-- const removeButton = $("<button>").addClass("btn btn-small").text("Delete").click(async () => {+ const removeButton = $("<span>")+ .addClass("glyphicon glyphicon-trash pointer")+ .prop("title", "Remove this attribute")+ .click(async () => {if (valueAttr.attributeId) {await server.remove("notes/" + noteId + "/attributes/" + valueAttr.attributeId);}@@ -318,7 +322,7 @@ async function loadAttributes() {$tr.remove();});- $multiplicityCell.append(removeButton);+ $multiplicityCell.append(addButton).append(" ").append(removeButton);}return $tr;}diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.cssindex 615887a5c6..35169887c9 100644--- a/src/public/stylesheets/style.css+++ b/src/public/stylesheets/style.css@@ -433,4 +433,8 @@ html.theme-dark body {#note-detail-promoted-attributes td, note-detail-promoted-attributes th {padding: 5px;+}++.pointer {+ cursor: pointer;}\ No newline at end of file