source: sandbox/newExpressoMail/prototype/modules/mail/templates/detailedfoldertree.ejs @ 7046

Revision 7046, 2.2 KB checked in by gustavo, 9 years ago (diff)

Ticket #2911 - Melhoria na disposição e exibição das abas

  • Property svn:executable set to *
Line 
1<%
2        var specialFolders = {
3                        INBOX: {name:'Caixa de Entrada', classe:'inbox'},
4                        Inbox: {name:'Caixa de Entrada', classe:'inbox'},
5                };
6        specialFolders[trashfolder] = {name:'Lixeira', classe:'trash'};
7        specialFolders[draftsfolder] = {name:'Rascunhos', classe:'drafts'};
8        specialFolders[spamfolder] = {name:'Spam', classe:'spam'};
9        specialFolders[sentfolder] = {name:'Enviados', classe:'sent'};
10        function recursive_forest(array_trees)
11        {
12          %><ul><%
13       
14              for(var i=0; i<array_trees.length; i++)
15              {
16                  folder_class = '';
17                  folder_name = array_trees[i].commonName;
18
19                  if( specialFolders[folder_name] ){
20                      folder_class = specialFolders[folder_name].classe;
21                      folder_name = specialFolders[folder_name].name;
22                  }
23
24                  %><li id="<%= array_trees[i].id %>" class="closed" role="folder"><span class="folder <%= folder_class %>" title="<%= folder_name %>" style="text-align : left; position : static;"><%= folder_name %>
25                  <% if(array_trees[i].messageCount.unseen > 0){        %>
26                        <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>
27                  <% }  %>
28                  <% if(array_trees[i].children_unseen > 0){    %>
29                        <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>
30                  <% }  %>
31                  </span>
32                  <%
33                  if (array_trees[i].children.length>0)
34                          recursive_forest(array_trees[i].children);
35
36                  %></li><%
37              }
38 
39          %></ul><%
40        }
41%>
42<ul class="filetree foldertree-skin-prognus mainfoldertree">
43  <li><span class="folder head_folder">Minhas Pastas</span>
44      <% recursive_forest(data.folders[0]); %>
45  </li>
46  <% if(data.folders[1].length > 0) { %>
47  <li><span class="folder shared-folders">Pastas compartilhadas</span>
48      <% recursive_forest(data.folders[1]); %>
49  </li>
50  <%}%>
51  <% if(preferences.use_local_messages == 1) { %>
52  <li><span class="folder head_folder">Pastas locais</span>
53      <% recursive_forest(data.folders[2]); %>
54  </li>
55  <%}%>
56  <li><span class="folder head_folder all_accomp followup-messages">Para acompanhamento</span>
57  </li>
58</ul>
Note: See TracBrowser for help on using the repository browser.