7.1.0 to 7.2.0
UIContext
The UIContext
global variable has been removed from the following sample templates: sample-template-basic.html, sample-template-advanced.html, and cryptoIQWorkstation.html. UIContext
is now a local variable of the startUI
function, which is defined in the examples/templates/js/sample-template.js file.
UIContext
can no longer be accessed globally. To create a global variable that references UIContext
, do the following:
-
Declare a variable in your application's HTML document before the
<script>
tag that includes sample-template.js, for example:<script>var globalUIContext;</script> <script src="examples/templates/js/sample-template.js"></script>
-
In the
startUI
function in sample-template.js, assignUIContext
to your global variable:function startUI(stx, root, restore){ var UIContext=root.context=new CIQ.UI.Context(stx, $(root).find("cq-context,[cq-context]") .addBack("cq-context,[cq-context]")); globalUIContext = UIContext;
-
Reference the new global variable as you previously referenced
UIContext
.
Otherwise, remove any references to UIContext
(outside of startUI
) from your application.