Lançado Adianti Framework 7.6!
Clique aqui para saber mais
Full Calendar integrado com Adianti Seguindo o tutorial do Danilo Monteiro, fiz a integração do full calendar com a o Adianti. https://groups.google.com/forum/#!topic/adianti-tools-pt/mKo9U9G0Fgs...
MR
Full Calendar integrado com Adianti  
Seguindo o tutorial do Danilo Monteiro, fiz a integração do full calendar com a o Adianti.

https://groups.google.com/forum/#!topic/adianti-tools-pt/mKo9U9G0Fgs

Pacotão Dominando o Adianti Framework 7
O material mais completo de treinamento do Framework.
Curso em vídeo aulas + Livro completo + Códigos fontes do projeto ERPHouse.
Conteúdo Atualizado! Versão 7.4


Dominando o Adianti 7 Quero me inscrever agora!

Comentários (3)


MS

Marcos,
eu tentei e não obtive sucesso usando theme3 poderia informar a como utilizou?
MR

Copie os arquivos dentro de app/lib/include. Em librares.html coloque:
<link href="app/lib/include/fullcalendar/fullcalendar.css" rel="stylesheet"/> <link href="app/lib/include/fullcalendar/fullcalendar.print.css" rel="stylesheet" media="print"/> <script src="app/lib/include/fullcalendar/lib/moment.min.js"></script> <script src="app/lib/include/fullcalendar/lib/jquery.min.js"></script> <script src="app/lib/include/fullcalendar/fullcalendar.min.js"></script> <script src="app/lib/include/fullcalendar/locale/pt-br.js"></script>


