Ignore:
Timestamp:
07/27/12 17:43:32 (12 years ago)
Author:
douglasz
Message:

Ticket #2966 - Organizado codigo de impressao de envetos no mes.

Location:
sandbox/2.4.2-expresso1/prototype/modules/calendar
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.4.2-expresso1/prototype/modules/calendar/css/print.css

    r6893 r6896  
     1.month { 
     2        min-width: 600px; 
     3        min-height: 400px; 
     4        background : #F4F6FA; 
     5        border: 1px solid #DCE7FC; 
     6        text-align: center; 
     7        float: left; 
     8} 
     9.month .name-month { 
     10        font: 20px arial; 
     11        color: #8EB2FF; 
     12        margin: 0 0 15px 0; 
     13} 
     14.month .name-month img { 
     15        margin: 3px 0 0 0; 
     16        width: 20px; 
     17        height: 20px; 
     18} 
     19.month span { 
     20        font: 14px arial; 
     21        display: block; 
     22 
     23} 
     24.month .days ul { 
     25        list-style: none; 
     26 
     27} 
     28.month .days ul li{ 
     29        font: 12px arial; 
     30        margin: 3px; 
     31} 
    132body.detail{     
    233        margin-top: 30px; 
    334} 
    4  
    535.details-event-list { 
    636        margin-top: 10px; 
    737} 
    8  
    938body.detail a.title { 
    1039        font-weight: bold; 
    1140        color: #30487E !important; 
    1241} 
    13  
    1442.events-list-win td{ 
    1543        padding: 0px; 
  • sandbox/2.4.2-expresso1/prototype/modules/calendar/js/helpers.js

    r6894 r6896  
    128128        //var html = DataLayer.render( path + 'templates/attendee_permissions.ejs', {} ); 
    129129        var print = $('.fc-header-right').find('.fc-button.fc-button-agendaDay').clone(); 
    130        $('.fc-header-right').find('.fc-button-year').toggleClass('fc-corner-right'); 
    131        print.addClass('fc-corner-right'); 
    132        print.addClass('fc-button-print'); 
    133        print.removeClass('fc-button-agendaDay'); 
    134        print.removeClass('fc-corner-left'); 
    135        print.find('.fc-button-content').html('Imprimir'); 
    136        $('.fc-header-right').append(print); 
    137        $('.fc-button-print').click(function(){ 
    138                         var window_print = window.open('','ExpressoCalendar','width=600,height=600,scrollbars=yes');         
    139                         window_print.document.open(); 
    140                         if($("#calendar").fullCalendar('getView').name == "month"){ 
    141                                 var end = $("#calendar").fullCalendar('getView').visEnd.getTime()/1000; 
    142                                 var start = $("#calendar").fullCalendar('getView').visStart.getTime()/1000; 
    143                                 var criteria = DataLayer.criteria("schedulable:calendar", {'start':start, 'end':end} ); 
    144                                  
    145                                 var data = DataLayer.get("schedulable:print", criteria); 
    146                                  
    147                                 window_print.document.write('<link rel="stylesheet" type"text/css" href="../prototype/modules/calendar/css/calendar_print.css" >' + DataLayer.render('templates/print_month.ejs', { 
    148                                         'InfoPage' : $("#calendar").fullCalendar('getView').title, 
    149                                         'days' : data 
    150                                 } )); 
    151                         }                        
    152                         //window_print.document.close(); 
    153                         window_print.print(); 
    154            }); 
     130        $('.fc-header-right').find('.fc-button-year').toggleClass('fc-corner-right'); 
     131        print.addClass('fc-corner-right'); 
     132        print.addClass('fc-button-print'); 
     133        print.removeClass('fc-button-agendaDay'); 
     134        print.removeClass('fc-corner-left'); 
     135        print.find('.fc-button-content').html('Imprimir'); 
     136        $('.fc-header-right').append(print); 
     137        $('.fc-button-print').click(function(){ 
     138                var window_print = window.open('','ExpressoCalendar','width=800,height=600,scrollbars=yes');         
     139                window_print.document.open(); 
     140                var end = $("#calendar").fullCalendar('getView').visEnd.getTime()/1000; 
     141                var start = $("#calendar").fullCalendar('getView').visStart.getTime()/1000; 
     142                var criteria = DataLayer.criteria("schedulable:calendar", {'start':start, 'end':end} ); 
     143                 
     144                var data = DataLayer.get("schedulable:print", criteria); 
     145                         
     146                if($("#calendar").fullCalendar('getView').name == "month"){                              
     147                        window_print.document.write(DataLayer.render('templates/print_month.ejs', { 
     148                                'InfoPage' : $("#calendar").fullCalendar('getView').title, 
     149                                'days' : data 
     150                        } )); 
     151                }                        
     152                //window_print.document.close(); 
     153                window_print.print(); 
     154        }); 
    155155} 
    156156 
  • sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/print_month.ejs

    r6894 r6896  
     1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
     2<html> 
     3        <head> 
     4                <link rel="stylesheet" type="text/css" href="../prototype/modules/calendar/css/reset.css"> 
     5                <link rel="stylesheet" type="text/css" href="../prototype/modules/calendar/css/style.css"> 
     6                <link rel="stylesheet" type="text/css" href="../prototype/modules/calendar/css/layout.css"> 
     7                <link rel="stylesheet" type="text/css" href="../prototype/modules/calendar/css/print.css"> 
     8        </head> 
     9        <body>   
    110        <% console.log(data) %> 
    211        <div class="month"> 
     
    3039                </div><!--first-week--> 
    3140        </div><!--mounth--> 
     41        </body> 
     42</html> 
Note: See TracChangeset for help on using the changeset viewer.