diff options
author | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2008-11-21 21:10:02 +0300 |
---|---|---|
committer | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2008-11-21 21:10:02 +0300 |
commit | 9b86be897b8ba44278debf7e93e4f133541414e2 (patch) | |
tree | f7c60a9a0159325d64aa3bfaf4c5d4fb58a6418d /core | |
parent | 9abd41fedc8c615e927bf1a055e58b27869fc35e (diff) |
- not showing the icon "more data" for some reports
- excluding *.db from svn
- still needs work (refactoring the viewdatatable show VS enabled notion + i18n of icon etc.)
Diffstat (limited to 'core')
-rw-r--r-- | core/API/ResponseBuilder.php | 4 | ||||
-rw-r--r-- | core/ViewDataTable.php | 39 | ||||
-rw-r--r-- | core/ViewDataTable/Html.php | 17 |
3 files changed, 35 insertions, 25 deletions
diff --git a/core/API/ResponseBuilder.php b/core/API/ResponseBuilder.php index d60f141c85..cb2d0edebe 100644 --- a/core/API/ResponseBuilder.php +++ b/core/API/ResponseBuilder.php @@ -167,9 +167,7 @@ class Piwik_API_ResponseBuilder 'filter_offset' => array('integer', '0'), 'filter_limit' => array('integer', Zend_Registry::get('config')->General->dataTable_default_limit), ), - 'SafeDecodeLabel' => array( - 'filter_safe_decode_label' => array('integer') - ), + 'SafeDecodeLabel' => array(), ); return $genericFilters; diff --git a/core/ViewDataTable.php b/core/ViewDataTable.php index e19a2056ed..7943078d07 100644 --- a/core/ViewDataTable.php +++ b/core/ViewDataTable.php @@ -84,6 +84,14 @@ abstract class Piwik_ViewDataTable */ protected $JSexcludeLowPopulation = true; + + /** + * Defines if we show the "Show all columns" icon under the table + * + * @var bool + */ + protected $JSshowAllColumns = true; + /** * Defines if we include the footer after the dataTable output. * The footer contains all the extra features like the search box, the links Next/Previous, the icons to export in several formats, etc. @@ -287,7 +295,6 @@ abstract class Piwik_ViewDataTable $this->showFooter = Piwik_Common::getRequestVar('showDataTableFooter', true); $this->variablesDefault['filter_excludelowpop_default'] = 'false'; $this->variablesDefault['filter_excludelowpop_value_default'] = 'false'; - $this->setSafeDecodeLabel(); } /** @@ -385,7 +392,6 @@ abstract class Piwik_ViewDataTable 'filter_exact_column', 'disable_generic_filters', 'disable_queued_filters', - 'filter_safe_decode_label', 'filter_add_columns_when_show_all_columns', ); foreach($toSetEventually as $varToSet) @@ -542,7 +548,8 @@ abstract class Piwik_ViewDataTable $javascriptVariablesToSet['show_search'] = $this->getSearchBox(); $javascriptVariablesToSet['show_offset_information'] = $this->getOffsetInformation(); $javascriptVariablesToSet['show_exclude_low_population'] = $this->getExcludeLowPopulation(); - $javascriptVariablesToSet['showAllColumns'] = $this->getShowAllColumns(); + $javascriptVariablesToSet['showingAllColumns'] = $this->getShowingAllColumns(); + $javascriptVariablesToSet['show_show_all_columns'] = $this->getShowAllColumns(); // we escape the values that will be displayed in the javascript footer of each datatable // to make sure there is malicious code injected (the value are already htmlspecialchar'ed as they @@ -680,6 +687,22 @@ abstract class Piwik_ViewDataTable } /** + * Whether or not to show the "View more data" icon + * + * @return void + */ + public function disableShowAllColumns() + { + $this->JSshowAllColumns = false; + } + + public function getShowAllColumns() + { + return $this->JSshowAllColumns; + } + + + /** * @see disableExcludeLowPopulation() * * @return bool|string If this parameter is enabled or not @@ -779,16 +802,6 @@ abstract class Piwik_ViewDataTable } /** - * The 'label' column in the datatable will be safely url decoded. - * - * @return void - */ - public function setSafeDecodeLabel() - { - $this->variablesDefault['filter_safe_decode_label'] = '1'; - } - - /** * Sets a custom parameter, that will be printed in the javascript array associated with each datatable * * @param string parameter name diff --git a/core/ViewDataTable/Html.php b/core/ViewDataTable/Html.php index 8aec913d6b..6aa28bdb9f 100644 --- a/core/ViewDataTable/Html.php +++ b/core/ViewDataTable/Html.php @@ -56,10 +56,10 @@ class Piwik_ViewDataTable_Html extends Piwik_ViewDataTable $this->dataTableTemplate = 'CoreHome/templates/datatable.tpl'; $this->variablesDefault['enable_sort'] = '1'; - $this->variablesDefault['showAllColumns'] = '0'; - if(Piwik_Common::getRequestVar('showAllColumns', '0', 'string') == '1') + $this->variablesDefault['showingAllColumns'] = '0'; + if(Piwik_Common::getRequestVar('showingAllColumns', '0', 'string') == '1') { - $this->setShowAllColumns(); + $this->setShowingAllColumns(); } // load general columns translations @@ -82,7 +82,7 @@ class Piwik_ViewDataTable_Html extends Piwik_ViewDataTable $this->loadDataTableFromAPI(); - if($this->getShowAllColumns()) + if($this->getShowingAllColumns()) { $this->setColumnsToDisplay(array('label', 'nb_visits', @@ -121,7 +121,6 @@ class Piwik_ViewDataTable_Html extends Piwik_ViewDataTable { $nbColumns = count($this->columnsToDisplay); } - $view->nbColumns = $nbColumns; $view->id = $this->getUniqIdTable(); @@ -255,15 +254,15 @@ class Piwik_ViewDataTable_Html extends Piwik_ViewDataTable return $this->setRecursiveLoadDataTableIfSearchingForPattern(); } - protected function setShowAllColumns() + protected function setShowingAllColumns() { $this->variablesDefault['filter_add_columns_when_show_all_columns'] = '1'; - $this->variablesDefault['showAllColumns'] = '1'; + $this->variablesDefault['showingAllColumns'] = '1'; } - protected function getShowAllColumns() + protected function getShowingAllColumns() { - return $this->variablesDefault['showAllColumns']; + return $this->variablesDefault['showingAllColumns']; } /** |