Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added course category filtering menu to My Courses #76

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion amd/build/personal_menu.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions amd/build/pm_category_filter.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions amd/src/personal_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
/**
* Course card favoriting.
*/
define(['jquery', 'core/log', 'core/yui', 'theme_snap/pm_course_cards', 'theme_snap/util', 'theme_snap/ajax_notification'],
function($, log, Y, courseCards, util, ajaxNotify) {
define(['jquery', 'core/log', 'core/yui', 'theme_snap/pm_course_cards', 'theme_snap/util', 'theme_snap/ajax_notification', 'theme_snap/pm_category_filter'],
function($, log, Y, courseCards, util, ajaxNotify, categoryFilter) {

/**
* Personal Menu (courses menu).
Expand Down Expand Up @@ -122,6 +122,10 @@ define(['jquery', 'core/log', 'core/yui', 'theme_snap/pm_course_cards', 'theme_s
var applyListeners = function() {
// On clicking personal menu trigger.
$(document).on("click", ".js-personal-menu-trigger", function(event) {
// TODO: in very rare case it may be possible that a different Snap code overlap the css set in the
// TODO: following call. To fix it we need to move this call later.
categoryFilter.viewingMode("get");

$('body').toggleClass('snap-fixy-open');
if ($('.snap-fixy-open #primary-nav').is(':visible')) {
self.update();
Expand Down
Loading