Первый фоллен на хелле (wildkin) wrote in changelog,
Первый фоллен на хелле
wildkin
changelog

[livejournal] r18946: LJSUP-7240: Style-always-mine checkbox u...

Committer: dnikolaev
LJSUP-7240: Style-always-mine checkbox update

U   trunk/cgi-bin/LJ/Widget/StyleAlwaysMine.pm
Modified: trunk/cgi-bin/LJ/Widget/StyleAlwaysMine.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/StyleAlwaysMine.pm	2011-04-21 09:52:57 UTC (rev 18945)
+++ trunk/cgi-bin/LJ/Widget/StyleAlwaysMine.pm	2011-04-21 09:56:52 UTC (rev 18946)
@@ -20,16 +20,32 @@
     if ($u->can_use_stylealwaysmine) {
         $ret .= $class->start_form( action => "$LJ::SITEROOT/tools/setstylemine.bml",
                                     name => "setstyle_form");
-        if ($u->opt_stylealwaysmine) {
-            $ret .= $class->html_hidden( feature => 'off', user => $u->user );
-            $ret .= "<a href='' onclick='document.setstyle_form.submit();return false;'>" .
-                    $class->ml("web.controlstrip.links.styleorigstyle") .
-                    "</a>";
+        if ($LJ::DISABLED{control_strip_new}) {
+            if ($u->opt_stylealwaysmine) {
+                $ret .= $class->html_hidden( feature => 'off', user => $u->user );
+                $ret .= "<a href='' onclick='document.setstyle_form.submit();return false;'>" .
+                        $class->ml("web.controlstrip.links.styleorigstyle") .
+                        "</a>";
+            } else {
+                $ret .= $class->html_hidden( feature => 'on', user => $u->user );
+                $ret .= "<a href='' onclick='document.setstyle_form.submit();return false;'>" .
+                        $class->ml("web.controlstrip.links.stylemystyle") .
+                        "</a>";
+            }
         } else {
-            $ret .= $class->html_hidden( feature => 'on', user => $u->user );
-            $ret .= "<a href='' onclick='document.setstyle_form.submit();return false;'>" .
-                    $class->ml("web.controlstrip.links.stylemystyle") .
-                    "</a>";
+            if ($u->opt_stylealwaysmine) {
+                $ret .= $class->html_hidden( feature => 'off', user => $u->user );
+                $ret .= "<div class=\"w-cs-view-style\">" .
+                        "<label for=\"view-own\"><input type=\"checkbox\" id=\"view-own\" checked=\"checked\" class=\"checkbox\" onchange='document.setstyle_form.submit();'/>" .
+                        $class->ml("web.controlstrip.links.viewownstyle") .
+                        "</label></div>";
+            } else {
+                $ret .= $class->html_hidden( feature => 'on', user => $u->user );
+                $ret .= "<div class=\"w-cs-view-style\">" .
+                        "<label for=\"view-own\"><input type=\"checkbox\" id=\"view-own\" class=\"checkbox\" onchange='document.setstyle_form.submit();'/>" .
+                        $class->ml("web.controlstrip.links.viewownstyle") .
+                        "</label></div>";
+            }
         }
         $ret .= $class->end_form;
     }

Tags: livejournal, pm, wildkin
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