Move all of our CSS rules into our CssResource
This save us from needing to download the application's CSS resources in a separate HTTP connection. It also allowed us to find and remove some unused class names. I may have broken a few style classes here. I plan to break the CSS up into smaller chunks and fix any broken styles as I go through them. Change-Id: I81b60ff8d93be3faedf606d2f40a6f89d401909d Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -35,7 +35,7 @@ public class ErrorDialog extends AutoCenterDialogBox {
|
||||
|
||||
body = new FlowPanel();
|
||||
final FlowPanel buttons = new FlowPanel();
|
||||
buttons.setStyleName("gerrit-ErrorDialog-Buttons");
|
||||
buttons.setStyleName(Gerrit.RESOURCES.css().errorDialogButtons());
|
||||
final Button closey = new Button();
|
||||
closey.setText(Gerrit.C.errorDialogClose());
|
||||
closey.addClickHandler(new ClickHandler() {
|
||||
@@ -47,7 +47,7 @@ public class ErrorDialog extends AutoCenterDialogBox {
|
||||
buttons.add(closey);
|
||||
|
||||
final FlowPanel center = new FlowPanel();
|
||||
center.setStyleName("gerrit-ErrorDialog");
|
||||
center.setStyleName(Gerrit.RESOURCES.css().errorDialog());
|
||||
center.add(body);
|
||||
center.add(buttons);
|
||||
add(center);
|
||||
@@ -90,13 +90,9 @@ public class ErrorDialog extends AutoCenterDialogBox {
|
||||
}
|
||||
}
|
||||
|
||||
body.add(label(cn, "gerrit-ErrorDialog-ErrorType"));
|
||||
final Label r = new Label(cn);
|
||||
r.setStyleName(Gerrit.RESOURCES.css().errorDialogErrorType());
|
||||
body.add(r);
|
||||
body.add(new Label(what.getMessage()));
|
||||
}
|
||||
|
||||
private static Label label(final String what, final String style) {
|
||||
final Label r = new Label(what);
|
||||
r.setStyleName(style);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user