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 @@
t
xowiki
-
+
Gustaf Neumann
A xotcl-based enterprise wiki system with multiple object types
2014-02-11
@@ -55,26 +55,27 @@
BSD-Style
2
-
-
+
+
+
-
-
-
+
+
+
-
+
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 "" [$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 "" [$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