source: sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/calendar_list.ejs @ 6820

Revision 6820, 6.6 KB checked in by acoutinho, 10 years ago (diff)

Ticket #2966 - Melhorias e correcoes qtips de criacao de groups/simple task

Line 
1<%
2    var signatures = {'calendar': [], 'taskGroup': [], 'sharedCalendar': []};
3    for(var i = 0; i < data.signatures.length; i++)
4    {
5        if(data.signatures[i].calendar.type == 1){
6            signatures['taskGroup'].push(data.signatures[i]);
7        }else{
8            signatures[data.signatures[i].isOwner == 1 ? 'calendar' : 'sharedCalendar'].push(data.signatures[i]);       
9        }
10    }
11%>
12
13<div class="all-list-calendars">
14
15    <div class="my-groups-task">
16        <a title='Grupos de tarefas' class="title-my-calendars" aria-expanded='false' role='button' tabindex='0'>Grupos de tarefas</a>
17        <span class="status-list ui-icon ui-icon-triangle-1-s"></span>
18        <a href="#" class="button new new-calendar 1">Novo Grupo</a>
19        <ul class="list-calendars my-list-calendars">
20            <% for (var i=0; i < signatures['taskGroup'].length; i++) {%>
21            <li class="list-calendars-item list-calendars-item-<%= signatures['taskGroup'][i].calendar.id %>" title="<%= signatures['taskGroup'][i].calendar.name %>">
22
23                <div>
24                    <input class="calendar-view" type="checkbox" name="" value="<%= signatures['taskGroup'][i].calendar.id %>" checked="checked"/>
25                    <label><%= signatures['taskGroup'][i].calendar.name %></label>
26
27                </div>
28                <a class="cal-list-options-btn my-cal-list-options-btn-<%= signatures['taskGroup'][i].calendar.id %>" style="background-color:#<%=signatures['taskGroup'][i].backgroundColor%>; border-color:#<%= signatures['taskGroup'][i].borderColor%>;">
29                    <img src="../prototype/modules/calendar/img/arrow_down.png" width="10" height="10" class="cal-list-img"/>
30                </a>
31
32
33                <div class="cal-list-options my-cal-list-options-<%= signatures['taskGroup'][i].calendar.id %> hidden">
34                    <ul>
35                        <li><a href="#" onclick="add_tab_configure_calendar(<%= signatures['taskGroup'][i].calendar.id%>, 1);">Configurações</a></li>
36                        <li><a href="#" onclick="remove_calendar(1);">Remover Grupo</a></li>
37                    </ul>
38
39                </div>
40            </li>
41            <%}%>
42
43        </ul>
44    </div>
45
46    <div class="my-calendars">
47        <a title='Minhas agendas' class="title-my-calendars" aria-expanded='false' role='button' tabindex='0'>Minhas agendas</a>
48        <span class="status-list ui-icon ui-icon-triangle-1-s"></span>
49        <a href="#" class="button new new-calendar 0">Nova Agenda</a>
50        <ul class="list-calendars my-list-calendars">
51            <% for (var i=0; i < signatures.calendar.length; i++) {%>
52            <li class="list-calendars-item list-calendars-item-<%= signatures['calendar'][i].calendar.id %>" title="<%= signatures['calendar'][i].calendar.name %>">
53
54                <div>
55                    <input class="calendar-view" type="checkbox" name="" value="<%= signatures['calendar'][i].calendar.id %>" checked="checked"/>
56                    <label><%= signatures['calendar'][i].calendar.name %></label>
57
58                </div>
59                <a class="cal-list-options-btn my-cal-list-options-btn-<%= signatures['calendar'][i].calendar.id %>" style="background-color:#<%=signatures['calendar'][i].backgroundColor%>; border-color:#<%= signatures['calendar'][i].borderColor%>;">
60                    <img src="../prototype/modules/calendar/img/arrow_down.png" width="10" height="10" class="cal-list-img"/>
61                </a>
62
63
64                <div class="cal-list-options my-cal-list-options-<%= signatures['calendar'][i].calendar.id %> hidden">
65                    <ul>
66                        <li><a href="#" onclick="add_tab_configure_calendar(<%= signatures['calendar'][i].calendar.id%>, 0);">Configurações</a></li>
67                        <li><a href="#" onclick="show_modal_import_export(0, <%= signatures['calendar'][i].calendar.id%>);">Importar</a></li>
68                        <li><a href="#" onclick="show_modal_import_export(1, <%= signatures['calendar'][i].calendar.id%>);">Exportar</a></li>
69                        <li><a href="#" onclick="show_modal_shared(<%= signatures['calendar'][i].calendar.id%>);">Compartilhar agenda</a></li>
70                        <li><a href="#" onclick="remove_calendar(0);">Remover agenda</a></li>
71                    </ul>
72
73                </div>
74            </li>
75            <%}%>
76
77        </ul>
78    </div>
79
80    <div class="signed-calendars">
81        <a title='Agendas assinadas' class="title-signed-calendars" aria-expanded='false' role='button' tabindex='0'>Agendas assinadas</a>                     
82        <span class="status-list-shared ui-icon ui-icon-triangle-1-s"></span>
83        <a href="#" class="button new new-calendar-shared tiny">Nova Agenda</a>
84
85        <ul class="list-calendars signed-list-calendars">
86            <% for (var i=0; i < signatures['sharedCalendar'].length; i++) {%>
87                <li class="list-calendars-item list-calendars-item-<%= signatures['sharedCalendar'][i].calendar.id %>" title="<%= signatures['sharedCalendar'][i].calendar.name %>">
88                 <div>
89                            <input class="calendar-view" type="checkbox" name="" value="<%= signatures['sharedCalendar'][i].calendar.id %>" checked="checked"/>
90                            <label><%= signatures['sharedCalendar'][i].calendar.name %></label>
91                         </div>
92                <a class="cal-list-options-btn my-cal-list-options-btn-<%= signatures['sharedCalendar'][i].calendar.id %>" style="background-color:#<%=signatures['sharedCalendar'][i].backgroundColor%>; border-color:#<%= signatures['sharedCalendar'][i].borderColor%>;">
93                    <img src="../prototype/modules/calendar/img/arrow_down.png" width="10" height="10" class="cal-list-img"/></a>
94                <div class="cal-list-options my-cal-list-options-<%= signatures['sharedCalendar'][i].calendar.id  %> hidden">
95                    <ul>
96                        <li><a href="#" onclick="add_tab_configure_calendar(<%= signatures['sharedCalendar'][i].calendar.id %>, 0);">Configurações</a></li>
97                        <li><a href="#" onclick="show_modal_import_export(0, <%= signatures['sharedCalendar'][i].calendar.id %>);">Importar</a></li>
98                        <li><a href="#" onclick="show_modal_import_export(1, <%= signatures['sharedCalendar'][i].calendar.id %>);">Exportar</a></li>
99                        <%if(!signatures['sharedCalendar'][i].permission.acl['required']){%>
100                            <li><a href="#" onclick="cancel_signatures['sharedCalendar'](<%= signatures['sharedCalendar'][i].id %>);">Cancelar assinatura</a></li>
101                        <%}%>
102                    </ul>
103
104                </div>
105
106            </li>
107            <%}%>
108        </ul>
109    </div>
110</div>
Note: See TracBrowser for help on using the repository browser.