Commit c95fea47 authored by Georg Ringer's avatar Georg Ringer Committed by Andreas Fernandez
Browse files

[TASK] Remove alerts of locked records

Use tooltips instead of ancient JavaScript alerts for locked
records.

Resolves: #79422
Releases: master
Change-Id: Ia9911f8eaad1c55c2af14e366af13e0e9b7b21df
Reviewed-on: https://review.typo3.org/51387

Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Mona Muzaffar's avatarMona Muzaffar <mona.muzaffar@gmx.de>
Reviewed-by: Mona Muzaffar's avatarMona Muzaffar <mona.muzaffar@gmx.de>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
parent a47765a1
......@@ -550,7 +550,7 @@ class InlineRecordContainer extends AbstractContainer
// If the record is edit-locked by another user, we will show a little warning sign:
if ($lockInfo = BackendUtility::isRecordLocked($foreignTable, $rec['uid'])) {
$cells['locked'] = '
<a class="btn btn-default" href="#" onclick="alert(' . GeneralUtility::quoteJSvalue($lockInfo['msg']) . ');return false;">
<a class="btn btn-default" href="#" data-toggle="tooltip" data-title="' . htmlspecialchars($lockInfo['msg']) . '">
' . '<span title="' . htmlspecialchars($lockInfo['msg']) . '">' . $this->iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL)->render() . '</span>' . '
</a>';
}
......
......@@ -1600,8 +1600,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
$additionalIcons[] = $langMode ? $this->languageFlag($row['sys_language_uid'], false) : '';
// Get record locking status:
if ($lockInfo = BackendUtility::isRecordLocked('tt_content', $row['uid'])) {
$additionalIcons[] = '<a href="#" onclick="alert(' . GeneralUtility::quoteJSvalue($lockInfo['msg'])
. ');return false;" title="' . htmlspecialchars($lockInfo['msg']) . '">'
$additionalIcons[] = '<a href="#" data-toggle="tooltip" data-title="' . htmlspecialchars($lockInfo['msg']) . '">'
. $this->iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL)->render() . '</a>';
}
// Call stats information hook
......
......@@ -921,10 +921,8 @@ class DatabaseRecordList extends AbstractDatabaseRecordList
// If the record is edit-locked by another user, we will show a little warning sign:
$lockInfo = BackendUtility::isRecordLocked($table, $row['uid']);
if ($lockInfo) {
$warning = '<a href="#" onclick="alert('
. GeneralUtility::quoteJSvalue($lockInfo['msg']) . '); return false;" title="'
. htmlspecialchars($lockInfo['msg']) . '">'
. $this->iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL)->render() . '</a>';
$warning = '<span data-toggle="tooltip" data-placement="right" data-title="' . htmlspecialchars($lockInfo['msg']) . '">'
. $this->iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL)->render() . '</span>';
}
$theData[$fCol] = $theData['__label'] = $warning . $this->linkWrapItems($table, $row['uid'], $recTitle, $row);
// Render thumbnails, if:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment