Index: openacs-4/packages/xowiki/xowiki.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v diff -u -N -r1.159 -r1.160 --- openacs-4/packages/xowiki/xowiki.info 10 Mar 2018 17:38:40 -0000 1.159 +++ openacs-4/packages/xowiki/xowiki.info 14 Mar 2018 15:40:49 -0000 1.160 @@ -10,7 +10,7 @@ t xowiki - + Gustaf Neumann A xotcl-based enterprise wiki system with multiple object types 2017-08-06 @@ -55,11 +55,11 @@ BSD-Style 2 - + - + @@ -74,8 +74,6 @@ - - Index: openacs-4/packages/xowiki/resources/templates/oacs-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/oacs-view.adp,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/xowiki/resources/templates/oacs-view.adp 22 Dec 2017 13:51:40 -0000 1.4 +++ openacs-4/packages/xowiki/resources/templates/oacs-view.adp 14 Mar 2018 15:40:49 -0000 1.5 @@ -1,4 +1,4 @@ - + @context;literal@ @item_id;literal@ @@ -7,7 +7,7 @@ - @header_stuff;literal@ +
Index: openacs-4/packages/xowiki/resources/templates/oacs-view2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/oacs-view2.adp,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/xowiki/resources/templates/oacs-view2.adp 22 Dec 2017 13:51:40 -0000 1.4 +++ openacs-4/packages/xowiki/resources/templates/oacs-view2.adp 14 Mar 2018 15:40:49 -0000 1.5 @@ -1,4 +1,4 @@ - + @context;literal@ @item_id;literal@ @@ -8,7 +8,7 @@ - @header_stuff;literal@ +
Index: openacs-4/packages/xowiki/resources/templates/oacs-view3-bootstrap3.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/oacs-view3-bootstrap3.adp,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/xowiki/resources/templates/oacs-view3-bootstrap3.adp 22 Dec 2017 13:51:40 -0000 1.4 +++ openacs-4/packages/xowiki/resources/templates/oacs-view3-bootstrap3.adp 14 Mar 2018 15:40:49 -0000 1.5 @@ -1,4 +1,4 @@ - + @context;literal@ @item_id;literal@ @@ -18,7 +18,7 @@ - @header_stuff;literal@ +
Index: openacs-4/packages/xowiki/resources/templates/oacs-view3.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/oacs-view3.adp,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/xowiki/resources/templates/oacs-view3.adp 22 Dec 2017 13:51:40 -0000 1.4 +++ openacs-4/packages/xowiki/resources/templates/oacs-view3.adp 14 Mar 2018 15:40:49 -0000 1.5 @@ -1,4 +1,4 @@ - + @context;literal@ @item_id;literal@ @@ -13,7 +13,7 @@ - @header_stuff;literal@ +
Index: openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.adp,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.adp 22 Dec 2017 13:51:40 -0000 1.4 +++ openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.adp 14 Mar 2018 15:40:49 -0000 1.5 @@ -1,11 +1,11 @@ - + @context;literal@ @item_id;literal@ body doc - @header_stuff;literal@ +
@@ -71,7 +71,7 @@
+ @context;literal@ @item_id;literal@ body doc - @header_stuff;literal@ +
@@ -71,7 +71,7 @@
+ @context;literal@ @item_id;literal@ body doc - @header_stuff;literal@ +
Index: openacs-4/packages/xowiki/resources/templates/view-links.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/view-links.adp,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/xowiki/resources/templates/view-links.adp 22 Dec 2017 13:51:40 -0000 1.4 +++ openacs-4/packages/xowiki/resources/templates/view-links.adp 14 Mar 2018 15:40:49 -0000 1.5 @@ -1,4 +1,4 @@ - +
Index: openacs-4/packages/xowiki/resources/templates/view-plain.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/view-plain.adp,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/xowiki/resources/templates/view-plain.adp 22 Dec 2017 13:51:40 -0000 1.4 +++ openacs-4/packages/xowiki/resources/templates/view-plain.adp 14 Mar 2018 15:40:49 -0000 1.5 @@ -1,4 +1,4 @@ - +
Index: openacs-4/packages/xowiki/tcl/adp-generator-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/adp-generator-procs.tcl,v diff -u -N -r1.50 -r1.51 --- openacs-4/packages/xowiki/tcl/adp-generator-procs.tcl 24 Dec 2017 12:51:38 -0000 1.50 +++ openacs-4/packages/xowiki/tcl/adp-generator-procs.tcl 14 Mar 2018 15:40:49 -0000 1.51 @@ -28,7 +28,7 @@ @item_id;literal@ body doc - [:extra_header_stuff]@header_stuff;literal@}]\n + [:extra_header_stuff]}]\n } ADP_Generator instproc wikicmds_part {} { @@ -446,7 +446,7 @@
0} { set name [[self]::__bulkactions set __identifier] @@ -498,23 +496,23 @@ html::div -id ${:id}_wrapper -class "table-responsive" { html::form -name $name -id $name -method POST { html::div -id ${:id}_container { - html::table -id ${:id} -class [:set css.table-class] { - my render-actions - my render-body + html::table -id ${:id} -class ${:css.table-class} { + :render-actions + :render-body } - if {[llength $bulkactions]>0} { my render-bulkactions } + if {[llength $bulkactions]>0} { :render-bulkactions } } } } } else { #nesting forms inside a xowf page will place the action buttons at the wrong place! html::div -id ${:id}_wrapper -class "table-responsive" { html::div -id ${:id}_container { - html::table -id ${:id} -class [:set css.table-class] { - my render-actions - my render-body + html::table -id ${:id} -class ${:css.table-class} { + :render-actions + :render-body } - if {[llength $bulkactions]>0} { my render-bulkactions } + if {[llength $bulkactions]>0} { :render-bulkactions } } } } Index: openacs-4/packages/xowiki/tcl/chat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/chat-procs.tcl,v diff -u -N -r1.24 -r1.25 --- openacs-4/packages/xowiki/tcl/chat-procs.tcl 1 Feb 2018 22:16:44 -0000 1.24 +++ openacs-4/packages/xowiki/tcl/chat-procs.tcl 14 Mar 2018 15:40:49 -0000 1.25 @@ -97,7 +97,7 @@ } # small javascript library to obtain a portable ajax request object - ::xo::Page requireJS "/resources/xowiki/get-http-object.js" + ::xo::Page requireJS urn:ad:js:get-http-object switch -- $mode { polling { Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -N -r1.258 -r1.259 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 10 Mar 2018 17:38:40 -0000 1.258 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 14 Mar 2018 15:40:49 -0000 1.259 @@ -1882,7 +1882,7 @@ if {![:istype ::xowiki::formfield::richtext] || $disabled } { :render_richtext_as_div } else { - ::xo::Page requireJS "/resources/xowiki/jquery/jquery.min.js" + ::xo::Page requireJS urn:ad:js:jquery ::xo::Page requireJS "/resources/xowiki/ckeditor/ckeditor_source.js" #::xo::Page requireJS "/resources/xowiki/ckeditor/ckeditor.js" ::xo::Page requireJS "/resources/xowiki/ckeditor/adapters/jquery.js" @@ -2095,7 +2095,7 @@ :render_richtext_as_div } else { - template::head::add_javascript -src "/resources/xowiki/jquery/jquery.min.js" + template::head::add_javascript -src urn:ad:js:jquery try { # # Try to use the ckeditor from the richtext-ckeditor4 @@ -2294,7 +2294,7 @@ :render_richtext_as_div } else { ::xo::Page requireCSS "/resources/xowiki/wymeditor/skins/default/screen.css" - ::xo::Page requireJS "/resources/xowiki/jquery/jquery.min.js" + ::xo::Page requireJS urn:ad:js:jquery ::xo::Page requireJS "/resources/xowiki/wymeditor/jquery.wymeditor.pack.js" set postinit "" foreach plugin {hovertools resizable fullscreen embed} { Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v diff -u -N -r1.210 -r1.211 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 1 Feb 2018 21:56:57 -0000 1.210 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 14 Mar 2018 15:40:49 -0000 1.211 @@ -1401,7 +1401,7 @@ my-tags instproc render {} { :get_parameters - ::xo::Page requireJS "/resources/xowiki/get-http-object.js" + ::xo::Page requireJS urn:ad:js:get-http-object set p_link [${:__including_page} pretty_link] set return_url [::xo::cc url]?[::xo::cc actual_query] @@ -1425,7 +1425,7 @@ set :id [::xowiki::Includelet html_id [self]] } set content [subst { - #xowiki.your_tags_label#: $tags_with_links + #xowiki.your_tags_label#: $tags_with_links (#xowiki.edit_link#, #xowiki.popular_tags_link#)
\n" - ::xo::Page requireJS "/resources/xowiki/jquery/jquery.min.js" + ::xo::Page requireJS urn:ad:js:jquery ::xo::Page requireJS "/resources/xowiki/jquery.carousel.min.js" ::xo::Page requireJS [subst -novariables { $(function(){ @@ -2760,7 +2760,7 @@
  • [join [:render_images $pages] "
  • \n
  • "]
  • \ "
    \n" - ::xo::Page requireJS "/resources/xowiki/jquery/jquery.min.js" + ::xo::Page requireJS urn:ad:js:jquery ::xo::Page requireJS "/resources/xowiki/infiniteCarousel/jquery.infinitecarousel2.min.js" ::xo::Page requireJS [subst -novariables { $(function(){ @@ -2820,7 +2820,7 @@ "
    \n" ::xo::Page requireStyle "div.jquery-cloud-carousel div {width:650px; height:400px;background:#000;}" - ::xo::Page requireJS "/resources/xowiki/jquery/jquery.min.js" + ::xo::Page requireJS urn:ad:js:jquery ::xo::Page requireJS "/resources/xowiki/jquery.mousewheel.min.js" ::xo::Page requireJS "/resources/xowiki/cloud-carousel.1.0.5.min.js" @@ -2898,7 +2898,7 @@ ::xo::Page requireStyle "div.spacegallery {width:600px; height:450px;}" ::xo::Page requireCSS "/resources/xowiki/spacegallery/spacegallery.css" - ::xo::Page requireJS "/resources/xowiki/jquery/jquery.min.js" + ::xo::Page requireJS urn:ad:js:jquery ::xo::Page requireJS "/resources/xowiki/spacegallery/js/eye.js" ::xo::Page requireJS "/resources/xowiki/spacegallery/js/utils.js" ::xo::Page requireJS "/resources/xowiki/spacegallery/js/spacegallery.js" @@ -3653,7 +3653,7 @@ # ::xotcl::Class highcharts -parameter {title id} highcharts instproc pie {names data} { - ::xo::Page requireJS "/resources/xowiki/jquery/jquery.min.js" + ::xo::Page requireJS urn:ad:js:jquery ::xo::Page requireJS "/resources/xowiki/highcharts/js/highcharts.js" ::xo::Page requireJS "/resources/xowiki/highcharts/js/themes/gray.js" set result "
    \n" Index: openacs-4/packages/xowiki/tcl/link-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/link-procs.tcl,v diff -u -N -r1.99 -r1.100 --- openacs-4/packages/xowiki/tcl/link-procs.tcl 21 Oct 2017 17:06:24 -0000 1.99 +++ openacs-4/packages/xowiki/tcl/link-procs.tcl 14 Mar 2018 15:40:49 -0000 1.100 @@ -575,7 +575,7 @@ return 0 } ::xowiki::Link::glossary instproc render_found {href label} { - ::xo::Page requireJS "/resources/xowiki/get-http-object.js" + ::xo::Page requireJS urn:ad:js:get-http-object ::xo::Page requireJS "/resources/xowiki/popup-handler.js" ::xo::Page requireJS "/resources/xowiki/overlib/overlib.js" if {![info exists :cssid]} {my cssid [::xowiki::Includelet html_id [self]]} Index: openacs-4/packages/xowiki/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v diff -u -N -r1.308 -r1.309 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 1 Feb 2018 21:56:57 -0000 1.308 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 14 Mar 2018 15:40:49 -0000 1.309 @@ -992,6 +992,7 @@ if {$link ne ""} {set back_link $link} set top_includelets ""; set content $error_msg; set folderhtml "" ::xo::cc set status_code $status_code + ::xo::Page requireCSS urn:ad:css:xowiki ${:id} return_page -adp $template_file -variables { context title index_link back_link header_stuff error_msg top_includelets content folderhtml Index: openacs-4/packages/xowiki/tcl/repeat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/repeat-procs.tcl,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/xowiki/tcl/repeat-procs.tcl 1 Feb 2018 22:16:44 -0000 1.11 +++ openacs-4/packages/xowiki/tcl/repeat-procs.tcl 14 Mar 2018 15:40:49 -0000 1.12 @@ -73,8 +73,7 @@ } repeatContainer instproc initialize {} { ::xo::Page requireJS "/resources/xowiki/repeat.js" - ::xo::Page requireJS "/resources/xowiki/jquery/jquery.min.js" - #::xo::Page requireJS "/resources/ajaxhelper/jquery/jquery-1.11.1.min.js" + ::xo::Page requireJS urn:ad:js:jquery if {[info exists :__initialized_repeat]} {return} next Index: openacs-4/packages/xowiki/tcl/resource-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/resource-init.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/tcl/resource-init.tcl 14 Mar 2018 15:40:49 -0000 1.1 @@ -0,0 +1,12 @@ +# +# register some URNs that we are providing for sharing +# +template::register_urn -urn urn:ad:js:jquery -resource /resources/xowiki/jquery/jquery.min.js +template::register_urn -urn urn:ad:js:bootstrap3 -resource //maxcdn.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js +template::register_urn -urn urn:ad:js:get-http-object -resource /resources/xowiki/get-http-object.js + +template::register_urn -urn urn:ad:css:bootstrap3 -resource //maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css +template::register_urn -urn urn:ad:css:xowiki -resource /resources/xowiki/xowiki.css + + + Index: openacs-4/packages/xowiki/tcl/tree-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/tree-procs.tcl,v diff -u -N -r1.16 -r1.17 --- openacs-4/packages/xowiki/tcl/tree-procs.tcl 22 Dec 2017 13:51:41 -0000 1.16 +++ openacs-4/packages/xowiki/tcl/tree-procs.tcl 14 Mar 2018 15:40:49 -0000 1.17 @@ -311,23 +311,23 @@ -li_expanded_atts [list "class='expanded'" ""] TreeRenderer=yuitree proc include_head_entries {{-style ""} {-ajax 1} args} { - set ajaxhelper 1 - ::xowiki::Includelet require_YUI_CSS -ajaxhelper $ajaxhelper "fonts/fonts-min.css" - ::xowiki::Includelet require_YUI_CSS -ajaxhelper $ajaxhelper \ - "treeview/assets/skins/sam/treeview.css" + ::xo::Page requireCSS urn:ad:css:yui2:fonts/fonts-min + ::xo::Page requireCSS urn:ad:css:yui2:treeview/assets/skins/sam/treeview if {$style ne ""} { # yuitree default css style files are in the assets directory - if {$style eq "yuitree"} {set style ""} - ::xo::Page requireCSS "/resources/ajaxhelper/yui/treeview/assets/$style/tree.css" + if {$style eq "yuitree"} { + ::xo::Page requireCSS urn:ad:css:yui2:treeview/assets/tree + } else { + ::xo::Page requireCSS urn:ad:css:yui2:treeview/assets/$style/tree + } } + ::xo::Page requireJS urn:ad:js:yui2:yahoo-dom-event/yahoo-dom-event - ::xowiki::Includelet require_YUI_JS -ajaxhelper $ajaxhelper "yahoo-dom-event/yahoo-dom-event.js" - if {$ajax} { - ::xowiki::Includelet require_YUI_JS -ajaxhelper $ajaxhelper "connection/connection-min.js" - ::xowiki::Includelet require_YUI_JS -ajaxhelper $ajaxhelper "animation/animation-min.js" ;# ANIM + ::xo::Page requireJS urn:ad:js:yui2:connection/connection-min + ::xo::Page requireJS urn:ad:js:yui2:animation/animation-min } - ::xowiki::Includelet require_YUI_JS -ajaxhelper $ajaxhelper "treeview/treeview-min.js" + ::xo::Page requireJS urn:ad:js:yui2:treeview/treeview-min } TreeRenderer=yuitree proc render {tree} { return "
      [next]
    " @@ -344,9 +344,9 @@ TreeRenderer=listdnd proc include_head_entries {args} { set ajaxhelper 0 - ::xowiki::Includelet require_YUI_JS -ajaxhelper $ajaxhelper "utilities/utilities.js" - ::xowiki::Includelet require_YUI_JS -ajaxhelper $ajaxhelper "selector/selector-min.js" - ::xo::Page requireJS "/resources/xowiki/yui-page-order-region.js" + ::xo::Page requireJS urn:ad:js:yui2:utilities/utilities + ::xo::Page requireJS urn:ad:js:yui2:selector/selector-min + ::xo::Page requireJS "/resources/xowiki/yui-page-order-region.js" } TreeRenderer=listdnd proc render {tree} { array set "" ${:context} Index: openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl,v diff -u -N -r1.340 -r1.341 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 1 Feb 2018 22:16:44 -0000 1.340 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 14 Mar 2018 15:40:49 -0000 1.341 @@ -396,7 +396,8 @@ if {$compare_id == 0} { return "" } - ::xo::Page requireCSS /resources/xowiki/xowiki.css + ::xo::Page requireCSS urn:ad:css:xowiki + set my_page [::xowiki::Package instantiate_page_from_id -revision_id ${:revision_id}] $my_page volatile @@ -439,10 +440,10 @@ ::xo::Page set_property doc title $title array set property_doc [::xo::Page get_property doc] - set header_stuff [::xo::Page header_stuff] + ::xo::Page header_stuff ${:package_id} return_page -adp /packages/xowiki/www/diff -variables { - content title context header_stuff + content title context time1 time2 user1 user2 revision_id1 revision_id2 property_doc } } @@ -1206,7 +1207,7 @@ set label [ns_quotehtml "$tag ($nr)"] lappend entries "$label" } - ns_return 200 text/html "[_ xowiki.popular_tags_label]: [join $entries {, }]" + ns_return 200 text/html "[_ xowiki.popular_tags_label]: [join $entries {, }]" } # @@ -1538,12 +1539,12 @@ # } #:log "--after context delete_link=$delete_link " - #$context_package_id instvar folder_id ;# this is the root folder - #set template [$folder_id get_payload template] set template [$context_package_id get_parameter "template" ""] set page [self] - foreach css [$context_package_id get_parameter extra_css ""] {::xo::Page requireCSS -order 10 $css} + foreach css [$context_package_id get_parameter extra_css ""] { + ::xo::Page requireCSS -order 10 $css + } # refetch template_file, since it might have been changed via set-parameter # the cache flush (next line) is not pretty here and should be supported from xotcl-core ::xo::cc unset -nocomplain cache([list $context_package_id get_parameter template_file]) @@ -1554,7 +1555,6 @@ # standard location # if {![regexp {^[./]} $template_file]} { - #set template_file /packages/xowiki/www/$template_file set template_file [${:package_id} get_adp_template $template_file] } @@ -1563,7 +1563,7 @@ # a. adp_compile/ adp_eval # b. return_page/ adp_include # - ::xo::Page requireCSS /resources/xowiki/xowiki.css + ::xo::Page requireCSS urn:ad:css:xowiki if {$footer ne ""} { template::add_body_script -script { function get_popular_tags(popular_tags_link, prefix) { @@ -1584,8 +1584,14 @@ } } } - set header_stuff [::xo::Page header_stuff] - #:log "HEADER STUFF <$header_stuff>" + + # + # The method header_stuff performs the requried + # template::head::add_script and template::head::add_css + # etc. operations + # + ::xo::Page header_stuff + if {![info exists :description]} { set :description [:get_description $content] } @@ -1652,7 +1658,7 @@ set name ${:name} set item_id ${:item_id} $context_package_id return_page -adp $template_file -variables { - name title item_id context header_stuff return_url + name title item_id context return_url content footer package_id page_package_id page_context rev_link edit_link delete_link new_link admin_link index_link view_link notification_subscribe_link notification_image Index: openacs-4/packages/xowiki/tcl/yui-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/yui-init.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/tcl/yui-init.tcl 14 Mar 2018 15:40:49 -0000 1.1 @@ -0,0 +1,79 @@ +# +# URN registry for YUI2 resources, either from ajaxhelper or from CDN +# + +set YUI_CSS_PATHS { + assets/skins/sam/skin + base/base + button/assets/skins/sam/button + container/assets/container + datatable/assets/skins/sam/datatable + fonts/fonts-min + grids/grids + menu/assets/skins/sam/menu + reset/reset + reset-fonts-grids/reset-fonts-grids + treeview/assets/skins/sam/treeview +} + +# +# Not all yui 2 files are available minified, so we have to specify +# manually, where we can get it +# +set YUI_JS_PATHS { + animation/animation-min + autocomplete/autocomplete-min + button/button-min + connection/connection-min + container/container-min + datasource/datasource-min + datatable/datatable-min + menu/menu-min + selector/selector-min + treeview/treeview-min + utilities/utilities + yahoo-dom-event/yahoo-dom-event +} + + +# +# The following asset files is up to my knowledge not available via CDN +# +template::register_urn \ + -urn urn:ad:css:yui2:treeview/assets/tree \ + -resource /resources/ajaxhelper/yui/treeview/assets/tree.css +template::register_urn \ + -urn urn:ad:css:yui2:treeview/assets/folders/tree \ + -resource /resources/ajaxhelper/yui/treeview/assets/folders/tree.css +template::register_urn \ + -urn urn:ad:css:yui2:treeview/assets/menu/tree \ + -resource /resources/ajaxhelper/yui/treeview/assets/menu/tree.css + +if {[file isdirectory $::acs::rootdir/packages/ajaxhelper/www/resources]} { + + foreach path $YUI_CSS_PATHS { + template::register_urn \ + -urn urn:ad:css:yui2:$path \ + -resource /resources/ajaxhelper/yui/$path.css + } + + foreach path $YUI_JS_PATHS { + template::register_urn \ + -urn urn:ad:js:yui2:$path \ + -resource /resources/ajaxhelper/yui/$path.js + } + +} else { + set version 2.7.0 + foreach path $YUI_CSS_PATHS { + template::register_urn \ + -urn urn:ad:css:yui2:$path \ + -resource //yui.yahooapis.com/$version/build/$path.css + } + + foreach path $YUI_JS_PATHS { + template::register_urn \ + -urn urn:ad:js:yui2:$path \ + -resource //yui.yahooapis.com/$version/build/$path.js + } +} Index: openacs-4/packages/xowiki/tcl/yui-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/yui-procs.tcl,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/xowiki/tcl/yui-procs.tcl 21 Oct 2017 15:58:14 -0000 1.7 +++ openacs-4/packages/xowiki/tcl/yui-procs.tcl 14 Mar 2018 15:40:49 -0000 1.8 @@ -339,8 +339,8 @@ # Drag & Drop Utility, Animation Utility, YUI Loader and the Get Utility. # Use this file to reduce HTTP requests whenever you are including more # than three of its constituent components. - ::xowiki::Includelet require_YUI_JS -ajaxhelper ${:ajaxhelper} "yahoo-dom-event/yahoo-dom-event.js" - ::xowiki::Includelet require_YUI_JS -ajaxhelper ${:ajaxhelper} "utilities/utilities.js" + ::xo::Page requireJS urn:ad:js:yui2:yahoo-dom-event/yahoo-dom-event + ::xo::Page requireJS urn:ad:js:yui2:utilities/utilities } menubar { # @@ -358,78 +358,76 @@ :require -module "utilities" # todo : this is more than necessary foreach jsFile { - "container/container-min.js" - "treeview/treeview-min.js" - "button/button-min.js" - "menu/menu-min.js" - "datasource/datasource-min.js" - "autocomplete/autocomplete-min.js" - "datatable/datatable-min.js" - "selector/selector-min.js" + container/container-min + treeview/treeview-min + button/button-min + menu/menu-min + datasource/datasource-min + autocomplete/autocomplete-min + datatable/datatable-min + selector/selector-min } { - ::xowiki::Includelet require_YUI_JS -ajaxhelper ${:ajaxhelper} $jsFile + ::xo::Page requireJS urn:ad:js:yui2:$jsFile } :require -module "reset-fonts-grids" :require -module "base" foreach cssFile { - "container/assets/container.css" - "datatable/assets/skins/sam/datatable.css" - "button/assets/skins/sam/button.css" - "assets/skins/sam/skin.css" - "menu/assets/skins/sam/menu.css" + container/assets/container + datatable/assets/skins/sam/datatable + button/assets/skins/sam/button + assets/skins/sam/skin + menu/assets/skins/sam/menu + treeview/assets/folders/tree } { - ::xowiki::Includelet require_YUI_CSS -ajaxhelper ${:ajaxhelper} $cssFile + ::xo::Page requireCSS urn:ad:css:yui2:$cssFile } - ::xowiki::Includelet require_YUI_CSS -ajaxhelper 1 "treeview/assets/folders/tree.css" } datatable { # see comment above :require -module "utilities" # todo : this is more than necessary foreach jsFile { - "container/container-min.js" - "treeview/treeview-min.js" - "button/button-min.js" - "menu/menu-min.js" - "datasource/datasource-min.js" - "autocomplete/autocomplete-min.js" - "datatable/datatable-min.js" - "selector/selector-min.js" + container/container-min + treeview/treeview-min + button/button-min + menu/menu-min + datasource/datasource-min + autocomplete/autocomplete-min + datatable/datatable-min + selector/selector-min } { - ::xowiki::Includelet require_YUI_JS -version "2.7.0b" -ajaxhelper ${:ajaxhelper} $jsFile + ::xo::Page requireJS urn:ad:js:yui2:$jsFile } :require -module "reset-fonts-grids" :require -module "base" foreach cssFile { - "container/assets/container.css" - "datatable/assets/skins/sam/datatable.css" - "button/assets/skins/sam/button.css" - "assets/skins/sam/skin.css" - "menu/assets/skins/sam/menu.css" + container/assets/container + datatable/assets/skins/sam/datatable + button/assets/skins/sam/button + assets/skins/sam/skin + menu/assets/skins/sam/menu } { - ::xowiki::Includelet require_YUI_CSS -ajaxhelper ${:ajaxhelper} $cssFile + ::xo::Page requireCSS urn:ad:css:yui2:$cssFile } - #::xowiki::Includelet require_YUI_CSS -ajaxhelper 1 "treeview/assets/skins/sam/treeview.css" - #::xowiki::Includelet require_YUI_CSS -ajaxhelper 1 "treeview/assets/folders/tree.css" } reset { - ::xowiki::Includelet require_YUI_CSS -ajaxhelper ${:ajaxhelper} "reset/reset.css" + ::xo::Page requireCSS urn:ad:css:yui2:reset/reset } fonts { - ::xowiki::Includelet require_YUI_CSS -ajaxhelper ${:ajaxhelper} "fonts/fonts.css" + ::xo::Page requireCSS urn:ad:css:yui2:fonts/fonts-min } grids { - ::xowiki::Includelet require_YUI_CSS -ajaxhelper ${:ajaxhelper} "grids/grids.css" + ::xo::Page requireCSS urn:ad:css:yui2:grids/grids } base { - ::xowiki::Includelet require_YUI_CSS -ajaxhelper ${:ajaxhelper} "base/base.css" + ::xo::Page requireCSS urn:ad:css:yui2:base/base } "reset-fonts-grids" { - ::xowiki::Includelet require_YUI_CSS -ajaxhelper ${:ajaxhelper} "reset-fonts-grids/reset-fonts-grids.css" + ::xo::Page requireCSS urn:ad:css:yui2:reset-fonts-grids/reset-fonts-grids } } } Index: openacs-4/packages/xowiki/www/error-template.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/error-template.adp,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/xowiki/www/error-template.adp 7 Jul 2015 12:15:32 -0000 1.9 +++ openacs-4/packages/xowiki/www/error-template.adp 14 Mar 2018 15:40:49 -0000 1.10 @@ -1,10 +1,6 @@ @title;literal@ - @title;literal@ @context;literal@ - @header_stuff;literal@ - -
    Index: openacs-4/packages/xowiki/www/portlet-ajax.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlet-ajax.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/xowiki/www/portlet-ajax.tcl 7 Aug 2017 23:48:31 -0000 1.6 +++ openacs-4/packages/xowiki/www/portlet-ajax.tcl 14 Mar 2018 15:40:49 -0000 1.7 @@ -1,6 +1,8 @@ # like portlet, except with background loading via ajax # gustaf neumann, fecit may 2006 -::xo::Page requireJS "/resources/xowiki/get-http-object.js" + +::xo::Page requireJS urn:ad:js:get-http-object + if {![string match "/*" $portlet]} { set folder_id [$__including_page set parent_id] set package_id [$folder_id set package_id]