Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhura Jayaratne <madhura.cj@gmail.com>2015-07-06 13:28:19 +0300
committerMadhura Jayaratne <madhura.cj@gmail.com>2015-07-06 13:28:19 +0300
commit989199ee47dfa136b0dcbdf2f3beafbe1b62313c (patch)
tree08902192372e6548903771fe40c79a0fcbc8b745 /js/tbl_chart.js
parent978a1a7cbfe13e403041359f30591e042718b263 (diff)
bug saved chart image does not have a proper name or an extension
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Diffstat (limited to 'js/tbl_chart.js')
-rw-r--r--js/tbl_chart.js15
1 files changed, 3 insertions, 12 deletions
diff --git a/js/tbl_chart.js b/js/tbl_chart.js
index 868172f1a0..33cdab78dd 100644
--- a/js/tbl_chart.js
+++ b/js/tbl_chart.js
@@ -160,17 +160,14 @@ function drawChart() {
});
try {
currentChart = PMA_queryChart(chart_data, columnNames, currentSettings);
+ if (currentChart != null) {
+ $('#saveChart').attr('href', currentChart.toImageString());
+ }
} catch (err) {
PMA_ajaxShowMessage(err.message, false);
}
}
-function saveChartAsImage() {
- if (currentChart !== null) {
- currentChart.saveAsImage();
- }
-}
-
function getSelectedSeries() {
var val = $('select[name="chartSeries"]').val() || [];
var ret = [];
@@ -240,7 +237,6 @@ AJAX.registerTeardown('tbl_chart.js', function () {
$('input[name="xaxis_label"]').unbind('keyup');
$('input[name="yaxis_label"]').unbind('keyup');
$('#resizer').unbind('resizestop');
- $('#saveChart').unbind('click');
$('#tblchartform').unbind('submit');
});
@@ -357,11 +353,6 @@ AJAX.registerOnload('tbl_chart.js', function () {
drawChart();
});
- // handle chart saving
- $('#saveChart').click(function() {
- saveChartAsImage();
- });
-
// handler for ajax form submission
$('#tblchartform').submit(function (event) {