Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Add animated Font Awesome spinner to Admin menu initial ajax open call #782

Open
nadavkav opened this issue Oct 20, 2016 · 4 comments
Open

Comments

@nadavkav
Copy link
Contributor

nadavkav commented Oct 20, 2016

Some sysadmins point my attention to this, although it seems minor, as it takes seconds for it to appear.

Moodle Clean/More (and Shoelace) theme has a very informative spinner FA spinner when the
Site Administration "folder" icon is clicked. (when class "loading" is present)
image

@gjb2048
Copy link
Owner

gjb2048 commented Oct 20, 2016

Code there, just not working.

@gjb2048
Copy link
Owner

gjb2048 commented Oct 20, 2016

Ok, not working because animation 'fa-spin' and Essential's version does not work on the FA content. FA works by having a 'fa-spin' class, but this is applied to the containing tag. This is an 'i' tag. This is specified by Essential's core renderer pix_icon method. However, core Moodle AJAX does not call this when returning new 'markup', thus icon replacement not used. Essential can replace the icon in CSS but therefore not make it spin. Catch-22.

@gjb2048
Copy link
Owner

gjb2048 commented Oct 20, 2016

No idea how to fix.

@nadavkav
Copy link
Contributor Author

Tricky 😢 no idea over here too.
For now, I added a half-baked workaround

.tree_item.branch.loading:before {
    font-family: FontAwesome;
    content: "\f110";
}

It starts to show the freezed "spinner" but before anyone understand what is happening... it is already loaded (ajax call returns) and it changes to "open folder" icon

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants