1 | <% |
---|
2 | |
---|
3 | var specialFolders = { |
---|
4 | INBOX: {name:'Caixa de Entrada', classe:'inbox'}, |
---|
5 | Inbox: {name:'Caixa de Entrada', classe:'inbox'}, |
---|
6 | }; |
---|
7 | specialFolders[outboxfolder] = {name: 'Caixa de Saída', classe:'outbox'}; |
---|
8 | specialFolders[trashfolder] = {name:'Lixeira', classe:'trash'}; |
---|
9 | specialFolders[draftsfolder] = {name:'Rascunhos', classe:'drafts'}; |
---|
10 | specialFolders[spamfolder] = {name:'Spam', classe:'spam'}; |
---|
11 | specialFolders[sentfolder] = {name:'Enviados', classe:'sent'}; |
---|
12 | function recursive_forest(array_trees) |
---|
13 | { |
---|
14 | %><ul><% |
---|
15 | |
---|
16 | for(var i=0; i<array_trees.length; i++) |
---|
17 | { |
---|
18 | folder_class = ''; |
---|
19 | folder_name = array_trees[i].commonName; |
---|
20 | |
---|
21 | if( specialFolders[folder_name] ){ |
---|
22 | folder_class = specialFolders[folder_name].classe; |
---|
23 | folder_name = specialFolders[folder_name].name; |
---|
24 | } |
---|
25 | |
---|
26 | %><li id="<%= array_trees[i].id %>" class="closed"><span class="folder <%= folder_class %>" title="<%= folder_name %>" style="text-align : left; position : static;"><%= folder_name %> |
---|
27 | <% if(array_trees[i].messageCount.unseen > 0){ %> |
---|
28 | <span style="text-align : left;">[<label id="dftree_<%= array_trees[i].id%>_unseen" class="folder_unseen" style="color : red; text-align : left;"><%= array_trees[i].messageCount.unseen %></label>]</span> |
---|
29 | <% } %> |
---|
30 | <% if(array_trees[i].children_unseen > 0){ %> |
---|
31 | <span style="text-align : left;">[<label id="dftree_<%= array_trees[i].id%>_children_unseen" class="folder_unseen" style="color : blue; text-align : left;"><%= array_trees[i].children_unseen %></label>]</span> |
---|
32 | <% } %> |
---|
33 | </span> |
---|
34 | <input type="hidden" value="<%= array_trees[i].type %>"> |
---|
35 | <% |
---|
36 | if (array_trees[i].children.length>0) |
---|
37 | recursive_forest(array_trees[i].children); |
---|
38 | |
---|
39 | %></li><% |
---|
40 | } |
---|
41 | |
---|
42 | %></ul><% |
---|
43 | } |
---|
44 | %> |
---|
45 | <div class="upper"></div> |
---|
46 | <ul class="filetree foldertree-skin-prognus mainfoldertree"> |
---|
47 | <li><span class="folder head_folder">Minhas Pastas</span> |
---|
48 | <% recursive_forest(data.folders[0]); %> |
---|
49 | </li> |
---|
50 | <% if(data.folders[1].length > 0) { %> |
---|
51 | <li><span class="folder shared-folders">Pastas compartilhadas</span> |
---|
52 | <% recursive_forest(data.folders[1]); %> |
---|
53 | </li> |
---|
54 | <%}%> |
---|
55 | <% if(preferences.use_local_messages == 1) { %> |
---|
56 | <% if(expresso_mail_archive.enabled && data.folders[2].length > 0) { /*MailArchive ativado*/ %> |
---|
57 | <li> |
---|
58 | <span class="folder local-folder head_folder" style="display: inline;">Pastas locais</span> |
---|
59 | <% recursive_forest(data.folders[2]); %> |
---|
60 | </li> |
---|
61 | <%} else { /*MailArchive desativado*/ %> |
---|
62 | <li> |
---|
63 | <span class="folder local-folder head_folder" style="display: inline;" title="MailArchive Desconectado">Pastas locais</span> |
---|
64 | <span class="local-connect" onclick="services_retry();" title="Conectar ao MailArchive"></span> |
---|
65 | </li> |
---|
66 | <%}%> |
---|
67 | |
---|
68 | <%}%> |
---|
69 | <li><span class="folder head_folder all_accomp followup-messages">Para acompanhamento</span> |
---|
70 | </li> |
---|
71 | </ul> |
---|
72 | <div class="lower"></div> |
---|