Inheritance: extends yii\base\Widget
示例#1
2
 public function run()
 {
     return \yii2fullcalendar\yii2fullcalendar::widget(['clientOptions' => $this->getClientOptions(), 'events' => $this->getEvents()]);
 }
示例#2
1
            <?php 
echo yii2fullcalendar::widget(['eventAfterAllRender' => 'refreshDate', 'clientOptions' => ['defaultView' => 'agendaDay', 'minTime' => '05:00:00', 'maxTime' => '20:00:00', 'allDaySlot' => false, 'height' => 'auto', 'header' => ['right' => '']]]);
?>
        </div>

        <div id="techs">
            <?php 
foreach ($techs as $tech) {
    ?>
                <div class="schedule">
                    <h4 class="text-center"><?php 
    echo Html::a($tech->contact->name, ['tech/schedule', 'id' => $tech->contact_id]);
    ?>
</h4>
                    <?php 
    echo yii2fullcalendar::widget(['header' => false, 'ajaxEvents' => \yii\helpers\Url::to(['schedule/ajax-events', 'tech_id' => $tech->contact_id]), 'eventRender' => 'eventRender', 'options' => ['data' => ['tech' => $tech->contact_id]], 'clientOptions' => ['height' => 'auto', 'defaultView' => 'agendaDay', 'allDaySlot' => false, 'minTime' => '05:00:00', 'maxTime' => '20:00:00', 'businessHours' => ['start' => $tech->start_of_day, 'end' => $tech->end_of_day, 'dow' => [1, 2, 3, 4, 5]], 'dayClick' => new JsExpression('dayClick'), 'droppable' => true, 'dropAccept' => '.fc-event.future', 'drop' => new JsExpression('externalEventDrop'), 'eventDrop' => new JsExpression('eventDrop'), 'eventResize' => new JsExpression('eventResize'), 'eventDragStart' => new JsExpression('function(event, jsEvent, ui, view) { view.el.css("z-index", 10); startInternalDrag(jsEvent, view); }'), 'eventDragStop' => new JsExpression('function(event, jsEvent, ui, view) { view.el.css("z-index", 1); }'), 'loading' => new JsExpression('function(isLoading) { $("#loading").toggle(isLoading); }')]]);
    ?>
                </div>
            <?php 
}
?>
        </div>

        <legend>
            <span class="green">On-Site</span>
            <span class="blue">Remote</span>
            <span class="grey">Past</span>
            <span class="red">Needs Update</span>
        </legend>
    </div>
</div>
示例#3
0
文件: index.php 项目: poykub/wph
                    <i class="fa fa-circle-o faa-burst animated"></i>
                    <h3 class="box-title kanit">ตารางการใช้ห้องประชุม</h3>
                </div>
                <!-- /.panel-heading -->
                <div class="panel-body">
                    <?php 
$events = array();
//Testing
$Event = new \yii2fullcalendar\models\Event();
$Event->id = 1;
$Event->title = 'ประชุมคัดกรองโรค';
$Event->start = date('Y-m-d\\TH:m:s\\Z');
$events[] = $Event;
$Event = new \yii2fullcalendar\models\Event();
$Event->id = 2;
$Event->title = 'ประชุม True imeeting กับ สสจ.เลย';
$Event->start = date('Y-m-d\\TH:m:s\\Z', strtotime('tomorrow 6am'));
$events[] = $Event;
?>

                    <?php 
echo \yii2fullcalendar\yii2fullcalendar::widget(array('options' => ['lang' => 'th']));
?>
                </div>
            </div>
            <!-- /.panel .chat-panel -->
        </div>
    </div>

</section><!-- /.content -->
示例#4
0
\t\t\tvar start_time = moment(event.start).format("DD-MM-YYYY, h:mm:ss a");
\t\t    \tvar end_time = moment(event.end).format("DD-MM-YYYY, h:mm:ss a");

\t\t        element.clickover({
\t\t            title: event.title,
\t\t            placement: 'top',
\t\t            html: true,
\t\t\t    global_close: true,
\t\t\t    container: 'body',
\t\t            content: "<table class='table'><tr><th>Event Detail : </th><td>" + event.description + " </td></tr><tr><th> Event Type : </th><td>" + event.event_type + "</td></tr><tr><th> Start Time : </t><td>" + start_time + "</td></tr><tr><th> End Time : </th><td>" + end_time + "</td></tr></table>"
        \t\t});
               }
