mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-12 09:20:45 +08:00
moved toolbar
This commit is contained in:
parent
8f657710ad
commit
1b060893e7
3 changed files with 13 additions and 17 deletions
|
|
@ -168,7 +168,7 @@
|
||||||
var $table = $('#reports-table');
|
var $table = $('#reports-table');
|
||||||
CHECKBOX_SELECTOR = null;
|
CHECKBOX_SELECTOR = null;
|
||||||
REPORTS_TABLE = $table.DataTable({
|
REPORTS_TABLE = $table.DataTable({
|
||||||
dom: "Rt<'pagination-row hidden'<'pagination-info'li><'pagination-actions'p>>",
|
dom: "R<'reports-toolbar'f>t<'pagination-row hidden'<'pagination-info'li><'pagination-actions'p>>",
|
||||||
order: [[9, 'desc']],
|
order: [[9, 'desc']],
|
||||||
sScrollX: '100%',
|
sScrollX: '100%',
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
|
|
@ -213,10 +213,16 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
DataTableHelpers.initLengthAppearance($table.closest('.dataTables_wrapper'));
|
DataTableHelpers.initLengthAppearance($table.closest('.dataTables_wrapper'));
|
||||||
|
DataTableHelpers.initSearchField($table.closest('.dataTables_wrapper'), I18n.t('projects.reports.index.search_reports'));
|
||||||
$('.pagination-row').removeClass('hidden');
|
$('.pagination-row').removeClass('hidden');
|
||||||
$('.report-row.processing').each(function() {
|
$('.report-row.processing').each(function() {
|
||||||
setTimeout(() => { checkProcessingStatus($(this).data('id')); }, START_POLLING_INTERVAL);
|
setTimeout(() => { checkProcessingStatus($(this).data('id')); }, START_POLLING_INTERVAL);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let topToolbar = $('#toolbarWrapper').detach().html();
|
||||||
|
$('.reports-datatable .reports-toolbar').prepend(topToolbar);
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
drawCallback: function() {
|
drawCallback: function() {
|
||||||
if (CHECKBOX_SELECTOR) CHECKBOX_SELECTOR.checkSelectAllStatus();
|
if (CHECKBOX_SELECTOR) CHECKBOX_SELECTOR.checkSelectAllStatus();
|
||||||
|
|
@ -334,11 +340,6 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$('.reports-index').on('keyup', '.report-search', function() {
|
|
||||||
REPORTS_TABLE.search($(this).val()).draw();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.reports-index').on('click', '.generate-docx', function(e) {
|
$('.reports-index').on('click', '.generate-docx', function(e) {
|
||||||
var reportId = $(this).closest('.report-row').attr('data-id');
|
var reportId = $(this).closest('.report-row').attr('data-id');
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-report-container {
|
|
||||||
display: inline-block;
|
|
||||||
float: right;
|
|
||||||
margin-right: 2em;
|
|
||||||
width: 200px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.reports-datatable {
|
.reports-datatable {
|
||||||
|
|
@ -35,6 +28,12 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
|
.reports-toolbar {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding-bottom: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
.dataTables_scroll {
|
.dataTables_scroll {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,4 @@
|
||||||
<span class="hidden-xs"><%=t "projects.reports.index.delete" %></span>
|
<span class="hidden-xs"><%=t "projects.reports.index.delete" %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="sci-input-container left-icon search-report-container">
|
|
||||||
<input type="text" class="sci-input-field report-search" placeholder="<%= t("projects.reports.index.search_reports") %>"></input>
|
|
||||||
<i class="fas fa-search"></i>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue