Committer: dnikolaev
LJSUP-8562: Restore controlstrip settings at /customize/options.bmlU trunk/bin/upgrading/s2layers/core1.s2 U trunk/cgi-bin/LJ/ControlStrip.pm
Modified: trunk/bin/upgrading/s2layers/core1.s2 =================================================================== --- trunk/bin/upgrading/s2layers/core1.s2 2011-04-19 07:43:59 UTC (rev 18907) +++ trunk/bin/upgrading/s2layers/core1.s2 2011-04-19 09:29:41 UTC (rev 18908) @@ -2015,6 +2015,64 @@ print control_strip_logged_out_userpic_css(); print control_strip_logged_out_full_userpic_css(); } + + ### New control strip CSS + + "/* Cleaned CSS for new ControlStrip */\n"; + + if ($fgcolor or $bgcolor) { + ".w-cs {\n"; + if ($bgcolor) { + " background: " + $*control_strip_bgcolor + ";\n"; + } + if ($fgcolor) { + " color: " + $*control_strip_fgcolor + ";\n"; + } + if ($bgimage == "") { + " background-image: none;\n"; + } else { + " background-image: url($bgimage);\n"; + } + "}\n"; + } + + if ($linkcolor) { + ".w-cs A:link,\n"; + ".w-cs A:visited,\n"; + ".w-cs A:hover,\n"; + ".w-cs A:active {\n"; + " color: " + $*control_strip_linkcolor + " !important;\n"; + "}\n"; + } + + "/* User info */\n"; + if ($bgcolor or $bordercolor) { + ".w-cs .w-cs-userinfo {\n"; + if ($bgcolor) { + " background: " + $*control_strip_bgcolor + ";\n"; + } + if ($bordercolor) { + " border-color: " + $*control_strip_bordercolor + ";\n"; + } + if ($bgimage == "") { + " background-image: none;\n"; + } else { + " background-image: url($bgimage);\n"; + } + "}\n"; + } + + "/* Summary */\n"; + if ($bgcolor) { + ".w-cs .w-cs-summary {\n"; + " background: " + $*control_strip_bgcolor + ";\n"; + "}\n"; + } + if ($bordercolor) { + ".w-cs .w-cs-summary LI.w-cs-i-tokens {\n"; + " border-color: " + $*control_strip_bordercolor + ";\n"; + "}\n"; + } } } Modified: trunk/cgi-bin/LJ/ControlStrip.pm =================================================================== --- trunk/cgi-bin/LJ/ControlStrip.pm 2011-04-19 07:43:59 UTC (rev 18907) +++ trunk/cgi-bin/LJ/ControlStrip.pm 2011-04-19 09:29:41 UTC (rev 18908) @@ -77,8 +77,6 @@ $data_journal->{view_entry} = $data_journal->{view} eq 'entry'; $data_journal->{display} = LJ::ljuser($journal); - # warn "[", $data_journal->{view}, "]\n"; - if ($remote) { $data_remote->{is_logged_in} = 1; @@ -108,7 +106,6 @@ } } } - warn $data_journal->{login_form}->{root}; $data_remote->{userpic} = { src => $tinted_nouserpic_img || "$LJ::IMGPREFIX/controlstrip/nouserpic.gif", @@ -310,8 +307,8 @@ $data->{remote}->{status} = get_status($data); - use Data::Dumper; - # warn Dumper( { flatten($data) } ), "\n"; + # my $h = { flatten($data) }; + # warn join('', map { "$_ => $h->{$_}\n" } sort keys %$h); my $tmpl = LJ::HTML::Template->new( { @@ -336,9 +333,6 @@ $tmpl->param(flatten($data), link_mobile => $mobile_link ); - # use Data::Dumper; - # warn Dumper({flatten($data)}), "\n"; - return $tmpl->output; }