mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
Fix action toolbar init [SCI-8413]
This commit is contained in:
parent
c86ba663e1
commit
7c9142de5e
5 changed files with 6 additions and 13 deletions
|
@ -145,6 +145,7 @@
|
|||
|
||||
function updateButtons() {
|
||||
window.actionToolbarComponent.fetchActions({ label_template_ids: rowsSelectedIDs() });
|
||||
$('.dataTables_scrollBody').css('padding-bottom', `${rowsSelectedIDs().length > 0 ? 68 : 0}px`);
|
||||
}
|
||||
|
||||
function reloadTable() {
|
||||
|
@ -280,6 +281,7 @@
|
|||
initDeleteModal();
|
||||
initRefreshFluicsButton();
|
||||
window.initActionToolbar();
|
||||
window.actionToolbarComponent.setBottomOffset(75);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ var ProtocolsIndex = (function() {
|
|||
window.initActionToolbar();
|
||||
window.actionToolbarComponent.setReloadCallback(reloadTable);
|
||||
// make room for pagination
|
||||
window.actionToolbarComponent.setBottomOffset(75);
|
||||
window.actionToolbarComponent.setBottomOffset(70);
|
||||
updateButtons();
|
||||
initProtocolsTable();
|
||||
initKeywordFiltering();
|
||||
|
@ -645,6 +645,7 @@ var ProtocolsIndex = (function() {
|
|||
|
||||
function updateButtons() {
|
||||
window.actionToolbarComponent.fetchActions({ protocol_ids: rowsSelected.join(',') });
|
||||
$('.dataTables_scrollBody').css('padding-bottom', `${rowsSelected.length > 0 ? 68 : 0}px`);
|
||||
}
|
||||
|
||||
function initLocalFileImport() {
|
||||
|
|
|
@ -54,6 +54,7 @@ var RepositoryDatatable = (function(global) {
|
|||
function updateButtons() {
|
||||
if (window.actionToolbarComponent) {
|
||||
window.actionToolbarComponent.fetchActions({ repository_row_ids: rowsSelected });
|
||||
$('.dataTables_scrollBody').css('padding-bottom', `${rowsSelected.length > 0 ? 68 : 0}px`);
|
||||
}
|
||||
|
||||
if (currentMode === 'viewMode') {
|
||||
|
@ -656,7 +657,7 @@ var RepositoryDatatable = (function(global) {
|
|||
},
|
||||
fnInitComplete: function() {
|
||||
window.initActionToolbar();
|
||||
|
||||
window.actionToolbarComponent.setBottomOffset(70);
|
||||
initHeaderTooltip();
|
||||
disableCheckboxToggleOnCheckboxPreview();
|
||||
|
||||
|
|
|
@ -1,14 +1,6 @@
|
|||
<template>
|
||||
<div class="label-templates-show">
|
||||
<div class="header">
|
||||
<div id="breadcrumbsWrapper">
|
||||
<div class="breadcrumbs-container">
|
||||
<a :href="labelTemplatesUrl" class="breadcrumbs-link">
|
||||
{{ i18n.t('label_templates.show.breadcrumb_index') }}
|
||||
</a>
|
||||
<span class="delimiter">/</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="labelTemplate.id" class="title-row">
|
||||
<img :src="labelTemplate.attributes.icon_url" class="label-template-icon"/>
|
||||
<InlineEdit
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
<% provide(:sidebar_title, t('sidebar.templates.sidebar_title')) %>
|
||||
<% provide(:container_class, "no-second-nav-container") %>
|
||||
<%= content_for :sidebar do %>
|
||||
<%= render partial: "/shared/sidebar/templates_sidebar", locals: {active: :label} %>
|
||||
<% end %>
|
||||
|
||||
<div id="labelTemplateContainer"
|
||||
data-label-template-url="<%= label_template_path(params[:id], format: :json) %>"
|
||||
|
|
Loading…
Reference in a new issue