source: publico/PloneImapClient/trunk/skins/PloneImapClient_public/imapclient_mailbox.pt @ 2663

Última Alteração nesse arquivo desde 2663 foi 2663, incluída por johnnysouza, 15 anos atrás
File size: 5.4 KB
Linha 
1<html xmlns:tal="http://xml.zope.org/namespaces/tal"
2      xmlns:metal="http://xml.zope.org/namespaces/metal"
3      metal:use-macro="here/main_template/macros/master"
4      i18n:domain="ploneimapclient">
5    <body>
6
7<script language="javascript">
8function checkbox_checker()
9{
10
11// set var checkbox_choices to zero
12
13var checkbox_choices = 0;
14
15// Loop from zero to the one minus the number of checkbox button selections
16for (counter = 0; counter < checkbox_form.checkbox.length; counter++)
17{
18
19// If a checkbox has been selected it will return true
20// (If not it will return false)
21if (checkbox_form.checkbox[counter].checked)
22{ checkbox_choices = checkbox_choices + 1; }
23
24}
25
26
27if (checkbox_choices > 3 )
28{
29// If there were more than three selections made display an alert box
30msg="You're limited to only three selections.\n"
31msg=msg + "You have made " + checkbox_choices + " selections.\n"
32msg=msg + "Please remove " + (checkbox_choices-3) + " selection(s)."
33alert(msg)
34return (false);
35}
36
37
38if (checkbox_choices < 3 )
39{
40// If there were less then selections made display an alert box
41alert("Please make three selections. \n" + checkbox_choices + " entered so far.")
42return (false);
43}
44
45// If three were selected then display an alert box stating input was OK
46alert(" *** Valid input of three outfielders was entered. ***");
47return (true);
48}
49
50function del_mails()
51    {
52        Document.
53        alert("Hello World!")
54    }
55
56</script>
57
58<metal:javascriptslot fill-slot="javascript_head_slot">
59    <script language="javascript">
60
61
62    function del_mails()
63    {
64        // set var checkbox_choices to zero
65        var checkbox_choices = 0;
66        var checkbox_list = document.getElementsByName("imapclient_checkbox");
67        var checked_list = "";
68        // Loop from zero to the one minus the number of checkbox button selections
69        for (counter = 0; counter < checkbox_list.length; counter++)
70        {
71            // If a checkbox has been selected it will return true
72            // (If not it will return false)
73            if (checkbox_list[counter].checked)
74            {
75                checkbox_choices = checkbox_choices + 1;
76                checked_list = checked_list + checkbox_list[counter].value + " ";
77            }
78        }
79        alert("Emails a serem deletados:\n"+checked_list);
80    }
81
82
83    </script>
84
85</metal:javascriptslot>
86               
87
88
89<metal:block fill-slot="top_slot"
90             tal:define="dummy python:request.set('disable_border',1)" />
91
92
93<div metal:fill-slot="main"
94      tal:define="folder python:context.REQUEST.get('folder','INBOX');
95                  headers python:context.portal_imapclient.getHeaders(folder);">
96
97        <ul class="contentViews">
98          <li><a href="atualizarcache">Chegou email?</a>
99          </li>
100          <li><a href="imapclient_newmail">Escrever</a>
101          </li>
102          <li><a href="javascript:del_mails()">Excluir</a>
103          </li>
104        </ul>
105        <div style="border-bottom-style:outset;border-bottom-width:thin;"
106             class="contentActions"
107             tal:content="python:str(len(headers)) + ' emails na pasta ' + folder" />
108       
109        <table height="100%" border="0" cellspacing="5" cellpadding="0" width="95%">
110                  <tal:block tal:repeat="header headers">
111                     <tr tal:define="oddrow repeat/header/odd;
112                                     FLAGS repeat/header/item/Flags;
113                                     DELETED python:'\Deleted' in FLAGS;
114                                     READ python: ( r'\Seen' in FLAGS )"
115                         tal:attributes="class python:test(oddrow, 'even', 'odd')"
116                         style="height:20px">
117                       <td>
118                         <strike tal:condition="python:DELETED" />
119                         <b tal:condition="python:not READ" />
120                         <input type="checkbox" name="imapclient_checkbox"
121                                tal:attributes="value repeat/header/item/UID" />
122                         <span tal:define="MSG_TO repeat/header/item/To|nothing;
123                                           MSG_FROM repeat/header/item/From|nothing;
124                                           value python:test(folder == context.portal_imapclient.getFolderOUT(), MSG_TO, MSG_FROM)"
125                               tal:replace="structure python:'<a href=\'mailto:'+value[0][1]+'\'>'+ test(value[0][0],value[0][0],value[0][1])+'</a>'" >
126                                            Sender/To
127                          </span>
128                       </td>
129                       <td>
130                         <b tal:condition="python:not READ" />
131                         <a tal:define="UID repeat/header/item/UID;
132                                        url python: 'imapclient_emailview?folder=' + str(folder) + '&UID=' + str(UID)"
133                                        tal:content="repeat/header/item/Subject|nothing"
134                                        tal:attributes="href url">
135                                        Subject NEW
136                         </a>
137                       </td>
138                       <td >
139                          <strike tal:condition="python:DELETED" />
140                          <b tal:condition="python:not READ" />
141                            <span tal:content="repeat/header/item/Date | nothing">Date</span>
142
143                       </td>
144                     </tr>
145                  </tal:block>
146                </table>
147</div>
148</body>
149</html>
Note: Veja TracBrowser para ajuda no uso do navegador do trac.
 

The contents and data of this website are published under license:
Creative Commons 4.0 Brasil - Atribuir Fonte - Compartilhar Igual.