The first ajax load fetches the template and puts it in localstorage + a js var
The second load gets it from local storage, but does not put it in the js var.
The pix_icon helper expects it to be in the js var always.
It turns out that, after all these years, we've been doing it wrong.
The YUI Loader should be loaded at the top of the body, not in the head.
Having it in the head means that the body has not yet loaded, and we see
a number of minor issues for scripts which happen very early in the load
process. One of these is the creation of invalid HTML from the YUI loader
because it is not able to insert in the body as it has not yet been
created.
To be safe, we must move all JS to the same point (because of unknown
dependencies between them). These should be placed as early in the body as
possible.
We also change the way in which the legacy YUI css modules are loaded.
We often do isEqual tests but where a field, may have a single exception.
Ordinarily we can handle this easily by breaking the test down, but when
dealing with mocked objects we can only pass an instance of a
PHPUnit_Framework_Constraint, or a single value (which is cast to an
instance of PHPUnit_Framework_Constraint_IsEqual).
To deal with instances of time-based exception, we need to be able to
compare simple objects and classes where one or two values may be
different.
In order to have a consistant browser behavior and prevent nesting of
subscripts and superscripts, tags are converted to CSS classes and then
the CSS classes in the selection are toggeled using the rangy crossbrowser
selection library already included in Atto without using an execCommand.
Previously duplicate users could be returned when they had
done duplicate badge criteria - this would lead to a duplicate
constraint being hit as they were attempted to be awarded twice.
Added an @array "options" parameter to user_get_user_navigation_info(),
for passing in avatarsize, and possibly other options in future.
Also removed an errant parameter in the /lib/outputrenderers.php
user_get_user_navigation_info() call, as there was no corresponding
parameter in the function definition.
(Test written by Jetha Chan.)