- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 45 of file WwwMenu.java.
◆ addToMenu()
Reimplemented from org.turro.menu.ElephantMenu.
Definition at line 121 of file WwwMenu.java.
122 bar.addMenu(
"Statistics", Permission.from(
"sysinfo:list"))
124 .addMenuitem(
"Rankings",
"ranking",
"/statistics/rankings.zul",
false)
125 .addMenuitem(
"Matchings",
"matching",
"/statistics/matchings.zul",
false);
◆ addToSessionMenu()
void org.turro.elephant.zul.menu.WwwMenu.addToSessionMenu |
( |
ElephantSubmenu |
submenu | ) |
|
Reimplemented from org.turro.menu.ElephantMenu.
Definition at line 48 of file WwwMenu.java.
49 submenu.addMenuitem(
"Impersonate",
"spy", (EventListener) (Event event) -> {
50 InputDialog.getInput(Framework.getCurrent().getPage(),
51 I_.get(
"Impersonate"),
53 new InputField(
"Contact", null, null, 0) {
55 protected HtmlBasedComponent createEditor() {
56 EntityCombobox ec = new EntityCombobox();
57 ec.setRoot(
"contact");
61 protected Object getEditorValue() {
62 return ((EntityCombobox) editor).getObjectValue();
65 }, (Context context) -> {
66 InputField[] fields = (InputField[]) context.get(
"fields");
67 if(fields.length > 0) {
68 for(InputField f : fields) {
69 if(
"Contact".equals(f.getLabel())) {
70 Authentication.impersonateContact(f.getValue());
71 Clients.evalJavaScript(
"exitWanted=true;");
72 Application.getApplication().sendRedirect(
"/app/frame");
79 }, Permission.from(() -> {
80 return Authentication.canImpersonate();
82 .addMenuitem(
"Back to self",
"no-spy", (EventListener) (Event event) -> {
83 Authentication.impersonateIContact(
null);
84 Clients.evalJavaScript(
"exitWanted=true;");
85 Application.getApplication().sendRedirect(
"/app/frame");
86 }, Permission.from(() -> {
87 return Authentication.isBehaving();
89 .addMenuitem(
"Tags",
"tag",
"/commons/tagEntities.zul",
true)
90 .addMenuitem(
"Warnings",
"warn",
"/error/warnings.zul")
91 .addMenuitem(
"Log",
"log", (EventListener) (Event event) -> {
93 }, Permission.from(
"contact:log"))
94 .addMenuitem(
"Skills",
"/commons/rootSkills.zul");
◆ addToToolsMenu()
void org.turro.elephant.zul.menu.WwwMenu.addToToolsMenu |
( |
ElephantSubmenu |
submenu | ) |
|
Reimplemented from org.turro.menu.ElephantMenu.
Definition at line 98 of file WwwMenu.java.
99 submenu.addMenuitem(
"Contexts",
"www_context",
"/www/admin/webadmin.zul", Permission.from(
"context:list"))
100 .addMenuitem(
"Files",
"/www/admin/files.zul", Permission.from(
"context:list"))
101 .addMenuitem(
"Synonyms",
"/publication/synonyms.zul", Permission.from(
"publication:edit"))
102 .addMenuitem(
"Occurrences",
"/bs/apis/occurrences.zul")
103 .addMenuitem(
"Actors",
"/bs/apis/actors.zul")
104 .addMenuitem(
"Send by entity",
"/mail/mailTo.zul", Permission.from(
"contact:all"))
105 .addMenuitem(
"Cleanup",
"/bs/apis/cleanup.zul")
106 .addMenuitem(
"Export time tracker", (EventListener) (Event event) -> {
107 TimeTrackerExporter.exportTimeTracker();
108 }, Permission.from(
"contact:list"))
110 .addMenuitem(
"Reset site settings", (EventListener) (Event event) -> {
111 Application.resetSettings();
112 }, Permission.from(
"context:list"))
113 .addMenuitem(
"Reset schemes", (EventListener) (Event event) -> {
114 Application.resetSchemes();
115 }, Permission.from(
"context:list"))
116 .addMenuitem(
"Configuration",
"/www/config/configurator.zul", Permission.from(
"context:list"))
◆ showLog()
static void org.turro.elephant.zul.menu.WwwMenu.showLog |
( |
String |
generatorPath, |
|
|
String |
entityPath |
|
) |
| |
|
static |
Definition at line 132 of file WwwMenu.java.
133 Framework.getCurrent().getDesktop().removeAttribute(
"generatorPath");
134 Framework.getCurrent().getDesktop().removeAttribute(
"entityPath");
135 if(!Strings.isBlank(generatorPath)) {
136 Framework.getCurrent().getDesktop().setAttribute(
"generatorPath", generatorPath);
137 }
else if(!Strings.isBlank(entityPath)) {
138 Framework.getCurrent().getDesktop().setAttribute(
"entityPath", entityPath);
142 "/log/systemLog.zul",
null);
◆ showWarnings()
static void org.turro.elephant.zul.menu.WwwMenu.showWarnings |
( |
| ) |
|
|
static |
The documentation for this class was generated from the following file: