Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
webui: fix the access theme - multiselect / about colors
  • Loading branch information
perexg committed May 3, 2016
1 parent 660ffa2 commit 4bb0864
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 4 deletions.
12 changes: 9 additions & 3 deletions Makefile.webui
Expand Up @@ -74,8 +74,13 @@ CSS_DONE += static/xcheckbox/xcheckbox.css
CSS_DONE += static/app/ext.css

CSS_BLUE += $(EXTJSPATH)/resources/css/xtheme-blue.css
CSS_BLUE2 += static/app/ext-blue.css

CSS_GRAY += $(EXTJSPATH)/resources/css/xtheme-gray.css
CSS_GRAY2 += static/app/ext-gray.css

CSS_ACCESS += $(EXTJSPATH)/resources/css/xtheme-access.css
CSS_ACCESS2+= static/app/ext-access.css

#
# extjs extensions
Expand Down Expand Up @@ -159,9 +164,9 @@ JAVASCRIPT_TV += $(ROOTPATH)/tv.js
#

JAVASCRIPT_SRC = $(foreach f,$(JAVASCRIPT),$(WEBDIR)/$(f))
CSS_BLUE_SRC = $(foreach f,$(CSS_INIT) $(CSS_BLUE) $(CSS_DONE),$(WEBDIR)/$(f))
CSS_GRAY_SRC = $(foreach f,$(CSS_INIT) $(CSS_GRAY) $(CSS_DONE),$(WEBDIR)/$(f))
CSS_ACCESS_SRC = $(foreach f,$(CSS_INIT) $(CSS_ACCESS) $(CSS_DONE),$(WEBDIR)/$(f))
CSS_BLUE_SRC = $(foreach f,$(CSS_INIT) $(CSS_BLUE) $(CSS_DONE) $(CSS_BLUE2),$(WEBDIR)/$(f))
CSS_GRAY_SRC = $(foreach f,$(CSS_INIT) $(CSS_GRAY) $(CSS_DONE) $(CSS_GRAY2),$(WEBDIR)/$(f))
CSS_ACCESS_SRC = $(foreach f,$(CSS_INIT) $(CSS_ACCESS) $(CSS_ACCESS2) $(CSS_DONE),$(WEBDIR)/$(f))
CSS_SRC = $(CSS_BLUE_SRC) $(CSS_GRAY_SRC) $(CSS_ACCESS_SRC)

JAVASCRIPT_TV_SRC = $(foreach f,$(JAVASCRIPT_TV),$(WEBDIR)/$(f))
Expand Down Expand Up @@ -233,6 +238,7 @@ $(WEBDIR)/extjs-debug.c: $(JAVASCRIPT_SRC) $(CSS_SRC)
$(VV)printf '$(foreach f,$(CSS_INIT),extjs_lcss(hq, "$(f)");\n)' > $@
$(VV)printf 'extjs_lcss(hq, "redir/theme.debug.css");\n' >> $@
$(VV)printf '$(foreach f,$(CSS_DONE),extjs_lcss(hq, "$(f)");\n)' >> $@
$(VV)printf 'extjs_lcss(hq, "redir/theme.app.debug.css");\n' >> $@
$(VV)printf 'extjs_load(hq, "redir/locale.js");\n' >> $@
$(VV)printf '$(foreach f,$(JAVASCRIPT),extjs_load(hq, "$(f)");\n)' >> $@

Expand Down
2 changes: 1 addition & 1 deletion src/webui/extjs.c
Expand Up @@ -193,7 +193,7 @@ page_about(http_connection_t *hc, const char *remain, void *opaque)
htsbuf_queue_t *hq = &hc->hc_reply;
const char *lang = hc->hc_access->aa_lang_ui;

htsbuf_qprintf(hq, "<center>\n\
htsbuf_qprintf(hq, "<center class=\"about-tab\">\n\
<div class=\"about-title\">HTS Tvheadend %s</div>\n\
<p>&copy; 2006 - 2016 Andreas \303\226man, Jaroslav Kysela, Adam Sutton, et al.</p>\n\
<p><img src=\"static/img/logobig.png\"></p>\n\
Expand Down
25 changes: 25 additions & 0 deletions src/webui/static/app/ext-access.css
@@ -0,0 +1,25 @@
.ux-mselect {
overflow: auto;
background: #33373d;
position: relative; /* for calculating scroll offsets */
zoom: 1;
overflow: auto;
}

.ux-mselect-item {
font: normal 15px tahoma, arial, helvetica, sans-serif;
padding: 2px;
border: 1px solid #33373d;
white-space: nowrap;
cursor: pointer;
}

.ux-mselect-selected {
border: 3px solid #ff9c33 !important;
background: #66676d;
cursor: pointer;
}

.about-tab a {
color: #ff9c33
}
Empty file.
Empty file.
5 changes: 5 additions & 0 deletions src/webui/static/app/ext.css
Expand Up @@ -974,6 +974,11 @@
font-size: 150%;
}

.about-tab {
margin-left: auto;
margin-right: auto;
}

.about-title {
font-size: 24px;
font-weight: bold;
Expand Down
12 changes: 12 additions & 0 deletions src/webui/webui.c
Expand Up @@ -1812,6 +1812,18 @@ http_redir(http_connection_t *hc, const char *remain, void *opaque)
}
return HTTP_STATUS_BAD_REQUEST;
}
if (!strcmp(components[0], "theme.app.debug.css")) {
theme = access_get_theme(hc->hc_access);
if (theme) {
snprintf(buf, sizeof(buf), "src/webui/static/app/ext-%s.css", theme);
if (!http_file_test(buf)) {
snprintf(buf, sizeof(buf), "/static/app/ext-%s.css", theme);
http_css_import(hc, buf);
return 0;
}
}
return HTTP_STATUS_BAD_REQUEST;
}
}

return HTTP_STATUS_BAD_REQUEST;
Expand Down

0 comments on commit 4bb0864

Please sign in to comment.