mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 02:04:33 +08:00
Fix smart annotation in inventory on edit
This commit is contained in:
parent
84aacecb81
commit
97f5a7e9fc
3 changed files with 7 additions and 5 deletions
|
@ -27,7 +27,7 @@ $.fn.dataTable.render.editRepositoryAssetValue = function(formId, columnId, cell
|
|||
|
||||
$.fn.dataTable.render.editRepositoryTextValue = function(formId, columnId, cell) {
|
||||
let $cell = $(cell.node());
|
||||
let text = $cell.text();
|
||||
let text = $cell.find('.text-value').data('edit-value');
|
||||
|
||||
$cell.html(`
|
||||
<div class="sci-input-container text-field error-icon">
|
||||
|
|
|
@ -26,7 +26,8 @@ $.fn.dataTable.render.defaultRepositoryAssetValue = function() {
|
|||
};
|
||||
|
||||
$.fn.dataTable.render.RepositoryTextValue = function(data) {
|
||||
return data.value;
|
||||
var text = $(`<span class="text-value" data-edit-value="${data.value.edit}">${data.value.view}</span>`);
|
||||
return text.prop('outerHTML');
|
||||
};
|
||||
|
||||
$.fn.dataTable.render.defaultRepositoryTextValue = function() {
|
||||
|
|
|
@ -8,9 +8,10 @@ module RepositoryDatatable
|
|||
|
||||
def value
|
||||
@user = scope[:user]
|
||||
custom_auto_link(object.data,
|
||||
simple_format: true,
|
||||
team: scope[:team])
|
||||
{
|
||||
view: custom_auto_link(object.data, simple_format: true, team: scope[:team]),
|
||||
edit: sanitize_input(object.data)
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue