Skip to content
Snippets Groups Projects
Commit 67448ed9 authored by David Greiner's avatar David Greiner Committed by Wouter Wolters
Browse files

[TASK] Hide clipboard menu selector if clipboard is empty

With this patch the clipboard menu selector becomes visible
if the clipboard is not empty.

Resolves: #68142
Releases: master
Change-Id: I9a0ec271da0b3e5aeeb97cff0b728f8faead9d72
Reviewed-on: http://review.typo3.org/41248


Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
parent 6f88d6cf
Branches
Tags
No related merge requests found
......@@ -268,9 +268,11 @@ class Clipboard {
if (!$this->fileMode && $elementCount) {
$optionArray[] = '<li><a href="#" onclick="' . htmlspecialchars(('window.location.href=' . GeneralUtility::quoteJSvalue($this->editUrl() . '&returnUrl=') . '+top.rawurlencode(window.location.href);')) . '">' . $this->clLabel('edit', 'rm') . '</a></li>';
}
$deleteLink = '';
// Delete:
$menuSelector = '';
if ($elementCount) {
// Delete:
$deleteLink = '<a class="btn btn-danger" href="' . htmlspecialchars($removeAllUrl) . '#clip_head">' . IconUtility::getSpriteIcon('actions-document-close', array('title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:buttons.clear', TRUE))) . '</a>';
if ($this->getBackendUser()->jsConfirmation(JsConfirmation::DELETE)) {
$js = '
......@@ -282,9 +284,9 @@ class Clipboard {
$js = ' window.location.href=' . GeneralUtility::quoteJSvalue($this->deleteUrl(0, ($this->fileMode ? 1 : 0)) . '&redirect=') . '+top.rawurlencode(window.location.href); ';
}
$optionArray[] = '<li><a href="#" onclick="' . htmlspecialchars($js) . '">' . $this->clLabel('delete', 'rm') . '</a></li>';
}
$menuSelector = '
// menuSelector
$menuSelector = '
<div class="btn-group">
<button class="btn btn-default dropdown-toggle" type="button" id="menuSelector" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
' . $this->clLabel('menu', 'rm') . '
......@@ -295,6 +297,7 @@ class Clipboard {
</ul>
</div>
';
}
$out[] = '
<tr>
......
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