MDL-59015 blocks: Confusing View more button in course overview block
authorMihail Geshoski <mihail@moodle.com>
Thu, 9 Aug 2018 03:39:57 +0000 (11:39 +0800)
committerMihail Geshoski <mihail@moodle.com>
Mon, 13 Aug 2018 00:53:19 +0000 (08:53 +0800)
blocks/myoverview/amd/build/event_list.min.js
blocks/myoverview/amd/src/event_list.js
blocks/myoverview/templates/timeline-view-courses.mustache

index 0d04b59..343b46e 100644 (file)
Binary files a/blocks/myoverview/amd/build/event_list.min.js and b/blocks/myoverview/amd/build/event_list.min.js differ
index 9d96fc5..8a1bd91 100644 (file)
@@ -101,6 +101,8 @@ define(['jquery', 'core/notification', 'core/templates',
         if (!hasLoadedAll(root)) {
             // Only enable the button if we've got more events to load.
             viewMoreButton.prop('disabled', false);
+        } else {
+            viewMoreButton.addClass('hidden');
         }
     };
 
index a569405..6f35022 100644 (file)
@@ -86,7 +86,7 @@
             // If there was only one hidden block then we have no more to show now
             // so we can disable the button.
             if (blocks && blocks.length == 1) {
-                button.prop('disabled', true);
+                button.addClass('hidden');
             }
 
             if (data) {