mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 14:45:56 +08:00
Merge branch 'develop' into features/datetime-picker
This commit is contained in:
commit
c7cd435e95
|
@ -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 && \
|
||||
|
|
|
@ -609,9 +609,11 @@ var ExperimnetTable = {
|
|||
|
||||
$.get(dataUrl, tableParams, (result) => {
|
||||
$(this.table).find('.table-row-placeholder, .table-row-placeholder-divider').remove();
|
||||
this.appendRows(result.data);
|
||||
this.initDueDatePicker(result.data);
|
||||
this.handleNoResults();
|
||||
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) => {
|
||||
this.appendRows(response.data);
|
||||
this.initDueDatePicker(response.data);
|
||||
this.initProvisioningStatusPolling();
|
||||
setTimeout(() => {
|
||||
this.appendRows(response.data);
|
||||
this.initDueDatePicker(response.data);
|
||||
this.initProvisioningStatusPolling();
|
||||
}, 100);
|
||||
},
|
||||
customParams: (params) => {
|
||||
return { ...params, ...tableParams };
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
editorHeader.css('left', '');
|
||||
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);
|
||||
this.$nextTick(() => {
|
||||
if (editorHeader.css('position') === 'fixed') {
|
||||
editorHeader.css({
|
||||
top: totalHeight - 1,
|
||||
left: '',
|
||||
});
|
||||
}
|
||||
$('html, body').animate({
|
||||
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({
|
||||
top: totalHeight - 1,
|
||||
left: '',
|
||||
});
|
||||
editorHeader.css('left', '');
|
||||
if (this.headerSticked) {
|
||||
editorHeader.css('top', totalHeight - 1);
|
||||
}
|
||||
} else if (headerTop < (visibleHeaderHeight + visibleSecondaryNavHeight)
|
||||
&& target[0].getBoundingClientRect().top <= headerTop) {
|
||||
$('html, body').animate({
|
||||
scrollTop: editorHeader.offset().top
|
||||
}, 800);
|
||||
&& target[0].getBoundingClientRect().top <= headerBottom) {
|
||||
this.$nextTick(() => {
|
||||
$('html, body').animate({
|
||||
scrollTop: target.offset().top + (visibleHeaderHeight + visibleSecondaryNavHeight),
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
|
||||
target.focus();
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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
2
bin/chromium
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
env -i /usr/bin/chromium $@
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue