diff options
author | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2009-12-09 02:12:17 +0300 |
---|---|---|
committer | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2009-12-09 02:12:17 +0300 |
commit | 066840e942c56a68b29a01accb36416caab9c306 (patch) | |
tree | 82eb9c80236cc216a1fdebf777170571ea022157 /plugins | |
parent | 4b6e2990d01ddacdb68bb4f9da72d6bc3985d371 (diff) |
Disabling clearspring export functionnality as it was not working for some reasons (refs #861)
Disabling the Embed flash functionnality temporarily, probably a regression of the charts loading their data directly.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Widgetize/templates/widgetize.js | 76 |
1 files changed, 40 insertions, 36 deletions
diff --git a/plugins/Widgetize/templates/widgetize.js b/plugins/Widgetize/templates/widgetize.js index e509a63cdd..46382eacbe 100644 --- a/plugins/Widgetize/templates/widgetize.js +++ b/plugins/Widgetize/templates/widgetize.js @@ -68,34 +68,47 @@ function widgetize() ); // Add the Flash Export if a flash <embed> is found in the widget - $(loadedWidgetElement) - .find('embed,object') - .each(function() { - var htmlEmbed = $(this).parent().html(); - - htmlEmbed = htmlEmbed.replace(/ (data=")/, ' $1' + unescape(piwik.piwik_url)); - htmlEmbed = htmlEmbed.replace(/ (value=")x-(data-file=)/, ' $1$2' + piwik.piwik_url + 'index.php'); - - $(exportButtonsElement).append( - '<div id="embedThisWidgetFlash">'+ - '<label for="embedThisWidgetFlashInput">› Embed Flash</label>'+ - '<span id="embedThisWidgetFlashInput">'+ - self.getInputFormWithHtml('flashEmbed', htmlEmbed) + - '</span>'+ - '</div>' - ); - }); + // 0.5: removing temporarily this feature as it seems not working + if(false) { + $(loadedWidgetElement) + .find('embed,object') + .each(function() { + var htmlEmbed = $(this).parent().html(); + + htmlEmbed = htmlEmbed.replace(/ (data=")/, ' $1' + unescape(piwik.piwik_url)); + htmlEmbed = htmlEmbed.replace(/ (value=")x-(data-file=)/, ' $1$2' + piwik.piwik_url + 'index.php'); + + $(exportButtonsElement).append( + '<div id="embedThisWidgetFlash">'+ + '<label for="embedThisWidgetFlashInput">› Embed Flash</label>'+ + '<span id="embedThisWidgetFlashInput">'+ + self.getInputFormWithHtml('flashEmbed', htmlEmbed) + + '</span>'+ + '</div>' + ); + }); + } - // Add the Clearspring Export - $(exportButtonsElement).append( - '<div id="embedThisWidgetEverywhere">'+ - '<div id="exportThisWidget">'+ - '<label for="flashEmbed">› Export anywhere!</label>'+ - '<img src="http://cdn.clearspring.com/launchpad/static/cs_button_share1.gif">'+ - '</div>'+ - '<div id="exportThisWidgetMenu"></div>'+ - '</div>' - ); + // 0.5: Removing launchpad feature as it doesn't seem to work well despite us contacting Clearspring + if(false) { + $(exportButtonsElement).append( + '<div id="embedThisWidgetEverywhere">'+ + '<div id="exportThisWidget">'+ + '<label for="flashEmbed">› Export anywhere!</label>'+ + '<img src="http://cdn.clearspring.com/launchpad/static/cs_button_share1.gif">'+ + '</div>'+ + '<div id="exportThisWidgetMenu"></div>'+ + '</div>' + ); + // Call clearspring + $Launchpad.ShowButton({ + actionElement : "exportThisWidget", + targetElement : "exportThisWidgetMenu", + userId : "4797da88692e4fe9", + widgetName : widgetName + " - Piwik", + source : "iframeDivToExport" + }); + } // We then replace the div iframeDivToExport with the actual Iframe html // Clearspring will then build a widget that has the same html as this div @@ -107,15 +120,6 @@ function widgetize() .parent() .append(exportButtonsElement); - // Call clearspring - $Launchpad.ShowButton({ - actionElement : "exportThisWidget", - targetElement : "exportThisWidgetMenu", - userId : "4797da88692e4fe9", - widgetName : widgetName + " - Piwik", - source : "iframeDivToExport" - }); - // JS is buggy at least on IE //var widgetJS = '<script type="text/javascript" src="'+ getEmbedUrl(pluginId, actionId, "js") +'"></scr'+'ipt>'; //divEmbedThisWidget.append('<br/>Embed JS: '+ getInputFormWithHtml('javascriptEmbed', widgetJS)); |