Merge branch 'develop' into features/datetime-picker

This commit is contained in:
Anton 2023-11-09 11:40:26 +01:00
commit c7cd435e95
8 changed files with 47 additions and 23 deletions

View file

@ -76,7 +76,7 @@ RUN \
librsvg2-2 \
libvips42 \
graphviz \
chromium-driver \
chromium \
libfile-mimeinfo-perl && \
npm install -g yarn && \
yarn add puppeteer@npm:puppeteer-core && \

View file

@ -609,9 +609,11 @@ var ExperimnetTable = {
$.get(dataUrl, tableParams, (result) => {
$(this.table).find('.table-row-placeholder, .table-row-placeholder-divider').remove();
setTimeout(() => {
this.appendRows(result.data);
this.initDueDatePicker(result.data);
this.handleNoResults();
}, 100);
InfiniteScroll.init(this.table, {
url: dataUrl,
@ -621,9 +623,11 @@ var ExperimnetTable = {
pageSize: this.pageSize,
lastPage: !result.next_page,
customResponse: (response) => {
setTimeout(() => {
this.appendRows(response.data);
this.initDueDatePicker(response.data);
this.initProvisioningStatusPolling();
}, 100);
},
customParams: (params) => {
return { ...params, ...tableParams };

View file

@ -263,6 +263,7 @@ var MarvinJsEditorApi = (function() {
} else if (config.mode === 'edit') {
config.objectType = 'Asset';
MarvinJsEditor.update(config);
location.reload();
} else if (config.mode === 'new-tinymce') {
config.objectType = 'TinyMceAsset';
MarvinJsEditor.save(config);

View file

@ -83,32 +83,49 @@ export default {
const editorHeader = $('.tox-editor-header');
// For Protocol Templates only reset the left value
// For Protocol Templates
if (!this.headerRef && !this.secondaryNavigation) {
if (target[0].getBoundingClientRect().top < 0 && editorHeader.css('position') !== 'fixed') {
$('html, body').animate({
scrollTop: target.offset().top - editorHeader.outerHeight(),
}, 100); // 100ms works best for editorHeader to be fully visible
} else {
editorHeader.css('left', '');
}
return;
}
// Handle opening TinyMCE toolbars when only a small bottom area of editor is visible
const targetBottom = target[0].getBoundingClientRect().bottom;
if (targetBottom < 3 * headerHeight) {
$('html, body').animate({
scrollTop: target.offset().top,
}, 800);
return;
}
// Handle showing TinyMCE toolbar for fixed/static position of toolbar
this.$nextTick(() => {
if (editorHeader.css('position') === 'fixed') {
editorHeader.css({
top: totalHeight - 1,
left: '',
});
} else if (headerTop < (visibleHeaderHeight + visibleSecondaryNavHeight)
&& target[0].getBoundingClientRect().top <= headerTop) {
}
$('html, body').animate({
scrollTop: editorHeader.offset().top
}, 800);
scrollTop: target.offset().top + (visibleHeaderHeight + visibleSecondaryNavHeight),
}, 100);
});
return;
}
const headerBottom = this.headerRef.getBoundingClientRect().bottom;
// Handle showing TinyMCE toolbar for fixed/static position of toolbar
if (editorHeader.css('position') === 'fixed') {
editorHeader.css('left', '');
if (this.headerSticked) {
editorHeader.css('top', totalHeight - 1);
}
} else if (headerTop < (visibleHeaderHeight + visibleSecondaryNavHeight)
&& target[0].getBoundingClientRect().top <= headerBottom) {
this.$nextTick(() => {
$('html, body').animate({
scrollTop: target.offset().top + (visibleHeaderHeight + visibleSecondaryNavHeight),
}, 100);
});
}
target.focus();

View file

@ -12,7 +12,7 @@
@resizing="onResizeMove"
@resize-end="onResizeEnd"
>
<div class="ml-4 h-full border rounded relative bg-sn-white flex flex-col right-0 absolute navigator-container">
<div class="ml-4 h-full border rounded bg-sn-white flex flex-col right-0 absolute navigator-container">
<div class="px-3 py-2.5 flex items-center relative leading-4">
<i class="sn-icon sn-icon-navigator"></i>
<div class="font-bold text-base pl-3">

View file

@ -197,7 +197,7 @@ class TeamZipExportJob < ZipExportJob
else
return unless preview.processed?
file_name = preview.filename.to_s
file_name = preview.blob.filename.to_s
file_data = preview.download
end
rescue ActiveStorage::FileNotFoundError => e

2
bin/chromium Executable file
View file

@ -0,0 +1,2 @@
#!/bin/bash
env -i /usr/bin/chromium $@

View file

@ -3,7 +3,7 @@
Grover.configure do |config|
config.options = {
cache: false,
executable_path: '/usr/bin/chromium',
executable_path: './bin/chromium',
launch_args: ['--no-sandbox']
}
end