Bug #21164 » 0012089_v2.patch
typo3/sysext/reports/mod/mod_styles.css (Arbeitskopie) | ||
---|---|---|
/* ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- */
|
||
/* status report */
|
||
table.system-status-report {
|
||
width: 100%;
|
||
margin: 10px 0px;
|
||
border-collapse: collapse;
|
||
border-top: 1px solid #595d66;
|
||
#ext-reports-mod-index-php h2.section-header {
|
||
margin: 15px 0;
|
||
padding: 2px 0 0 20px;
|
||
cursor: pointer;
|
||
}
|
||
table.system-status-report th,
|
||
table.system-status-report td {
|
||
border-width: 1px 0px;
|
||
#ext-reports-mod-index-php h2.collapsed {
|
||
background-image:url(../../../gfx/arrowright.png);
|
||
background-repeat:no-repeat;
|
||
}
|
||
table.system-status-report th,
|
||
table.system-status-report td {
|
||
text-align: left;
|
||
padding: 6px;
|
||
font-size: 12px;
|
||
#ext-reports-mod-index-php h2.expanded {
|
||
background-image:url(../../../gfx/arrowdown.png);
|
||
background-repeat:no-repeat;
|
||
}
|
||
table.system-status-report th {
|
||
width: 300px;
|
||
}
|
||
table.system-status-report th a,
|
||
table.system-status-report td a {
|
||
color: #000;
|
||
font-weight: bold;
|
||
text-decoration: none;
|
||
}
|
||
table.system-status-report th a:hover,
|
||
table.system-status-report td a:hover {
|
||
text-decoration: underline;
|
||
#ext-reports-mod-index-php .message-body {
|
||
clear: left;
|
||
}
|
||
table.system-status-report th {
|
||
padding-left: 30px;
|
||
font-weight: bold;
|
||
#ext-reports-mod-index-php .message-left {
|
||
float: left;
|
||
width: 400px;
|
||
}
|
||
table.system-status-report td.merge-down,
|
||
table.system-status-report th.merge-down {
|
||
border-bottom-width: 0px !important;
|
||
#ext-reports-mod-index-php .message-right {
|
||
float: left;
|
||
}
|
||
table.system-status-report td.merge-up {
|
||
border-top-width: 0px !important;
|
||
background-image: none;
|
||
padding-left: 30px;
|
||
}
|
||
table.system-status-report tr td.typo3-message {
|
||
background-image: none;
|
||
}
|
||
table.system-status-report tr td.typo3-message ul,
|
||
table.system-status-report tr td.typo3-message ol {
|
||
margin-top: 0px;
|
||
}
|
||
typo3/sysext/reports/mod/index.php (Arbeitskopie) | ||
---|---|---|
t3lib_extMgm::extPath('reports') . 'mod/mod_template.html'
|
||
);
|
||
$this->doc->backPath = $GLOBALS['BACK_PATH'];
|
||
$this->doc->getPageRenderer()->loadScriptaculous('effects');
|
||
$this->doc->addStyleSheet(
|
||
'tx_reports',
|
||
'../' . t3lib_extMgm::siteRelPath('reports') . 'mod/mod_styles.css'
|
||
... | ... | |
// Draw the form
|
||
$this->doc->form = '<form action="" method="post" enctype="multipart/form-data">';
|
||
// JavaScript
|
||
$this->doc->JScode = '
|
||
<script language="javascript" type="text/javascript">
|
||
... | ... | |
function jumpToUrl(URL) {
|
||
document.location = URL;
|
||
}
|
||
var state;
|
||
Event.observe(document, "dom:loaded", function(){
|
||
$$(".section-header").invoke("observe", "click", function(event){
|
||
var item = Event.element(event);
|
||
if (item.hasClassName("expanded")) {
|
||
item.removeClassName("expanded").addClassName("collapsed");
|
||
Effect.BlindUp(item.next("div"), {duration : 0.5});
|
||
state = 1;
|
||
} else {
|
||
item.removeClassName("collapsed").addClassName("expanded");
|
||
Effect.BlindDown(item.next("div"), {duration : 0.5});
|
||
state = 0;
|
||
}
|
||
new Ajax.Request("ajax.php", {
|
||
parameters : "ajaxID=Reports::saveCollapseState&item=" + item.id + "&state=" + state
|
||
});
|
||
});
|
||
});
|
||
</script>
|
||
';
|
||
$this->doc->postCode='
|
||
... | ... | |
return $buttons;
|
||
}
|
||
}
|
||
typo3/sysext/reports/ext_tables.php (Arbeitskopie) | ||
---|---|---|
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['security'] = 'tx_reports_reports_status_SecurityStatus';
|
||
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['configuration'] = 'tx_reports_reports_status_ConfigurationStatus';
|
||
$GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['Reports::saveCollapseState'] = 'EXT:reports/reports/class.tx_reports_reports_status.php:tx_reports_reports_Status->saveCollapseState';
|
||
}
|
||
?>
|
typo3/sysext/reports/reports/class.tx_reports_reports_status.php (Arbeitskopie) | ||
---|---|---|
*/
|
||
protected function renderStatus(array $statusCollection) {
|
||
$content = '';
|
||
$template = '
|
||
<div class="typo3-message message-###CLASS###">
|
||
<div class="header-container">
|
||
<div class="message-header message-left">###HEADER###</div>
|
||
<div class="message-header message-right">###STATUS###</div>
|
||
</div>
|
||
<div class="message-body">###CONTENT###</div>
|
||
</div>';
|
||
$statuses = $this->sortStatusProviders($statusCollection);
|
||
foreach($statuses as $provider => $providerStatus) {
|
||
$providerState = $this->sortStatuses($providerStatus);
|
||
$content .= '<h2>' . $provider . '</h2>';
|
||
$content .= '<table class="system-status-report">';
|
||
$id = str_replace(' ', '-', $provider);
|
||
if (isset($GLOBALS['BE_USER']->uc['reports']['states'][$id]) && $GLOBALS['BE_USER']->uc['reports']['states'][$id]) {
|
||
$collapsedStyle = 'style="display:none"';
|
||
$collapsedClass = 'collapsed';
|
||
} else {
|
||
$collapsedStyle = '';
|
||
$collapsedClass = 'expanded';
|
||
}
|
||
$content .= '<h2 id="' . $id . '" class="section-header ' . $collapsedClass . '">' . $provider . '</h2>
|
||
<div ' . $collapsedStyle . '>';
|
||
$classes = array(
|
||
tx_reports_reports_status_Status::NOTICE => 'notice',
|
||
tx_reports_reports_status_Status::INFO => 'information',
|
||
... | ... | |
);
|
||
foreach ($providerState as $status) {
|
||
$class = 'typo3-message message-' . $classes[$status->getSeverity()];
|
||
$description = $status->getMessage();
|
||
|
||
if (empty($description)) {
|
||
$content .= '<tr><th class="'. $class .' statusTitle">'. $status->getTitle() .'</th><td class="'. $class .'">'. $status->getValue() .'</td></tr>';
|
||
} else {
|
||
$content .= '<tr><th class="'. $class .' merge-down">'. $status->getTitle() .'</th><td class="'. $class .' merge-down">'. $status->getValue() .'</td></tr>';
|
||
$content .= '<tr><td class="'. $class .' merge-up" colspan="2">'. $description .'</td></tr>';
|
||
}
|
||
$content .= strtr($template, array(
|
||
'###CLASS###' => $classes[$status->getSeverity()],
|
||
'###HEADER###' => $status->getTitle(),
|
||
'###STATUS###' => $status->getValue(),
|
||
'###CONTENT###' => $status->getMessage(),
|
||
));
|
||
}
|
||
|
||
$content .= '</table>';
|
||
$content .= '</div>';
|
||
}
|
||
return $content;
|
||
}
|
||
... | ... | |
}
|
||
return $statuses;
|
||
}
|
||
/**
|
||
* saves the section toggle state in the backend user's uc
|
||
*
|
||
* @param array array of parameters from the AJAX interface, currently unused
|
||
* @param TYPO3AJAX object of type TYPO3AJAX
|
||
* @return void
|
||
*/
|
||
|
||
public function saveCollapseState(array $params, TYPO3AJAX $ajaxObj) {
|
||
$item = t3lib_div::_POST('item');
|
||
$state = (bool)t3lib_div::_POST('state');
|
||
$GLOBALS['BE_USER']->uc['reports']['states'][$item] = $state;
|
||
$GLOBALS['BE_USER']->writeUC();
|
||
}
|
||
}
|
||
- « Previous
- 1
- 2
- Next »