Skip to content

Commit

Permalink
MDL-61127 filepicker: Selected repository now highlighted.
Browse files Browse the repository at this point in the history
  • Loading branch information
abgreeve committed Apr 3, 2018
1 parent b2ee1cf commit cbca0b7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions repository/filepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1643,10 +1643,15 @@ M.core_filepicker.init = function(Y, options) {
.removeClass('active')
.setAttribute('aria-selected', 'false')
.setAttribute('tabindex', '-1');
scope.fpnode.all('#fp-repo-'+scope.options.client_id+'-'+obj.repo_id)
.addClass('active')
scope.fpnode.all('.nav-link')
.removeClass('active')
.setAttribute('aria-selected', 'false')
.setAttribute('tabindex', '-1');
var activenode = scope.fpnode.one('#fp-repo-' + scope.options.client_id + '-' + obj.repo_id);
activenode.addClass('active')
.setAttribute('aria-selected', 'true')
.setAttribute('tabindex', '0');
activenode.all('.nav-link').addClass('active');
// add class repository_REPTYPE to the filepicker (for repository-specific styles)
for (var i in scope.options.repositories) {
scope.fpnode.removeClass('repository_'+scope.options.repositories[i].type)
Expand Down

0 comments on commit cbca0b7

Please sign in to comment.