Index: openacs-4/packages/xowiki/xowiki.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v
diff -u -r1.148.2.9 -r1.148.2.10
--- openacs-4/packages/xowiki/xowiki.info	1 Apr 2014 18:37:33 -0000	1.148.2.9
+++ openacs-4/packages/xowiki/xowiki.info	14 Apr 2014 21:33:09 -0000	1.148.2.10
@@ -10,7 +10,7 @@
     <inherit-templates-p>t</inherit-templates-p>
     <auto-mount>xowiki</auto-mount>
 
-    <version name="0.151" url="http://openacs.org/repository/download/apm/xowiki-0.151.apm">
+    <version name="0.152" url="http://openacs.org/repository/download/apm/xowiki-0.152.apm">
         <owner url="mailto:neumann@wu-wien.ac.at">Gustaf Neumann</owner>
         <summary>A xotcl-based enterprise wiki system with multiple object types</summary>
         <release-date>2014-02-11</release-date>
@@ -55,26 +55,27 @@
         <license>BSD-Style</license>
         <maturity>2</maturity>
 
-        <provides url="xowiki" version="0.151"/>
-	<requires url="acs-kernel" version="5.6.0"/>
+        <provides url="xowiki" version="0.152"/>
         <requires url="acs-datetime" version="4.0"/>
+        <requires url="acs-kernel" version="5.6.0"/>
+        <requires url="acs-subsite" version="5.2"/>
         <requires url="categories" version="1.0d3"/>
         <requires url="file-storage" version="4.7d3"/>
         <requires url="general-comments" version="4.6.1"/>
         <requires url="xotcl-core" version="0.129"/>
-        <requires url="acs-subsite" version="5.2"/>
 
         <callbacks>
-            <callback type="before-uninstall"  proc="::xowiki::before-uninstall"/>
             <callback type="after-install"  proc="::xowiki::after-install"/>
-            <callback type="before-uninstantiate"  proc="::xowiki::before-uninstantiate"/>
             <callback type="after-upgrade"  proc="::xowiki::upgrade_callback"/>
+            <callback type="before-uninstall"  proc="::xowiki::before-uninstall"/>
+            <callback type="before-uninstantiate"  proc="::xowiki::before-uninstantiate"/>
         </callbacks>
         <parameters>
             <parameter scope="instance" datatype="number"  min_n_values="1"  max_n_values="1"  name="MenuBar"  default="0" description="Activate experimental menubar stuff"/>
             <parameter scope="instance" datatype="text"  min_n_values="1"  max_n_values="1"  name="PackageDescription"  description="Description of the Package. This description will appear for example in the Description of the default RSS feed for this package" section_name="Description"/>
             <parameter scope="instance" datatype="string"  min_n_values="1"  max_n_values="1"  name="PackagePath"  description="Space delimited names of local URL paths pointing to xowiki instances from where this instance should inherit pages (example: /xowiki /public/wiki)"/>
             <parameter scope="instance" datatype="string"  min_n_values="1"  max_n_values="1"  name="PackageTitle"  description="Title of the Package; this title will appear for example in the default RSS feed for this package." section_name="Description"/>