E criei:

  1. <?php
  1. <?php
  2. class JqueryAgendaView extends TPage
  3. {
  4.     function __construct()
  5.     {
  6.         parent::__construct();
  7.         
  8.         $table = new TTable;
  9.         $calendar = new TElement('div');
  10.         $calendar->id   'calendar';
  11.         
  12.         $table->addRow()->addCell($calendar);   
  13.         try 
  14.         { 
  15. TTransaction::open('samples');
  16.             
  17.             $repository = new TRepository('Event');
  18.             $events $repository->load();
  19.              
  20.             $script =new TElement('script');
  21.             $script->type 'text/javascript';
  22.             $script->add("
  23.             $(document).ready(function() {
  24.                     $('#calendar').fullCalendar({
  25.                         locale: 'pt-br',
  26.                         timezone: 'America/Sao_Paulo',
  27.                         header: {
  28.                             left: 'prev,next today',
  29.                             center: 'title',
  30.                             right: 'month,agendaWeek,agendaDay'
  31.                         },
  32.                         events: [
  33.                 ");
  34.                 foreach($events as $event)
  35.                 {
  36.                     $script->add("
  37.                         {
  38.                             id: ".$event->id.",
  39.                             title: '".$event->title."',
  40.                             start: new Date(".date('Y'strtotime($event->event_date)).", ".date('m'strtotime('-1 months',strtotime($event->event_date)) ).", ".date('d'strtotime($event->event_date)).", ".str_replace(':',',',$event->start_hour)."),
  41.                             end: new Date(".date('Y'strtotime($event->event_date)).", ".date('m'strtotime('-1 months',strtotime($event->event_date)) ).", ".date('d'strtotime($event->event_date)).", ".($event->start_hour $event->duration)."),
  42.                             backgroundColor: '".$event->color."', 
  43.                             borderColor: '".$event->color."',
  44.                             url: \"index.php?class=EventForm&method=onEdit&key=".$event->id."&event_date=".date('d'strtotime($event->event_date))."&start_hour=".$event->start_hour."\",
  45.                             status: false
  46.                         },
  47.                     ");
  48.                 }
  49.                 $script->add("
  50.                         ],
  51.                         eventRender: function(event, eventElement) 
  52.                         {
  53.                             if(event.status == true)
  54.                             {
  55.                                 eventElement.find('div.fc-content').prepend(\"<i class='fa fa-check'></i> \");
  56.                             }
  57.                             else
  58.                             {
  59.                                 eventElement.find('div.fc-content').prepend(\"<i class='fa fa-clock-o'></i> \");
  60.                             }
  61.                             
  62.                         },
  63.                         dayClick: function(date, jsEvent, view) {
  64.                             
  65.                             if (view.name === 'month') {
  66.                                 $('#calendar').fullCalendar('gotoDate', date);
  67.                                 $('#calendar').fullCalendar('changeView', 'agendaDay');
  68.                                 $('.fc-event-container').children('a').attr('generator', 'adianti');
  69.                                 $('.fc-widget-content').mouseover(function(){
  70.                                     $(this).css('cursor','pointer');
  71.                                 });
  72.                             }
  73.                             else if(view.name === 'agendaDay' || view.name === 'agendaWeek') 
  74.                             {
  75.                                 $(this).append('<a></a>');
  76.                                 $(this).children('a').attr('generator', 'adianti');
  77.                                 var href = $(this).children('a').attr('href', 'index.php?class=EventForm&method=onStartEdit&event_date='+date.format('DD/MM/YYYY')+'&start_hour='+date.format('hh:mm'));
  78.                                 $(this).children('a').click();
  79.                             }                           
  80.                         },
  81.                     });
  82.                     $('.fc-content').click(function(){
  83.                         $(this).parent('a').attr('generator', 'adianti');
  84.                     });
  85.                     $('.fc-widget-content').mouseover(function(){
  86.                         $(this).css('cursor','pointer');
  87.                     });
  88.                     $('body').on('click', ':button.fc-button', function(event){
  89.                         event.preventDefault();
  90.                         $('.fc-content').parent('a').attr('generator', 'adianti');
  91.                         $('.fc-widget-content').mouseover(function(){
  92.                             $(this).css('cursor','pointer');
  93.                         });
  94.                     });
  95.                     $(':button.fc-today-button').click(function(){
  96.                         $('.fc-content').parent('a').attr('generator', 'adianti');
  97.                         $('.fc-widget-content').mouseover(function(){
  98.                             $(this).css('cursor','pointer');
  99.                         });
  100.                     });
  101.                     
  102.                 });
  103.             ");
  104.             $table->addRow()->addCell($script);
  105.             
  106.             TTransaction::close(); 
  107.             
  108.         } 
  109.         catch (Exception $e
  110.         { 
  111.             new TMessage('error'$e->getMessage()); 
  112.         } 
  113.         
  114.         $vbox = new TVBox;
  115.         $vbox->add($table);
  116.         
  117.         parent::add($vbox);
  118.     }
  119.    public function onDelete$param )
  120.     {
  121.         $action = new TAction(array($this'Delete'));
  122.         $action->setParameters($param);
  123.         new TQuestion('Do you really want to delete ?'$action);
  124.     }
  125.     public function Delete$param )
  126.     {
  127.         try
  128.         {
  129.             if (isset($param['id']))
  130.             {
  131.                 $key=$param['id'];
  132.                 
  133.                 TTransaction::open('samples');
  134.                 
  135.                 $object = new Event($key);
  136.                 $object->delete();
  137.                 TTransaction::close();
  138.                 
  139.                 $posAction = new TAction(array('JqueryAgendaView''reload'));
  140.                 new TMessage('info''Record deleted'$posAction);
  141.             }
  142.         }
  143.         catch (Exception $e)
  144.         {
  145.             new TMessage('error''<b>Error</b> ' $e->getMessage());
  146.             TTransaction::rollback();
  147.         }
  148.     }
  149.     
  150.     public function reload()
  151.     {
  152.     
  153.     }    
  154.  
  155. }
  156. ?>
AV

Marcos, obrigado pela contribuição me ajudou d+ em um projeto aqui. Valeu