Index: openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 3 May 2006 12:03:23 -0000 1.3 +++ openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 19 May 2006 11:23:16 -0000 1.4 @@ -29,7 +29,8 @@ {options {editor xinha plugins { GetHtml CharacterMap ContextMenu FullScreen InsertAnchor ListType TableOperations EditTag LangMarks Abbreviation OacsFs - } height 350px}} + } height 350px + }} {html {rows 15 cols 50 style {width: 100%}}}} } {f.description @@ -47,21 +48,28 @@ {folderspec ""} } + WikiForm instproc mkFields {} { + my instvar data set __fields "" foreach __field [my field_list] { set __spec [my set f.$__field] - if {[string first "richtext" [lindex $__spec 0]] > -1 - && [my folderspec] ne ""} { - # we have a richtext widget. append the folder spec to its options - set __newspec [list [lindex $__spec 0]] - foreach __e [lrange $__spec 1 end] { - foreach {__name __value} $__e break - if {$__name eq "options"} {eval lappend __value [my folderspec]} - lappend __newspec $__name $__value + if {[string first "richtext" [lindex $__spec 0]] > -1} { + # we have a richtext widget; get special configuration is specified + set __spec [$data get_rich_text_spec $__field $__spec] + if {[my folderspec] ne ""} { + # append the folder spec to its options + set __newspec [list [lindex $__spec 0]] + foreach __e [lrange $__spec 1 end] { + foreach {__name __value} $__e break + if {$__name eq "options"} {eval lappend __value [my folderspec]} + lappend __newspec $__name $__value + } + my log "--F rewritten spec is '$__newspec'" + set __spec $__newspec } - my log "--F rewritten spec is '$__newspec'" - set __spec $__newspec + # ad_form does a subst. escape esp. the javascript stuff + set __spec [string map {\[ \\[ \] \\] \$ \\$ \\ \\\\} $__spec] } #my log "--F field <$__field> = $__spec" append __fields [list $__spec] \n @@ -316,9 +324,9 @@ set page_template [ns_queryget page_template] if {$page_template eq ""} { set page_template [$data set page_template] - my log "-- page_template = $page_template" + #my log "-- page_template = $page_template" } - my log "-- calling page_template = $page_template" + #my log "-- calling page_template = $page_template" set template [::Generic::CrItem instantiate -item_id $page_template] $template volatile set dont_edit [concat [[$data info class] edit_atts] [list title] \ 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.34 -r1.35 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 14 May 2006 20:03:53 -0000 1.34 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 19 May 2006 11:23:16 -0000 1.35 @@ -732,6 +732,21 @@ set content [my substitute_markup [my set text]] } + Page instproc get_rich_text_spec {field_name default} { + set spec "" + foreach {s widget_spec} [[my set parent_id] get_payload widget_specs] { + foreach {page_name var_name} [split $s ,] break + #ns_log notice "--w T.name = '[my set name]' var=$page_name, $var_name $field_name []" + if {[string match $page_name [my set name]] && + [string match $var_name $field_name]} { + set spec $widget_spec + break + } + } + if {$spec eq ""} {return $default} + return $field_name:$spec + } + Page instproc update_references {page_id references} { db_dml delete_references \ "delete from xowiki_references where page = $page_id" Index: openacs-4/packages/xowiki/www/view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/Attic/view.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/xowiki/www/view.tcl 3 May 2006 12:03:23 -0000 1.16 +++ openacs-4/packages/xowiki/www/view.tcl 19 May 2006 11:23:16 -0000 1.17 @@ -35,6 +35,7 @@ } set references [$page references] set header_stuff [::xowiki::Page header_stuff] +#ns_log notice "--HEADER-Stuff = <$header_stuff>" if {[$page exists master] && $master == 1} {set master [$page set master]} Index: openacs-4/packages/xowiki/www/resources/examples/check_falsch.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/examples/check_falsch.png,v diff -u Binary files differ Index: openacs-4/packages/xowiki/www/resources/examples/check_richtig.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/examples/check_richtig.png,v diff -u Binary files differ Index: openacs-4/packages/xowiki/www/resources/examples/xinha-mc-styles.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/examples/xinha-mc-styles.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/examples/xinha-mc-styles.css 19 May 2006 11:23:16 -0000 1.1 @@ -0,0 +1,34 @@ + +p.angabe { + font: 12px 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; + color: #222222; +} +p.loesungshinweis { + font: 12px 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; + color: #444444; + background-color: #FFFFF4; + border: #cccccc 1px solid; + padding-right: 5px; + padding-left: 8px; + padding-bottom: 0px; + padding-top: 0px; + margin-bottom: 15px; +} +li.correct_choice { + font: 12px 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; + color: #006600; + list-style: none; + background: url(/resources/xowiki/examples/check_richtig.png) center left no-repeat; + margin-left:-30px; + padding-left: 30px; + margin-bottom:12px; +} +li.incorrect_choice { + font: 12px 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; + color: #660000; + list-style: none; + background: url(/resources/xowiki/examples/check_falsch.png) center left no-repeat; + margin-left:-30px; + padding-left: 30px; + margin-bottom:12px; +} \ No newline at end of file