예제 #1
0
파일: index.php 프로젝트: darkofmoon/ett
                </div>
                <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12">
                    <button class="btn prev"></button>
                    <input type="text" id="currentDate" />
                    <button class="btn next"></button>
                </div>
            </div>
            <div class="col-lg-2 col-xs-12 clickable month">
                month
            </div>
            <div class="col-lg-2 col-xs-12 clickable week">
                week
            </div>
        </div>
        <?php 
echo FullCalendar::widget(['googleCalendar' => false, 'loading' => 'Loading', 'id' => 'cal', 'config' => ['lang' => 'en-au', 'slotMinutes' => '60', 'events' => "js:{url: '" . Yii::$app->urlManager->createUrl(['bookings/events']) . "', type: 'POST'}"]]);
?>
    </div>
    
    <p class="add">
        <?php 
echo Html::a('', ['create'], ['class' => '']);
?>
    </p>
	<p class="maximize">
		<a href="javascript:void(0);" onclick="maximize();"></a>
    </p>
</div>

<div class="modal fade" id="add-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
예제 #2
0
    <div class="modal-content">
      <center>A carregar ... p.f. aguarde.</center>
    </div>
  </div>
</div>-->

<div id="content" class="col-sm-10 calendar-content">
    <div>      
        <span id="popover_20" data-title="" data-content="A carregar ..." data-toggle="popover" data-original-title="" title=""></span>
    </div> 
    <?php 
Pjax::begin(['id' => 'full-calendar-refresh']);
?>
    
    <?php 
echo \talma\widgets\FullCalendar::widget(['id' => 'myfullcalendar', 'loading' => '', 'config' => ['header' => ['left' => 'prev,next today', 'center' => 'title', 'right' => 'month,agendaWeek,agendaDay'], 'defaultDate' => date("Y-m-d"), 'editable' => true, 'businessHours' => true, 'eventLimit' => true, 'weekNumbers' => true, 'lang' => 'pt', 'selectable' => true, 'selectHelper' => true, 'aspectRatio' => 2, "auto", 'events' => ['url' => 'events'], 'callbacks' => ['dayClick' => "function(date, jsEvent, view) {\r\n\r\n                    if ((lastDate-date)==0){\r\n                        eventCreate(date);                    \r\n                        lastDate=0;\r\n                    }\r\n                    else{\r\n                        lastDate=date;\r\n                    }\r\n                }", 'eventClick' => "function(calEvent, jsEvent, view) {\r\n                    return eventUpdate(calEvent);\r\n                }", 'eventRender' => "function(event, eventElement) {\r\n                    if (event.icon){\r\n                        eventElement.find('div.fc-content').addClass( event.icon );\r\n                    }\r\n                }", 'eventResize' => "function(event, delta, revertFunc) {\r\n                    return eventChangeDateTime(event, delta, revertFunc);\r\n                }", 'eventDrop' => "function(event, delta, revertFunc) {\r\n                    return eventChangeDateTime(event, delta, revertFunc);\r\n                }"]]]);
?>
    <?php 
Pjax::end();
?>
</div>

<?php 
yii\bootstrap\Modal::begin(['headerOptions' => ['id' => 'modalHeaderEvent'], 'id' => 'modalEvent', 'size' => 'modal-ms', 'clientOptions' => ['backdrop' => 'static', 'keyboard' => FALSE]]);
echo "<div id='modalContent'></div>";
yii\bootstrap\Modal::end();
?>

