Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Customizing viewer navigation / toolbox
al91206
Hi,
We are trying to relocate the icons located in the cog toolbar dropdown in the interactive viewer. We would like the print and export to excel functionality to be displayed horizontally along the navigation bar. I won't go into the reasons (hint: user training).
Anyway ...
I got the print icon to show up on the navigation bar and since I'm not a java programmer and have never really used java - I think I'm getting somewhere. Unfortunately the icon doesn't have any functionality - it just looks nice.
What I did was copy the print code from IVGlobalToolbarFragment and pasted it to IVNavigationbarFragment. I did alter the code slightly to match the navbar.jsp format.
Below are the code examples.
From IVGlobalToolbarFragment.jsp:
<DIV NAME="PRINT" CLASS="toolbar_buttonStyle" OPT="Print"
CONFIGENABLED="<%=(presentationBean.getGlobalFeatureOptions().getPrint().booleanValue( )==true)?"YES":"NO"%>" >
<INPUT TYPE="button"
CLASS="toolbar_imageUrl actuateCSSSprite actuateIV_Print"
ENABLED_ON="toolbar_imageUrl actuateCSSSprite actuateIV_Print"
ENABLED_OFF="toolbar_imageUrl actuateCSSSprite actuateIV_Print_disabled"/>
<fmt:message key="toolbar.print" bundle="${controlBundle}"/>
</DIV>
To IVNavigationBarFragment.jsp:
<TD WIDTH="8px" HEIGHT="27px" ALIGN='center'> </TD>
<TD HEIGHT="27px" ALIGN='center'>
<INPUT TYPE="button" NAME='Print'
TITLE="<fmt:message key="toolbar.print" bundle="${controlBundle}"/>"
CLASS="toolbar_imageUrl actuateCSSSprite actuateIV_Print"
ENABLED_ON="toolbar_imageUrl actuateCSSSprite actuateIV_Print"
ENABLED_OFF="toolbar_imageUrl actuateCSSSprite actuateIV_Print_disabled"/>
OPT="Print"
CONFIGENABLED="<%=(presentationBean.getGlobalFeatureOptions().getPrint().booleanValue( )==true)?"YES":"NO"%>" >
</TD>
I've attached both jsp files in a zip along with this note.
Any help in getting the print functionality would be greatly appreciated. I will also post this in DevShare if it works.
Thanks!
Al
Find more posts tagged with
Comments
averma
Hi Al,<br />
<br />
You don't need to know java to do this. All you have to do is to add the script below to IVNavigationBarFragment.jsp and call the printDialog javascript function on the button click event for the print icon:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<SCRIPT TYPE="text/javascript">
function printDialog()
{
var currentViewer = actuate.getViewer();
currentViewer.showPrintDialog();
}
</SCRIPT>
</pre>
<br />
<br />
AV
al91206
Thanks for the reply. I'm wondering if it is possible you could add the function you wrote to the jsp file I attached or just tell me where to put the code you suggested in your reply.
I added the function to the top of the jsp file - then called it as follows:
<TD WIDTH="8px" HEIGHT="27px" ALIGN='center'> </TD>
<TD HEIGHT="27px" ALIGN='center'>
<INPUT TYPE="button" NAME='Print' onClick="printDialog()"
TITLE="<fmt:message key="toolbar.print" bundle="${controlBundle}"/>"
CLASS="toolbar_imageUrl actuateCSSSprite actuateIV_Print"
ENABLED_ON="toolbar_imageUrl actuateCSSSprite actuateIV_Print"
ENABLED_OFF="toolbar_imageUrl actuateCSSSprite actuateIV_Print_disabled"/>
OPT="Print"
CONFIGENABLED="<%=(presentationBean.getGlobalFeatureOptions().getPrint().booleanValue( )==true)?"YES":"NO"%>" >
</TD>
This didn't work for me. Nothing happens when I click the print icon.
I assumed I could just copy from the IVGlobalToolbarFragment.jsp and paste it to the IVNavigationbarFragment - guess that's not the case? That was the reason I posted the jsp files.
You said "All you have to do is to add the script below to IVNavigationBarFragment.jsp and call the printDialog javascript function on the button click event for the print icon" - an example would have proven much better for me as this explanation is over my head.
Al
averma
Al,
I am not sure what version of Information Console you are using. I am able to implement the customization through some changes to NavigationbarFragment.jsp (Attached)
The code that I modifed is at the end and is marked under "Modification". You may want to implement similar modification in your jsp file.
Hope this helps.
Ashwini