forked from pentaho/pentaho-kettle
-
Notifications
You must be signed in to change notification settings - Fork 197
Admin: Custom UI
Hiromu Hota edited this page Nov 20, 2019
·
1 revision
Spoon uses the XUL (XML User Interface Language) to define some parts of its user interface (see here for details). By editting XUL files, some UI components can be disabled (hidden).
The file menu, for example, is defined in $CATALINA_HOME/webapps/spoon/WEB-INF/classes/ui/menubar.xul
as in the following snippet:
<menu id="file" label="${Spoon.Menu.File}" accesskey="alt-f">
<menuitem id="file-open" label="${Spoon.Menu.File.Open}" />
<menuitem id="file-save-as" label="${Spoon.Menu.File.SaveAs}" />
</menu>
To restrict user's capability, one may want to disable some of UI components.
To to so, add disable="true"
to the component to be disabled like below.
<menu id="file" label="${Spoon.Menu.File}" accesskey="alt-f">
<menuitem id="file-open" label="${Spoon.Menu.File.Open}" />
<menuitem id="file-save-as" label="${Spoon.Menu.File.SaveAs}" disabled="true" />
</menu>
No disabled
attribute has the same effect as disabled="false"
.
To hide MainToolbar, edit $CATALINA_HOME/webapps/spoon/WEB-INF/classes/ui/spoon.xul
and add disabled="true" like
<toolbar id="main-toolbar" mode="full" disabled="true">
Similarly, edit $CATALINA_HOME/webapps/spoon/WEB-INF/classes/ui/menubar.xul
and add disabled="true" like
<menubar id="spoon-menubar" disabled="true">