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.145 -r1.146 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 17 Jul 2007 13:18:08 -0000 1.145 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 18 Jul 2007 12:29:03 -0000 1.146 @@ -1194,53 +1194,6 @@ return [my include_portlet [list form-menu -form_item_id [my item_id]]] } -# Page instproc new_name {name} { -# if {$name ne ""} { -# my instvar package_id -# set name [my complete_name $name] -# set name [::$package_id normalize_name $name] -# set suffix ""; set i 0 -# set folder_id [my parent_id] -# while {[CrItem lookup -name $name$suffix -parent_id $folder_id] != 0} { -# set suffix -[incr i] -# } -# set name $name$suffix -# } -# return $name -# } - -# Page instproc create-new {} { -# my instvar package_id -# set name [my new_name [::xo::cc form_parameter name ""]] -# set class [::xo::cc form_parameter class ::xowiki::Page] -# if {[::xotcl::Object isclass $class] && [$class info heritage ::xowiki::Page] ne ""} { -# set class [::xo::cc form_parameter class ::xowiki::Page] -# set f [$class new -destroy_on_cleanup \ -# -name $name \ -# -package_id $package_id \ -# -parent_id [my parent_id] \ -# -publish_status "production" \ -# -title [my title] \ -# -text [list [::xo::cc form_parameter content ""] text/html]] -# $f save_new -# $package_id returnredirect \ -# [my query_parameter "return_url" [$package_id pretty_link $name]?m=edit] -# } -# } - - Form instproc create-new {} { - my instvar package_id - set f [FormInstance new -destroy_on_cleanup \ - -package_id $package_id \ - -parent_id [my parent_id] \ - -publish_status "production" \ - -page_template [my item_id]] - $f set __title_prefix [my title] - $f save_new - $package_id returnredirect \ - [my query_parameter "return_url" [$package_id pretty_link [$f name]]?m=edit] - } - Form proc disable_input_fields {form} { dom parse -simple -html $form doc $doc documentElement root @@ -1253,6 +1206,8 @@ Form instproc get_content {} { my instvar text + ::xowiki::Form requireFormCSS + #my log "-- text='$text'" if {[lindex $text 0] ne ""} { set content [my substitute_markup [my set text]] @@ -1355,6 +1310,7 @@ # we have a template return [next] } else { + ::xowiki::Form requireFormCSS set form [lindex [my get_from_template form] 0] set field_names [my form_attributes] set form_fields [my create_form_fields $field_names] 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.83 -r1.84 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 18 Jul 2007 11:36:28 -0000 1.83 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 18 Jul 2007 12:29:03 -0000 1.84 @@ -602,7 +602,9 @@ {-validation_errors ""} } { my instvar page_template doc root package_id - + + ::xowiki::Form requireFormCSS + set form [lindex [my get_from_template form] 0] set anon_instances [my get_from_template anon_instances] @@ -1009,4 +1011,20 @@ } + if {[apm_version_names_compare [ad_acs_version] 5.3.0] == 1} { + ns_log notice "Zen-state: 5.3.2 or newer" + Form set extraCSS "" + } else { + ns_log notice "Zen-state: pre 5.3.1, use backward compatible form css file" + Form set extraCSS "zen-forms-backward-compatibility.css" + } + Form proc requireFormCSS {} { + #my msg requireFormCSS + set css [my set extraCSS] + if {$css ne ""} { + #my msg "requireCSS $css" + ::xowiki::Page requireCSS $css + } + } + } \ No newline at end of file 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.18 -r1.19 --- openacs-4/packages/xowiki/www/resources/xowiki.css 9 May 2007 13:19:23 -0000 1.18 +++ openacs-4/packages/xowiki/www/resources/xowiki.css 18 Jul 2007 12:29:04 -0000 1.19 @@ -31,38 +31,39 @@ background: url(/resources/xowiki/external.png) right center no-repeat; padding-right: 12px; } -h1 { - border-bottom: solid silver 1px; color: #222222; - margin-top: 0.5em; margin-bottom: 0.5em; - text-align: left; font-weight: normal; -} -h2 { - border-bottom: 1px solid silver; color: #222222; - margin-top: 1em; margin-bottom: 0.25em; - text-align: left; font-weight: normal; -} -h3 { - text-indent: 0em; margin-top: 0.75em; margin-bottom: 0.0em; - letter-spacing: 0px; color: #222222; - text-align: left; font-weight: bold; -} - -hr { - height: 1px; border: none; - color: silver; background-color: silver; -} div.xowiki-content {background: #fff; font: 10pt Verdana, Arial, Helvetica, sans-serif;} /* table, td {font: 10px 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; color: #000;}*/ #main div.column {text-align: left; margin-bottom: 1em;} #content {float: left; width: 70%} -div.xowiki-content h1 {font-size: 24px; margin: 0 0 .5em 0; clear: both;} -div.xowiki-content h2 {font-size: 16px; clear: both;} -div.xowiki-content h3 {font-size: 14px} +div.xowiki-content h1 { + font-size: 24px; clear: both; + border-bottom: solid silver 1px; color: #222222; + margin-top: 1em; margin-bottom: 0.5em; + text-align: left; font-weight: normal; +} +div.xowiki-content h2 { + font-size: 16px; + clear: both; + border-bottom: 1px solid silver; color: #222222; + margin-top: 1em; margin-bottom: 0.25em; + text-align: left; font-weight: normal; +} +div.xowiki-content h3 { + font-size: 14px + text-indent: 0em; + margin-top: 0.75em; margin-bottom: 0.1em; + letter-spacing: 0px; color: #222222; + text-align: left; font-weight: bold; +} div.xowiki-content h4 {font-size: 12px; margin: 0;} div.xowiki-content .box {border: 1px solid #a1a5a9; padding: 0 5px 5px 5px; margin: 0 0 1.25em 0;} div.xowiki-content .errorMsg {color: red; font-weight: bold;} +div.xowiki-content .hr { + height: 1px; border: none; + color: silver; background-color: silver; +} #bookNavBar { top: 0px; height: 2px; background-color: #859db8; } @@ -114,38 +115,35 @@ } div.presence h1 {font-size: 90%; margin-bottom: 0px} -.code { +div.xowiki-content pre, .code { font-family: "Courier", monospace; } .string { color: #7D615B; } -div.code { +div.xowiki-content pre, div.code { font-size: 90%; font-family: "Courier", monospace; white-space: pre; margin-right: 15px; - padding-right: 5px; - border: #cccccc 1px solid; margin-left: 15px; - padding-left: 5px; - padding-bottom: 12px; - padding-top: 0px; + margin-bottom: 15px; + padding: 5px 5px; background-color: #FFFFF8; - margin-bottom: 16px; + border: #cccccc 1px solid; } -div.code p i { +div.xowiki-content pre p i, div.code p i { color: #008000; } -div.code i { +div.xowiki-content pre i, div.code i { color: #008000; } -div.code p em { +div.xowiki-content pre em, div.code p em { color: #008000; } -div.code em { +div.xowiki-content pre em, div.code em { color: #008000; } strong.code { Index: openacs-4/packages/xowiki/www/resources/zen-forms-backward-compatibility.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/zen-forms-backward-compatibility.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/zen-forms-backward-compatibility.css 18 Jul 2007 12:29:04 -0000 1.1 @@ -0,0 +1,108 @@ +/*form fieldset{ + border: 0px solid #F00; +} + +form .form-required-mark { + color: #ff0000; + display: inline; +} + +form .form-item-wrapper { + clear: both; + padding: 5px; +} + +form .form-item-wrapper .form-label { + float: left; + text-align: right; + display: block; + width: 12em; +} + +form .form-item-wrapper .form-widget, form .form-button, form .form-help-text { + display: block; + margin-left: 13em; +} + +form .form-item-wrapper .form-error { + display: block; + margin-left: 13em; + color: #ff0000; +} +*/ + +.form-label-error, .form-widget-error, .form-required-mark, .form-error { + color: #c30000; +} + +/* form layout for forms with divs*/ + +.margin-form fieldset, .vertical-form fieldset, fieldset { + border: 0px solid #000; +} + +.margin-form .form-required-mark { + display: inline; +} + +.margin-form fieldset { + border: 0 solid #FFFFFF; +} + +.margin-form .form-item-wrapper { + clear: both; + padding: 5px; +} + +.margin-form .form-item-wrapper .form-label { + float: left; + text-align: right; + display: block; + width: 15em; +} + +.margin-form .form-item-wrapper .form-widget, .margin-form .form-button, .margin-form div.form-help-text { + display: block; + margin-left: 16em; +} + +.margin-form .form-item-wrapper .form-error, .margin-form .form-item-wrapper .form-widget-error { + display: block; + margin-left: 16em; +} + + +.vertical-form .form-required-mark { + display: inline; +} + +.vertical-form .form-item-wrapper { + clear: both; + padding: 8px; +} + +.vertical-form .form-item-wrapper .form-label{ + text-align: left; + display: block; + +} + +.vertical-form .form-item-wrapper .form-widget{ + display: inline; + +} + + +.inline-form div { + display: inline; +} + + +/* pages that are laid out like forms but do not use the form builder and do not have input fields*/ +.margin-form-div .form-item-wrapper { + padding-bottom: 10px; +} + +.margin-form-div h1 { + margin-left: 13.5em; +} \ No newline at end of file