mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
promoted attributes have tabindex following the title and before note content
This commit is contained in:
parent
7cca2d9247
commit
297b536ebc
@ -228,15 +228,16 @@ async function loadAttributes() {
|
|||||||
|
|
||||||
const promoted = attributes.filter(attr => (attr.type === 'label-definition' || attr.type === 'relation-definition') && attr.value.isPromoted);
|
const promoted = attributes.filter(attr => (attr.type === 'label-definition' || attr.type === 'relation-definition') && attr.value.isPromoted);
|
||||||
|
|
||||||
let idx = 1;
|
let idx = 2; // because idx is also tabIndex and 1 is the title
|
||||||
|
|
||||||
async function createRow(definitionAttr, valueAttr) {
|
async function createRow(definitionAttr, valueAttr) {
|
||||||
const definition = definitionAttr.value;
|
const definition = definitionAttr.value;
|
||||||
const inputId = "promoted-input-" + (idx++);
|
const inputId = "promoted-input-" + idx;
|
||||||
const $tr = $("<tr>");
|
const $tr = $("<tr>");
|
||||||
const $labelCell = $("<th>").append(valueAttr.name);
|
const $labelCell = $("<th>").append(valueAttr.name);
|
||||||
const $input = $("<input>")
|
const $input = $("<input>")
|
||||||
.prop("id", inputId)
|
.prop("id", inputId)
|
||||||
|
.prop("tabindex", idx)
|
||||||
.prop("attribute-id", valueAttr.isOwned ? valueAttr.attributeId : '') // if not owned, we'll force creation of a new attribute instead of updating the inherited one
|
.prop("attribute-id", valueAttr.isOwned ? valueAttr.attributeId : '') // if not owned, we'll force creation of a new attribute instead of updating the inherited one
|
||||||
.prop("attribute-type", valueAttr.type)
|
.prop("attribute-type", valueAttr.type)
|
||||||
.prop("attribute-name", valueAttr.name)
|
.prop("attribute-name", valueAttr.name)
|
||||||
@ -244,6 +245,8 @@ async function loadAttributes() {
|
|||||||
.addClass("form-control")
|
.addClass("form-control")
|
||||||
.addClass("promoted-attribute-input");
|
.addClass("promoted-attribute-input");
|
||||||
|
|
||||||
|
idx++;
|
||||||
|
|
||||||
const $inputCell = $("<td>").append($("<div>").addClass("input-group").append($input));
|
const $inputCell = $("<td>").append($("<div>").addClass("input-group").append($input));
|
||||||
|
|
||||||
const $actionCell = $("<td>");
|
const $actionCell = $("<td>");
|
||||||
|
@ -32,7 +32,7 @@ async function show() {
|
|||||||
lint: true,
|
lint: true,
|
||||||
gutters: ["CodeMirror-lint-markers"],
|
gutters: ["CodeMirror-lint-markers"],
|
||||||
lineNumbers: true,
|
lineNumbers: true,
|
||||||
tabindex: 2 // so that tab from title will lead to code editor focus
|
tabindex: 100
|
||||||
});
|
});
|
||||||
|
|
||||||
codeEditor.on('change', noteDetailService.noteChanged);
|
codeEditor.on('change', noteDetailService.noteChanged);
|
||||||
|
@ -184,7 +184,7 @@
|
|||||||
<table id="note-detail-promoted-attributes"></table>
|
<table id="note-detail-promoted-attributes"></table>
|
||||||
|
|
||||||
<div id="note-detail-component-wrapper">
|
<div id="note-detail-component-wrapper">
|
||||||
<div id="note-detail-text" class="note-detail-component" tabindex="2"></div>
|
<div id="note-detail-text" class="note-detail-component" tabindex="100"></div>
|
||||||
|
|
||||||
<div id="note-detail-search" class="note-detail-component">
|
<div id="note-detail-search" class="note-detail-component">
|
||||||
<div style="display: flex; align-items: center;">
|
<div style="display: flex; align-items: center;">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user