Skip to content

Commit

Permalink
Refs #4040, #4041 removed rest of viewdatatable set/get/enable/disabl…
Browse files Browse the repository at this point in the history
…e property functions, did the same for all other ViewDataTable classes, moved most of ViewDataTable/HtmlTable logic to visualization instead of main class and re-add links for UI integration tests.
  • Loading branch information
Benaka Moorthi committed Aug 1, 2013
1 parent c4b5fdf commit 0f61caa
Show file tree
Hide file tree
Showing 25 changed files with 691 additions and 1,011 deletions.
18 changes: 3 additions & 15 deletions core/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,19 +158,7 @@ public function getDefaultAction()
*/
protected function renderView(ViewDataTable $view, $fetch = false)
{
Piwik_PostEvent('Controller.renderView', array(
$this,
array('view' => $view,
'controllerName' => $view->getCurrentControllerName(),
'controllerAction' => $view->getCurrentControllerAction(),
'apiMethodToRequestDataTable' => $view->getApiMethodToRequestDataTable(),
'controllerActionCalledWhenRequestSubTable' => $view->getControllerActionCalledWhenRequestSubTable(),
)
));

$view->main();

$rendered = $view->getView()->render();
$rendered = $view->render();
if ($fetch) {
return $rendered;
}
Expand Down Expand Up @@ -597,7 +585,7 @@ public static function setPeriodVariablesView($view)
protected function setMetricsVariablesView(ViewDataTable $view, $defaultMetricDay = 'nb_uniq_visitors',
$defaultMetric = 'nb_visits', $metricsForDay = array('nb_uniq_visitors'),
$metricsForAllPeriods = array('nb_visits', 'nb_actions'), $labelDisplayed = true)
{
{// TODO: needed?
// columns is set in the request if metrics picker has been used
$columns = Common::getRequestVar('columns', false);
if ($columns !== false) {
Expand All @@ -612,7 +600,7 @@ protected function setMetricsVariablesView(ViewDataTable $view, $defaultMetricDa
if ($labelDisplayed) {
array_unshift($columns, 'label');
}
$view->setColumnsToDisplay($columns);
$view->columns_to_display = $columns;
}

/**
Expand Down
Loading

0 comments on commit 0f61caa

Please sign in to comment.