mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 11:57:16 +08:00
fixes bug with checkAvailableColumns function [fixes SCI-2578]
This commit is contained in:
parent
10554fecb4
commit
eb75f6c03d
2 changed files with 2 additions and 7 deletions
|
@ -400,13 +400,7 @@ var RepositoryDatatable = (function(global) {
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
var columns_ids = data.columns;
|
var columns_ids = data.columns;
|
||||||
var present_columns = [];
|
var present_columns = $(TABLE_ID).data('repository-columns-ids');
|
||||||
$('table' + TABLE_ID + ' thead tr').children('th').each(function() {
|
|
||||||
var id = parseInt($(this).attr('id'));
|
|
||||||
if(id) {
|
|
||||||
present_columns.push(id);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if( !_.isEqual(columns_ids.sort(), present_columns.sort()) ) {
|
if( !_.isEqual(columns_ids.sort(), present_columns.sort()) ) {
|
||||||
alert($(TABLE_ID).data('columns-changed'));
|
alert($(TABLE_ID).data('columns-changed'));
|
||||||
animateSpinner();
|
animateSpinner();
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
data-delete-record="<%= repository_delete_records_path(repository) %>"
|
data-delete-record="<%= repository_delete_records_path(repository) %>"
|
||||||
data-copy-records="<%= repository_copy_records_path(repository) %>"
|
data-copy-records="<%= repository_copy_records_path(repository) %>"
|
||||||
data-max-dropdown-length="<%= Constants::NAME_TRUNCATION_LENGTH_DROPDOWN %>"
|
data-max-dropdown-length="<%= Constants::NAME_TRUNCATION_LENGTH_DROPDOWN %>"
|
||||||
|
data-repository-columns-ids="<%= repository.available_columns_ids %>"
|
||||||
data-save-text="<%= I18n.t('general.save') %>"
|
data-save-text="<%= I18n.t('general.save') %>"
|
||||||
data-edit-text="<%= I18n.t('general.edit') %>"
|
data-edit-text="<%= I18n.t('general.edit') %>"
|
||||||
data-cancel-text="<%= I18n.t('general.cancel') %>"
|
data-cancel-text="<%= I18n.t('general.cancel') %>"
|
||||||
|
|
Loading…
Add table
Reference in a new issue