McDewey

Multi-vendor documentation library · semantic search · MCP endpoint at /mcp

Page 420

↗ View in doc context
page
420
source
finesse/v12.5/developer-guide/developer-guide.md
chunk_id
finesse::v12.5::developer-guide::developer-guide::404

injectResource : function (url){ var node = null; // url null? do nothing if(!url) { return; } // creates script node for .js files else if(url.lastIndexOf('.js')=== url.length-3){ node = document.createElement("script"); node.async = false; node.setAttribute('src', url); } // creates link node for css files else if(url.lastIndexOf('.css')== url.length-4){ node = document.createElement("link"); node.setAttribute('href', url); node.setAttribute('rel', 'stylesheet'); } // inserts the node into dom if(node) { document.getElementsByTagName('head')[0].appendChild(node); } } In your gadget’s *.xml file, call the injectResource function that you have copied above. The parameter to the injectResource function is the path to your css file: <script type="text/javascript"> <your gadget namespace>.injectResource('<path to CSS file>/<CSS filename>.css'); </script> Subscription Management on Finesse Desktop Because the Finesse desktop provides a managed XMPP connection to the Cisco Finesse Notification Service, the ability to subscribe or unsubscribe to a particular notification feed is also provided as an interface using the SubscribeNodeReq and UnsubscribeNodeReq requests described in Finesse Requests. Gadget Height Management The height of the gadget is managed in several ways. As the gadget is essentially an iFrame HTML element, the height of the gadget refers to the height of the iFrame. This height can be set and modified by the following options. • Finesse desktop layout XML (fixed height) • Gadget API (dynamic height) Setting Gadget Height—Desktop Layout XML The gadget height is provided in pixels as a query parameter to the gadget URL in the Finesse desktop layout XML. The query parameter used in the XML is gadgetHeight. This is recommended if the height of the content inside the gadget does not change frequently. In the following example, the initial height of the gadget, when it gets rendered on the client, is set to 150 pixels. Cisco Finesse Web Services Developer and JavaScript Guide, Release 12.5(1) 404 Finesse Desktop Gadget Development Subscription Management on Finesse Desktop