mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 18:36:42 +02:00
MDL-64376 recentlyaccessedcourses: stop reloading on favourite
Stop reloading the whole content when a single course is favourited or unfavourited.
This commit is contained in:
parent
07203d34f1
commit
6d9727628a
6 changed files with 71 additions and 69 deletions
2
blocks/myoverview/amd/build/view.min.js
vendored
2
blocks/myoverview/amd/build/view.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -217,7 +217,7 @@ function(
|
|||
|
||||
setCourseFavouriteState(courseId, true).then(function(success) {
|
||||
if (success) {
|
||||
PubSub.publish(CourseEvents.favourited);
|
||||
PubSub.publish(CourseEvents.favourited, courseId);
|
||||
removeAction.removeClass('hidden');
|
||||
addAction.addClass('hidden');
|
||||
showFavouriteIcon(root, courseId);
|
||||
|
@ -240,7 +240,7 @@ function(
|
|||
|
||||
setCourseFavouriteState(courseId, false).then(function(success) {
|
||||
if (success) {
|
||||
PubSub.publish(CourseEvents.unfavorited);
|
||||
PubSub.publish(CourseEvents.unfavorited, courseId);
|
||||
removeAction.addClass('hidden');
|
||||
addAction.removeClass('hidden');
|
||||
hideFavouriteIcon(root, courseId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue