Merge branch 'MDL-55355-master' of git://github.com/lameze/moodle

This commit is contained in:
Andrew Nicols 2016-08-02 10:29:30 +08:00
commit 8dc3b7697b
2 changed files with 4 additions and 1 deletions

View File

@ -923,6 +923,7 @@ $string['hiddensectionscollapsed'] = 'Hidden sections are shown in collapsed for
$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';

View File

@ -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);
@ -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);
}
});