Merge branch 'stable-2.7'

* stable-2.7:
  Fix clearing themes

Change-Id: I3a21d199ad1942f26302292ab9ffe1e832dea02e
This commit is contained in:
Dave Borowitz
2013-05-14 14:56:58 -07:00
2 changed files with 9 additions and 5 deletions

View File

@@ -45,13 +45,17 @@ public class Themer {
} }
public void set(ThemeInfo theme) { public void set(ThemeInfo theme) {
set(theme.css() != null ? theme.css() : cssText, if (theme != null) {
theme.header() != null ? theme.header() : headerHtml, set(theme.css() != null ? theme.css() : cssText,
theme.footer() != null ? theme.footer() : footerHtml); theme.header() != null ? theme.header() : headerHtml,
theme.footer() != null ? theme.footer() : footerHtml);
} else {
set(cssText, headerHtml, footerHtml);
}
} }
public void clear() { public void clear() {
set(cssText, headerHtml, footerHtml); set(null);
} }
void init(Element css, Element header, Element footer) { void init(Element css, Element header, Element footer) {

View File

@@ -62,7 +62,7 @@ public abstract class Screen extends View {
protected void onUnload() { protected void onUnload() {
super.onUnload(); super.onUnload();
if (setTheme) { if (setTheme) {
Gerrit.THEMER.set(null); Gerrit.THEMER.clear();
} }
} }