<?php 
yii\bootstrap\Modal::begin(['headerOptions' => ['id' => 'modalHeaderRecurrence'], 'id' => 'modalRecurrence', 'size' => 'modal-ms', 'clientOptions' => ['backdrop' => 'static', 'keyboard' => FALSE]]);
echo "<div id='modalRecurrenceContent'></div>";
예제 #3
0
\talma\widgets\FullCalendar::widget(array(
        'id'=>'calender',
        'config'=>[
            'events'=>$model,
            'lang'=>'nl',
            'selectable'=> true,
            'selectHelper'=> true,
             'defaultDate'=>$defaultdate, 
            'weekNumbers'=>true,
            'columnFormat'=>'dd',
            'aspectRatio'=>1.5,
            'contentHeight'=> 650,
            //'gotoDate' => '2016-01-01',
            'displayEventEnd' => false,
            'eventLimitText' => '',
            'timeFormat' => '' ,
            'stick' =>true,
            'eventRender'=> new JsExpression("function(event, element )
            {
               
            }"),
            'eventClick'=> new JsExpression("function(calEvent, jsEvent, view)
             {
                   
                   if(calEvent.code_title == 'ndAvail' || calEvent.code_title == 'ddAvail')
                   {
                                    
                        getDialogInfoWhenContracting(calEvent);
                   }
                   else
                   {
                    //    updateEventClickZijnKalender(calEvent, jsEvent, view);
                   }
             }"
        ),
    ],
));
예제 #4
0
파일: bookings.php 프로젝트: darkofmoon/ett
<?php

use talma\widgets\FullCalendar;
$events = array();
//Testing
$Event = new \yii2fullcalendar\models\Event();
$Event->id = 1;
$Event->title = 'Testing';
$Event->start = date('Y-m-d\\Th:m:s\\Z');
$events[] = $Event;
$Event = new \yii2fullcalendar\models\Event();
$Event->id = 2;
$Event->title = 'Testing';
$Event->start = date('Y-m-d\\Th:m:s\\Z', strtotime('tomorrow 6am'));
$events[] = $Event;
echo FullCalendar::widget(['googleCalendar' => false, 'loading' => 'Loading', 'config' => ['lang' => 'en-US', 'events' => $events]]);
예제 #5
0
\talma\widgets\FullCalendar::widget(array(
        'id'=>'calender',
        'config'=>[
            'events'=>$model,
            'lang'=>'nl',
            'selectable'=> true,
            'selectHelper'=> true,
            'defaultDate'=> $defaultdate,
            'weekNumbers'=>true,
            'columnFormat'=>'dddd',
            'aspectRatio'=>1.5,
            'contentHeight'=> 650,
            'displayEventEnd' => false,
            'eventLimitText' => '',
            'timeFormat' => '',
           // 'Duration' => '08:00:00',
            'stick' =>true,
            'eventRender'=> new JsExpression("function(event, element )
            {
                if (event.description != null)
                {
                     $('a').each(function () {
                        element.qtip(
                            {
                                content: '<b>'+event.title+':</b><br>' + event.description ,
                                style: {classes: 'qtip-bootstrap'},
                                position: {
                                        target: 'mouse', // Use the mouse position as the position origin
                                        adjust: {
                                        // Don't adjust continuously the mouse, just use initial position
                                    mouse: false
                                    } 
                                },
                                 hide: {
                                    delay: 1000
                                }
                            }
                        );
                     });
                }
                else
                {
                    element.qtip(
                        {
                            content: event.title ,
                            style: 'qtip-bootstrap',
                            hide: 
                                {
                                    fixed: true,
                                    delay: 300
                                }
                        }
                    );
                }
                
            }"),
            'eventMouseout' => new JsExpression("function(event, jsEvent, view )
            {
                jQuery(this).qtip().hide();
            }"),
            
            'eventMouseover' => new JsExpression("function(event, jsEvent, view )
            {
                jQuery(this).qtip();
                
            }"),
            
            'dayClick'=> new JsExpression("function(date, jsEvent, view)
            {
                setDayClick(date, jsEvent, view);
                      
            }"), //end function
            
            'eventClick'=> new JsExpression("function(calEvent, jsEvent, view)
            {
                //als er sprake is van een contract aanbod
                if(calEvent.code_title == 'ndContr' || calEvent.code_title == 'ddContr')
                {
                   getDialogInfoWhenAccepting(calEvent);
                } 
                else
                {
                    updateEventClickMijnKalender(calEvent, jsEvent, view);
                }
            }"
        ),
    ],
));
예제 #6
0
echo Collapse::widget(['items' => [['label' => 'Calendários', 'content' => [$fam_cal, $other_cal], 'contentOptions' => ['class' => 'in'], 'footer' => '<a href="js:void(null)" onclick="calAdd();">Adicionar calendário</a>']]]);
?>

</div>


<div id="content" class="col-sm-10 calendar-content">
    <div>      
        <span id="popover_20" data-title="" data-content="A carregar ..." data-toggle="popover" data-original-title="" title=""></span>
    </div> 
    <?php 
Pjax::begin(['id' => 'full-calendar-refresh']);
?>
    
    <?php 
echo \talma\widgets\FullCalendar::widget(['id' => 'myfullcalendar', 'loading' => '', 'config' => ['header' => ['left' => 'prev,next today', 'center' => 'title', 'right' => 'month,agendaWeek,agendaDay'], 'defaultDate' => date("Y-m-d"), 'editable' => true, 'businessHours' => true, 'eventLimit' => true, 'weekNumbers' => true, 'lang' => 'pt', 'selectable' => false, 'selectHelper' => true, 'events' => ['url' => 'events'], 'callbacks' => ['eventClick' => "function(calEvent, jsEvent, view) {\r\n                    return eventView(calEvent);\r\n                }", 'eventRender' => "function(event, eventElement) {\r\n                    if (event.icon){\r\n                        eventElement.find('div.fc-content').addClass( event.icon );\r\n                    }\r\n                }"]]]);
?>
    <?php 
Pjax::end();
?>
</div>

<?php 
yii\bootstrap\Modal::begin(['headerOptions' => ['id' => 'modalHeaderEvent'], 'id' => 'modalEvent', 'size' => 'modal-ms', 'clientOptions' => ['backdrop' => 'static', 'keyboard' => FALSE]]);
echo "<div id='modalContent'></div>";
yii\bootstrap\Modal::end();
?>

<?php 
yii\bootstrap\Modal::begin(['headerOptions' => ['id' => 'modalHeaderRecurrence'], 'id' => 'modalRecurrence', 'size' => 'modal-ms', 'clientOptions' => ['backdrop' => 'static', 'keyboard' => FALSE]]);
echo "<div id='modalRecurrenceContent'></div>";