|
Re: JSP-Files behind Toolbar [message #890586 is a reply to message #890480] |
Fri, 22 June 2012 15:54 |
|
The toolbar is created with the ToolbarFragment.jsp located in the
webcontent\birt\pages\control folder of the viewer.
Jason
On 6/22/2012 7:53 AM, Dnns . wrote:
> Hi,
>
> i tried to find out, which jsp-Files are behind the icons in the toolbar
> of the webviewer.
> I want to delete some of these icons, and also delete the jsp-Files
> which open the dialogs or so.
> Dnns
|
|
|
Re: JSP-Files behind Toolbar [message #890599 is a reply to message #890586] |
Fri, 22 June 2012 16:18 |
Dnns . Messages: 30 Registered: May 2012 |
Member |
|
|
Hi,
that is what i already know. I checked this file, but I can't find a relation to other files.
<INPUT TYPE="image" NAME='parameter' SRC="birt/images/Report_parameters.gif" TITLE="<%= BirtResources.getHtmlMessage( "birt.viewer.toolbar.parameter" )%>" ALT="<%= BirtResources.getHtmlMessage( "birt.viewer.toolbar.parameter" )%>" CLASS="birtviewer_clickable">
So i see, there is an input, shown as picture, with an alternate text, titel and class. What i also found out, that the name is important. If i change it via firebug, the name pops up in a javascript alert.
In the BirtToolbar.js (webcontent/birt/ajaxui/app) File, there is a switch/case block. It seems, that this block handles the events. How they are emittet, i don't know.
__neh_click : function( event )
{
var oBtn = Event.element( event );
if ( oBtn )
{
switch ( oBtn.name )
{
case 'print':
{
birtEventDispatcher.broadcastEvent( birtEvent.__E_PRINT );
break;
}
case 'printServer':
{
birtEventDispatcher.broadcastEvent( birtEvent.__E_PRINT_SERVER );
break;
}
case 'exportReport':
{
birtEventDispatcher.broadcastEvent( birtEvent.__E_EXPORT_REPORT );
break;
}
case 'export':
{
birtEventDispatcher.fireEvent( birtEvent.__E_QUERY_EXPORT );
break;
}
case 'toc':
{
birtEventDispatcher.broadcastEvent( birtEvent.__E_TOC );
break;
}
case 'parameter':
{
birtEventDispatcher.broadcastEvent( birtEvent.__E_PARAMETER );
break;
}
default:
{
alert( oBtn.name );
break;
}
}
}
}
My JavaScript knowledge is at the moment not the best. This is the point, where i stand. I don't come to a further step.
Dnns
|
|
|
Re: JSP-Files behind Toolbar [message #890688 is a reply to message #890599] |
Fri, 22 June 2012 21:01 |
|
This gets to the heart of the AJAX code in the viewer. That code
broadcasts an event, which is handled by a js class that is registered
to listen for that event. These are implemented in
BirtReportDocument.js and AbstractBaseReportDocument.js.
Jason
On 6/22/2012 12:18 PM, Dnns . wrote:
> Hi,
> that is what i already know. I checked this file, but I can't find a
> relation to other files.
>
>
> <INPUT TYPE="image" NAME='parameter'
> SRC="birt/images/Report_parameters.gif" TITLE="<%=
> BirtResources.getHtmlMessage( "birt.viewer.toolbar.parameter" )%>"
> ALT="<%= BirtResources.getHtmlMessage( "birt.viewer.toolbar.parameter"
> )%>" CLASS="birtviewer_clickable">
>
>
> So i see, there is an input, shown as picture, with an alternate text,
> titel and class. What i also found out, that the name is important. If i
> change it via firebug, the name pops up in a javascript alert.
> In the BirtToolbar.js (webcontent/birt/ajaxui/app) File, there is a
> switch/case block. It seems, that this block handles the events. How
> they are emittet, i don't know.
>
>
> __neh_click : function( event )
> {
> var oBtn = Event.element( event );
>
> if ( oBtn )
> {
> switch ( oBtn.name )
> {
> case 'print':
> {
> birtEventDispatcher.broadcastEvent( birtEvent.__E_PRINT );
> break;
> }
> case 'printServer':
> {
> birtEventDispatcher.broadcastEvent(
> birtEvent.__E_PRINT_SERVER );
> break;
> }
> case 'exportReport':
> {
> birtEventDispatcher.broadcastEvent(
> birtEvent.__E_EXPORT_REPORT );
> break;
> }
> case 'export':
> {
> birtEventDispatcher.fireEvent(
> birtEvent.__E_QUERY_EXPORT );
> break;
> }
> case 'toc':
> {
> birtEventDispatcher.broadcastEvent( birtEvent.__E_TOC );
> break;
> }
> case 'parameter':
> {
> birtEventDispatcher.broadcastEvent(
> birtEvent.__E_PARAMETER );
> break;
> }
> default:
> {
> alert( oBtn.name );
> break;
> }
> }
> }
> }
>
>
> My JavaScript knowledge is at the moment not the best. This is the
> point, where i stand. I don't come to a further step.
>
> Dnns
|
|
|
Powered by
FUDForum. Page generated in 0.03303 seconds