source: branches/2.5/prototype/api/templates/foldertree.ejs @ 8113

Revision 8113, 1.6 KB checked in by douglas, 7 years ago (diff)

Ticket #3428 - Desenvolver importação e corrigir exportação de mensagens locais

Line 
1<%
2        var specialFolders = {
3                        INBOX: {name:'Caixa de Entrada', classe:'inbox'},
4                        Inbox: {name:'Caixa de Entrada', classe:'inbox'},
5                };
6    specialFolders[outboxfolder] = {name: 'Caixa de Saída', classe:'outbox'};
7        specialFolders[trashfolder] = {name:'Lixeira', classe:'trash'};
8        specialFolders[draftsfolder] = {name:'Rascunhos', classe:'drafts'};
9        specialFolders[spamfolder] = {name:'Spam', classe:'spam'};
10        specialFolders[sentfolder] = {name:'Enviados', classe:'sent'};
11
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 %>"><%= folder_name %></span>
27                  <%
28
29                  if (array_trees[i].children.length>0)
30                          recursive_forest(array_trees[i].children);
31
32                  %></li><%
33              }
34 
35          %></ul><%
36        }
37%>
38<ul id="foldertree" class="filetree foldertree-skin-prognus">
39  <li><span class="folder">Minhas Pastas</span>
40      <% recursive_forest(data.folders[0]); %>
41  </li>
42  <% if(data.folders[1].length > 0) { %>
43  <li><span class="folder">Pastas compartilhadas</span>
44      <% recursive_forest(data.folders[1]); %>
45  </li>
46  <%}%>
47  <% if(preferences.use_local_messages == 1) { %>
48  <li><span class="folder">Pastas locais</span>
49      <% recursive_forest(data.folders[2]); %>
50  </li>
51  <%}%>
52</ul>
Note: See TracBrowser for help on using the repository browser.