Committer: wisest-owl
LJSUP-13267: Some improvements for properties of S2-layersU trunk/cgi-bin/LJ/Customize.pm U trunk/cgi-bin/LJ/Widget/S2PropGroup.pm
Modified: trunk/cgi-bin/LJ/Customize.pm =================================================================== --- trunk/cgi-bin/LJ/Customize.pm 2012-09-11 13:55:26 UTC (rev 22864) +++ trunk/cgi-bin/LJ/Customize.pm 2012-09-11 14:34:11 UTC (rev 22865) @@ -463,7 +463,7 @@ $prop = S2::get_property($lyr_core->{'s2lid'}, $prop) unless ref $prop; next unless ref $prop; - next if $prop->{'noui'}; + next if $prop->{'noui'} && !S2::is_property_use ([$style->{'layer'}{'theme'}], $prop->{'name'}); my $name = $prop->{'name'}; next unless LJ::S2::can_use_prop($u, $lyr_layout->{'uniq'}, $name); Modified: trunk/cgi-bin/LJ/Widget/S2PropGroup.pm =================================================================== --- trunk/cgi-bin/LJ/Widget/S2PropGroup.pm 2012-09-11 13:55:26 UTC (rev 22864) +++ trunk/cgi-bin/LJ/Widget/S2PropGroup.pm 2012-09-11 14:34:11 UTC (rev 22865) @@ -44,7 +44,7 @@ $ret .= "<table cellspacing='0' class='prop-list first' id='proplist__presentation__basic'>"; $ret .= $class->language_chooser($u) if $opts{show_lang_chooser}; foreach my $prop_name (@basic_props) { - next if $class->skip_prop($props->{$prop_name}, $prop_name, theme => $theme); + next if $class->skip_prop($props->{$prop_name}, $prop_name, theme => $theme, style => $style); if ($opts{show_lang_chooser}) { # start on gray, since the language chooser will be white @@ -60,7 +60,7 @@ $count = 1; # reset counter my $header_printed = 0; foreach my $prop_name (@$groupprops) { - next if $class->skip_prop($props->{$prop_name}, $prop_name, props_to_skip => \%is_basic_prop, theme => $theme); + next if $class->skip_prop($props->{$prop_name}, $prop_name, props_to_skip => \%is_basic_prop, theme => $theme, style => $style); # need to print the header inside the foreach because we don't want it printed if # there's no props in this group that are also in this subheader @@ -366,8 +366,9 @@ my $groupprops = $opts{groupprops}; my $theme = LJ::Customize->get_current_theme($u); + my $style = LJ::S2::load_style($u->prop('s2_style')); foreach my $prop_name (@$groupprops) { - return 1 unless $class->skip_prop($props->{$prop_name}, $prop_name, theme => $theme); + return 1 unless $class->skip_prop($props->{$prop_name}, $prop_name, theme => $theme, style => $style); } return 0;