Skip to content
Extraits de code Groupes Projets
Valider 7504af88 rédigé par BeezyT's avatar BeezyT
Parcourir les fichiers

refs #2431 LEGALNOTICE, Export as Image translated, removed some unneeded JS

git-svn-id: http://dev.piwik.org/svn/trunk@4734 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent cb1cc52c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -87,6 +87,10 @@ THIRD-PARTY COMPONENTS AND LIBRARIES ...@@ -87,6 +87,10 @@ THIRD-PARTY COMPONENTS AND LIBRARIES
The following components/libraries are redistributed in this package, The following components/libraries are redistributed in this package,
and subject to their respective licenses. and subject to their respective licenses.
Name: jqPlot
Link: http://www.jqplot.com/
License: Dual-licensed: MIT or GPL v2
Name: CSS3PIE Name: CSS3PIE
Link: http://github.com/lojjic/PIE Link: http://github.com/lojjic/PIE
License: Dual-licensed: Apache v2 or GPL v2 License: Dual-licensed: Apache v2 or GPL v2
......
...@@ -80,7 +80,6 @@ class Piwik_CoreHome extends Piwik_Plugin ...@@ -80,7 +80,6 @@ class Piwik_CoreHome extends Piwik_Plugin
$jsFiles[] = "plugins/CoreHome/templates/jqplot.js"; $jsFiles[] = "plugins/CoreHome/templates/jqplot.js";
$jsFiles[] = $jqplot."excanvas.js"; $jsFiles[] = $jqplot."excanvas.js";
$jsFiles[] = $jqplot."jqplot.core.js"; $jsFiles[] = $jqplot."jqplot.core.js";
$jsFiles[] = $jqplot."jqplot.linearTickGenerator.js";
$jsFiles[] = $jqplot."jqplot.linearAxisRenderer.js"; $jsFiles[] = $jqplot."jqplot.linearAxisRenderer.js";
$jsFiles[] = $jqplot."jqplot.axisTickRenderer.js"; $jsFiles[] = $jqplot."jqplot.axisTickRenderer.js";
$jsFiles[] = $jqplot."jqplot.axisLabelRenderer.js"; $jsFiles[] = $jqplot."jqplot.axisLabelRenderer.js";
...@@ -92,7 +91,6 @@ class Piwik_CoreHome extends Piwik_Plugin ...@@ -92,7 +91,6 @@ class Piwik_CoreHome extends Piwik_Plugin
$jsFiles[] = $jqplot."jqplot.shadowRenderer.js"; $jsFiles[] = $jqplot."jqplot.shadowRenderer.js";
$jsFiles[] = $jqplot."jqplot.shapeRenderer.js"; $jsFiles[] = $jqplot."jqplot.shapeRenderer.js";
$jsFiles[] = $jqplot."jqplot.sprintf.js"; $jsFiles[] = $jqplot."jqplot.sprintf.js";
$jsFiles[] = $jqplot."jsdate.js";
$jsFiles[] = $jqplot."jqplot.themeEngine.js"; $jsFiles[] = $jqplot."jqplot.themeEngine.js";
$jsFiles[] = $jqplot."plugins/jqplot.pieRenderer.js"; $jsFiles[] = $jqplot."plugins/jqplot.pieRenderer.js";
$jsFiles[] = $jqplot."plugins/jqplot.barRenderer.js"; $jsFiles[] = $jqplot."plugins/jqplot.barRenderer.js";
......
...@@ -14,7 +14,11 @@ ...@@ -14,7 +14,11 @@
<script type="text/javascript"> <script type="text/javascript">
{literal} window.setTimeout(function() { {/literal} {literal} window.setTimeout(function() { {/literal}
(new JQPlot({$flashParameters.data})).render('{$jqPlotType}', '{$chartDivId}', false, '{'General_NoDataForGraph'|translate}'); (new JQPlot({$flashParameters.data})).render('{$jqPlotType}', '{$chartDivId}', false, {literal} { {/literal}
noData: '{'General_NoDataForGraph'|translate}',
exportTitle: '{'General_ExportAsImage_js'|translate}',
exportText: '{'General_SaveImageOnYourComputer_js'|translate}'
{literal} }); {/literal}
{literal} }, 5); {/literal} {literal} }, 5); {/literal}
</script> </script>
......
...@@ -55,7 +55,7 @@ JQPlot.prototype = { ...@@ -55,7 +55,7 @@ JQPlot.prototype = {
}, },
/** Generic render function */ /** Generic render function */
render: function(type, targetDivId, replotting, noDataString) { render: function(type, targetDivId, replotting, lang) {
// preapare the appropriate chart type // preapare the appropriate chart type
switch (type) { switch (type) {
case 'graphEvolution': case 'graphEvolution':
...@@ -75,7 +75,7 @@ JQPlot.prototype = { ...@@ -75,7 +75,7 @@ JQPlot.prototype = {
// TODO: this should already be noticed by php and the chart should // TODO: this should already be noticed by php and the chart should
// not even be generated // not even be generated
if (this.data.length == 0) { if (this.data.length == 0) {
$('#' + targetDivId).addClass('pk-emptyGraph').css('height', 'auto').html(noDataString); $('#' + targetDivId).addClass('pk-emptyGraph').css('height', 'auto').html(lang.noData);
return; return;
} }
...@@ -106,7 +106,7 @@ JQPlot.prototype = { ...@@ -106,7 +106,7 @@ JQPlot.prototype = {
plot.replot(); plot.replot();
}) })
.bind('piwikExportAsImage', function(e) { .bind('piwikExportAsImage', function(e) {
self.exportAsImage(target); self.exportAsImage(target, lang);
}); });
var plotWidth = target.innerWidth(); var plotWidth = target.innerWidth();
...@@ -122,7 +122,7 @@ JQPlot.prototype = { ...@@ -122,7 +122,7 @@ JQPlot.prototype = {
}, },
/** Export the chart as an image */ /** Export the chart as an image */
exportAsImage: function(container) { exportAsImage: function(container, lang) {
var exportCanvas = document.createElement('canvas'); var exportCanvas = document.createElement('canvas');
exportCanvas.width = container.width(); exportCanvas.width = container.width();
exportCanvas.height = container.height(); exportCanvas.height = container.height();
...@@ -154,9 +154,10 @@ JQPlot.prototype = { ...@@ -154,9 +154,10 @@ JQPlot.prototype = {
}); });
$(document.createElement('div')) $(document.createElement('div'))
.append('Right click, save image as (translate!)<br />').append($(img)) .append('<div style="font-size: 13px; margin-bottom: 3px;">'
+ lang.exportText + '</div>').append($(img))
.dialog({ .dialog({
title: 'Export (translate!)', title: lang.exportTitle,
modal: true, modal: true,
width: 'auto', width: 'auto',
position: ['center', 'center'], position: ['center', 'center'],
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter