ssafronova (ssafronova) wrote in changelog,
ssafronova
ssafronova
changelog

[livejournal] r18835: LJSUP-8539: Contextual popup (hover menu...

Committer: ssafronova
LJSUP-8539: Contextual popup (hover menu) - disable in settings
U   trunk/cgi-bin/ljhooks.pl
U   trunk/cgi-bin/weblib.pl
Modified: trunk/cgi-bin/ljhooks.pl
===================================================================
--- trunk/cgi-bin/ljhooks.pl	2011-04-11 04:10:52 UTC (rev 18834)
+++ trunk/cgi-bin/ljhooks.pl	2011-04-11 05:53:39 UTC (rev 18835)
@@ -319,4 +319,14 @@
     return 1;
 });
 
+register_setter("opt_ctxpopup", sub {
+    my ($u, $key, $value, $err) = @_;
+    unless ($value =~ /^(Y|N)$/) {
+        $$err = "Illegal value. Must be 'Y' or 'N'";
+        return 0;
+    }
+    $u->set_prop("opt_ctxpopup", $value);
+    return 1;
+});
+
 1;

Modified: trunk/cgi-bin/weblib.pl
===================================================================
--- trunk/cgi-bin/weblib.pl	2011-04-11 04:10:52 UTC (rev 18834)
+++ trunk/cgi-bin/weblib.pl	2011-04-11 05:53:39 UTC (rev 18835)
@@ -1336,6 +1336,7 @@
 
     # ctxpopup prop
     my $ctxpopup = 1;
+    $ctxpopup = 0 if $remote and not $remote->prop("opt_ctxpopup");
 
     # poll for esn inbox updates?
     my $inbox_update_poll = $LJ::DISABLED{inbox_update_poll} ? 0 : 1;

Tags: livejournal, pl, ssafronova
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