Merge branch 'MDL-42989-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
Dan Poltawski
2013-12-03 16:01:22 +08:00
4 changed files with 25 additions and 19 deletions
@@ -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;
}
File diff suppressed because one or more lines are too long
@@ -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
View File
@@ -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;
}