Отключить параметр просмотра параметров в BIRT Viewer

Из-за ограничения представления параметров Birt мы реализовали стороннюю JSP для сбора параметров и передачи их в Birt Engine.

Но по умолчанию в программе просмотра Birt есть опция просмотра параметров (см. Снимок экрана). Я хочу найти способ отключить эту опцию. заранее спасибо снимок экрана 1 снимок экрана 2

1 ответ

После небольшой игры с кодами я нашел решение. Изменение должно быть сделано в ToolbarFragment.jsp, который можно найти в каталоге

"BIRT / зритель / org.eclipse.birt.report.viewer / BIRT / WebContent / BIRT / страницы / контроль / ToolbarFragment.jsp"

закомментируйте следующий фрагмент, и все готово:)

           <%-- <TD WIDTH="15px">
                   <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">
                </TD> --%>

Вы можете сделать это с помощью Javascript

скрипты меню клиентских скриптов внутри вы можете вставить код ниже

head.ready(function(){
document.getElementsByName("parameter")[0].parentElement.previousSibling.remove();
document.getElementsByName("export")[0].parentElement.previousSibling.remove();
document.getElementsByName("print")[0].parentElement.previousSibling.remove();
document.getElementsByName("exportReport")[0].parentElement.previousSibling.remove();
document.getElementsByName("exportReport")[0].parentElement.remove();
document.getElementsByName("printServer")[0].parentElement.previousSibling.remove();
document.getElementsByName("printServer")[0].parentElement.remove();
document.getElementsByName("toc")[0].parentElement.remove();
document.getElementsByName("export")[0].parentElement.remove();
document.getElementsByName("parameter")[0].parentElement.remove();
document.getElementById("navigationBar").parentElement.parentElement.remove();
});

Здесь будет отображаться описание клиентских скриптов

Другие вопросы по тегам