- Timestamp:
- 07/30/12 16:30:19 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.4.2-expresso1/prototype/modules/calendar/js/helpers.js
r6904 r6912 128 128 //var html = DataLayer.render( path + 'templates/attendee_permissions.ejs', {} ); 129 129 var print = $('.fc-header-right').find('.fc-button.fc-button-agendaDay').clone(); 130 /* 131 $('.fc-header-right').find('.fc-button-year').toggleClass('fc-corner-right'); 132 print.addClass('fc-corner-right'); 133 print.addClass('fc-button-print'); 134 print.removeClass('fc-button-agendaDay'); 135 print.removeClass('fc-corner-left'); 136 print.find('.fc-button-content').html('Imprimir'); 137 $('.fc-header-right').append(print); 138 $('.fc-button-print').click(function(){ 139 var window_print = window.open('','ExpressoCalendar','width=600,height=600,scrollbars=yes'); 140 window_print.document.open(); 141 142 143 var end = $("#calendar").fullCalendar('getView').visEnd.getTime()/1000; 144 var start = $("#calendar").fullCalendar('getView').visStart.getTime()/1000; 145 var criteria = DataLayer.criteria("schedulable:calendar", {'start':start, 'end':end} ); 146 147 var data = DataLayer.get("schedulable:print", criteria); 148 149 150 if($("#calendar").fullCalendar('getView').name == "month"){ 151 152 window_print.document.write('<link rel="stylesheet" type"text/css" href="../prototype/modules/calendar/css/calendar_print.css" >' + DataLayer.render('templates/print_month.ejs', { 153 'InfoPage' : $("#calendar").fullCalendar('getView').title, 154 'days' : data 155 } )); 156 } else if($("#calendar").fullCalendar('getView').name == "agendaWeek"){ 157 158 window_print.document.write('<link rel="stylesheet" type"text/css" href="../prototype/modules/calendar/css/calendar_print.css" >' + DataLayer.render('templates/print_week.ejs', { 159 'InfoPage' : $("#calendar").fullCalendar('getView').title, 160 'days' : data 161 } )); 162 } 163 //window_print.document.close(); 164 window_print.print(); 165 }); 166 */ 167 168 169 130 170 $('.fc-header-right').find('.fc-button-year').toggleClass('fc-corner-right'); 131 171 print.addClass('fc-corner-right'); … … 156 196 'title': 'Calendário Diário' 157 197 } )); 198 <<<<<<< .mine 199 } 200 201 if($("#calendar").fullCalendar('getView').name == "agendaWeek"){ 202 203 window_print.document.write(DataLayer.render('templates/calendar_week_print.ejs', { 204 'InfoPage' : $("#calendar").fullCalendar('getView').title, 205 'days' : data, 206 'title': 'Calendário Semanal' 207 } )); 208 209 var aux = 0; 210 211 212 setTimeout(function(){$(window_print.document).find(".all-day").each(function(){ 213 if($(this).height() > aux) 214 aux = $(this).height(); 215 }) 216 217 $(window_print.document).find(".all-day").each(function(){ 218 $(this).height(aux); 219 }); 220 $(window_print.document).find(".all-day-line .write").height(aux); 221 aux = 0; 222 },20); 223 224 } 225 ======= 158 226 } 159 227 if($("#calendar").fullCalendar('getView').name == "year"){ … … 163 231 } )); 164 232 } 233 >>>>>>> .r6911 165 234 window_print.document.close(); 166 235 window_print.print(); 167 236 }); 237 168 238 } 169 239
Note: See TracChangeset
for help on using the changeset viewer.