mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
Merge branch 'MDL-55355-master-fix' of https://github.com/lameze/moodle
This commit is contained in:
commit
079e06adcd
2 changed files with 5 additions and 4 deletions
|
@ -40,14 +40,14 @@ require([
|
|||
uniqid = "{{uniqid}}",
|
||||
chartArea = $('#chart-area-' + uniqid),
|
||||
chartImage = chartArea.find('.chart-image'),
|
||||
chartTable = chartArea.find('.chart-table-data');
|
||||
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);
|
||||
});
|
||||
|
||||
chartArea.find('.chart-table-expand a').first().click(function(e) {
|
||||
chartLink.on('click', function(e) {
|
||||
e.preventDefault();
|
||||
if (chartTable.is(':visible')) {
|
||||
chartTable.hide();
|
||||
|
|
|
@ -138,14 +138,15 @@ class behat_mod_feedback extends behat_base {
|
|||
|
||||
$feedbackxpath = "//th[contains(normalize-space(string(.)), \"" . $feedbackname . "\")]/ancestor::table/" .
|
||||
"following-sibling::div[contains(concat(' ', normalize-space(@class), ' '), ' chart-area ')][1]" .
|
||||
"//p[contains(concat(' ', normalize-space(@class), ' '), ' chart-table-expand ')]";
|
||||
"//p[contains(concat(' ', normalize-space(@class), ' '), ' chart-table-expand ') and ".
|
||||
"//a[contains(normalize-space(string(.)), '".get_string('showchartdata')."')]]";
|
||||
|
||||
$charttabledataxpath = $feedbackxpath .
|
||||
"/following-sibling::div[contains(concat(' ', normalize-space(@class), ' '), ' chart-table-data ')][1]";
|
||||
|
||||
// If chart data is not visible then expand.
|
||||
$node = $this->get_selected_node("xpath_element", $charttabledataxpath);
|
||||
if (!$node->isVisible()) {
|
||||
if ($node && !$node->isVisible()) {
|
||||
$this->execute('behat_general::i_click_on_in_the', array(
|
||||
get_string('showchartdata'),
|
||||
'link',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue