Commit 690ef9ce authored by Jan Helke's avatar Jan Helke Committed by Mathias Schreiber
Browse files

[TASK] Use ModuleTemplate API for PageLayout

Releases: master
Resolves: #69845
Change-Id: I7c5d007ec547c81004ec6e169f02fc3c56c40ef1
Reviewed-on: http://review.typo3.org/43348

Reviewed-by: Frans Saris's avatarFrans Saris <franssaris@gmail.com>
Tested-by: Frans Saris's avatarFrans Saris <franssaris@gmail.com>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Mathias Schreiber's avatarMathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber's avatarMathias Schreiber <mathias.schreiber@wmdb.de>
parent 0eb5f70e
......@@ -101,6 +101,9 @@
//
.module-body {
padding: @module-body-padding;
> .callout:first-child {
margin-top: 0;
}
}
.module-docheader + .module-body {
padding-top: @module-docheader-height + @module-body-padding-vertical;
......
......@@ -34,7 +34,7 @@
width: 100%;
}
.t3-grid-container {
margin: 0px (@page-grid-spacing * -1);
margin: 0px (@page-grid-spacing * -1) @line-height-computed;
}
.t3-grid-cell {
background-color: @page-grid-cell-bg;
......
......@@ -195,10 +195,12 @@ class ShortcutButton implements ButtonInterface, PositionInterface
$shortcutMarkup = $documentTemplate->makeShortcutIcon(
implode(',', $this->getVariables),
implode(',', $this->setVariables),
$this->moduleName
$this->moduleName,
'',
'btn btn-sm btn-default'
);
return '<span class="btn btn-sm btn-default">' . $shortcutMarkup . '</span>';
return $shortcutMarkup;
}
/**
......
......@@ -143,7 +143,7 @@ class SplitButton extends AbstractButton implements ButtonInterface
'value' => $items['primary']->getValue()
];
if (!empty($items['primary']->getOnClick())) {
$attributes['onclick'] = htmlspecialchars($items['primary']->getOnClick());
$attributes['onclick'] = $items['primary']->getOnClick();
}
$attributesString = '';
foreach ($attributes as $key => $value) {
......@@ -172,7 +172,7 @@ class SplitButton extends AbstractButton implements ButtonInterface
$optionAttributes['class'] = htmlspecialchars($option->getClasses());
}
if (!empty($option->getOnClick())) {
$optionAttributes['onclick'] = htmlspecialchars($option->getOnClick());
$optionAttributes['onclick'] = $option->getOnClick();
}
$optionAttributesString = '';
foreach ($optionAttributes as $key => $value) {
......
......@@ -652,9 +652,10 @@ function jumpToUrl(URL) {
* @param string $setList Is the list of SET[] variables to store (if any) - SET[] variables a stored in $GLOBALS["SOBE"]->MOD_SETTINGS for backend modules
* @param string $modName Module name string
* @param string|int $motherModName Is used to enter the "parent module name" if the module is a submodule under eg. Web>* or File>*. You can also set this value to 1 in which case the currentLoadedModule is sent to the shortcut script (so - not a fixed value!) - that is used in file_edit and wizard_rte modules where those are really running as a part of another module.
* @param string $classes
* @return string HTML content
*/
public function makeShortcutIcon($gvList, $setList, $modName, $motherModName = '')
public function makeShortcutIcon($gvList, $setList, $modName, $motherModName = '', $classes = '')
{
$gvList = 'route,' . $gvList;
$storeUrl = $this->makeShortcutUrl($gvList, $setList);
......@@ -678,17 +679,17 @@ function jumpToUrl(URL) {
$shortcutUrl = $pathInfo['path'] . '?' . $storeUrl;
$shortcutExist = BackendUtility::shortcutExists($shortcutUrl);
$icon = '<span>' . $this->iconFactory->getIcon('actions-system-shortcut-new', Icon::SIZE_SMALL)->render() . '</span>';
$icon = $this->iconFactory->getIcon('actions-system-shortcut-new', Icon::SIZE_SMALL)->render();
if ($shortcutExist) {
return '<a class="active" title="">' . $icon . '</a>';
return '<a class="active ' . htmlspecialchars($classes) . '" title="">' . $icon . '</a>';
}
$url = GeneralUtility::quoteJSvalue(rawurlencode($shortcutUrl));
$onClick = 'top.TYPO3.ShortcutMenu.createShortcut(' . GeneralUtility::quoteJSvalue(rawurlencode($modName)) .
', ' . $url . ', ' . $confirmationText . ', ' . $motherModule . ', this);return false;';
return '<a href="#" onclick="' . htmlspecialchars($onClick) . '" title="' .
return '<a href="#" class="' . htmlspecialchars($classes) . '" onclick="' . htmlspecialchars($onClick) . '" title="' .
$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.makeBookmark', true) . '">' . $icon . '</a>';
}
......
......@@ -102,15 +102,15 @@ define('TYPO3/CMS/Backend/PageActions', ['jquery'], function($) {
*/
PageActions.editPageTitle = function() {
var $inputFieldWrap = $(
'<form class="row">' +
'<div class="col-lg-4 col-md-6 col-sm-12">' +
'<div class="input-group">' +
'<form>' +
'<div class="form-group">' +
'<div class="input-group input-group-lg">' +
'<input class="form-control">' +
'<span class="input-group-btn">' +
'<button class="btn btn-default" type="button" data-action="submit"><span class="t3-icon fa fa-floppy-o"></span></button>' +
'<button class="btn btn-default" type="button" data-action="submit"><span class="t3-icon fa fa-floppy-o"></span></button> ' +
'</span>' +
'<span class="input-group-btn">' +
'<button class="btn btn-danger" type="button" data-action="cancel"><span class="t3-icon fa fa-times"></span></button>' +
'<button class="btn btn-default" type="button" data-action="cancel"><span class="t3-icon fa fa-times"></span></button> ' +
'</span>' +
'</div>' +
'</div>' +
......
......@@ -11,12 +11,17 @@
* The TYPO3 project - inspiring people to share!
*/
define('TYPO3/CMS/Backend/ToggleSearchToolbox', ['jquery', 'TYPO3/CMS/Backend/jquery.clearable'], function($) {
$(document).ready(function() {
/**
* Toggle the search toolbox
*/
define('TYPO3/CMS/Backend/ToggleSearchToolbox', ['jquery', 'TYPO3/CMS/Backend/DocumentHeader', 'TYPO3/CMS/Backend/jquery.clearable'], function($, DocumentHeader) {
"use strict";
$(function() {
var $toolbar = $('#db_list-searchbox-toolbar');
$('.t3js-toggle-search-toolbox').on('click', function() {
$toolbar.toggle();
DocumentHeader.reposition();
if ($toolbar.is(':visible')) {
$('#search_field').focus();
}
......@@ -26,14 +31,12 @@ define('TYPO3/CMS/Backend/ToggleSearchToolbox', ['jquery', 'TYPO3/CMS/Backend/jq
var searchResultShown = ('' !== $searchFields.val());
// make search field clearable
$searchFields.clearable(
{
onClear: function() {
if (searchResultShown) {
$(this).closest('form').submit();
}
$searchFields.clearable({
onClear: function() {
if (searchResultShown) {
$(this).closest('form').submit();
}
}
);
});
});
});
\ No newline at end of file
});
......@@ -35,6 +35,7 @@ use TYPO3\CMS\Core\Utility\MathUtility;
*/
class AbstractDatabaseRecordList extends AbstractRecordList
{
/**
* Specify a list of tables which are the only ones allowed to be displayed.
*
......@@ -555,31 +556,31 @@ class AbstractDatabaseRecordList extends AbstractRecordList
// Table with the search box:
$content = '<div class="db_list-searchbox-form db_list-searchbox-toolbar module-docheader-bar module-docheader-bar-search t3js-module-docheader-bar t3js-module-docheader-bar-search" id="db_list-searchbox-toolbar" style="display: ' . ($this->searchString == '' ? 'none' : 'block') . ';">
' . $formElements[0] . '
<div id="typo3-dblist-search">
<div class="panel panel-default">
<div class="panel-body">
<div class="form-inline form-inline-spaced">
<div class="form-group">
<div id="typo3-dblist-search">
<div class="panel panel-default">
<div class="panel-body">
<div class="form-inline form-inline-spaced">
<div class="form-group">
<input class="form-control" type="search" placeholder="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.enterSearchString', true) . '" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.title.searchString', true) . '" name="search_field" id="search_field" value="' . htmlspecialchars($this->searchString) . '" />
</div>
<div class="form-group">
</div>
<div class="form-group">
<label for="search_levels">' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.label.search_levels', true) . ': </label>
' . $lMenu . '
</div>
<div class="form-group">
</div>
<div class="form-group">
<label for="showLimit">' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.label.limit', true) . ': </label>
<input class="form-control" type="number" min="0" max="10000" placeholder="10" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.title.limit', true) . '" name="showLimit" id="showLimit" value="' . htmlspecialchars(($this->showLimit ? $this->showLimit : '')) . '" />
</div>
<div class="form-group">
</div>
<div class="form-group">
<button type="submit" class="btn btn-default" name="search" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.title.search', true) . '">
' . $iconFactory->getIcon('actions-search', Icon::SIZE_SMALL)->render() . ' ' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.search', true) . '
</button>
</div>
</div>
</div>
</div>
</div>
' . $formElements[1] . '</div></div>';
</button>
</div>
</div>
</div>
</div>
</div>
' . $formElements[1] . '</div>';
return $content;
}
......@@ -587,7 +588,7 @@ class AbstractDatabaseRecordList extends AbstractRecordList
*
* Various helper functions
*
******************************/
******************************/
/**
* Setting the field names to display in extended list.
* Sets the internal variable $this->setFields
......@@ -728,12 +729,11 @@ class AbstractDatabaseRecordList extends AbstractRecordList
$condition = '(' . $condition . ' AND ' . $tablePidField . '=' . $currentPid . ')';
}
$whereParts[] = $condition;
} elseif (
$fieldConfig['type'] == 'text' ||
} elseif ($fieldConfig['type'] == 'text' ||
$fieldConfig['type'] == 'flex' ||
($fieldConfig['type'] == 'input' && (!$fieldConfig['eval'] || !preg_match('/date|time|int/', $fieldConfig['eval'])))) {
$condition = $fieldName . ' LIKE \'%' . $this->searchString . '%\'';
$whereParts[] = $condition;
$condition = $fieldName . ' LIKE \'%' . $this->searchString . '%\'';
$whereParts[] = $condition;
}
}
}
......@@ -833,7 +833,9 @@ class AbstractDatabaseRecordList extends AbstractRecordList
// If the title is blank, make a "no title" label:
if ((string)$code === '') {
$code = '<i>[' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.no_title', 1) . ']</i> - ' . htmlspecialchars(GeneralUtility::fixed_lgd_cs(
BackendUtility::getRecordTitle($table, $row), $this->getBackendUserAuthentication()->uc['titleLen']));
BackendUtility::getRecordTitle($table, $row),
$this->getBackendUserAuthentication()->uc['titleLen']
));
} else {
$code = htmlspecialchars(GeneralUtility::fixed_lgd_cs($code, $this->fixedL), ENT_QUOTES, 'UTF-8', false);
if ($code != htmlspecialchars($origCode)) {
......@@ -859,7 +861,8 @@ class AbstractDatabaseRecordList extends AbstractRecordList
// "Show" link (only pages and tt_content elements)
if ($table == 'pages' || $table == 'tt_content') {
$code = '<a href="#" onclick="' . htmlspecialchars(
BackendUtility::viewOnClick(($table == 'tt_content' ? $this->id . '#' . $row['uid'] : $row['uid']))) . '" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', true) . '">' . $code . '</a>';
BackendUtility::viewOnClick(($table == 'tt_content' ? $this->id . '#' . $row['uid'] : $row['uid']))
) . '" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', true) . '">' . $code . '</a>';
}
break;
case 'info':
......@@ -949,7 +952,7 @@ class AbstractDatabaseRecordList extends AbstractRecordList
$urlParameters = array_merge_recursive($urlParameters, $this->overrideUrlParameters);
return $this->getThisScript() . ltrim(GeneralUtility::implodeArrayForUrl('', $urlParameters), '&');
return BackendUtility::getModuleUrl(GeneralUtility::_GP('M'), $urlParameters);
}
/**
......
......@@ -7945,6 +7945,9 @@ button.close {
.module-body {
padding: 24px 24px;
}
.module-body > .callout:first-child {
margin-top: 0;
}
.module-docheader + .module-body {
padding-top: 89px;
}
......@@ -12791,7 +12794,7 @@ iframe {
width: 100%;
}
.t3-grid-container {
margin: 0px -10px;
margin: 0px -10px 18px;
}
.t3-grid-cell {
background-color: #fafafa;
......
Supports Markdown
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