Index: openacs-4/packages/acs-subsite/acs-subsite.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/acs-subsite.info,v
diff -u -r1.102 -r1.103
--- openacs-4/packages/acs-subsite/acs-subsite.info 6 Feb 2009 20:56:52 -0000 1.102
+++ openacs-4/packages/acs-subsite/acs-subsite.info 9 May 2009 22:27:52 -0000 1.103
@@ -8,7 +8,7 @@
f
t
-
+
OpenACS
Subsite
2008-05-31
@@ -17,7 +17,7 @@
GPL
3
-
+
Index: openacs-4/packages/acs-subsite/tcl/apm-callback-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/apm-callback-procs.tcl,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/acs-subsite/tcl/apm-callback-procs.tcl 10 Jan 2007 21:22:06 -0000 1.10
+++ openacs-4/packages/acs-subsite/tcl/apm-callback-procs.tcl 9 May 2009 22:27:53 -0000 1.11
@@ -90,5 +90,27 @@
}
}
}
+ 5.5.0d7 5.5.0d8 {
+ db_transaction {
+ set package_keys ([join '[subsite::package_keys]' ,])
+ foreach subsite_id [db_list get_subsite_ids {}] {
+ set new_css [list]
+ set css [parameter::get \
+ -package_id $subsite_id \
+ -parameter ThemeCSS \
+ -default ""]
+ if { $css ne "" } {
+ foreach css $css {
+ lappend new_css [list [list href [lindex $css 0]] \
+ [list media [lindex $css 1]]]
+ }
+ parameter::set_value \
+ -package_id $subsite_id \
+ -parameter ThemeCSS \
+ -value $new_css
+ }
+ }
+ }
+ }
}
}
Index: openacs-4/packages/acs-subsite/tcl/apm-callback-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/apm-callback-procs.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-subsite/tcl/apm-callback-procs.xql 9 May 2009 22:27:53 -0000 1.1
@@ -0,0 +1,12 @@
+
+
+
+
+
+ select package_id
+ from apm_packages
+ where package_key in $package_keys
+
+
+
+
Index: openacs-4/packages/openacs-default-theme/openacs-default-theme.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-default-theme/openacs-default-theme.info,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/openacs-default-theme/openacs-default-theme.info 8 May 2008 01:35:58 -0000 1.2
+++ openacs-4/packages/openacs-default-theme/openacs-default-theme.info 9 May 2009 22:27:53 -0000 1.3
@@ -16,7 +16,7 @@
0
-
+
Index: openacs-4/packages/openacs-default-theme/tcl/apm-callback-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-default-theme/tcl/apm-callback-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/openacs-default-theme/tcl/apm-callback-procs.tcl 8 May 2008 02:44:45 -0000 1.2
+++ openacs-4/packages/openacs-default-theme/tcl/apm-callback-procs.tcl 9 May 2009 22:27:53 -0000 1.3
@@ -13,9 +13,9 @@
-key default_plain \
-name #openacs-default-theme.plain# \
-template /packages/openacs-default-theme/lib/plain-master \
- -css "{/resources/openacs-default-theme/styles/default-master.css all}
- {/resources/acs-templating/forms.css all}
- {/resources/acs-templating/lists.css all}" \
+ -css {{{href /resources/openacs-default-theme/styles/default-master.css} {media all}}
+ {{href /resources/acs-templating/forms.css} {media all}}
+ {{href /resources/acs-templating/lists.css} {media all}}} \
-form_template /packages/acs-templating/resources/forms/standard \
-list_template /packages/acs-templating/resources/lists/table \
-list_filter_template /packages/acs-templating/resources/lists/filters
@@ -24,9 +24,9 @@
-key default_tabbed \
-name #openacs-default-theme.tabbed# \
-template /packages/openacs-default-theme/lib/tabbed-master \
- -css "{/resources/openacs-default-theme/styles/default-master.css all}
- {/resources/acs-templating/forms.css all}
- {/resources/acs-templating/lists.css all}" \
+ -css {{{href /resources/openacs-default-theme/styles/default-master.css} {media all}}
+ {{href /resources/acs-templating/forms.css} {media all}}
+ {{href /resources/acs-templating/lists.css} {media all}}} \
-form_template /packages/acs-templating/resources/forms/standard \
-list_template /packages/acs-templating/resources/lists/table \
-list_filter_template /packages/acs-templating/resources/lists/filters
@@ -48,9 +48,9 @@
-value /packages/openacs-default-theme/lib/plain-master
parameter::set_default -package_key acs-subsite -parameter ThemeCSS \
- -value "{/resources/openacs-default-theme/styles/default-master.css all}
- {/resources/acs-templating/forms.css all}
- {/resources/acs-templating/lists.css all}"
+ -value {{{href /resources/openacs-default-theme/styles/default-master.css} {media all}}
+ {{href /resources/acs-templating/forms.css} {media all}}
+ {{href /resources/acs-templating/lists.css} {media all}}}
parameter::set_default -package_key acs-subsite -parameter ThemeKey -value default_plain
}
Index: openacs-4/www/blank-master.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/www/blank-master.tcl,v
diff -u -r1.46 -r1.47
--- openacs-4/www/blank-master.tcl 4 Oct 2008 20:20:18 -0000 1.46
+++ openacs-4/www/blank-master.tcl 9 May 2009 22:27:53 -0000 1.47
@@ -84,9 +84,24 @@
set css [parameter::get -package_id [ad_conn subsite_id] -parameter ThemeCSS -default ""]
if { $css ne "" } {
+ set params [list]
+
+ # DRB: Need to handle two cases, the lame first attempt and the more complete current
+ # attempt which allows you to specify all of the parameters to template::head::add_css
+ # (sigh, remove this kludge for 5.5.1). We need to handle the old case so upgrades
+ # to 5.5 for mgh and various of my sites work correctly.
+
foreach css $css {
- template::head::add_css -href [lindex $css 0] -media [lindex $css 1]
+ if { [llength $css] == 2 && [llength [lindex $css 0]] == 1 } {
+ template::head::add_css -href [lindex $css 0] -media [lindex $css 1]
+ } else {
+ foreach param $css {
+ lappend params -[lindex $param 0] [lindex $param 1]
+ }
+ eval [concat template::head::add_css $params]
+ }
}
+
} else {
template::head::add_css \
-href "/resources/acs-templating/lists.css" \