vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r21419: LJSUP-11518: Add ability to assign custo...

Committer: vad
LJSUP-11518: Add ability to assign custom classes to the root node of widget.
U   trunk/cgi-bin/LJ/Widget.pm
Modified: trunk/cgi-bin/LJ/Widget.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget.pm	2012-03-14 14:28:23 UTC (rev 21418)
+++ trunk/cgi-bin/LJ/Widget.pm	2012-03-14 14:45:11 UTC (rev 21419)
@@ -28,6 +28,8 @@
     return "";
 }
 
+sub collapsable { } ## true for collapsable widget
+
 sub start_form {
     my $class = shift;
     my %opts = @_;
@@ -130,8 +132,9 @@
     } elsif (ref $class && $class->{'no_container_div'}) {
         return $rv;
     } else {
+        my $collapsable_class = $class->collapsable ? 'appwidget-prop-collapsable' : '';
         return 
-            "<div class='appwidget appwidget-$css_subclass' id='$widget_ele_id'>\n" .
+            "<div class='appwidget appwidget-$css_subclass $collapsable_class' id='$widget_ele_id'>\n" .
             $rv .
             "</div><!-- end .appwidget-$css_subclass -->\n";
     }

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