source: sandbox/2.5.0-expresso1/prototype/modules/mail/templates/float_folder_menu.ejs @ 7202

Revision 7202, 3.1 KB checked in by thiago, 10 years ago (diff)

Ticket #3088 - Listagem das arvore de pastas, deleção, renomear, criar, etc.

  • Property svn:executable set to *
Line 
1<%
2        var specialFolders = {
3                        INBOX: {name:'Caixa de Entrada'},
4                        Inbox: {name:'Caixa de Entrada'},
5                        Root : {name:'root'}
6                };
7    specialFolders["local_messages_trash"] = {name:'Lixeira', classe:'trash'};
8    specialFolders["local_messages_drafts"] = {name:'Rascunhos', classe:'drafts'};
9    specialFolders["local_messages_spam"] = {name:'Spam', classe:'spam'};
10    specialFolders["local_messages_sent"] = {name:'Enviados', classe:'sent'};
11    specialFolders["local_messages_outbox"] = {name:'Enviados', classe:'sent'};
12
13        specialFolders[trashfolder] = {name:'Lixeira', classe:'trash'};
14        specialFolders[draftsfolder] = {name:'Rascunhos', classe:'drafts'};
15        specialFolders[spamfolder] = {name:'Spam', classe:'spam'};
16        specialFolders[sentfolder] = {name:'Enviados', classe:'sent'};
17%>
18
19<span class="float-menu">
20    <% if(data.name_folder != "local_messages_inbox"){ %>
21        <%if(!data.flag.valid){ %>
22
23                <%if(data.name_folder != 'INBOX'){%>
24                        <span class="ui-icon ui-icon-document float-menu-new floating-default" title="<%=get_lang("New Folder")%>"></span> 
25                <%}%>
26                <%if(!specialFolders[data.name_folder] ){ %>
27                        <span class="ui-icon ui-icon-pencil float-menu-edit floating-default" title="<%=get_lang("Edit folder")%>"></span> 
28                        <span class="ui-icon ui-icon-close float-menu-remove floating-default" title="<%=get_lang("Delete folder")%>"></span> 
29                <%}
30                else if(data.name_folder == trashfolder || data.name_folder == "local_messages_trash"){%>
31                        <span class="ui-icon ui-icon-trash float-menu-clean floating-default" onclick="empty_trash_imap();" title="<%=get_lang("Empty Trash")%>"></span> 
32                <%}
33                else if(data.name_folder == spamfolder || data.name_folder == "local_messages_spam"){%>
34       
35                        <span class="ui-icon ui-icon-trash float-menu-clean floating-default" onclick="empty_spam_imap();" title="<%=get_lang("Empty Spam")%>"></span> 
36                       
37                <%}%>
38
39        <%}else{ %>
40        <%      if(parseInt(data.acl.create)){%>
41                        <span class="ui-icon ui-icon-document float-menu-new floating-default" title="<%=get_lang("New Folder")%>"></span>
42        <%              if(parseInt(data.acl.delete) && parseInt(data.acl.rename) && !specialFolders[data.name_folder] && !data.flag.head){ %>
43                                <span class="ui-icon ui-icon-pencil float-menu-edit floating-default" title="<%=get_lang("Edit folder")%>"></span> 
44        <%              } %>
45
46        <%      } %>
47        <%      if(parseInt(data.acl.delete) && !specialFolders[data.name_folder] && !data.flag.head){ %>
48                        <span class="ui-icon ui-icon-close float-menu-remove floating-default" title="<%=get_lang("Delete folder")%>"></span>
49                <%}%>
50                <%if(data.name_folder == trashfolder && parseInt(data.acl.delete)){%>
51                        <span class="ui-icon ui-icon-trash float-menu-clean floating-default" onclick="empty_trash_imap(true, $(this));" title="<%=get_lang("Empty Trash")%>"></span> 
52                <%}else if(data.name_folder == spamfolder && parseInt(data.acl.delete)){%>
53                        <span class="ui-icon ui-icon-trash float-menu-clean floating-default" onclick="empty_spam_imap(true, $(this));" title="<%=get_lang("Empty Spam")%>"></span> 
54                <%}%>
55        <%}%>
56    <% } %>
57        <span class="ui-icon ui-icon-arrowthickstop-1-n float-menu-export floating-default" title="<%=get_lang("Export folder messages")%>"></span> 
58 </span>
Note: See TracBrowser for help on using the repository browser.