Палсеич— (lusever) wrote in changelog,
Палсеич—
lusever
changelog

[ljcom] r8252: LJSV-879: Add "Disable anonymous" as an ...

Committer: pkornilov
LJSV-879: Add "Disable anonymous" as an option on virtual gift blocking.
U   trunk/cgi-bin/LJ/Hooks/Settings.pm
Modified: trunk/cgi-bin/LJ/Hooks/Settings.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/Settings.pm	2010-03-04 07:47:14 UTC (rev 8251)
+++ trunk/cgi-bin/LJ/Hooks/Settings.pm	2010-03-04 08:12:40 UTC (rev 8252)
@@ -108,6 +108,20 @@
                              'disabled' => $is_plus, 
                              'selected' => $sponsored });
     $ret .= "<label for='opt_disable_vgifts_sponsored'>" . LJ::Lang::ml('ljcom.extra_privacy_options.vgifts.disable.sponsored') . "</label>";
+    $ret .= qq|<script type="text/javascript">
+        jQuery('#opt_disable_vgifts').change(function()
+        {
+            var disable_sponsored = jQuery('#opt_disable_vgifts_sponsored'),
+                is_plus = '$is_plus';
+            if (jQuery(this).val() == 'all') {
+                disable_sponsored.attr('checked', 'checked').attr('disabled', 'disabled');
+            } else if (disable_sponsored.attr('disabled')) {
+                disable_sponsored.removeAttr('checked');
+                !is_plus && disable_sponsored.removeAttr('disabled');
+            }
+        })
+        .change();
+    </script>|;
     $ret .= "<br /><span class='helper'>*" . LJ::Lang::ml('ljcom.extra_privacy_options.vgifts.disable.note') . "</span>" if $is_plus;
     $ret .= "</td></tr>\n";
     $ret .= "</table>\n";

Tags: ljcom, lusever, pm
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments