This should be read in conjunction with the Get Started Document.
Juice has to be first loaded on to the system.
/usr/opt/til/talisie/Webapp/Views/Javascript directoryextend-talisP2.js file - see attached exampleNext, the call to Juice needs to be added to the header.js script in the /usr/opt/til/talisie/Webapp/Views/Javascript directory. As the calls are being added to a JavaScript file, there is some additional code required to ensure that all code has been loaded in to the browser before any extension functionality is called. Add the following code to the end of the header.js file:
//Javascript loading function
function myloadjs(file){
var juhead = document.getElementsByTagName('head')[0];
var juins = document.createElement('script');
juins.type = 'text/javascript';
juins.src = file;
juhead.appendChild(juins);
}
myloadjs("/TalisPrism/Views/Javascript/juice/jquery-1.3.2.min.js");
myloadjs("/TalisPrism/Views/Javascript/juice/juice.js");
//Do not load extension script until jQuery & Juice loaded in to browser
function whenJuiceLoaded(){
if(typeof juice != 'undefined' && typeof jQuery != 'undefined'){
myloadjs("/TalisPrism/Views/Javascript/juice/extend-talisP2.js");
}else{
setTimeout(function(){whenJuiceLoaded();},10);
}
}
whenJuiceLoaded();
| Attachment | Size |
|---|---|
| extend-talisP2.js.txt | 1.45 KB |
| talis_prism2_metadef.js.txt | 305 bytes |