mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-05-10 05:56 am

[dw-nonfree] Fix up layout types definition

[commit: http://hg.dwscoalition.org/dw-nonfree/rev/87692bad1af7]

http://bugs.dwscoalition.org/show_bug.cgi?id=966

Use layout_type, wizard updates for Transmogrified.

Patch by [personal profile] afuna.

Files modified:
  • bin/upgrading/s2layers/transmogrified/layout.s2
  • cgi-bin/LJ/S2Theme/transmogrified.pm
--------------------------------------------------------------------------------
diff -r a736d161c5cb -r 87692bad1af7 bin/upgrading/s2layers/transmogrified/layout.s2
--- a/bin/upgrading/s2layers/transmogrified/layout.s2	Sat May 09 07:37:55 2009 +0000
+++ b/bin/upgrading/s2layers/transmogrified/layout.s2	Sun May 10 05:56:40 2009 +0000
@@ -11,23 +11,16 @@ set comment_management_links = "text";
 set comment_management_links = "text";
 set all_commentsubjects = true;
 
-property string sidebar_position { 
-    des = "Set the position of the sidebar";
-    values = "left|Left|right|Right";
-    noui = 1;
-}
-property string sidebar_width {
-    des = "How wide should the sidebar be?";
-    noui = 1;
-}
-set sidebar_position = "right";
-set sidebar_width = "230px";
-
 propgroup presentation {
     property use num_items_recent;
     property use num_items_reading;
     property use use_journalstyle_entry_page;
+    property use layout_type;
+    property use sidebar_width;
 }
+
+set layout_type = "two-columns-right";
+set sidebar_width = "230px";
 
 propgroup modules {
     property use module_userprofile_group;
@@ -267,15 +260,8 @@ function print_module_userprofile() {
 
 function print_stylesheet () {
     var string sidebar_positioning = "margin-right: -$*sidebar_width;";
+    var string sidebar_position = "right";
     var string sidebar_position_alt = "left";
-    if ($*sidebar_position == "left") {
-        $sidebar_positioning = "right: $*sidebar_width;
-        margin-left: -100%;
-    }
-    *+html .module-section-two {
-        right: -19px";
-        $sidebar_position_alt = "right";
-    }
 
     """
     /* believe me, this style is much easier to deal with if you 
@@ -318,7 +304,7 @@ function print_stylesheet () {
 
     #wrap {
         color: $*color_page_text;
-        padding-$*sidebar_position: $*sidebar_width;
+        padding-$sidebar_position: $*sidebar_width;
         padding-top: 20px;
         padding-$sidebar_position_alt: 20px;
 	}
diff -r a736d161c5cb -r 87692bad1af7 cgi-bin/LJ/S2Theme/transmogrified.pm
--- a/cgi-bin/LJ/S2Theme/transmogrified.pm	Sat May 09 07:37:55 2009 +0000
+++ b/cgi-bin/LJ/S2Theme/transmogrified.pm	Sun May 10 05:56:40 2009 +0000
@@ -3,6 +3,9 @@ use base qw( LJ::S2Theme );
 
 sub cats { qw( featured ) }
 sub designer { "Yvonne" }
+
+sub layouts { ( "2r" => "two-columns-right" ) }
+sub layout_prop { "layout_type" }
 
 sub page_props {
     my $self = shift;
--------------------------------------------------------------------------------