Opened 3 years ago

Closed 3 years ago

#1841 closed Task (fixed)

Proxy: deprecate exportImage and outputImage

Reported by: vipsoft Owned by: vipsoft
Priority: normal Milestone: 1.5.1 Piwik 1.5.1
Component: Core Keywords:
Cc: Sensitive: no


common.js uses the data: uri in the browser, but this is not supported by IE7 (and earlier).

  • common.js: add a browser-side test for data: uri support in piwikHelper.OFC.jquery.popup(), and if not-supported, use ajax to POST the base64 image data over to Proxy's exportImage, e.g.,
    var data = new Image();
    data.onload = data.onerror = function(){
    	if(this.width != 1 || this.height != 1)
    		... // data: uri not supported
    		... // data: uri is supported
    data.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
  • common.js: at the same time, perhaps, remove the unused piwikHelper.OFC.jquery.rasterize() method, and inline piwikHelper.OFC.jquery.image() into piwikHelper.OFC.jquery.popup()
  • Proxy/Controller.php: enhance exportImage to use MHTML format for IE7 (and earlier)

Change History (2)

comment:1 Changed 3 years ago by vipsoft (robocoder)

(In [4987]) refs #1841 - exportImage and outputImage are now deprecated (since OFC has been replaced); will be removed if/when PiwikMap.swf switches to non-Flash

comment:2 Changed 3 years ago by vipsoft (robocoder)

  • Milestone changed from Feature requests to 1.6 Piwik 1.6
  • Resolution set to fixed
  • Status changed from new to closed
  • Summary changed from Proxy: Export as image and "data:" uris to Proxy: deprecate exportImage and outputImage
  • Type changed from New feature to Task
Note: See TracTickets for help on using tickets.