Opened 21 months ago

Closed 7 months ago

Last modified 6 months ago

#3317 closed Bug (fixed)

Plugins API: let plugins customize datatable footer icons

Reported by: chmielot Owned by: Benaka Moorthi
Priority: major Milestone: 2.x - The Great Piwik 2.x Backlog
Component: Core Keywords:
Cc: Sensitive: no

Description

Use case:

Using Widgetize-Plugin to display certain widgets on a website:

<div id="widgetIframe">
<iframe width="100%" 
    height="350" 
    src="http://host/piwik/index.php?module=Widgetize&action=iframe&columns[]=nb_visits,nb_pageviews&moduleToWidgetize=VisitsSummary&actionToWidgetize=getEvolutionGraph&idSite=1&period=month&date=today&disableLink=1&widget=1&show_export_as_image_icon=0" 
    scrolling="no" 
    frameborder="0" 
    marginheight="0" 
    marginwidth="0" 
    id="visitssum"></iframe>
</div>

The show_export_as_image_icon setting has no effect, because the value (first set in parent class from request parameters) is overwritten in core/ViewDataTable/GenerateGraphHTML.php

I don't see why this shouldn't be allowed here. The patch fixes this problem.

Attachments (1)

3317-show_export_as_image_icon.diff (679 bytes) - added by chmielot 21 months ago.

Download all attachments as: .zip

Change History (11)

Changed 21 months ago by chmielot

comment:1 Changed 21 months ago by chmielot

Please review

comment:2 Changed 21 months ago by vipsoft (robocoder)

  • Milestone set to 1.8.3 - Piwik 1.8.3

comment:3 Changed 18 months ago by matt (mattab)

So, do you want to be able to hide the "Export as image button" ? is it what you are requesting? we could add a new parameter "showExportAsImage".

See similar #3316

comment:4 Changed 18 months ago by chmielot

matt, this patch just fixes available functionality. Could be of course, that the existing show_export_as_image_icon parameter is deprecated. #3316 adds completely new functionality. Please also see #3327, which is similar.

Last edited 18 months ago by chmielot (previous) (diff)

comment:5 Changed 13 months ago by matt (mattab)

  • Milestone changed from 1.12 - The Great 1.x Backlog to 2.0 - Piwik 2.0
  • Summary changed from show_export_as_image_icon setting without effect in widgets to Plugins API: customize datatable footer icons

Generalizing the task so we can check that all features/icons of the datatable are customized by plugins reusing the Piwik framework.

comment:6 Changed 8 months ago by matt (mattab)

  • Milestone changed from 2.0 - Piwik 2.0 to 2.x - Piwik 2.x

comment:7 Changed 7 months ago by capedfuzz (diosmosis)

In 83261e010ae9f5d2f9d39a7589eecd0b40b1b2bf:

Refs #4041, #3317, #4077, allow different visualizations to specify their own loading logic (when the appropriate footer icon is clicked) and fix a couple UI bugs in treemap.

comment:8 Changed 7 months ago by capedfuzz (diosmosis)

In c0768bf32a5bdccb8b50ac67c922e8c57b678dc9:

Refs #4041, #3317, allow visualization ID to be whole class name, allow footer icons to be customized per report/visualization, made visitor log a new visualization and removed the datatable_template display property.

comment:9 Changed 7 months ago by capedfuzz (diosmosis)

  • Owner set to Benaka Moorthi
  • Resolution set to fixed
  • Status changed from new to closed

In 604210375d71655e59767aab4f66e5645b3c7f8e:

Fixes #3317, allow plugins/themes to specify their own ViewDataTable footer icons or modify existing ones.

comment:10 Changed 6 months ago by matt (mattab)

  • Priority changed from normal to major
  • Summary changed from Plugins API: customize datatable footer icons to Plugins API: let plugins customize datatable footer icons
Note: See TracTickets for help on using tickets.