| |
23 |
23 |
|
| |
24 |
24 |
# Pull out the package_id of the subsite closest to our current node |
| |
25 |
25 |
set pkg_id [site_node_closest_ancestor_package "acs-subsite"] |
| |
26 |
26 |
|
| |
27 |
27 |
template::multirow append \ |
| |
28 |
28 |
attribute bgcolor [ad_parameter -package_id $pkg_id bgcolor dummy "white"] |
| |
29 |
29 |
template::multirow append \ |
| |
30 |
30 |
attribute text [ad_parameter -package_id $pkg_id textcolor dummy "black"] |
| |
31 |
31 |
|
| |
32 |
32 |
if { [info exists prefer_text_only_p] |
| |
33 |
33 |
&& $prefer_text_only_p == "f" |
| |
34 |
34 |
&& [ad_graphics_site_available_p] } { |
| |
35 |
35 |
template::multirow append attribute background \ |
| |
36 |
36 |
[ad_parameter -package_id $pkg_id background dummy "/graphics/bg.gif"] |
| |
37 |
37 |
} |
| |
38 |
38 |
|
| |
39 |
39 |
if { ![template::util::is_nil focus] } { |
| |
40 |
40 |
# Handle elements wohse name contains a dot |
| |
41 |
41 |
regexp {^([^.]*)\.(.*)$} $focus match form_name element_name |
| |
42 |
42 |
|
| |
|
43 |
# Add safety code to test that the element exists ' |
| |
|
44 |
set header_stuff "$header_stuff |
| |
|
45 |
<script language=\"JavaScript\"> |
| |
|
46 |
function acs_focus( form_name, element_name ){ |
| |
|
47 |
if (document.forms == null) return; |
| |
|
48 |
if (document.forms\[form_name\] == null) return; |
| |
|
49 |
if (document.forms\[form_name\].elements\[element_name\] == null) return; |
| |
|
50 |
|
| |
|
51 |
document.forms\[form_name\].elements\[element_name\].focus(); |
| |
|
52 |
} |
| |
|
53 |
</script> |
| |
|
54 |
" |
| |
|
55 |
|
| |
43 |
56 |
template::multirow append \ |
| |
44 |
|
attribute onload "javascript:document.forms\['${form_name}'\].elements\['${element_name}'\].focus()" |
| |
|
57 |
attribute onload "javascript:acs_focus('${form_name}', '${element_name}')" |
| |
45 |
58 |
} |
| |
46 |
59 |
|
| |
47 |
60 |
|
| |
48 |
61 |
# Developer-support |
| |
49 |
62 |
|
| |
50 |
63 |
if { [llength [namespace eval :: info procs ds_link]] == 1 } { |
| |
51 |
64 |
set ds_link "[ds_link]" |
| |
52 |
65 |
} else { |
| |
53 |
66 |
set ds_link "" |
| |
54 |
67 |
} |
| |
55 |
68 |
|
| |
56 |
69 |
|
| |
57 |
70 |
|