Skip to content

Commit

Permalink
MDL-55355 core: Change chart link text when status change
Browse files Browse the repository at this point in the history
  • Loading branch information
lameze committed Aug 1, 2016
1 parent d1a3ea6 commit 2356c4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lang/en/moodle.php
Expand Up @@ -923,6 +923,7 @@
$string['hiddensectionsinvisible'] = 'Hidden sections are completely invisible';
$string['hide'] = 'Hide';
$string['hideadvancedsettings'] = 'Hide advanced settings';
$string['hidechartdata'] = 'Hide chart data';
$string['hidepicture'] = 'Hide picture';
$string['hidesection'] = 'Hide section {$a}';
$string['hidesettings'] = 'Hide settings';
Expand Down
4 changes: 3 additions & 1 deletion lib/templates/chart.mustache
Expand Up @@ -41,7 +41,7 @@ require([
chartArea = $('#chart-area-' + uniqid),
chartImage = chartArea.find('.chart-image'),
chartTable = chartArea.find('.chart-table-data');

chartLink = chartArea.find('.chart-table-expand a');
Builder.make(data).then(function(ChartInst) {
new Output(chartImage, ChartInst);
new OutputTable(chartTable, ChartInst);
Expand All @@ -51,9 +51,11 @@ require([
e.preventDefault();
if (chartTable.is(':visible')) {
chartTable.hide();
chartLink.text({{#quote}}{{#str}}showchartdata, moodle{{/str}}{{/quote}});
chartTable.attr('aria-expanded', false);
} else {
chartTable.show();
chartLink.text({{#quote}}{{#str}}hidechartdata, moodle{{/str}}{{/quote}});
chartTable.attr('aria-expanded', true);
}
});
Expand Down

0 comments on commit 2356c4f

Please sign in to comment.