diff --git a/app/assets/javascripts/repositories/renderers/edit_renderers.js b/app/assets/javascripts/repositories/renderers/edit_renderers.js index a76104108..dc26af015 100644 --- a/app/assets/javascripts/repositories/renderers/edit_renderers.js +++ b/app/assets/javascripts/repositories/renderers/edit_renderers.js @@ -143,7 +143,7 @@ $.fn.dataTable.render.editRepositoryNumberValue = function(formId, columnId, cel type="number" name="repository_cells[${columnId}]" placeholder="${I18n.t('repositories.table.number.enter_number')}" - value="${$cell.find('.number-value').data('full-value')}" + value="${$cell.find('.number-value').data('value')}" data-type="RepositoryNumberValue"> `); }; diff --git a/app/assets/javascripts/repositories/renderers/new_renderers.js b/app/assets/javascripts/repositories/renderers/new_renderers.js index c270d1761..d9ab17b4f 100644 --- a/app/assets/javascripts/repositories/renderers/new_renderers.js +++ b/app/assets/javascripts/repositories/renderers/new_renderers.js @@ -75,8 +75,6 @@ $.fn.dataTable.render.newRepositoryNumberValue = function(formId, columnId, $cel placeholder="${I18n.t('repositories.table.number.enter_number')}" data-type="RepositoryNumberValue"> `); - - SmartAnnotation.init($cell.find('input')); }; $.fn.dataTable.render.newRepositoryDateTimeValue = function(formId, columnId, $cell) { diff --git a/app/assets/javascripts/repositories/renderers/view_renderers.js b/app/assets/javascripts/repositories/renderers/view_renderers.js index 9c6147c4f..596b68c8f 100644 --- a/app/assets/javascripts/repositories/renderers/view_renderers.js +++ b/app/assets/javascripts/repositories/renderers/view_renderers.js @@ -63,8 +63,8 @@ $.fn.dataTable.render.defaultRepositoryDateTimeValue = function() { }; $.fn.dataTable.render.RepositoryDateTimeValue = function(data) { - return `${data.value.formatted}`; }; @@ -73,7 +73,7 @@ $.fn.dataTable.render.defaultRepositoryTimeValue = function() { }; $.fn.dataTable.render.RepositoryTimeValue = function(data) { - return `${data.value.formatted}`; }; @@ -146,7 +146,7 @@ $.fn.dataTable.render.defaultRepositoryNumberValue = function() { }; $.fn.dataTable.render.RepositoryNumberValue = function(data) { - return ` + return ` ${data.value} `; }; diff --git a/app/serializers/repository_datatable/repository_number_value_serializer.rb b/app/serializers/repository_datatable/repository_number_value_serializer.rb index 8c6986bf9..25aff993c 100644 --- a/app/serializers/repository_datatable/repository_number_value_serializer.rb +++ b/app/serializers/repository_datatable/repository_number_value_serializer.rb @@ -2,15 +2,9 @@ module RepositoryDatatable class RepositoryNumberValueSerializer < RepositoryBaseValueSerializer - attributes :full_value - def value decimal_number = scope[:column].metadata.fetch('decimals') { Constants::REPOSITORY_NUMBER_TYPE_DEFAULT_DECIMALS } BigDecimal(object.data).round(decimal_number.to_i) end - - def full_value - object.data - end end end