Changeset 6880 for sandbox/2.4.2-expresso1
- Timestamp:
- 07/26/12 09:44:14 (12 years ago)
- Location:
- sandbox/2.4.2-expresso1/prototype/modules/calendar
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.4.2-expresso1/prototype/modules/calendar/js/calendar.codecs.js
r6876 r6880 511 511 calendar: objEvent.calendar, 512 512 summary: objEvent.summary, 513 type: !!objEvent.type ? objEvent.type : 1, 513 514 description: objEvent.description, 514 515 timezone: objEvent.timezone, … … 621 622 id: form.idTask, 622 623 location: form.location, 623 type: 2,624 type: !!form.type ? form.type : 2, 624 625 percentage: form.percentage, 625 626 priority: form.priority, … … 669 670 id: attendee, 670 671 isOrganizer: (form.attendee_organizer == attendee ? 1 : 0 ), 671 isExternal: !!parseInt(form.attendeeType[i]) ? 1 : 0 ,672 isExternal: !!parseInt(form.attendeeType[i]) ? 1 : 0 672 673 }; 673 674 }; … … 713 714 group: objEvent.group, 714 715 summary: objEvent.summary, 716 type: !!objEvent.type ? objEvent.type : 2, 715 717 description: objEvent.description, 716 718 timezone: objEvent.timezone, … … 1007 1009 1008 1010 var pref = User.preferences; 1009 1010 var res = DataLayer.encode('schedulable:preview', evtObj); 1011 var res = []; 1012 1013 for(var i = 0; i < evtObj.length; i++){ 1014 res.push(DataLayer.encode('schedulable:' + (evtObj[i].type == '1' ? 'preview' : 'task'), evtObj[i])); 1015 } 1011 1016 1012 1017 if( !notArray ){ … … 1043 1048 'endDate': new Date( occurrences[ii] + duration ).toString( User.preferences.dateFormat ) 1044 1049 } ); 1045 1046 1047 1048 1049 res2.repeat = typeRepeat[res[i].repeat.frequency]; 1050 1051 if(res[i].repeat) 1052 res2.repeat = typeRepeat[res[i].repeat.frequency]; 1050 1053 1051 1054 while (counter.compareTo( currentDate ) == 0) { -
sandbox/2.4.2-expresso1/prototype/modules/calendar/js/helpers.js
r6876 r6880 2353 2353 } 2354 2354 2355 pageselectCallback(keyword, 0, false, false,type); // load page 1 and insert data on event_list.ejs2355 pageselectCallback(keyword, 0, false, type); // load page 1 and insert data on event_list.ejs 2356 2356 2357 2357 $('.preferences-win.active .button.save, .preferences-win.active .button.cancel, .preferences-win.active .button.import, .preferences-win.active .button.export').button(); … … 2373 2373 if(paginator.indexOf('next') > 0){ 2374 2374 if(parseInt($(currentView+' [name = results]').val()) > 25) 2375 pageselectCallback($(currentView+' [name = keyword]').val(), ((parseInt($(currentView+' [name = page_index]').val())) +1) );2375 pageselectCallback($(currentView+' [name = keyword]').val(), ((parseInt($(currentView+' [name = page_index]').val())) +1), false, 2); 2376 2376 }else{ 2377 2377 if(parseInt($(currentView+' [name = page_index]').val()) > 0) 2378 pageselectCallback($(currentView+' [name = keyword]').val(), ((parseInt($(currentView+' [name = page_index]').val())) -1) );2378 pageselectCallback($(currentView+' [name = keyword]').val(), ((parseInt($(currentView+' [name = page_index]').val())) -1), false, 2); 2379 2379 } 2380 2380 }); … … 2414 2414 } 2415 2415 2416 function paginatorList(currentView, view ){2416 function paginatorList(currentView, view, type){ 2417 2417 $(currentView+' .events-list.events-list-win.active .list-events-paginator .fc-header-title').html('<h2>'+mountTitleList( parseInt($('[name = page_index]').val()),view)+'</h2>'); 2418 2418 $(currentView+' .events-list.events-list-win.active .header-paginator .fc-header-right .fc-button').removeClass('fc-state-active') … … 2435 2435 var goView = $(this).attr('class'); 2436 2436 if(goView.indexOf('agendaDay') > 0) 2437 pageselectCallback($(currentView+' [name = keyword]').val(), 0, ' ', 'agendaDay');2437 pageselectCallback($(currentView+' [name = keyword]').val(), 0, 'agendaDay', type); 2438 2438 else if(goView.indexOf('month') > 0) 2439 pageselectCallback($(currentView+' [name = keyword]').val(), 0, ' ', 'month');2439 pageselectCallback($(currentView+' [name = keyword]').val(), 0, 'month', type); 2440 2440 else if(goView.indexOf('year') > 0) 2441 pageselectCallback($(currentView+' [name = keyword]').val(), 0, ' ', 'year');2441 pageselectCallback($(currentView+' [name = keyword]').val(), 0, 'year', type); 2442 2442 else if(goView.indexOf('agendaWeek') > 0) 2443 pageselectCallback($(currentView+' [name = keyword]').val(), 0, ' ', 'agendaWeek');2443 pageselectCallback($(currentView+' [name = keyword]').val(), 0, 'agendaWeek', type); 2444 2444 2445 2445 }); … … 2457 2457 var paginator = $(this).attr('class'); 2458 2458 if(paginator.indexOf('next') > 0) 2459 pageselectCallback($(currentView+' [name = keyword]').val(), ((parseInt($('[name = page_index]').val())) +1), '', view);2459 pageselectCallback($(currentView+' [name = keyword]').val(), ((parseInt($('[name = page_index]').val())) +1), view, type); 2460 2460 else 2461 pageselectCallback($(currentView+' [name = keyword]').val(), ((parseInt($('[name = page_index]').val())) -1), '', view);2461 pageselectCallback($(currentView+' [name = keyword]').val(), ((parseInt($('[name = page_index]').val())) -1), view, type); 2462 2462 }); 2463 2463 } 2464 2464 2465 function paginatorListEvent(currentView, typeView, view ){2465 function paginatorListEvent(currentView, typeView, view, type){ 2466 2466 if(!!$(currentView).find('.fc-calendar').length) 2467 2467 return; … … 2487 2487 paginatorSearch(currentView); 2488 2488 }else 2489 paginatorList(currentView, view );2489 paginatorList(currentView, view, type); 2490 2490 } 2491 2491 … … 2564 2564 } 2565 2565 2566 function pageselectCallback(keyword, page_index, jq,view, type){2566 function pageselectCallback(keyword, page_index, view, type){ 2567 2567 $('.qtip.qtip-blue').remove(); 2568 2568 … … 2636 2636 2637 2637 }); 2638 paginatorListEvent(currentView, (keyword == '' || keyword == null) ? 'list' : 'search', !!view ? view : User.preferences.defaultCalView );2638 paginatorListEvent(currentView, (keyword == '' || keyword == null) ? 'list' : 'search', !!view ? view : User.preferences.defaultCalView, type); 2639 2639 }); 2640 2640 }else{ … … 2646 2646 '</div>' 2647 2647 ); 2648 paginatorListEvent(currentView, 'list', !!view ? view : User.preferences.defaultCalView );2648 paginatorListEvent(currentView, 'list', !!view ? view : User.preferences.defaultCalView, type); 2649 2649 } 2650 2650 } -
sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/event_list.ejs
r6857 r6880 1 <% 2 3 var decoder = {status: {1: 'Sem ações', 2: 'Em processo', 3: 'Completo', 4: 'Cancelado'}, priority: {1: 'Alta', 2: 'Normal', 3: 'Baixa'}} 4 5 %> 6 1 7 <div title="<%=data.tab_title%>" class="events-list events-list-win active"> 2 8 … … 46 52 var img_type = ""; 47 53 var title_type = ""; 48 if(_event.type == 1){54 if(_event.type == '1'){ 49 55 img_type = "../prototype/modules/calendar/img/event.png"; 50 56 title_type = "Evento"; 51 }if(_event.type == 2){57 }if(_event.type == '2'){ 52 58 img_type = "../prototype/modules/calendar/img/task.png"; 53 59 title_type = "Tarefa"; 54 }if(_event.type == 3){60 }if(_event.type == '3'){ 55 61 img_type = "../prototype/modules/calendar/img/activity_icon.jpg"; 56 62 title_type = "Atividade"; … … 105 111 <%if(_event.allDay){%> 106 112 <p class="input-group date-info"> 107 <label>Duração </label>113 <label>Duração:</label> 108 114 <span class="">Dia inteiro</span> 109 115 </p> … … 123 129 </p> 124 130 <%}%> 125 <%if(_event.type == 1){131 <%if(_event.type == '1'){ 126 132 if(_event.repeat ){%> 127 133 <p class="input-group"> … … 131 137 <%}}%> 132 138 <p class="input-group"> 133 <label>Lembretes </label>139 <label>Lembretes:</label> 134 140 <% if(_event.alarms) { 135 141 var string_alarm = ""; 136 if(_event.type == 1)142 if(_event.type == '1') 137 143 string_alarm = 'do evento'; 138 if(_event.type == 2)144 if(_event.type == '2') 139 145 string_alarm = 'da tarefa'; 140 if(_event.type == 2)146 if(_event.type == '3') 141 147 string_alarm = 'da atividade'; 142 148 %> … … 148 154 <% } %> 149 155 </p> 150 <%if(_event.type == 1){%>151 <p class="input-group"> 152 <label>Local </label>156 <%if(_event.type == '1'){%> 157 <p class="input-group"> 158 <label>Local:</label> 153 159 <span><%= _event.location %></span> 154 160 </p> 155 161 <%}%> 156 162 <p class="input-group"> 157 <label>Descrição 163 <label>Descrição:</label> 158 164 <span class="large" ><%= _event.description %></span> 159 165 </p> 160 <%if(_event.type != 1){%>161 <p class="input-group"> 162 <label>Prioridade 163 <span><%= _event.priority%></span>164 </p> 165 <p class="input-group"> 166 <label> Porcentagem de Conlusão</label>167 <span><%= _event.percent %></span>168 </p> 169 <p class="input-group"> 170 <label>Status 171 <span><%= _event.status%></span>166 <%if(_event.type != '1'){%> 167 <p class="input-group"> 168 <label>Prioridade:</label> 169 <span><%= decoder['priority'][_event.priority] %></span> 170 </p> 171 <p class="input-group"> 172 <label>% Conlusão:</label> 173 <span><%= _event.percentage %>%</span> 174 </p> 175 <p class="input-group"> 176 <label>Status:</label> 177 <span><%= decoder['status'][_event.status] %></span> 172 178 </p> 173 179 <% } %> … … 176 182 <span><%= _event.privacy %></span> 177 183 </p> --> 178 <%if(_event.type == 1){%>179 <p class="input-group"> 180 <label>Organizador </label>184 185 <p class="input-group"> 186 <label>Organizador:</label> 181 187 <span class="large"><%= _event.organizer.user ? _event.organizer.user.name : _event.organizer.name %> (<%= _event.organizer.user ? _event.organizer.user.mail : _event.organizer.mail %>)</span> 182 188 </p> 183 <%} 184 if(_event.type != 3){%>185 <p class="input-group"> 186 <label>Participantes </label>189 190 <%if(_event.type != '3'){%> 191 <p class="input-group"> 192 <label>Participantes:</label> 187 193 <% if(_event.attendee) { %> 188 194 <span class="large" > … … 194 200 </p> 195 201 <%} 196 if(_event.type == 3){%>202 if(_event.type == '3'){%> 197 203 <p class="input-group"> 198 204 <label>Tarefas</label> … … 205 211 <% } %> 206 212 </p> 207 <%} 208 if(_event.type == 1){%>209 <p class="input-group"> 210 <label>Presença </label>213 <%}%> 214 215 <p class="input-group"> 216 <label>Presença:</label> 211 217 <span> 212 213 214 215 216 217 218 219 220 221 222 </p> 223 <%}%> 218 <% var status_name; 219 if (_event.status == 1) 220 status_name = "Eu vou"; 221 else if (_event.status == 2) 222 status_name = "Talvez"; 223 else if (_event.status == 3) 224 status_name = "Eu não vou"; 225 %> 226 <%= status_name %> 227 </span> <!-- Ta hardcodificado isso aqui? --> 228 </p> 229 224 230 </fieldset> 225 231 <div class="menu-container footer-container">
Note: See TracChangeset
for help on using the changeset viewer.