diff options
author | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-08-05 03:05:21 +0400 |
---|---|---|
committer | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-08-05 03:05:21 +0400 |
commit | 9b5a42a62395607556893085701a8d385c464697 (patch) | |
tree | 7fe62a829f265c889bea48ae5124b879b6b43fd9 /plugins | |
parent | 2615404eab2e96048583caccf86248af2dd90d9b (diff) |
Refs #4040, #4041, change the way jqplot.js checks for viewdatatble types, changed relatedReports view property name to related_reports and fixed spelling of row_picker_mach_rows_by.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Actions/Actions.php | 12 | ||||
-rw-r--r-- | plugins/CoreHome/javascripts/jqplot.js | 22 | ||||
-rw-r--r-- | plugins/CoreHome/templates/_dataTableFooter.twig | 10 | ||||
-rw-r--r-- | plugins/DBStats/DBStats.php | 8 | ||||
-rw-r--r-- | plugins/DevicesDetection/DevicesDetection.php | 10 | ||||
-rw-r--r-- | plugins/Referers/Controller.php | 2 | ||||
-rw-r--r-- | plugins/UserSettings/UserSettings.php | 12 | ||||
-rw-r--r-- | plugins/VisitTime/VisitTime.php | 2 |
8 files changed, 37 insertions, 41 deletions
diff --git a/plugins/Actions/Actions.php b/plugins/Actions/Actions.php index 1edb4dfd31..fb5d7a677e 100644 --- a/plugins/Actions/Actions.php +++ b/plugins/Actions/Actions.php @@ -782,7 +782,7 @@ class Piwik_Actions extends Plugin 'filter_sort_column' => 'entry_nb_visits', 'filter_sort_order' => 'desc', 'title' => Piwik_Translate('Actions_SubmenuPagesEntry'), - 'relatedReports' => array( + 'related_reports' => array( 'Actions.getEntryPageTitles' => Piwik_Translate('Actions_EntryPageTitles') ), 'self_url' => $reportUrl @@ -810,7 +810,7 @@ class Piwik_Actions extends Plugin 'filter_sort_column' => 'exit_nb_visits', 'filter_sort_order' => 'desc', 'title' => Piwik_Translate('Actions_SubmenuPagesExit'), - 'relatedReports' => array( + 'related_reports' => array( 'Actions.getExitPageTitles' => Piwik_Translate('Actions_ExitPageTitles') ), 'self_url' => $reportUrl, @@ -897,7 +897,7 @@ class Piwik_Actions extends Plugin 'filter_sort_order' => 'desc', 'show_exclude_low_population' => false, 'title' => $title, - 'relatedReports' => $relatedReports + 'related_reports' => $relatedReports ); $this->addExcludeLowPopDisplayProperties($result); @@ -920,7 +920,7 @@ class Piwik_Actions extends Plugin 'columns_to_display' => array('label', 'nb_hits', 'nb_visits', 'bounce_rate', 'avg_time_on_page', 'exit_rate', 'avg_time_generation'), 'title' => Piwik_Translate('Actions_SubmenuPageTitles'), - 'relatedReports' => array( + 'related_reports' => array( 'Actions.getEntryPageTitles' => Piwik_Translate('Actions_EntryPageTitles'), 'Actions.getExitPageTitles' => Piwik_Translate('Actions_ExitPageTitles'), ), @@ -946,7 +946,7 @@ class Piwik_Actions extends Plugin ), 'columns_to_display' => array('label', 'entry_nb_visits', 'entry_bounce_count', 'bounce_rate'), 'title' => Piwik_Translate('Actions_EntryPageTitles'), - 'relatedReports' => array( + 'related_reports' => array( 'Actions.getPageTitles' => Piwik_Translate('Actions_SubmenuPageTitles'), "Actions.$entryPageUrlAction" => Piwik_Translate('Actions_SubmenuPagesEntry') ), @@ -970,7 +970,7 @@ class Piwik_Actions extends Plugin ), 'columns_to_display' => array('label', 'exit_nb_visits', 'nb_visits', 'exit_rate'), 'title' => Piwik_Translate('Actions_ExitPageTitles'), - 'relatedReports' => array( + 'related_reports' => array( 'Actions.getPageTitles' => Piwik_Translate('Actions_SubmenuPageTitles'), "Actions.$exitPageUrlAction" => Piwik_Translate('Actions_SubmenuPagesExit'), ), diff --git a/plugins/CoreHome/javascripts/jqplot.js b/plugins/CoreHome/javascripts/jqplot.js index 0911573449..fe013254c4 100644 --- a/plugins/CoreHome/javascripts/jqplot.js +++ b/plugins/CoreHome/javascripts/jqplot.js @@ -68,21 +68,17 @@ JQPlot.prototype = { /** Generic render function */ render: function (targetDivId, lang) { - var type = $('#' + targetDivId).closest('div.dataTable').data('dataTableInstance').param['viewDataTable']; + var dataTableDiv = $('#' + targetDivId).closest('div.dataTable'); // preapare the appropriate chart type - switch (type) {// TODO: should rely on CSS, not viewDataTable. otherwise ecommerceOrder row evolution will fail - case 'graphEvolution': - this.prepareEvolutionChart(targetDivId, lang); - break; - case 'graphVerticalBar': - this.prepareBarChart(targetDivId, lang); - break; - case 'graphPie': - this.preparePieChart(targetDivId, lang); - break; - default: - return; + if (dataTableDiv.hasClass('dataTableVizEvolution')) { + this.prepareEvolutionChart(targetDivId, lang); + } else if (dataTableDiv.hasClass('dataTableVizBar')) { + this.prepareBarChart(targetDivId, lang); + } else if (dataTableDiv.hasClass('dataTableVizPie')) { + this.preparePieChart(targetDivId, lang); + } else { + return; } // handle replot diff --git a/plugins/CoreHome/templates/_dataTableFooter.twig b/plugins/CoreHome/templates/_dataTableFooter.twig index e5ec62e45c..10100b9bcc 100644 --- a/plugins/CoreHome/templates/_dataTableFooter.twig +++ b/plugins/CoreHome/templates/_dataTableFooter.twig @@ -128,7 +128,7 @@ {% endif %} </ul> </div> - {% if isPluginLoaded('Annotations') and not properties.datatable_visualizations.hide_annotations_view|default(true) %} + {% if isPluginLoaded('Annotations') and not properties.hide_annotations_view %} <div class="annotationView" title="{{ 'Annotations_IconDesc_js'|translate }}"> <a class="tableIcon"> <img width="16" height="16" src="plugins/Zeitgeist/images/grey_marker.png"/> @@ -140,16 +140,16 @@ {% endif %} <div class="datatableRelatedReports"> - {% if (properties.relatedReports is not empty) and properties.show_related_reports %} - {% if properties.relatedReports|length == 1 %} + {% if (properties.related_reports is not empty) and properties.show_related_reports %} + {% if properties.related_reports|length == 1 %} {{ 'General_RelatedReport'|translate }}: {% else %} {{ 'General_RelatedReports'|translate }}: {% endif %} - <ul style="list-style:none;{% if properties.relatedReports|length == 1 %}display:inline-block;{% endif %}}"> + <ul style="list-style:none;{% if properties.related_reports|length == 1 %}display:inline-block;{% endif %}}"> <li><span href="{{ properties.self_url }}" style="display:none;">{{ properties.title }}</span></li> - {% for reportUrl,reportTitle in properties.relatedReports %} + {% for reportUrl,reportTitle in properties.related_reports %} <li><span href="{{ reportUrl }}">{{ reportTitle }}</span></li> {% endfor %} </ul> diff --git a/plugins/DBStats/DBStats.php b/plugins/DBStats/DBStats.php index 8cbbeaa961..593f2a9b64 100644 --- a/plugins/DBStats/DBStats.php +++ b/plugins/DBStats/DBStats.php @@ -146,7 +146,7 @@ class Piwik_DBStats extends Plugin $this->addPresentationFilters($result); $result['title'] = Piwik_Translate('DBStats_MetricTables'); - $result['relatedReports'] = array( + $result['related_reports'] = array( 'DBStats.getMetricDataSummaryByYear' => Piwik_Translate('DBStats_MetricDataByYear') ); @@ -161,7 +161,7 @@ class Piwik_DBStats extends Plugin $result['translations']['label'] = Piwik_Translate('CoreHome_PeriodYear'); $result['title'] = Piwik_Translate('DBStats_MetricDataByYear'); - $result['relatedReports'] = array( + $result['related_reports'] = array( 'DBStats.getMetricDataSummary' => Piwik_Translate('DBStats_MetricTables') ); @@ -175,7 +175,7 @@ class Piwik_DBStats extends Plugin $this->addPresentationFilters($result); $result['title'] = Piwik_Translate('DBStats_ReportTables'); - $result['relatedReports'] = array( + $result['related_reports'] = array( 'DBStats.getReportDataSummaryByYear' => Piwik_Translate('DBStats_ReportDataByYear') ); @@ -190,7 +190,7 @@ class Piwik_DBStats extends Plugin $result['translations']['label'] = Piwik_Translate('CoreHome_PeriodYear'); $result['title'] = Piwik_Translate('DBStats_ReportDataByYear'); - $result['relatedReports'] = array( + $result['related_reports'] = array( 'DBStats.getReportDataSummary' => Piwik_Translate('DBStats_ReportTables') ); diff --git a/plugins/DevicesDetection/DevicesDetection.php b/plugins/DevicesDetection/DevicesDetection.php index 8adc51141c..35fb148866 100644 --- a/plugins/DevicesDetection/DevicesDetection.php +++ b/plugins/DevicesDetection/DevicesDetection.php @@ -318,7 +318,7 @@ class Piwik_DevicesDetection extends Plugin 'show_exclude_low_population' => false, 'translations' => array('label' => Piwik_Translate("DevicesDetection_dataTableLabelSystemFamily")), 'title' => Piwik_Translate('DeviceDetection_OperatingSystemFamilies'), - 'relatedReports' => $this->getOsRelatedReports() + 'related_reports' => $this->getOsRelatedReports() ); } @@ -329,7 +329,7 @@ class Piwik_DevicesDetection extends Plugin 'show_exclude_low_population' => false, 'translations' => array('label' => Piwik_Translate("DevicesDetection_dataTableLabelSystemVersion")), 'title' => Piwik_Translate('DeviceDetection_OperatingSystemVersions'), - 'relatedReports' => $this->getOsRelatedReports() + 'related_reports' => $this->getOsRelatedReports() ); } @@ -340,7 +340,7 @@ class Piwik_DevicesDetection extends Plugin 'show_exclude_low_population' => false, 'translations' => array('label' => Piwik_Translate("DevicesDetection_dataTableLabelBrowserFamily")), 'title' => Piwik_Translate('DevicesDetection_BrowsersFamily'), - 'relatedReports' => $this->getBrowserRelatedReports() + 'related_reports' => $this->getBrowserRelatedReports() ); } @@ -350,7 +350,7 @@ class Piwik_DevicesDetection extends Plugin 'show_search' => false, 'show_exclude_low_population' => false, 'translations' => array('label' => Piwik_Translate("DevicesDetection_dataTableLabelBrowserVersion")), - 'relatedReports' => $this->getBrowserRelatedReports() + 'related_reports' => $this->getBrowserRelatedReports() ); } @@ -369,4 +369,4 @@ class Piwik_DevicesDetection extends Plugin 'DevicesDetection.getBrowserVersions' => Piwik_Translate('DevicesDetection_BrowserVersions') ); } -} +}
\ No newline at end of file diff --git a/plugins/Referers/Controller.php b/plugins/Referers/Controller.php index 4375b46891..1e31b6dd41 100644 --- a/plugins/Referers/Controller.php +++ b/plugins/Referers/Controller.php @@ -299,7 +299,7 @@ class Piwik_Referers_Controller extends Controller $visibleRows = array($label, $total); $view->request_parameters_to_modify['rows'] = $label . ',' . $total; } - $view->row_picker_mach_rows_by = 'label'; + $view->row_picker_match_rows_by = 'label'; $view->row_picker_visible_rows = $visibleRows; $view->documentation = Piwik_Translate('Referers_EvolutionDocumentation') . '<br />' diff --git a/plugins/UserSettings/UserSettings.php b/plugins/UserSettings/UserSettings.php index 4cfb959b01..dfed450ca0 100644 --- a/plugins/UserSettings/UserSettings.php +++ b/plugins/UserSettings/UserSettings.php @@ -208,7 +208,7 @@ class Piwik_UserSettings extends Plugin return array_merge($this->getBasicUserSettingsDisplayProperties(), array( 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnOperatingSystem')), 'title' => Piwik_Translate('UserSettings_OperatingSystems'), - 'relatedReports' => $this->getOsRelatedReports() + 'related_reports' => $this->getOsRelatedReports() )); } @@ -217,7 +217,7 @@ class Piwik_UserSettings extends Plugin return array_merge($this->getBasicUserSettingsDisplayProperties(), array( 'translations' => array('label' => Piwik_Translate('UserSettings_OperatingSystemFamily')), 'title' => Piwik_Translate('UserSettings_OperatingSystemFamily'), - 'relatedReports' => $this->getOsRelatedReports() + 'related_reports' => $this->getOsRelatedReports() )); } @@ -226,7 +226,7 @@ class Piwik_UserSettings extends Plugin $result = array_merge($this->getBasicUserSettingsDisplayProperties(), array( 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnBrowserVersion')), 'title' => Piwik_Translate('UserSettings_ColumnBrowserVersion'), - 'relatedReports' => $this->getBrowserRelatedReports() + 'related_reports' => $this->getBrowserRelatedReports() )); $result['visualization_properties']['JqplotGraph']['max_graph_elements'] = 7; return $result; @@ -237,7 +237,7 @@ class Piwik_UserSettings extends Plugin $result = array_merge($this->getBasicUserSettingsDisplayProperties(), array( 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnBrowser')), 'title' => Piwik_Translate('UserSettings_Browsers'), - 'relatedReports' => $this->getBrowserRelatedReports() + 'related_reports' => $this->getBrowserRelatedReports() )); $result['visualization_properties']['JqplotGraph']['max_graph_elements'] = 7; return $result; @@ -260,7 +260,7 @@ class Piwik_UserSettings extends Plugin 'show_offset_information' => false, 'show_pagination_control' => false, 'title' => Piwik_Translate('UserSettings_ColumnTypeOfScreen'), - 'relatedReports' => $this->getWideScreenDeviceTypeRelatedReports() + 'related_reports' => $this->getWideScreenDeviceTypeRelatedReports() )); } @@ -269,7 +269,7 @@ class Piwik_UserSettings extends Plugin return array_merge($this->getBasicUserSettingsDisplayProperties(), array( 'translations' => array('label' => Piwik_Translate('UserSettings_MobileVsDesktop')), 'title' => Piwik_Translate('UserSettings_MobileVsDesktop'), - 'relatedReports' => $this->getWideScreenDeviceTypeRelatedReports() + 'related_reports' => $this->getWideScreenDeviceTypeRelatedReports() )); } diff --git a/plugins/VisitTime/VisitTime.php b/plugins/VisitTime/VisitTime.php index 4fee297eba..3273daf3ea 100644 --- a/plugins/VisitTime/VisitTime.php +++ b/plugins/VisitTime/VisitTime.php @@ -168,7 +168,7 @@ class Piwik_VisitTime extends Plugin // add the visits by day of week as a related report, if the current period is not 'day' if (Common::getRequestVar('period', 'day') != 'day') { - $properties['VisitTime.getVisitInformationPerLocalTime']['relatedReports'] = array( + $properties['VisitTime.getVisitInformationPerLocalTime']['related_reports'] = array( 'VisitTime.getByDayOfWeek' => Piwik_Translate('VisitTime_VisitsByDayOfWeek') ); } |