EOF;
?>
                    <?php 
echo \yii2fullcalendar\yii2fullcalendar::widget(['options' => ['language' => 'es'], 'clientOptions' => ['fixedWeekCount' => false, 'weekNumbers' => true, 'editable' => true, 'eventLimit' => true, 'eventLimitText' => 'more Events', 'header' => ['left' => 'prev,next today', 'center' => 'title', 'right' => 'month,agendaWeek,agendaDay'], 'eventClick' => new \yii\web\JsExpression($JSEventClick), 'eventRender' => new \yii\web\JsExpression($JsF), 'contentHeight' => 380, 'timeFormat' => 'hh(:mm) A'], 'ajaxEvents' => yii\helpers\Url::toRoute(['/dashboard/events/view-events'])]);
?>
		   <div class="row">
			<ul class="legend">
			    <li><span class="holiday"></span> Holiday</li>
			    <li><span class="importantnotice"></span> Important Notice</li>
			    <li><span class="meeting"></span> Meeting</li>
			    <li><span class="messages"></span> Messages</li>
			</ul>
		   </div>
                </div><!-- /.box-body -->
            </div><!-- /.box -->

        </section><!-- /.Left col -->
        <!-- right col (We are only adding the ID to make the widgets sortable)-->
        <section class="col-lg-5 connectedSortable">
示例#5
0
/* @var $searchModel app\models\EventsSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('app', 'ตารางการใช้ห้อง');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="events-index">

    <h3><?php 
echo Html::encode($this->title);
?>
</h3>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
echo Html::a(Yii::t('app', 'บันทึกข้อมูล'), ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo \yii2fullcalendar\yii2fullcalendar::widget(['id' => 'calendar', 'options' => ['lang' => 'th', 'header' => ['left' => 'prev,next today', 'center' => 'title', 'right' => 'month,agendaWeek,agendaDay'], 'timeFormat' => ' '], 'events' => $events]);
?>
    <br>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'title', 'room.roomname', 'start', 'finish', ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
示例#6
0
    function(event, delta, revertFunc) {
        console.log(event);
        var title = event.title;
        var end = event.end.format();
        var start = event.start.format();
        console.log(event);
        update(title,start,end,event.id);
    }
JS;*/
echo $this->render('_menu');
?>
<div class="fullcalendar-index">
    <div class="row">
        <?php 
\yii\widgets\Pjax::begin(['id' => 'pjax-fullcalendar']);
echo \yii2fullcalendar\yii2fullcalendar::widget(array('events' => $events, 'clientOptions' => ['theme' => true, 'weekends' => true, 'defaultView' => 'agendaWeek', 'editable' => true, "selectable" => true, 'selectHelper' => true, "droppable" => true, 'customButtons' => new \yii\web\JsExpression($jsCustomButtons), 'eventClick' => new \yii\web\JsExpression($jsEventClick), 'select' => new \yii\web\JsExpression($jsSelect), 'eventDragStop' => new \yii\web\JsExpression($jsEventDragStop)], 'header' => ['center' => 'title', 'left' => 'prev,next today addEventButton delEventButton', 'right' => 'month,agendaWeek,agendaDay']));
\yii\widgets\Pjax::end();
?>
    </div>
