Index: openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl,v diff -u -r1.11.2.4 -r1.11.2.5 --- openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl 29 Jul 2019 17:13:25 -0000 1.11.2.4 +++ openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl 13 Aug 2019 15:40:46 -0000 1.11.2.5 @@ -13,8 +13,8 @@ namespace eval ::xowiki { # minimal implementation of Bootstrap "navbar" # currently only "dropdown" elements are supported within the navbar - # TODO: add support to include: - # - forms + # TODO: add support to include: + # - forms # - buttons # - text # - Non-nav links @@ -30,7 +30,7 @@ {containerClass "container-fluid"} {navbarClass "navbar navbar-default navbar-static-top"} } - + BootstrapNavbar instproc init {} { ::xo::Page requireJS urn:ad:js:jquery # @@ -41,20 +41,20 @@ security::csp::require script-src maxcdn.bootstrapcdn.com security::csp::require style-src maxcdn.bootstrapcdn.com security::csp::require font-src maxcdn.bootstrapcdn.com - + ::xo::Page requireCSS urn:ad:css:bootstrap3 ::xo::Page requireJS urn:ad:js:bootstrap3 next } - + BootstrapNavbar ad_instproc render {} { http://getbootstrap.com/components/#navbar } { html::nav -class [:navbarClass] -role "navigation" { # # Render the pull down menues - # + # html::div -class [:containerClass] { set rightMenuEntries {} foreach entry [:children] { @@ -73,31 +73,31 @@ } } } - } - + } + # # BootstrapNavbarDropdownMenu - # + # ::xo::tdom::Class create BootstrapNavbarDropdownMenu \ -superclass Menu \ -parameter { text header {brand false} - } + } BootstrapNavbarDropdownMenu ad_instproc render {} {doku} { # TODO: Add support for group-headers # get group header set group " " - + html::ul -class "nav navbar-nav" { html::li -class "dropdown" { set class "dropdown-toggle" if {[:brand]} {lappend class "navbar-brand"} html::a -href "\#" -class $class -data-toggle "dropdown" { - html::t [:text] + html::t [:text] html::b -class "caret" } html::ul -class "dropdown-menu" { @@ -114,17 +114,17 @@ } } } - + # # BootstrapNavbarDropdownMenuItem - # + # ::xo::tdom::Class create BootstrapNavbarDropdownMenuItem \ -superclass MenuItem \ -parameter { {href "#"} helptext - } - + } + BootstrapNavbarDropdownMenuItem ad_instproc render {} {doku} { html::li -class [expr {${:href} eq "" ? "disabled": ""}] { html::a [:get_attributes target href title id] { @@ -137,10 +137,10 @@ -preventdefault=false -script $body } } - + # # BootstrapNavbarDropzone - # + # ::xo::tdom::Class create BootstrapNavbarDropzone \ -superclass MenuComponent \ -parameter { @@ -159,11 +159,11 @@ var uploadForm = document.getElementById('js-upload-form'); var progressBar = document.getElementById('dropzone-progress-bar'); var uploadFileRunning = 0; - + var startUpload = function(files, csrf) { if (typeof files !== "undefined") { for (var i=0, l=files.length; i0} { html::div -id ${:id}_wrapper -class "table-responsive" { - html::form -name $name -id $name -method POST { + html::form -name $name -id $name -method POST { html::div -id ${:id}_container { html::table -id ${:id} -class ${:css.table-class} { :render-actions