Skip to content
This repository has been archived by the owner on Nov 5, 2018. It is now read-only.

Commit

Permalink
minor tweaks to the new ui
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Håkansson committed Dec 9, 2013
1 parent 83efc7e commit ab3c4d0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
23 changes: 11 additions & 12 deletions e2u/src/com/googlecode/e2u/MainPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,6 @@ public String getContentString(String key, Context context) throws IOException {
return Messages.getString(L10nKeys.OPEN);
}
return buildHTML(renderView(context, getFindView()), Messages.getString(L10nKeys.OPEN), true);
} else if (!bookController.bookIsValid()) {
if (KEY_TITLE.equals(key)) {
return Messages.getString(L10nKeys.VALIDATION);
}
return buildHTML(renderView(context, bookController.getValidationView()), Messages.getString(L10nKeys.VALIDATION), false);
} else if ("setup".equals(args.get("method"))) { //$NON-NLS-1$ //$NON-NLS-2$
if (KEY_TITLE.equals(key)) {
return Messages.getString(L10nKeys.SETTINGS);
Expand All @@ -366,12 +361,6 @@ public String getContentString(String key, Context context) throws IOException {
return Messages.getString(L10nKeys.SETTINGS);
}
return buildHTML(renderView(context, new PaperView(setupMenu, settingsView)), Messages.getString(L10nKeys.SETTINGS), true);
}
else if ("meta".equals(args.get("method"))) { //$NON-NLS-1$ //$NON-NLS-2$
if (KEY_TITLE.equals(key)) {
return Messages.getString(L10nKeys.ABOUT_THE_BOOK);
}
return buildHTML(renderView(context, bookController.getAboutBookView()), Messages.getString(L10nKeys.ABOUT_THE_BOOK), true);
} else if ("about".equals(args.get("method"))) {
if (KEY_TITLE.equals(key)) {
return Messages.getString(L10nKeys.ABOUT_THE_SOFTWARE);
Expand Down Expand Up @@ -402,7 +391,17 @@ else if ("meta".equals(args.get("method"))) { //$NON-NLS-1$ //$NON-NLS-2$
p.add(a);
div.add(p);
return buildHTML(div.getHTML(context).getResult(), Messages.getString(L10nKeys.TEST_SETUP), true);
} else if (device!=null && settingsView.getConfiguration().settingOK() && align!=null) {
} else if (!bookController.bookIsValid()) {
if (KEY_TITLE.equals(key)) {
return Messages.getString(L10nKeys.VALIDATION);
}
return buildHTML(renderView(context, bookController.getValidationView()), Messages.getString(L10nKeys.VALIDATION), false);
} else if ("meta".equals(args.get("method"))) { //$NON-NLS-1$ //$NON-NLS-2$
if (KEY_TITLE.equals(key)) {
return Messages.getString(L10nKeys.ABOUT_THE_BOOK);
}
return buildHTML(renderView(context, bookController.getAboutBookView()), Messages.getString(L10nKeys.ABOUT_THE_BOOK), true);
} else if (device!=null && settingsView.getConfiguration().settingOK() && align!=null) {
if ("do".equals(args.get("method"))) { //$NON-NLS-1$ //$NON-NLS-2$

if (KEY_TITLE.equals(key)) {
Expand Down
9 changes: 8 additions & 1 deletion e2u/src/com/googlecode/e2u/ValidationView.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import com.googlecode.ajui.AContainer;
import com.googlecode.ajui.ALabel;
import com.googlecode.ajui.ALink;
import com.googlecode.ajui.AParagraph;
import com.googlecode.ajui.APre;
import com.googlecode.e2u.l10n.L10nKeys;
Expand All @@ -34,7 +35,7 @@ public ValidationView(Validator v) {
}
{
AContainer div = new AContainer();
div.setClass("overflow");
//div.setClass("overflow");
APre pre = new APre();
InputStreamReader isr = new InputStreamReader(v.getReportStream());
int c;
Expand All @@ -53,6 +54,12 @@ public ValidationView(Validator v) {
}
div.add(pre);
add(div);
AParagraph p = new AParagraph();
ALink a = new ALink("#");
a.addAttribute("onclick", "window.open('book.xml','source'); return false;");
a.add(new ALabel(Messages.getString(L10nKeys.XSLT_VIEW_SOURCE)));
p.add(a);
add(p);
}
} else {
AParagraph p = new AParagraph();
Expand Down

0 comments on commit ab3c4d0

Please sign in to comment.