mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32:06 +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',
|
||||
success: function(data) {
|
||||
var columns_ids = data.columns;
|
||||
var present_columns = [];
|
||||
$('table' + TABLE_ID + ' thead tr').children('th').each(function() {
|
||||
var id = parseInt($(this).attr('id'));
|
||||
if(id) {
|
||||
present_columns.push(id);
|
||||
}
|
||||
});
|
||||
var present_columns = $(TABLE_ID).data('repository-columns-ids');
|
||||
if( !_.isEqual(columns_ids.sort(), present_columns.sort()) ) {
|
||||
alert($(TABLE_ID).data('columns-changed'));
|
||||
animateSpinner();
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
data-delete-record="<%= repository_delete_records_path(repository) %>"
|
||||
data-copy-records="<%= repository_copy_records_path(repository) %>"
|
||||
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-edit-text="<%= I18n.t('general.edit') %>"
|
||||
data-cancel-text="<%= I18n.t('general.cancel') %>"
|
||||
|
|
Loading…
Reference in a new issue