From 22302e8200cea376bbe056ff3b3ee791ed068e8a Mon Sep 17 00:00:00 2001 From: zadam Date: Sun, 21 Jun 2020 23:41:51 +0200 Subject: [PATCH] attrs WIP --- .../0159__migrate_attr_definitions.sql | 2 + src/public/app/widgets/note_attributes.js | 68 +++++++++++++++++-- src/services/app_info.js | 4 +- src/services/backup.js | 14 ++-- src/services/cls.js | 2 +- 5 files changed, 74 insertions(+), 16 deletions(-) create mode 100644 db/migrations/0159__migrate_attr_definitions.sql diff --git a/db/migrations/0159__migrate_attr_definitions.sql b/db/migrations/0159__migrate_attr_definitions.sql new file mode 100644 index 000000000..8ed5419db --- /dev/null +++ b/db/migrations/0159__migrate_attr_definitions.sql @@ -0,0 +1,2 @@ +UPDATE attributes SET type = 'label', name = 'label:' || name WHERE type = 'label-definition'; +UPDATE attributes SET type = 'label', name = 'relation:' || name WHERE type = 'relation-definition'; diff --git a/src/public/app/widgets/note_attributes.js b/src/public/app/widgets/note_attributes.js index 13733b458..655d08b41 100644 --- a/src/public/app/widgets/note_attributes.js +++ b/src/public/app/widgets/note_attributes.js @@ -94,8 +94,8 @@ const TPL = ` z-index: 1000; padding: 10px; position: absolute; - max-width: 400px; - max-height: 500px; + max-width: 600px; + max-height: 600px; overflow: auto; } @@ -104,9 +104,61 @@ const TPL = ` margin-top: 10px; margin-bottom: 10px; } + +.attr-edit { + width: 100%; +} + +.attr-edit th { + text-align: left; +} + +.attr-edit td input { + width: 100%; +}