Index: typo3/sysext/reports/ext_tables.php =================================================================== --- typo3/sysext/reports/ext_tables.php (revision 6074) +++ typo3/sysext/reports/ext_tables.php (working copy) @@ -22,6 +22,7 @@ $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'] = t3lib_extMgm::extPath($_EXTKEY) . 'reports/class.tx_reports_reports_status.php:tx_reports_reports_Status->saveCollapseState'; } ?> \ No newline at end of file Index: typo3/sysext/reports/mod/index.php =================================================================== --- typo3/sysext/reports/mod/index.php (revision 6074) +++ typo3/sysext/reports/mod/index.php (working copy) @@ -58,6 +58,7 @@ 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' @@ -107,7 +108,6 @@ // Draw the form $this->doc->form = '
'; - // JavaScript $this->doc->JScode = ' '; $this->doc->postCode=' @@ -246,6 +264,7 @@ return $buttons; } + } Index: typo3/sysext/reports/mod/mod_styles.css =================================================================== --- typo3/sysext/reports/mod/mod_styles.css (revision 6074) +++ typo3/sysext/reports/mod/mod_styles.css (working copy) @@ -27,64 +27,30 @@ /* ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- */ /* 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; -} - - - Index: typo3/sysext/reports/reports/class.tx_reports_reports_status.php =================================================================== --- typo3/sysext/reports/reports/class.tx_reports_reports_status.php (revision 6074) +++ typo3/sysext/reports/reports/class.tx_reports_reports_status.php (working copy) @@ -96,14 +96,26 @@ */ protected function renderStatus(array $statusCollection) { $content = ''; + $template = ' +
+
+
###HEADER###
+
###STATUS###
+
+
###CONTENT###
+
'; $statuses = $this->sortStatusProviders($statusCollection); foreach($statuses as $provider => $providerStatus) { $providerState = $this->sortStatuses($providerStatus); - - $content .= '

' . $provider . '

'; - $content .= ''; + + $id = str_replace(' ', '-', $provider); + $collapsed = intval($GLOBALS['BE_USER']->uc['reports']['states'][$id]); + $collapsedClass = $collapsed ? ' collapsed' : ' expanded'; + + $content .= '

' . $provider . '

+
'; $classes = array( tx_reports_reports_status_Status::NOTICE => 'notice', tx_reports_reports_status_Status::INFO => 'information', @@ -113,18 +125,14 @@ ); foreach ($providerState as $status) { - $class = 'typo3-message message-' . $classes[$status->getSeverity()]; - $description = $status->getMessage(); - - if (empty($description)) { - $content .= '
'; - } else { - $content .= ''; - $content .= ''; - } + $content .= strtr($template, array( + '###CLASS###' => $classes[$status->getSeverity()], + '###HEADER###' => $status->getTitle(), + '###STATUS###' => $status->getValue(), + '###CONTENT###' => $status->getMessage(), + )); } - - $content .= '
'. $status->getTitle() .''. $status->getValue() .'
'. $status->getTitle() .''. $status->getValue() .'
'. $description .'
'; + $content .= ''; } return $content; } @@ -181,6 +189,22 @@ } 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($params, $ajaxObj) { + $item = t3lib_div::_POST('item'); + $state = t3lib_div::_POST('state'); + + $GLOBALS['BE_USER']->uc['reports']['states'][$item] = $state; + $GLOBALS['BE_USER']->writeUC(); + } }