</div>
<?php 
\common\widgets\JsBlock::begin();
?>
<script type="text/javascript">
    $(function() {
        var currentMousePos = {
            x: -1,
            y: -1
        };
        jQuery(document).on("mousemove", function (event) {
            currentMousePos.x = event.pageX;
示例#7
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel frontend\models\EmployeeSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Event';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="employee-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
	<?php	$roles = Yii::$app->user->identity->user_type;
			if ($roles == 'admin'){ ?>
    <p>
        <?= Html::a('Create Event', ['create'], ['class' => 'btn btn-success']) ?>
    </p>
	<?php } ?>

    <?= \yii2fullcalendar\yii2fullcalendar::widget(array(
      'events'=> $events,
  ));
  ?>

</div>
 /**
  * Initializes the widget.
  * If you override this method, make sure you call the parent implementation first.
  */
 public function init()
 {
     //checks for the element id
     if (!isset($this->options['id'])) {
         $this->options['id'] = $this->getId();
     }
     //checks for the element id
     if (!isset($this->options['class'])) {
         $this->options['class'] = 'fullcalendar';
     }
     parent::init();
 }
示例#9
0
$events[] = $Event;
?>
<div class="card_container record-full" id="service-time" style="float:none;">
    
    <?php 
/* time/loc */
?>
    <div class="header-context">  
        <div class="avatar center gray-color">
            <i class="fa fa-calendar fa-3x"></i>    
        </div>
        <div class="title">
            <div class="subhead"><?php 
echo Yii::t('app', 'Vreme izvršenja usluge');
?>
</div> 
            <div class="head second"><?php 
echo f_datetime($model->delivery_starts);
?>
 <i class="fa fa-caret-right"></i> <?php 
echo f_datetime($model->delivery_ends);
?>
</div>                           
        </div>
    </div> 
    <div class="secondary-context">                   
        <?php 
echo \yii2fullcalendar\yii2fullcalendar::widget(['events' => $events, 'options' => ['lang' => 'sr', 'defaultView' => 'agendaWeek']]);
?>
    </div>                                                             
</div>
 /**
  *
  * See vendor/philippfrenzel/yii2fullcalendar/yii2fullcalendar.php
  * for implementation details.
  *
  */
 public function init()
 {
     parent::init();
 }
示例#11
0
<?php

use yii\helpers\Html;
use yii\helpers\Url;
use yii2fullcalendar\yii2fullcalendar as Calendar;
/* @var $this yii\web\View */
/* @var $searchModel app\models\FlightSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$calendar_name = 'calendar';
?>
<div class="calendar-index">

	<div id="date_picker"></div>

    <?php 
echo Calendar::widget(['id' => $calendar_name, 'events' => $events, 'clientOptions' => []]);
?>

</div>
<script type="text/javascript">
<?php 
$this->beginBlock('JS_DATEPICKER');
?>
$("#date_picker").datepicker({
   // While using year and month change I prefer to use inline  date picker  like (  <div id="datepicker"></div>   )
	changeMonth: true,
	changeYear: true,
	onChangeMonthYear: function(year, month, inst) {
		var date = new Date();
		//console.log('y='+year+', m='+month+"="+date);
		$('#<?php 
示例#12
0
use yii\helpers\Html;
use yii2fullcalendar\yii2fullcalendar;
use yii2fullcalendar\models\Event;
/* @var $this yii\web\View */
/* @var $model app\models\Event */
$this->title = 'Calendar';
$this->params['breadcrumbs'][] = ['label' => 'Events', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
echo '<div class="event-view">';
echo '<h1>' . Html::encode($this->title) . '</h1>';
$events = array();
foreach ($models as $model) {
    $event = new Event();
    $event->id = $model->id;
    $event->title = $model->title;
    $event->description = $model->description;
    $event->allDay = $model->allDay;
    $event->start = $model->start;
    $event->end = $model->end;
    $event->dow = $model->dow;
    $event->className = $model->className;
    $event->editable = $model->editable;
    $event->source = $model->source;
    $event->color = $model->color;
    $event->backgroundColor = $model->backgroundColor;
    $event->borderColor = $model->borderColor;
    $event->textColor = $model->textColor;
    $events[] = $event;
}
echo yii2fullcalendar::widget(['events' => $events, 'options' => ['lang' => 'de', 'weekends' => true, 'default' => 'month', 'editable' => true]]);
echo '</div>';
示例#13
0
            </tr>
        <?php 
}
?>
    </table>
    <div class="clearfix"></div>

    <div id="this-week">
        <div class="pull-right">
            <?php 
echo Html::a('<span class="glyphicon glyphicon-calendar"></span> My Calendar', ['/tech/schedule'], ['class' => 'btn btn-default btn-xs', 'title' => 'View your calendar']);
?>
        </div>
        <h4>This week:</h4>
        <?php 
echo \yii2fullcalendar\yii2fullcalendar::widget(['ajaxEvents' => \yii\helpers\Url::to(['schedule/ajax-events', 'tech_id' => $model->contact_id]), 'header' => false, 'clientOptions' => ['height' => 'auto', 'defaultView' => 'basicWeek', 'allDaySlot' => false, 'loading' => new JsExpression('function(isLoading) { $("#loading").toggle(isLoading) }'), 'eventRender' => new JsExpression('function(event, element) { $(element).attr("title", event.description) }')]]);
?>
    </div>
    <hr>

    <div id="open-tickets">
        <div class="pull-right">
            <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> New Ticket', ['/ticket/create'], ['class' => 'btn btn-success btn-xs showModalButton', 'title' => 'Create a new ticket']);
?>
            <div class="btn-group">
                <?php 
echo Html::a('<span class="glyphicon glyphicon-phone-alt"></span> New Call', ['/schedule/log-work', 'remote' => true], ['class' => 'btn btn-info btn-xs showModalButton', 'title' => 'Enter notes for an incoming support call']);
?>
                <?php 
echo Html::a('<span class="glyphicon glyphicon-list-alt"></span> Log Work', ['/schedule/log-work'], ['class' => 'btn btn-primary btn-xs showModalButton', 'title' => 'Enter notes for completed work']);
示例#14
0
$this->params['breadcrumbs'][] = ['label' => 'Schedule', 'url' => ['schedule/index']];
$this->params['breadcrumbs'][] = $model->contact->name;
?>
<div class="tech-schedule">

    <p class="pull-right">
        <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> Schedule Ticket', ['schedule/create', 'Schedule' => ['tech_id' => $model->contact_id]], ['class' => 'btn btn-success btn-xs showModalButton']);
?>
    </p>
    <h3>Schedule: <?php 
echo Html::a(Html::encode($model->contact->name), ['/contact/view', 'id' => $model->contact_id]);
?>
</h3>

    <?php 
echo \yii2fullcalendar\yii2fullcalendar::widget(['ajaxEvents' => \yii\helpers\Url::to(['schedule/ajax-events', 'tech_id' => $model->contact_id]), 'eventRender' => 'eventRender', 'eventAfterAllRender' => 'setTimeLine', 'options' => ['data' => ['tech' => $model->contact_id]], 'clientOptions' => ['height' => 'auto', 'defaultView' => 'agendaWeek', 'allDaySlot' => false, 'minTime' => '05:00:00', 'maxTime' => '20:00:00', 'businessHours' => ['start' => $model->start_of_day, 'end' => $model->end_of_day, 'dow' => [1, 2, 3, 4, 5]], 'dayClick' => new JsExpression('dayClick'), 'eventDrop' => new JsExpression('eventDrop'), 'eventResize' => new JsExpression('eventResize'), 'loading' => new JsExpression('function(isLoading) { $("#loading").toggle(isLoading) }')]]);
?>

    <legend>
        <span class="blue">Remote</span>
        <span class="green">On-Site</span>
        <span class="grey">Past</span>
        <span class="red">Needs Update</span>
    </legend>
</div>

<?php 
//\frontend\assets\SchedulerAsset::register($this);
$this->registerJsFile('/js/jquery.ui.touch.js', ['depends' => [\yii\web\JqueryAsset::className()]]);
$this->registerJsFile('/js/schedule.js', ['depends' => [\yii\web\JqueryAsset::className()]]);
示例#15
0
<?php

/* @var $this yii\web\View */
/* @var $events array */
use app\models\Tasks;
use yii\web\JsExpression;
use yii\web\View;
$this->title = 'Manager Organizer';
?>
<div class="site-index">
<?php 
$JSEventClick = <<<EOF
    function(calEvent, jsEvent, view) {
        //alert('Event: ' + calEvent.title);
        //alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
        //alert('View: ' + calEvent.id);
        window.open('?r=tasks/view&id='+calEvent.id);
        return false;
    }
EOF;
?>

    <?php 
echo \yii2fullcalendar\yii2fullcalendar::widget(array('events' => $events, 'clientOptions' => ['eventClick' => new JsExpression($JSEventClick), 'defaultDate' => date('Y-m-d')]));
?>

</div>
示例#16
0
<?php

$this->title = "ปฏิทินการเดินทางไปราชการ";
use yii2fullcalendar\yii2fullcalendar;
use yii\helpers\Url;
?>
<div class="box box-info box-solid">
    <div class="box-header with-border">
        <center><h3><?php 
echo yii\helpers\Html::encode($this->title);
?>
</h3></center>
    </div>
    <div class="box-body">
        <?php 
echo yii2fullcalendar::widget(['options' => ['lang' => 'th'], 'header' => ['left' => 'prev,next today', 'center' => 'title', 'right' => 'month,agendaWeek,agendaDay'], 'clientOptions' => ['timeFormat' => 'H:mm'], 'ajaxEvents' => Url::to(['/mission/default/jsoncalendar'])]);
?>
    </div>
</div>

示例#17
0
/* @var $searchModel app\models\FrequenciaSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Minhas Frequências';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="frequencia-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p><?php 
echo Html::a('Ver todas', ['minhasfrequencias'], ['class' => 'btn btn-success']);
?>
 </p>

    <?php 
Modal::begin(['header' => '<h3>Frequência Individual</h3>', 'id' => 'modal', 'size' => '']);
echo "<div id='modalContent'></div>";
Modal::end();
?>

  <?php 
echo \yii2fullcalendar\yii2fullcalendar::widget(array('events' => $events));
?>
</div>
示例#18
0
use yii\helpers\Url;
use yii\web\JsExpression;
$this->title = '基金指數';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="index-fund-index">

	<h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('表格模式', ['index'], ['class' => 'btn btn-success']);
?>
    </p>

<?php 
$JSEventClick = <<<EOF
function(calEvent, jsEvent, view) {
    window.location = "/indexfund/update?id=" + calEvent.id;
}
EOF;
?>

<?php 
echo \yii2fullcalendar\yii2fullcalendar::widget(['options' => ['lang' => 'zh-cn'], 'ajaxEvents' => Url::to(['/indexfund/test']), 'clientOptions' => ['eventClick' => new JsExpression($JSEventClick)]]);
?>

</div>
示例#19
0
 public function run()
 {
     $this->view->registerCss($this->_css);
     CalendarJsAsset::register($this->view);
     return \yii2fullcalendar\yii2fullcalendar::widget(array('ajaxEvents' => $this->jsonUri, 'options' => ['lang' => 'en-gb', 'timeFormat' => 'H(:mm)', 'aspectRatio' => 1.4, 'id' => 'full-calendar', 'schedulerLicenseKey' => 'CC-Attribution-NonCommercial-NoDerivatives'], 'clientOptions' => ['weekends' => true, 'firstHour' => date('H'), 'defaultView' => 'agendaWeek', 'editable' => false, 'dayClick' => new JsExpression("function(date, jsEvent, view){ \$.app.cal.dayClick(date, jsEvent, view)}"), 'eventClick' => new JsExpression("function(event, jsEvent, view){ \$.app.cal.eventClick(event, jsEvent, view)}"), 'eventMouseover' => new JsExpression("function(event, jsEvent, view){ \$.app.cal.eventMouseover(event, jsEvent, view,this)}"), 'eventMouseout' => new JsExpression("function(event, jsEvent, view){ \$.app.cal.eventMouseout(event, jsEvent, view,this)}"), 'eventDrop' => new JsExpression("function(event, delta, revertFunc, jsEvent, ui, view ){ \$.app.cal.eventDrop(event, delta, revertFunc, jsEvent, ui, view)}"), 'eventResize' => new JsExpression("function(event, delta, revertFunc, jsEvent, ui, view ){ \$.app.cal.eventResize(event, delta, revertFunc, jsEvent, ui, view)}"), 'drop' => new JsExpression("function(date, jsEvent, ui, resourceId){ \$.app.cal.drop(date, jsEvent, ui, resourceId,this)}")], 'header' => ['center' => 'title', 'left' => 'prev,next today', 'right' => 'month,agendaWeek,agendaDay']));
 }
示例#20
0
    <p>Show schedule for </p><ul class="list-inline">
    <?php 
foreach ($medicaladvs as $lists) {
    ?>
        <li>
          <?php 
    echo Html::a(Html::encode($lists->FirstName), ['trmaschedule/create', 'id' => $lists->MedicaladvID]);
    ?>
        </li>
      <?php 
}
?>
    </ul>

<div class="trmaschedule-create">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <?php 
echo $this->render('_form', ['model' => $model]);
?>

</div>

<?php 
echo \yii2fullcalendar\yii2fullcalendar::widget(['events' => $events]);