We're using the Salesforce Console Integration Toolkit to display a custom status bar in the console. This works really well, except that the users can click on the status bar component (indicated by the hand cursor at the bottom of image below) to open up a popup window. Ideally, we don't want/need the user to open this (there's nothing to show, and in fact currently reads "This Space Intentionally Left Blank"). I've looked all over the documentation, but I can't seem to cause the status bar to not pop out a window at all, so our current implementation is to just call sforce.console.setCustomConsoleComponentVisible(false);
using window.setInterval
, but if we set the value too small, it lags the console, and if we set it too large, the window pops up and the user can see it until the next time it gets closed. Ideally, we'd like nothing to happen at all when the user clicks the status bar. Is there a way we prevent the custom console component from popping out its default popup window?
Here's the Visualforce page that implements the console component:
<apex:page showHeader="false" standardStylesheets="false">
<apex:includeScript value="/support/console/34.0/integration.js" />
<apex:includeScript value="{!URLFOR($Resource.ctiStatusJS)}" />
<h1>
This Space Intentionally Left Blank
</h1>
</apex:page>
For the purposes of this component, here's the relevant JavaScript:
!function(window, document, undefined) {
function heartbeat() {
sforce.console.setCustomConsoleComponentVisible(false);
}
function init() {
window.setInterval(heartbeat, 250);
}
window.addEventListener("DOMContentLoaded", init);
}(window, document)