Fix item card on results page, fix smart annotation links in RTE fields [SCI-9572] (#6506)

This commit is contained in:
Alex Kriuchykhin 2023-10-19 16:35:23 +02:00 committed by GitHub
parent 18c03eb836
commit 8a18bc6ad3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 10 deletions

View file

@ -12,7 +12,7 @@ var selectedRow = null;
function initEditMyModuleDescription() {
var viewObject = $('#my_module_description_view');
viewObject.on('click', function(e) {
if ($(e.target).hasClass('record-info-link') || e.target.tagName === 'A') return;
if ($(e.target).hasClass('record-info-link') || $(e.target).parent().hasClass('record-info-link')) return;
TinyMCE.init(
'#my_module_description_textarea',
{

View file

@ -23,7 +23,7 @@ var ProtocolRepositoryHeader = (function() {
function initEditDescription() {
var viewObject = $('#protocol_description_view');
viewObject.on('click', function(e) {
if ($(e.target).hasClass('record-info-link')) return;
if ($(e.target).hasClass('record-info-link') || $(e.target).parent().hasClass('record-info-link')) return;
TinyMCE.init('#protocol_description_textarea');
}).on('click', 'a', function(e) {
if ($(this).hasClass('record-info-link')) return;

View file

@ -4,7 +4,7 @@
'use strict';
$(document).on('click', '.record-info-link', function(e) {
const myModuleId = $('.my-modules-protocols-index').data('task-id');
const myModuleId = $('.my-module-content').data('task-id');
const repositoryRowURL = $(this).attr('href');
e.stopPropagation();

View file

@ -122,11 +122,12 @@
initTinymce(e) {
let textArea = `#${this.objectType}_textarea_${this.objectId}`;
if (this.active) return
if (e && $(e.target).prop("tagName") === 'A') return
if (e && $(e.target).hasClass('atwho-user-popover')) return
if (e && $(e.target).hasClass('record-info-link')) return
if (e && $(e.target).parent().hasClass('atwho-inserted')) return
if (this.active) return;
if (e && $(e.target).prop("tagName") === 'A') return;
if (e && $(e.target).hasClass('atwho-user-popover')) return;
if (e && $(e.target).hasClass('record-info-link')) return;
if (e && $(e.target).parent().hasClass('record-info-link')) return;
if (e && $(e.target).parent().hasClass('atwho-inserted')) return;
TinyMCE.init(textArea, {
onSaveCallback: (data) => {

View file

@ -26,7 +26,7 @@
<%= render partial: 'shared/drag_n_drop_overlay' %>
<div class="content-pane flexible my-modules-protocols-index with-grey-background" data-task-id="<%= @my_module.id %>">
<div class="content-pane flexible my-module-content my-modules-protocols-index with-grey-background" data-task-id="<%= @my_module.id %>">
<%= render partial: 'my_modules/header' %>
<div class="my-module-position-container">
<!-- Header Actions -->

View file

@ -13,7 +13,7 @@
<%= render partial: 'shared/drag_n_drop_overlay' %>
<%= render partial: 'assets/wopi/create_wopi_file_modal' %>
<div class="content-pane flexible my-modules-results with-grey-background">
<div class="content-pane flexible my-module-content my-modules-results with-grey-background" data-task-id="<%= @my_module.id %>">
<%= render partial: 'my_modules/header' %>
<%= render partial: 'my_modules/header_actions' %>