mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-27 14:37:35 +08:00
Merge pull request #2657 from urbanrotnik/ai-sci-4765-v2
Fix smart annotation in inventory on edit [SCI-4765] (HotFix branch)
This commit is contained in:
commit
ec14cf9fef
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) {
|
$.fn.dataTable.render.editRepositoryTextValue = function(formId, columnId, cell) {
|
||||||
let $cell = $(cell.node());
|
let $cell = $(cell.node());
|
||||||
let text = $cell.text();
|
let text = $cell.find('.text-value').data('edit-value');
|
||||||
|
|
||||||
$cell.html(`
|
$cell.html(`
|
||||||
<div class="sci-input-container text-field error-icon">
|
<div class="sci-input-container text-field error-icon">
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,8 @@ $.fn.dataTable.render.defaultRepositoryAssetValue = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
$.fn.dataTable.render.RepositoryTextValue = function(data) {
|
$.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() {
|
$.fn.dataTable.render.defaultRepositoryTextValue = function() {
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,10 @@ module RepositoryDatatable
|
||||||
|
|
||||||
def value
|
def value
|
||||||
@user = scope[:user]
|
@user = scope[:user]
|
||||||
custom_auto_link(object.data,
|
{
|
||||||
simple_format: true,
|
view: custom_auto_link(object.data, simple_format: true, team: scope[:team]),
|
||||||
team: scope[:team])
|
edit: sanitize_input(object.data)
|
||||||
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue