Merge pull request #6728 from artoscinote/ma_SCI_9189

Table and sticky toolbar fix [SCI-9189]
This commit is contained in:
Martin Artnik 2023-11-28 15:16:54 +01:00 committed by GitHub
commit fe34412f62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View file

@ -5,7 +5,7 @@
<div class="portocol-header-left-part grow">
<template v-if="headerSticked && moduleName">
<i class="sn-icon sn-icon-navigator sci--layout--navigator-open cursor-pointer p-1.5 border rounded border-sn-light-grey mr-4"></i>
<div @click="scrollTop" class="task-section-title w-[calc(100%_-_4rem)] min-w-[5rem] cursor-pointer">
<div @click="scrollTop" class="task-section-title w-[calc(100%_-_35rem)] min-w-[5rem] cursor-pointer">
<h2 class="truncate leading-6">{{ moduleName }}</h2>
</div>
</template>
@ -25,7 +25,7 @@
</div>
</div>
<div class="actions-block">
<div class="protocol-buttons-group">
<div class="protocol-buttons-group shrink-0">
<a v-if="urls.add_step_url"
class="btn btn-secondary"
:title="i18n.t('protocols.steps.new_step_title')"

View file

@ -162,10 +162,10 @@
this.openNameModal();
return;
}
const { row = 0, col = 0 } = this.selectedCell || {};
const { row = 0, col = 0 } = this.selectedCell || {};
this.editingTable = true;
this.$nextTick(() => this.tableObject.selectCell(row, col));
this.$nextTick(() => this.tableObject.selectCell(row,col));
},
disableTableEdit() {
this.editingTable = false;
@ -270,13 +270,12 @@
readOnly: !this.editingTable,
afterUnlisten: () => {
this.updatingTableData = true;
setTimeout(this.updateTable, 100) // delay makes cancel button work
this.updateTable();
},
afterSelection: (r, c, r2, c2) => {
if (r === r2 && c === c2) {
this.selectedCell = { row: r, col: c };
}
this.updateTable();
},
afterChange: () => {
if (this.editingTable == false) return;