From 53e920c49505e6835f8d69604e5bd2018edefe85 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Wed, 30 Nov 2011 15:38:27 +0100 Subject: Bugfixes and improvements of the the CSS stylesheet implementation --- lib/common_test/priv/ct_default.css | 2 +- lib/common_test/src/ct_logs.erl | 28 +++++++++++++--------------- 2 files changed, 14 insertions(+), 16 deletions(-) (limited to 'lib/common_test') diff --git a/lib/common_test/priv/ct_default.css b/lib/common_test/priv/ct_default.css index a64e1ec576..75f8d5db8a 100644 --- a/lib/common_test/priv/ct_default.css +++ b/lib/common_test/priv/ct_default.css @@ -147,7 +147,7 @@ td a:visited { } tr:hover th[scope=row], tr:hover td { - background-color: #808080; + background-color: #D1D1D1; color: #fff; } diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl index d66a31d9a5..19ad7b26d8 100644 --- a/lib/common_test/src/ct_logs.erl +++ b/lib/common_test/src/ct_logs.erl @@ -223,7 +223,6 @@ init_tc(RefreshLog) -> %%% %%%

This function is called by ct_framework:end_tc/3

end_tc(TCPid) -> - io:format(xhtml("
", "
")), %% use call here so that the TC process will wait and receive %% possible exit signals from ct_logs before end_tc returns ok call({end_tc,TCPid}). @@ -745,20 +744,19 @@ print_style(Fd,StyleSheet) -> 0 -> string:str(Str,"") of - 0 -> string:str(Str,""); - N1 -> N1 - end, - case Pos1 of - 0 -> - print_style_error(Fd,StyleSheet,missing_style_end_tag); - _ -> - Style = string:sub_string(Str,Pos0,Pos1+7), - io:format(Fd,"~s\n",[Style]) - end + Pos1 = case string:str(Str,"") of + 0 -> string:str(Str,""); + N1 -> N1 + end, + if (Pos0 == 0) and (Pos1 /= 0) -> + print_style_error(Fd,StyleSheet,missing_style_start_tag); + (Pos0 /= 0) and (Pos1 == 0) -> + print_style_error(Fd,StyleSheet,missing_style_end_tag); + Pos0 /= 0 -> + Style = string:sub_string(Str,Pos0,Pos1+7), + io:format(Fd,"~s\n",[Style]); + Pos0 == 0 -> + io:format(Fd,"\n",[Str]) end; {error,Reason} -> print_style_error(Fd,StyleSheet,Reason) -- cgit v1.2.3