peterm
committed
on 04 Mar 04
removing dependency of the simulation package on file-storage
openacs-4/www/default-master.tcl (+9 -5)
1 1 # /www/master-default.tcl
2 2 #
3 3 # Set basic attributes and provide the logical defaults for variables that
4 4 # aren't provided by the slave page.
5 5 #
6 6 # Author: Kevin Scaldeferri (kevin@arsdigita.com)
7 7 # Creation Date: 14 Sept 2000
8 8 # $Id$
9 9 #
10 10
11 11 # fall back on defaults for title, signatory and header_stuff
12 12
13 13 if [template::util::is_nil title]     { set title        [ad_conn instance_name]  }
  14 if [template::util::is_nil doc_type]     {
  15     set doc_type {<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  16        "http://www.w3.org/TR/html4/loose.dtd">}
  17 }
14 18 if [template::util::is_nil signatory] { set signatory    [ad_system_owner] }
15 19 if ![template::util::is_nil context] { set context_bar [eval ad_context_bar $context]}
16 20 if [template::util::is_nil context_bar] { set context_bar [ad_context_bar]}
17 21 if ![info exists header_stuff]        { set header_stuff {} }
18 22
19 23
20 24 # Attributes
21 25
22 26 template::multirow create attribute key value
23 27
24 28 # Pull out the package_id of the subsite closest to our current node
25 29 set pkg_id [site_node_closest_ancestor_package "acs-subsite"]
26 30
27   template::multirow append \
28       attribute bgcolor [ad_parameter -package_id $pkg_id bgcolor   dummy "white"]
29   template::multirow append \
30       attribute text    [ad_parameter -package_id $pkg_id textcolor dummy "black"]
  31 #template::multirow append \
  32 #    attribute bgcolor [ad_parameter -package_id $pkg_id bgcolor   dummy "white"]
  33 #template::multirow append \
  34 #    attribute text    [ad_parameter -package_id $pkg_id textcolor dummy "black"]
31 35
32 36 if { [info exists prefer_text_only_p]
33 37      && $prefer_text_only_p == "f"
34 38      && [ad_graphics_site_available_p] } {
35 39   template::multirow append attribute background \
36 40     [ad_parameter -package_id $pkg_id background dummy "/graphics/bg.gif"]
37 41 }
38 42
39 43 if { ![template::util::is_nil focus] } {
40 44     # Handle elements wohse name contains a dot
41 45     regexp {^([^.]*)\.(.*)$} $focus match form_name element_name
42 46
43 47     # Add safety code to test that the element exists '
44 48     set header_stuff "$header_stuff
45 49       <script language=\"JavaScript\">
46 50         function acs_focus( form_name, element_name ){
47 51             if (document.forms == null) return;
48 52             if (document.forms\[form_name\] == null) return;
49 53             if (document.forms\[form_name\].elements\[element_name\] == null) return;
50 54