Merge branch 'MDL-42989-master' of git://github.com/andrewnicols/moodle
This commit is contained in:
+8
-6
@@ -592,7 +592,7 @@ BRANCH.prototype = {
|
||||
} else {
|
||||
e.stopPropagation();
|
||||
}
|
||||
if (e.type === 'actionkey' && e.action === 'enter' && e.target.test('A')) {
|
||||
if ((e.type === 'actionkey' && e.action === 'enter') || e.target.test('a')) {
|
||||
// No ajaxLoad for enter.
|
||||
this.node.setAttribute('data-expandable', '0');
|
||||
this.node.setAttribute('data-loaded', '1');
|
||||
@@ -679,11 +679,13 @@ BRANCH.prototype = {
|
||||
}
|
||||
Y.log('AJAX loading complete but there were no children.', 'note', 'moodle-block_navigation');
|
||||
} catch (error) {
|
||||
// If we got here then there was an error parsing the result.
|
||||
Y.log('Error parsing AJAX response or adding branches to the navigation tree', 'error', 'moodle-block_navigation');
|
||||
Y.use('moodle-core-notification-exception', function () {
|
||||
return new M.core.exception(error).show();
|
||||
});
|
||||
if (outcome && outcome.status && outcome.status > 0) {
|
||||
// If we got here then there was an error parsing the result.
|
||||
Y.log('Error parsing AJAX response or adding branches to the navigation tree', 'error', 'moodle-block_navigation');
|
||||
Y.use('moodle-core-notification-exception', function () {
|
||||
return new M.core.exception(error).show();
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
blocks/navigation/yui/build/moodle-block_navigation-navigation/moodle-block_navigation-navigation.js
Vendored
+7
-5
@@ -591,7 +591,7 @@ BRANCH.prototype = {
|
||||
} else {
|
||||
e.stopPropagation();
|
||||
}
|
||||
if (e.type === 'actionkey' && e.action === 'enter' && e.target.test('A')) {
|
||||
if ((e.type === 'actionkey' && e.action === 'enter') || e.target.test('a')) {
|
||||
// No ajaxLoad for enter.
|
||||
this.node.setAttribute('data-expandable', '0');
|
||||
this.node.setAttribute('data-loaded', '1');
|
||||
@@ -675,10 +675,12 @@ BRANCH.prototype = {
|
||||
return true;
|
||||
}
|
||||
} catch (error) {
|
||||
// If we got here then there was an error parsing the result.
|
||||
Y.use('moodle-core-notification-exception', function () {
|
||||
return new M.core.exception(error).show();
|
||||
});
|
||||
if (outcome && outcome.status && outcome.status > 0) {
|
||||
// If we got here then there was an error parsing the result.
|
||||
Y.use('moodle-core-notification-exception', function () {
|
||||
return new M.core.exception(error).show();
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
+8
-6
@@ -590,7 +590,7 @@ BRANCH.prototype = {
|
||||
} else {
|
||||
e.stopPropagation();
|
||||
}
|
||||
if (e.type === 'actionkey' && e.action === 'enter' && e.target.test('A')) {
|
||||
if ((e.type === 'actionkey' && e.action === 'enter') || e.target.test('a')) {
|
||||
// No ajaxLoad for enter.
|
||||
this.node.setAttribute('data-expandable', '0');
|
||||
this.node.setAttribute('data-loaded', '1');
|
||||
@@ -677,11 +677,13 @@ BRANCH.prototype = {
|
||||
}
|
||||
Y.log('AJAX loading complete but there were no children.', 'note', 'moodle-block_navigation');
|
||||
} catch (error) {
|
||||
// If we got here then there was an error parsing the result.
|
||||
Y.log('Error parsing AJAX response or adding branches to the navigation tree', 'error', 'moodle-block_navigation');
|
||||
Y.use('moodle-core-notification-exception', function () {
|
||||
return new M.core.exception(error).show();
|
||||
});
|
||||
if (outcome && outcome.status && outcome.status > 0) {
|
||||
// If we got here then there was an error parsing the result.
|
||||
Y.log('Error parsing AJAX response or adding branches to the navigation tree', 'error', 'moodle-block_navigation');
|
||||
Y.use('moodle-core-notification-exception', function () {
|
||||
return new M.core.exception(error).show();
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user