Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -N -r1.171 -r1.172 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 2 Aug 2018 11:20:04 -0000 1.171 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 2 Aug 2018 13:11:39 -0000 1.172 @@ -4036,6 +4036,9 @@ # - prefix: used for resolving the files on the server; might either point # to the CDN or to locally installed files (typically /resources/...) # +# Optionally, the dict can contain more fields, like e.g. an urnMap for mapping +# urls to resources (see e.g. openacs-bootstrap4-theme) +# namespace eval util::resources { ad_proc -public ::util::resources::is_installed_locally { Index: openacs-4/packages/openacs-bootstrap3-theme/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/tcl/apm-callback-procs.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/openacs-bootstrap3-theme/tcl/apm-callback-procs.tcl 2 Aug 2018 12:41:42 -0000 1.4 +++ openacs-4/packages/openacs-bootstrap3-theme/tcl/apm-callback-procs.tcl 2 Aug 2018 13:11:39 -0000 1.5 @@ -53,9 +53,8 @@ -list_filter_template filters \ -dimensional_template dimensional \ -resource_dir /packages/openacs-bootstrap3-theme/resources \ - -streaming_head tabbed-streaming-head-turquois + -streaming_head tabbed-streaming-head-turquois } - } ad_proc -public openacs_bootstrap3_theme::apm::before_uninstall {} { Index: openacs-4/packages/openacs-bootstrap3-theme/tcl/init-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/tcl/init-procs.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/openacs-bootstrap3-theme/tcl/init-procs.tcl 2 Aug 2018 11:20:04 -0000 1.2 +++ openacs-4/packages/openacs-bootstrap3-theme/tcl/init-procs.tcl 2 Aug 2018 13:11:39 -0000 1.3 @@ -13,7 +13,7 @@ # # Provide paths for loading either via resources or CDN # - set resourceDir [acs_package_root_dir openacs-bootstrap3-theme/www/resources]/bootstrap + set resourceDir [acs_package_root_dir openacs-bootstrap3-theme/www/resources/bootstrap] set resourceUrl /resources/openacs-bootstrap3-theme/bootstrap set cdn "//maxcdn.bootstrapcdn.com/bootstrap" set version $openacs_bootstrap3_theme::bootstrap_version @@ -27,12 +27,17 @@ } lappend result \ - cdn $cdn \ resourceDir $resourceDir \ + cdn $cdn \ + cdnHost $cdnHost \ prefix $prefix \ cssFiles {css/bootstrap.min.css} \ jsFiles {js/bootstrap.min.js} \ - extraFiles {fonts/glyphicons-halflings-regular.woff fonts/glyphicons-halflings-regular.ttf} + extraFiles {fonts/glyphicons-halflings-regular.woff fonts/glyphicons-halflings-regular.ttf} \ + urnMap { + urn:ad:css:bootstrap3 css/bootstrap.min.css + urn:ad:js:bootstrap3 js/bootstrap.min.js + } return $result } Index: openacs-4/packages/openacs-bootstrap3-theme/tcl/resource-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/tcl/resource-init.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/openacs-bootstrap3-theme/tcl/resource-init.tcl 2 Aug 2018 09:13:17 -0000 1.1 +++ openacs-4/packages/openacs-bootstrap3-theme/tcl/resource-init.tcl 2 Aug 2018 13:11:39 -0000 1.2 @@ -10,19 +10,10 @@ # set resource_info [::openacs_bootstrap3_theme::resource_info] set prefix [dict get $resource_info prefix] -set regnames {bootstrap.min.js bootstrap3 bootstrap.min.css bootstrap3} -foreach file [concat \ - [dict get $resource_info cssFiles] \ - [dict get $resource_info jsFiles] \ - ] { - set fn [file tail $file] - if {[dict exists $regnames $fn]} { - set ext [string trimleft [file extension $fn] .] - template::register_urn \ - -urn urn:ad:${ext}:[dict get $regnames $fn] \ - -resource $prefix/$file - } else { - ns_log warning "openacs-bootstrap3_theme: not registering URN for $file" - } +foreach urn [dict keys [dict get $resource_info urnMap]] { + ns_log notice "TEST -urn $urn -resource $prefix/[dict get $resource_info urnMap $urn]" + template::register_urn \ + -urn $urn \ + -resource $prefix/[dict get $resource_info urnMap $urn] }