2
# $Id: comview.tcl 391 2007-01-25 03:53:59Z mikes@u.washington.edu $
3
# ========================================================================
4
# Copyright 2006 University of Washington
6
# Licensed under the Apache License, Version 2.0 (the "License");
7
# you may not use this file except in compliance with the License.
8
# You may obtain a copy of the License at
10
# http://www.apache.org/licenses/LICENSE-2.0
12
# ========================================================================
16
# Purpose: CGI script to produce the common view commands frame
20
{f_colid {} [WPCmd PEFolder isincoming 0]}
21
{f_name {} "saved-messages"}
24
# inherit global config
28
WPEval $comview_vars {
35
if {[info exists _wp(exitonclose)]} {
36
WPExitOnClose top.spec.body
40
cgi_put "<style type='text/css'>"
41
cgi_put ".viewop { font-family: arial, sans-serif; font-size: 7pt }"
43
if {$_wp(keybindings)} {
45
{{?} {top.location = 'wp.tcl?page=help'}}
46
{{l} {top.location = 'wp.tcl?page=folders'}}
47
{{a} {top.location = 'wp.tcl?page=addrbook'}}
48
{{n} {top.spec.body.location = 'wp.tcl?page=view&bod_next=1'}}
49
{{p} {top.spec.body.location = 'wp.tcl?page=view&bod_prev=1'}}
50
{{i} {top.spec.location = 'fr_index.tcl'}}
51
{{s} {document.saveform.f_name.focus()}}
52
{{d} {document.delform.op[0].click()}}
53
{{u} {document.delform.op[1].click()}}
54
{{r} {document.replform.op.click()}}
55
{{f} {document.forwform.op.click()}}
58
lappend kequiv [list {c} "top.location = 'wp.tcl?page=compose&oncancel=main.tcl&cid=[WPCmd PEInfo key]'"]
60
if {[WPCmd PEInfo feature enable-full-header-cmd]} {
61
lappend kequiv [list {h} "top.spec.body.location = 'wp.tcl?page=view&fullhdr=flip'"]
64
set onload "onLoad=[WPTFKeyEquiv $kequiv document.saveform.f_name top.spec.body]"
68
cgi_body bgcolor=$_wp(bordercolor) background=[file join $_wp(imagepath) logo $_wp(logodir) back.gif] "style=\"background-repeat: repeat-x\"" $onload {
69
cgi_table class=ops cellpadding=0 cellspacing=0 border=0 width="100%" height=24 {
71
cgi_table_data valign=middle align=left nowrap class=viewop {
72
cgi_form $_wp(appdir)/wp method=get target=_top name=replform {
73
cgi_text "page=view" type=hidden notab
74
cgi_text "cid=[WPCmd PEInfo key]" type=hidden notab
75
cgi_text "oncancel=main.tcl" type=hidden notab
76
cgi_text "postpost=fr_main.tcl" type=hidden notab
78
cgi_table border=0 class=ops cellpadding=0 cellspacing=0 class=viewop {
80
cgi_table_data class=viewop rowspan=2 {
81
# * * * * REPLY * * * *
82
cgi_submit_button op=Reply class="viewop" "style=\"vertical-align: middle; margin-left: 4\""
84
cgi_table_data class=viewop {
85
cgi_checkbox "repall=1" style=vertical-align:middle
86
cgi_put "To All[cgi_nbspace]"
90
cgi_table_data class=viewop rowspan=2 {
91
cgi_checkbox "reptext=1" checked style=vertical-align:middle
92
cgi_put "Include text"
99
cgi_table_data valign=middle align=center {
100
cgi_put [cgi_img [WPimg blackdot] width=1 height=26]
103
cgi_table_data valign=middle align=center nowrap {
104
cgi_form $_wp(appdir)/wp method=get target=_top name=forwform {
105
cgi_text "page=view" type=hidden notab
106
cgi_text "cid=[WPCmd PEInfo key]" type=hidden notab
107
cgi_text "oncancel=main.tcl" type=hidden notab
108
cgi_text "postpost=fr_main.tcl" type=hidden notab
110
# * * * * FORWARD * * * *
111
cgi_submit_button op=Forward class="viewop"
115
cgi_table_data valign=middle align=center {
116
cgi_put [cgi_img [WPimg blackdot] width=1 height=26]
119
cgi_table_data valign=middle align=center nowrap class=viewop {
120
cgi_table class=ops cellpadding=0 cellspacing=0 border=0 class=viewop {
122
cgi_table_data class=viewop {
123
cgi_form $_wp(appdir)/wp method=get target=spec name=saveform {
124
cgi_text "page=fr_view" type=hidden notab
125
cgi_text "cid=[WPCmd PEInfo key]" type=hidden notab
126
cgi_text "sid=[clock seconds]" type=hidden notab
128
# * * * * Save * * * *
129
cgi_submit_button "save=Save" class="viewop"
130
cgi_put "[cgi_nbspace]to "
132
cgi_text f_colid=$f_colid type=hidden notab
133
cgi_text op=save type=hidden notab
135
cgi_select f_name class=viewop style=vertical-align:middle "onchange=document.saveform.save.click(); return false;" {
136
foreach {oname oval} [WPTFGetSaveCache] {
137
cgi_option $oname value=$oval
146
cgi_table_data valign=middle align=center {
147
cgi_put [cgi_img [WPimg blackdot] width=1 height=26]
150
cgi_table_data valign=middle align=center nowrap {
151
cgi_form $_wp(appdir)/wp method=get target=_top name=take {
152
cgi_text "page=view" type=hidden notab
153
cgi_text "cid=[WPCmd PEInfo key]" type=hidden notab
154
cgi_submit_button op=Take class="viewop"
158
cgi_table_data valign=middle align=center {
159
cgi_put [cgi_img [WPimg blackdot] width=1 height=26]
162
cgi_table_data valign=middle align=right nowrap {
163
cgi_form $_wp(appdir)/wp method=get target=body name=delform {
164
cgi_text "page=view" type=hidden notab
165
cgi_text "cid=[WPCmd PEInfo key]" type=hidden notab
167
# * * * * UNDELETE * * * *
168
cgi_submit_button op=Delete class="viewop"
170
# * * * * UNDELETE * * * *
171
cgi_submit_button op=Undelete class="viewop" "style=\"margin-right: 4\""
173
# * * * * ANTISPAM * * * *
174
if {([info exists _wp(spamaddr)] && [string length $_wp(spamaddr)])
175
|| ([info exists _wp(spamfolder)] && [string length $_wp(spamfolder)])} {
176
cgi_submit_button "op=Report Spam" class="viewop" "style=\"margin-right: 4; color: white; background-color: black\""