+            <parameter scope="instance" datatype="string"  min_n_values="1"  max_n_values="1"  name="PreferedCSSToolkit"  default="yui" description="Use either &quot;yui&quot; or &quot;bootstrap&quot;"/>
             <parameter scope="instance" datatype="text"  min_n_values="1"  max_n_values="1"  name="WidgetSpecs"  description="Specify pairs of &quot;pagename,fieldname&quot; followed by a Tcl list which is used as a widget spec for ad_form. &quot;pagename&quot; and &quot;fieldname&quot; can contain wild card characters. The following rather complex widget-specs are from openacs.org:
 
 *,text {richtext(richtext),nospell,optional 
@@ -105,7 +106,7 @@
 Example: //xowiki/en:xowiki-standard-parameter"/>
             <parameter scope="instance" datatype="number"  min_n_values="1"  max_n_values="1"  name="production_mode"  default="0" description="When this parameter is set, new pages are created in a &quot;production&quot; state, where they are not visible to users. These page have to be released via the admin pages. Notifcation and syndication is decativated, while pages are under &quot;production&quot;." section_name="Options"/>
             <parameter scope="instance" datatype="string"  min_n_values="1"  max_n_values="1"  name="security_policy"  default="::xowiki::policy1" description="Define the valid operations for different kind of users. Currently, two policies are predefined: ::xowiki::policy1 and ::xowiki::policy2. Policy1 requires for all destructive operations (deletes, delete_revision) and programmatical operations (involving tcl code, e.g. editing the ::xotcl::Objects) package admin rights, for reindex site wide admin right). Policy 2 requires also for destructive operations site wide admin rights."/>
-            <parameter scope="instance" datatype="number"  min_n_values="1"  max_n_values="1"  name="show_page_references"  default="1" description="If enabled it shows on a page view the pages that reference it" section_name="Options"/>            
+            <parameter scope="instance" datatype="number"  min_n_values="1"  max_n_values="1"  name="show_page_references"  default="1" description="If enabled it shows on a page view the pages that reference it" section_name="Options"/>
             <parameter scope="instance" datatype="number"  min_n_values="1"  max_n_values="1"  name="show_per_object_categories"  default="1" description="If enabled it shows on a page view the categories assigned to this object" section_name="Options"/>
             <parameter scope="instance" datatype="number"  min_n_values="1"  max_n_values="1"  name="subst_blank_in_name"  default="1" description="normalize names of pages in a media wiki style. Most dominantly, spaces are turned into blanks." section_name="URL"/>
             <parameter scope="instance" datatype="string"  min_n_values="1"  max_n_values="1"  name="template_file"  default="view-default" description="Name of the ADP file to be used for viewing xowiki pages. The default value is 'view-default'. Alternatively, one can use 'view-book' to view pages in book style (needs page_ordering) or e.g. 'oacs-view' for providing a view with the category-tree on the left, or any other tailored view"/>
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl'.
Fisheye: No comparison available.  Pass `N' to diff?
Index: openacs-4/packages/xowiki/tcl/folder-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/folder-procs.tcl,v
diff -u -r1.27.2.4 -r1.27.2.5
--- openacs-4/packages/xowiki/tcl/folder-procs.tcl	13 Mar 2014 13:00:00 -0000	1.27.2.4
+++ openacs-4/packages/xowiki/tcl/folder-procs.tcl	14 Apr 2014 21:33:09 -0000	1.27.2.5
@@ -469,41 +469,39 @@
     # scoping in "-columns"
     set ::with_publish_status [expr {$publish_status ne "ready"}]
 
-    set t [::YUI::DataTable new -skin $skin -volatile \
+    switch [$package_id get_parameter "PreferedCSSToolkit" yui] {
+      bootstrap {set tableWidgetClass ::xowiki::BootstrapTable}
+      default   {set tableWidgetClass ::xowiki::YUIDataTable}
+    }
+    set t [$tableWidgetClass new -volatile -skin $skin \
                -columns {
                  BulkAction objects -id ID -hide $::hidden(objects) -actions {
                    Action new -label select -tooltip select -url admin/select
                  }
                  # The "-html" options are currenty ignored in the YUI
                  # DataTable. Not sure, it can be integrated in the traditional way. 
                  #
-                 # A full example for skinning the datatable is here:
-                 # http://developer.yahoo.com/yui/examples/datatable/dt_skinning.html
-                 #
                  HiddenField ID
                  AnchorField edit -CSSclass edit-item-button -label "" \
-                     -hide $::hidden(edit) \
-                     -html {style "padding: 0px;"}
+                     -hide $::hidden(edit)
                  if {$::with_publish_status} {
                    ImageAnchorField publish_status -orderby publish_status.src -src "" \
                        -width 8 -height 8 -border 0 -title "Toggle Publish Status" \
-                       -alt "publish status" -label [_ xowiki.publish_status] -html {style "padding: 2px;text-align: center;"}
+                       -alt "publish status" -label [_ xowiki.publish_status]
                  }
                  Field object_type -label [_ xowiki.page_kind] -orderby object_type -richtext false \
-                     -hide $::hidden(object_type) \
-                     -html {style "padding: 0px;"}
+                     -hide $::hidden(object_type)
                  AnchorField name -label [_ xowiki.Page-name] -orderby name \
-                     -hide $::hidden(name) \
-                     -html {style "padding: 2px;"}
+                     -hide $::hidden(name) 
                  Field last_modified -label [_ xowiki.Page-last_modified] -orderby last_modified \
                      -hide $::hidden(last_modified) 
                  Field mod_user -label [_ xowiki.By_user] -orderby mod_user  -hide $::hidden(mod_user) 
                  AnchorField delete -CSSclass delete-item-button \
                      -hide $::hidden(delete) \
                      -label "" ;#-html {onClick "return(confirm('Confirm delete?'));"}
+
                }]
 
-
     set extra_where_clause "true"
     # TODO: why filter on title and name?
     if {[info exists regexp]} {set extra_where_clause "(bt.title ~ '$regexp' OR ci.name ~ '$regexp' )"}
@@ -599,7 +597,12 @@
           -return_url $return_url \
           -nls_language [$current_folder get_nls_language_from_lang [::xo::cc lang]] \
           $menuEntries
-      set menubar [$mb render-yui]
+
+      switch [$context_package_id get_parameter "PreferedCSSToolkit" yui] {
+        bootstrap {set menuBarRenderer render-bootstrap}
+        default   {set menuBarRenderer render-yui}
+      }
+      set menubar [$mb $menuBarRenderer]
     }
     set viewers [util_coalesce [$current_folder property viewers] [$current_folder get_parameter viewers]]
     set viewer_links ""
@@ -770,13 +773,13 @@
     }
   }
 
-  Class DataTable \
+  Class ::xowiki::YUIDataTable \
       -superclass ::xo::Table \
       -parameter {
         {skin "yui-skin-sam"}
       }
 
-  DataTable instproc init {} {
+  ::xowiki::YUIDataTable instproc init {} {
     set trn_mixin [expr {[lang::util::translator_mode_p] ?"::xo::TRN-Mode" : ""}]
     my render_with YUIDataTableRenderer $trn_mixin
     next
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 -r1.191.2.11 -r1.191.2.12
--- openacs-4/packages/xowiki/tcl/includelet-procs.tcl	27 Mar 2014 15:18:07 -0000	1.191.2.11
+++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl	14 Apr 2014 21:33:09 -0000	1.191.2.12
@@ -3859,8 +3859,11 @@
     set cmd [list TableWidget t1 -volatile -columns $cols]
     if {$renderer ne ""} {
       lappend cmd -renderer $renderer
-    } elseif {[info commands ::xo::Table::YUIDataTableRenderer] ne ""} {
-      lappend cmd -renderer YUIDataTableRenderer
+    } else {
+      switch [$package_id get_parameter "PreferedCSSToolkit" yui] {
+        bootstrap {set tableRenderer ::xo::Table::BootstrapTableRenderer}
+        default   {set tableRenderer ::xo::Table::YUIDataTableRenderer}
+      }
     }
     {*}$cmd
 
Index: openacs-4/packages/xowiki/tcl/menu-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/menu-procs.tcl,v
diff -u -r1.7.2.1 -r1.7.2.2
--- openacs-4/packages/xowiki/tcl/menu-procs.tcl	30 Sep 2013 11:37:18 -0000	1.7.2.1
+++ openacs-4/packages/xowiki/tcl/menu-procs.tcl	14 Apr 2014 21:33:10 -0000	1.7.2.2
@@ -35,7 +35,7 @@
         {id "[my html_id]"}
         CSSclass
       }
-  
+
   Menu ad_instproc render {} {doku} {
     html::ul [my get_attributes id {CSSclass class}] {
       foreach menuitem [my children] {$menuitem render}
@@ -58,8 +58,8 @@
         target
 	{group ""}
       }
-  
-  
+
+
   MenuItem ad_instproc init args {doku} {
     next
     # Use computed default values when not specified
@@ -81,22 +81,22 @@
       my set linkclass [string tolower [namespace tail [my info class]]]label
     }
   }
-  
+
   MenuItem ad_instproc render {} {doku} {
     html::li [my get_attributes id {CSSclass class}] {
       html::a [my get_attributes title href target] {
         html::t [my text]
       }
     }
   }
-  
-  
+
+
   ::xo::tdom::Class YUIMenuItemList \
       -superclass Menu \
       -parameter {
         header
       }
-  
+
   YUIMenuItemList ad_instproc render {} {} {
     if {[my exists header]} {
       html::h6 {
@@ -105,11 +105,11 @@
     }
     next
   }
-  
+
   ###################################################
   #
   # YUIMenu
-  #  
+  #
   ::xo::tdom::Class create YUIMenu \
       -superclass Menu \
       -parameter {
@@ -119,7 +119,7 @@
 	{autorender false}
         {configuration {{}}}
       }
-  
+
   YUIMenu instproc init {} {
     ::xowiki::Includelet require_YUI_CSS -ajaxhelper 1 "menu/assets/skins/sam/menu.css"
     ::xowiki::Includelet require_YUI_JS  -ajaxhelper 1 "yahoo-dom-event/yahoo-dom-event.js"
@@ -154,11 +154,11 @@
     http://developer.yahoo.com/yui/menu/
   } {
     my append CSSclass " yuimenu"
-    
+
     # I want the menu to show up when JS is disabled
     # This gets overridden by JS, so its only relevant for the non-JS version
     #my set style "visibility: visible; position: relative;"
-    
+
     html::div [my get_attributes {CSSclass class} id style] {
       # Header
       html::t \n
@@ -203,14 +203,14 @@
 
   #
   # YUIMenuItem
-  #  
+  #
   ::xo::tdom::Class create YUIMenuItem \
       -superclass MenuItem \
       -parameter {
 	{href "#"}
         helptext
       }
-  
+
   YUIMenuItem ad_instproc render {} {doku} {
     html::li [my get_attributes id {CSSclass class} style] {
       # if we have no href, mark entry as disabled
@@ -227,17 +227,17 @@
     }
     html::t \n
   }
-  
-  
+
+
   #
   # YUIMenuBar
-  #    
+  #
   ::xo::tdom::Class create YUIMenuBar \
       -superclass YUIMenu \
       -parameter {
         {navbar true}
       }
-  
+
   YUIMenuBar ad_instproc render {} {
     http://developer.yahoo.com/yui/menu/#menubar
     MenuBar looks best without a header and with one MenuItemList only
@@ -260,13 +260,13 @@
       });"
     }
   }
-  
+
   #
   # YUIMenuBarItem
-  # 
+  #
   ::xo::tdom::Class create YUIMenuBarItem \
       -superclass YUIMenuItem
-  
+
   YUIMenuBarItem ad_instproc init {} {} {
     #goto YUIMenuItem and set all those nice defaults
     next
@@ -277,10 +277,10 @@
     }
   }
 
-  
+
   #
   # YUIContextMenu
-  # 
+  #
 
   # TODO: Support for Multiple Element IDs/Refs as Trigger
 
@@ -290,7 +290,7 @@
         {trigger "document"}
         {triggertype "reference"}
       }
-  
+
   YUIContextMenu ad_instproc render {} {
     http://developer.yahoo.com/yui/menu/#contextmenu
   } {
@@ -307,17 +307,17 @@
       }
     }
   }
-  
+
   #
   # YUIContextMenuItem
-  # 
+  #
   ::xo::tdom::Class YUIContextMenuItem \
       -superclass YUIMenuItem
-  
 
+
   #
   # Simple Generic MenuBar
-  # 
+  #
   # Class for creating and updating Menubars in an incremental
   # fashion. Menu handling works as following:
   #
@@ -330,9 +330,9 @@
   #      provided name determines the menu to which the entry is
   #      added. The following example adds a menu entry "StartPage" to
   #      the menu "Package":
-  #      
+  #
   #        $mb add_menu_item -name Package.Startpage \
-  #             -item [list text #xowiki.index# url $index_link]
+      #             -item [list text #xowiki.index# url $index_link]
   #
   #   4) After all updates are performed, use "render-yui" to obtain
   #      the HTML rendering of the menu.
@@ -355,18 +355,18 @@
   }
 
   if {[info commands ::dict] ne ""} {
-     ::xowiki::MenuBar instproc get_prop {dict key {default ""}} {
+    ::xowiki::MenuBar instproc get_prop {dict key {default ""}} {
       if {![dict exists $dict $key]} {
 	return $default
-      } 
+      }
       return [dict get $dict $key]
     }
   } else {
-     ::xowiki::MenuBar instproc get_prop {dict key {default ""}} {
+    ::xowiki::MenuBar instproc get_prop {dict key {default ""}} {
       array set "" $dict
       if {![info exists ($key)]} {
 	return $default
-      } 
+      }
       return [set ($key)]
     }
   }
@@ -375,7 +375,7 @@
     my set Menues [list]
     my destroy_on_cleanup
   }
-  
+
   ::xowiki::MenuBar instproc add_menu {-name {-label ""}} {
     my instvar Menues
     if {$name in $Menues} {
@@ -460,7 +460,7 @@
     # below). Iterate of the extra_menu property and add according
     # menu entries.
     #{form_link -name New.Page -label #xowiki.new# -form en:page.form}
-      
+
     foreach me $items {
       array unset ""
       set kind [lindex $me 0]
@@ -517,6 +517,10 @@
     } {
       foreach {menu_att menu} $M {
         if {$menu_att eq "id"} continue
+        if {[llength $menu_att] > 1} {
+          # We expect a dict as second list element.. but ignore here for the time being
+          lassign $menu_att menu_att props
+        }
         ::xowiki::YUIMenuBarItem -text [my get_prop $menu text] {
           ::xowiki::YUIMenu {
             foreach {item_att item} $menu {
@@ -525,7 +529,7 @@
               set url [my get_prop $item url]
 	      set group [my get_prop $item group]
 	      #my msg "ia=$item_att group '$group' // t=$text item=$item"
-              ::xowiki::YUIMenuItem -text $text -href $url -group $group {} 
+              ::xowiki::YUIMenuItem -text $text -href $url -group $group {}
             }
           }
         }
@@ -534,11 +538,17 @@
     return [$mb asHTML]
   }
 
-  namespace export Menu 
-  namespace export YUIMenuBar YUIMenuBarItem 
+  namespace export Menu
+  namespace export YUIMenuBar YUIMenuBarItem
   namespace export YUIMenu YUIMenuItem YUIMenuItemList
   namespace export YUIContextMenu YUIContextMenuItem
-# end of namespace
+  # end of namespace
 }
-::xo::library source_dependent 
+::xo::library source_dependent
 
+#
+# Local variables:
+#    mode: tcl
+#    tcl-indent-level: 2
+#    indent-tabs-mode: nil
+# End:
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 -r1.320.2.12 -r1.320.2.13
--- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl	13 Mar 2014 17:28:17 -0000	1.320.2.12
+++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl	14 Apr 2014 21:33:10 -0000	1.320.2.13
@@ -1315,7 +1315,11 @@
       #
       # At this place, the menu should be complete, we can render it
       #
-      append top_includelets \n "<div class='visual-clear'><!-- --></div>" [$mb render-yui]
+      switch [$context_package_id get_parameter "PreferedCSSToolkit" yui] {
+        bootstrap {set menuBarRenderer render-bootstrap}
+        default   {set menuBarRenderer render-yui}
+      }
+      append top_includelets \n "<div class='visual-clear'><!-- --></div>" [$mb $menuBarRenderer]
     }
 
     if {[$context_package_id get_parameter "with_user_tracking" 1]} {
Index: openacs-4/packages/xowiki/www/resources/xowiki.css
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/xowiki.css,v
diff -u -r1.61.2.1 -r1.61.2.2
--- openacs-4/packages/xowiki/www/resources/xowiki.css	14 Feb 2014 17:58:57 -0000	1.61.2.1
+++ openacs-4/packages/xowiki/www/resources/xowiki.css	14 Apr 2014 21:33:10 -0000	1.61.2.2
@@ -522,6 +522,13 @@
     
 }
 
+nav.navbar a {
+    text-decoration: none;
+}
+nav.navbar ul.dropdown-menu {
+    background-color: #F8F8F8;
+}
+
 /*
  * Local Variables:
  * mode: css