Index: openacs-4/packages/xowiki/xowiki.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v
diff -u -r1.148.2.14 -r1.148.2.15
--- openacs-4/packages/xowiki/xowiki.info 27 Aug 2014 20:56:10 -0000 1.148.2.14
+++ openacs-4/packages/xowiki/xowiki.info 2 Sep 2014 09:33:48 -0000 1.148.2.15
@@ -10,54 +10,54 @@
t
xowiki
-
+
Gustaf Neumann
A xotcl-based enterprise wiki system with multiple object types
- 2014-02-11
+ 2014-09-01
WU Vienna
- <pre>
-XoWiki is a Wiki implementation for OpenACS in XOTcl. Instead of
-trying to implement the full set of Wiki markup commands of systems
-like MediaWiki, XoWiki is based on a rich text editor and focuses more
-on integration with OpenACS (e.g categories, general comments,
-ADP-includes). XoWiki combines aspects of wikis (ease of
-page-creation) with aspects of a content management system (revisions,
-re-usable items, multiple languages). Furthermore, XoWiki allows to
-define different types of links such one could define book-structures
-(where a navigation structure could be built on the fly) or glossaries
-with different kind of word relationships (like synonyms,
-etc.). XoWiki supports pages in multiple languages and is localized.
-
-Some features:
- - cross language links
- - inclusion of ADP pages
- - nesting of Wiki-pages
- - large set of includeable content (includelets)
- - search
- - tags
- - categories
- - RSS
- - weblog
- - podcasts
- - notifications
- - web 2.0 gadgets (digg, delicious, my yahoo)
- - audio embedding
- - different appearances (template_file)
- - book-structures
- - prototype pages
- - import/export
- - virtual presence
- - analysis of collaboration networks
- - forms
- - named/unnamed pages
- - various security policies
+ <pre>
+XoWiki is a Wiki implementation for OpenACS in XOTcl. Instead of
+trying to implement the full set of Wiki markup commands of systems
+like MediaWiki, XoWiki is based on a rich text editor and focuses more
+on integration with OpenACS (e.g categories, general comments,
+ADP-includes). XoWiki combines aspects of wikis (ease of
+page-creation) with aspects of a content management system (revisions,
+re-usable items, multiple languages). Furthermore, XoWiki allows to
+define different types of links such one could define book-structures
+(where a navigation structure could be built on the fly) or glossaries
+with different kind of word relationships (like synonyms,
+etc.). XoWiki supports pages in multiple languages and is localized.
+
+Some features:
+ - cross language links
+ - inclusion of ADP pages
+ - nesting of Wiki-pages
+ - large set of includeable content (includelets)
+ - search
+ - tags
+ - categories
+ - RSS
+ - weblog
+ - podcasts
+ - notifications
+ - web 2.0 gadgets (digg, delicious, my yahoo)
+ - audio embedding
+ - different appearances (template_file)
+ - book-structures
+ - prototype pages
+ - import/export
+ - virtual presence
+ - analysis of collaboration networks
+ - forms
+ - named/unnamed pages
+ - various security policies
</pre>
BSD-Style
2
-
+
-
+
@@ -73,6 +73,7 @@
+
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 -r1.239.2.14 -r1.239.2.15
--- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 1 Sep 2014 11:03:24 -0000 1.239.2.14
+++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 2 Sep 2014 09:33:48 -0000 1.239.2.15
@@ -36,10 +36,8 @@
{mode edit}
{disabled}
{show_raw_value}
- CSSclass
- style
- {form_widget_CSSclass form-widget}
- {form_item_wrapper_CSSclass form-item-wrapper}
+ {CSSclass}
+ {style}
{type text}
{label}
{name}
@@ -280,11 +278,6 @@
}
}
- # FormField instproc repeatable {} {
- # my mixin add ::xowiki::formfield::repeatable
- # my reset_parameter
- #}
-
FormField instproc interprete_single_spec {s} {
if {$s eq ""} return
@@ -298,6 +291,7 @@
omit {my mixin add ::xowiki::formfield::omit}
noomit {my remove_omit}
disabled {my set_disabled true}
+ readonly {my readonly true}
enabled {my set_disabled false}
label=* {my label [lindex [split $s =] 1]}
help_text=* {my help_text [lindex [split $s =] 1]}
@@ -523,7 +517,7 @@
html::t \n
}
}
-
+
FormField instproc render_error_msg {} {
if {[my error_msg] ne "" && ![my exists error_reported]} {
::html::div -class form-error {
@@ -538,7 +532,7 @@
FormField instproc render_help_text {} {
set text [my help_text]
if {$text ne ""} {
- html::div -class form-help-text {
+ html::div -class [my form_help_text_CSSclass] {
html::img -src "/shared/images/info.gif" -alt {[i]} -title {Help text} \
-width "12" -height 9 -border 0 -style "margin-right: 5px" {}
html::t $text
@@ -745,7 +739,10 @@
submit_button instproc render_input {} {
# don't disable submit buttons
if {[my type] eq "submit"} {my unset -nocomplain disabled}
- ::html::input [my get_attributes name type {CSSclass class} value title disabled] {}
+ ::html::button [my get_attributes name type {form_button_CSSclass class} title disabled] {
+ ::html::t [my set value]
+ }
+ #::html::input [my get_attributes name type {form_button_CSSclass class} value title disabled] {}
my render_localizer
}
@@ -1433,7 +1430,8 @@
}
textarea instproc render_input {} {
- ::html::textarea [my get_attributes id name cols rows style {CSSclass class} disabled] {
+ ::html::textarea [my get_attributes id name cols rows style {CSSclass class} \
+ disabled placeholder readonly required wrap] {
::html::t [my value]
}
}
Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v
diff -u -r1.472.2.19 -r1.472.2.20
--- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 30 Aug 2014 22:47:24 -0000 1.472.2.19
+++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 2 Sep 2014 09:33:49 -0000 1.472.2.20
@@ -261,7 +261,12 @@
#
if {[catch {ns_cache flush xowiki_cache NOTHING}]} {
ns_log notice "xotcl-core: creating xowiki cache"
- ns_cache create xowiki_cache -size 200000
+
+ ns_cache create xowiki_cache \
+ -size [parameter::get_global_value \
+ -package_key xowiki \
+ -parameter CacheSize \
+ -default 400000]
}
#############################
@@ -2555,7 +2560,11 @@
# We need this acually only for PageTemplate and FormPage, but
# aliases will require XOTcl 2.0.... so we define it for the time
# being on ::xowiki::Page
- set name [expr {$margin_form ? "margin-form " : ""}]
+ if {[parameter::get_global_value -package_key xowiki -parameter PreferredCSSToolkit -default yui] ne "bootstrap"} {
+ set name [expr {$margin_form ? "margin-form " : ""}]
+ } else {
+ set name ""
+ }
set CSSname [my name]
# Remove language prefix, if used.
@@ -2877,7 +2886,9 @@
$doc documentElement root
my dom_disable_input_fields -with_submit $with_submit $root
set form [lindex [$root selectNodes //form] 0]
- Form add_dom_attribute_value $form class "margin-form"
+ if {[parameter::get_global_value -package_key xowiki -parameter PreferredCSSToolkit -default yui] ne "bootstrap"} {
+ Form add_dom_attribute_value $form class "margin-form"
+ }
return [$root asHTML]
}
@@ -3628,15 +3639,15 @@
catch {set text [lindex $text 0]}
}
if {$text ne ""} {
- #my msg "we have a template text='$text'"
+ #my log "we have a template text='$text'"
# we have a template
return [next]
} else {
- #my msg "we have a form '[my get_form]'"
+ #my log "we have a form '[my get_form]'"
set form [my get_form]
if {$form eq ""} {return ""}
- ::xowiki::Form requireFormCSS
+ my setCSSDefaults
lassign [my field_names_from_form -form $form] form_vars field_names
my array unset __field_in_form
@@ -3657,6 +3668,8 @@
$doc documentElement root
set form_node [lindex [$root selectNodes //form] 0]
+ my log "render-content"
+ Form add_dom_attribute_value $form_node role form
Form add_dom_attribute_value $form_node class [$page_template css_class_name]
# The following two commands are for non-generated form contents
my set_form_data $form_fields
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.19 -r1.320.2.20
--- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 1 Sep 2014 11:26:00 -0000 1.320.2.19
+++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 2 Sep 2014 09:33:49 -0000 1.320.2.20
@@ -652,6 +652,31 @@
#my log "--edit html length [string length $html]"
return $html
}
+
+ FormPage instproc setCSSDefaults {} {
+ my log setCSSDefaults
+ # check empty
+ if {[parameter::get_global_value -package_key xowiki -parameter PreferredCSSToolkit -default yui] eq "bootstrap"} {
+ ::xowiki::formfield::FormField parameter {
+ {CSSclass form-control}
+ {form_item_wrapper_CSSclass form-group}
+ {form_widget_CSSclass ""}
+ {form_button_CSSclass "btn btn-default"}
+ {form_button_wrapper_CSSclass ""}
+ {form_help_text_CSSclass help-block}
+ }
+ } else {
+ ::xowiki::formfield::FormField parameter {
+ {CSSclass}
+ {form_widget_CSSclass form-widget}
+ {form_item_wrapper_CSSclass form-item-wrapper}
+ {form_button_CSSclass ""}
+ {form_button_wrapper_CSSclass form-button}
+ {form_help_text_CSSclass form-help-text}
+ }
+ ::xowiki::Form requireFormCSS
+ }
+ }
FormPage instproc edit {
{-validation_errors ""}
@@ -661,7 +686,7 @@
my instvar page_template doc root package_id
#my log "edit [self args]"
- ::xowiki::Form requireFormCSS
+ my setCSSDefaults
my include_header_info -prefix form_edit
if {[::xo::cc mobile]} {my include_header_info -prefix mobile}
@@ -878,6 +903,7 @@
# Normally, the root node is the formNode, fcn is the first
# child (often a TEXT_NODE), but ic can be even empty.
}
+
#
# prepend some fields above the HTML contents of the form
@@ -934,7 +960,7 @@
}
set m [my form_parameter __form_redirect_method "edit"]
set url [export_vars -base [my pretty_link] {m return_url}]
- $formNode setAttribute action $url method POST
+ $formNode setAttribute action $url method POST role form
if {$has_file} {$formNode setAttribute enctype multipart/form-data}
Form add_dom_attribute_value $formNode class [$page_template css_class_name]
}
@@ -956,6 +982,7 @@
}
}
my post_process_dom_tree $doc $root $form_fields
+
set html [$root asHTML]
set html [my regsub_eval \
{(^|[^\\])\x003([a-zA-Z0-9_:]+)\x003} $html \
@@ -2145,10 +2172,11 @@
}
FormPage instproc render_form_action_buttons {{-CSSclass ""}} {
- ::html::div -class form-button {
- set f [::xowiki::formfield::submit_button new -destroy_on_cleanup \
- -name __form_button_ok \
- -CSSclass $CSSclass]
+ set f [::xowiki::formfield::submit_button new -destroy_on_cleanup \
+ -name __form_button_ok \
+ -CSSclass $CSSclass]
+
+ ::html::div -class [$f form_button_wrapper_CSSclass] {
$f render_input
}
}