Index: openacs-4/packages/dotlrn-bootstrap3-theme/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-bootstrap3-theme/tcl/apm-callback-procs.tcl,v diff -u -r1.2.2.2 -r1.2.2.3 --- openacs-4/packages/dotlrn-bootstrap3-theme/tcl/apm-callback-procs.tcl 21 Aug 2020 14:36:18 -0000 1.2.2.2 +++ openacs-4/packages/dotlrn-bootstrap3-theme/tcl/apm-callback-procs.tcl 21 Aug 2020 14:36:44 -0000 1.2.2.3 @@ -6,7 +6,7 @@ This Package depends on openacs-bootstrap3-theme } { - + ### 1-COLUMN LAYOUT ### # Insert layout to portal_layouts set var_list [list \ @@ -16,7 +16,7 @@ [list filename ../../dotlrn-bootstrap3-theme/lib/layouts/bootstrap-1column] ] set layout_id [package_instantiate_object -var_list $var_list portal_layout] - + # Insert regions to portal_supported_regions set var_list [list \ [list layout_id $layout_id] \ @@ -33,7 +33,7 @@ [list filename ../../dotlrn-bootstrap3-theme/lib/layouts/bootstrap-2column] ] set layout_id [package_instantiate_object -var_list $var_list portal_layout] - + # Insert regions to portal_supported_regions set var_list [list \ [list layout_id $layout_id] \ @@ -45,7 +45,7 @@ [list region 2] ] package_exec_plsql -var_list $var_list portal_layout add_region - + ### 3-COLUMN LAYOUT ### # Insert layout to portal_layouts set var_list [list \ @@ -55,7 +55,7 @@ [list filename ../../dotlrn-bootstrap3-theme/lib/layouts/bootstrap-3column] ] set layout_id [package_instantiate_object -var_list $var_list portal_layout] - + # Insert regions to portal_supported_regions set var_list [list \ [list layout_id $layout_id] \ @@ -72,8 +72,8 @@ [list region 3] ] package_exec_plsql -var_list $var_list portal_layout add_region - - + + # Insert these themes into portal_element_themes set var_list [list \ [list name "#dotlrn-bootstrap3-theme.bootstrap3-theme#"] \ @@ -82,14 +82,14 @@ [list resource_dir ../../dotlrn-bootstrap3-theme/lib/themes/bootstrap3-theme] ] set theme_id [package_instantiate_object -var_list $var_list portal_element_theme] - + # Insert these themes to dotlrn_site_templates set site_template_id [db_nextval acs_object_id_seq] db_dml insert_theme_to_dotlrn_site_templates {} - + # Insert this package's themes to site_templates db_transaction { - + subsite::new_subsite_theme \ -key dotlrn_bootstrap3 \ -name #dotlrn-bootstrap3-theme.bootstrap3-theme# \ @@ -120,21 +120,21 @@ {-package_id:required} } { Uninstantiate the package. We set portal_pages to zen theme layout here, because parameter BootstrapToZenMap is not available anymore at before_uninstall. -} { - +} { + # switch to zen-theme, set zen-theme-specific parameters, update portal_pages to zen-theme if {[subsite::get_theme] in {dotlrn_bootstrap3}} { subsite::set_theme -theme dotlrn_zen } # set default parameters to zen-theme; set portal_pages to zen-theme layout dotlrn_bootstrap3_theme::portal_page_parameter_update -new_theme dotlrn_zen - + } ad_proc -private dotlrn_bootstrap3_theme::apm::before_uninstall {} { Uninstall the package } { - + db_transaction { # delete dotlrn-bootstrap3 portal_layouts, portal_supported_regions, dotlrn_site_templates. portal_element_themes db_dml delete_theme_from_portal_layouts1 {} @@ -148,7 +148,7 @@ } on_error { ns_log notice "$errmsg" } - + # delete subsite_theme subsite::delete_subsite_theme -key dotlrn_bootstrap3 }