\t\t\t\t\t// dataprovider[i]=listData; \t\t\t\t// }); \t\t\t\t//console.log(data); \t\t\t\t//'{$datatest}='+data; \t\t\t\t//\$('test').reload; \t\t\t} \t\t}); */ \t\t// setTimeout(function(){ \t\t\t// \$.pjax.reload({container:'#gv-dashboard-issue'}); \t\t// },1); \t\t// var elemWeek = document.getElementById("id-week"); \t\t// elemWeek.value = weekNilai; \t\t//\$.pjax.reload({container:'#gv-dashboard-issue'}) \t} EOF; /* * VIEW SCHEDULE PLAN * @author ptrnov [ptr.nov@gmail.com] * @since 1.2 */ $wgBtnCalendar = FullcalendarScheduler::widget(['header' => ['left' => 'plus,today, prev,next', 'center' => 'title', 'right' => 'month'], 'options' => ['id' => 'fc-button-set-date-issue', 'language' => 'id'], 'optionsEventUrl' => ['events' => [], 'resources' => [], 'changeDropUrl' => [], 'dragableReceiveUrl' => [], 'dragableDropUrl' => []], 'clientOptions' => ['theme' => true, 'timezone' => 'local', 'selectHelper' => true, 'editable' => false, 'selectable' => true, 'select' => new JsExpression($JSEventClickIssue), 'eventClick' => new JsExpression($JSEventClickIssue), 'droppable' => false, 'firstDay' => '0', 'defaultView' => 'month']]); /*Triger FC SHOE*/ $this->registerJs("\t\r\n\t\t\tvar elem = document.getElementById('fc-button-set-date-issue');\r\n\t\t\tvar list = elem.getElementsByTagName('button')[3];\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tlist.click();\r\n\t\t\t},50);\r\n\r\n\t", $this::POS_READY); echo $wgBtnCalendar; ?>
\t\t\tif(\$('.fc-timelineOneDays-button').hasClass('ui-state-active')){ \t\t\t\t\t//\$('.fc-timelineOneDays-button').classList.toggle('ui-state-active'); \t \t\t\t // \$('ui-state-active').removeClass(); \t\t\t //\$('fc-agendaWeek-button ui-button ui-state-default').addClass('ui-state-default'); \t\t\t //alert('focused'); \t\t\t // var elem1 = document.getElementById('calendar_test'); \t\t\t\t// var list1 = elem1.getElementsByClassName('fc-timelineOneDays-button'); \t\t\t\t// console.log(list1[0].innerText); \t\t\t\t// list1[0].click(); \t\t\t}; \t\t},500); */ \t\t \t} EOF; $wgCalendar = FullcalendarScheduler::widget(['modalSelect' => ['id' => 'modal-select', 'id_content' => 'modalContent', 'headerLabel' => 'Model Header Label', 'modal-size' => 'modal-lg'], 'header' => ['left' => 'plus,today, prev,next, details, group, excel-export', 'center' => 'title', 'right' => 'timelineOneDays,agendaWeek,month,listWeek'], 'options' => ['id' => 'calendar_test', 'language' => 'id'], 'optionsEventUrl' => ['events' => Url::to(['/widget/pilotproject/render-data-events', 'claster' => 'event']), 'resources' => [], 'changeDropUrl' => '/widget/pilotproject/change-data-drop', 'dragableReceiveUrl' => '/widget/pilotproject/dragable-receive', 'dragableDropUrl' => '/widget/pilotproject/dragable-drop'], 'clientOptions' => ['theme' => true, 'customButtons' => ['details' => ['text' => 'Rooms', 'click' => new JsExpression($JSaddButtonRooms)], 'group' => ['text' => 'Group', 'click' => new JsExpression($JSaddGrp)], 'plus' => ['text' => 'Plus', 'click' => new JsExpression($JSaddAddRow)], 'excel-export' => ['text' => 'Excel-Export', 'click' => new JsExpression($JSaddButtonExport)]], 'timezone' => 'local', 'selectHelper' => true, 'editable' => true, 'selectable' => true, 'select' => new JsExpression($JSSelect), 'eventClick' => new JsExpression($JSEventClick), 'eventAfterRender' => new JsExpression($Jseventcolor), 'eventAfterAllRender' => new JsExpression($afterAllRender), 'droppable' => true, 'firstDay' => '0', 'theme' => true, 'aspectRatio' => 1.8, 'defaultView' => 'timelineDay', 'views' => ['timelineOneDays' => ['type' => 'timeline', 'duration' => ['days' => 1]]], 'resourceAreaWidth' => '30%', 'resourceLabelText' => 'Discriptions', 'resourceColumns' => [['labelText' => 'Rooms', 'field' => 'title', 'width' => '150px', 'align' => 'left'], ['labelText' => 'Department', 'field' => 'dep_id', 'width' => '150px', 'align' => 'center'], ['labelText' => 'CreateBy', 'field' => 'createby', 'width' => '100px', 'align' => 'center']]]]); /*modal*/ Modal::begin(['id' => 'modal-rooms', 'header' => '<div style="float:left;margin-right:10px" class="fa fa-2x fa fa-user"></div><div><h5 class="modal-title"><b>Create Rooms With Parent</b></h5></div>', 'size' => 'modal-sm', 'headerOptions' => ['style' => 'border-radius:5px; background-color: rgba(74, 206, 231, 1)']]); echo "<div id='modalContentRooms'></div>"; Modal::end(); /*modal*/ Modal::begin(['id' => 'modal-up', 'header' => '<div style="float:left;margin-right:10px" class="fa fa-2x fa fa-user"></div><div><h5 class="modal-title"><b>Pilot Project</b></h5></div>', 'size' => Modal::SIZE_LARGE, 'headerOptions' => ['style' => 'border-radius:5px; background-color: rgba(74, 206, 231, 1)']]); echo "<div id='modalContentUp'></div>"; Modal::end(); /*modal*/ // Modal::begin([ // 'id' => 'modal-row', // 'header' => '<div style="float:left;margin-right:10px" class="fa fa-plus"></div><div><h5 class="modal-title"><b>Tambah Row</b></h5></div>', // 'size' => Modal::SIZE_SMALL, // 'headerOptions'=>[ // 'style'=> 'border-radius:5px; background-color: rgba(74, 206, 231, 1)',
\t\t} \t\t//alert(rslt); \t\tvar elem = document.getElementById("id-ganjilgenap"); \t\telem.value = rslt; \t\tvar elemTgl = document.getElementById("id-tgl"); \t\telemTgl.value = rsltTgl; \t\tvar elemWeek = document.getElementById("id-week"); \t\telemWeek.value = weekNilai; \t} EOF; /* * VIEW SCHEDULE PLAN * @author ptrnov [ptr.nov@gmail.com] * @since 1.2 */ $wgCalendar = FullcalendarScheduler::widget(['header' => ['left' => 'plus,today, prev,next, details, group, excel-export', 'center' => 'title', 'right' => 'month'], 'options' => ['id' => 'modal-view-button', 'language' => 'id'], 'optionsEventUrl' => ['events' => [], 'resources' => [], 'changeDropUrl' => [], 'dragableReceiveUrl' => [], 'dragableDropUrl' => []], 'clientOptions' => ['theme' => true, 'timezone' => 'local', 'selectHelper' => true, 'editable' => true, 'selectable' => true, 'select' => new JsExpression($JSEventClick), 'eventClick' => new JsExpression($JSEventClick), 'droppable' => true, 'firstDay' => '0', 'theme' => true, 'aspectRatio' => 1.8, 'defaultView' => 'month']]); echo $wgCalendar; ?> <div> <dl> <dt style="width:80px; float:left;">Date</dt> <dd>: <input type="text" id="id-tgl"></dd> <dt style="width:80px; float:left;">Week-At</dt> <dd>: <input type="text" id="id-week"> </dd> <dt style="width:80px; float:left;">Week Of</dt> <dd>: <input type="text" id="id-ganjilgenap"> </dd> </dl> </div>
var child = event.parent; var status = event.status; var dateTime2 = new Date(event.end); var dateTime1 = new Date(event.start); var tgl1 = moment(dateTime1).format("YYYY-MM-DD"); var tgl2 = moment(dateTime2).subtract(1, "days").format("YYYY-MM-DD"); alert(tgl1); var id = event.id; if(child != 0 && status != 1){ $.get('/widget/pilotproject/drop-child',{'id':id,'tgl1':tgl1,'tgl2':tgl2}); } } EOF; */ $wgCalendar = FullcalendarScheduler::widget(['modalSelect' => ['id' => 'modal-select', 'id_content' => 'modalContent', 'headerLabel' => 'Model Header Label', 'modal-size' => 'modal-lg'], 'header' => ['left' => 'today prev,next', 'center' => 'title', 'right' => 'timelineOneDays,agendaWeek,month,listWeek'], 'options' => ['id' => 'calendar_test', 'language' => 'id'], 'optionsEventAdd' => ['events' => Url::to(['/widget/pilotproject/event-calendar-schedule']), 'resources' => Url::to(['/widget/pilotproject/resource-calendar-schedule']), 'eventDropUrl' => '/widget/pilotproject/drop-calendar-schedule', 'eventSelectUrl' => '/widget/pilotproject/test-form', 'eventDragableUrl' => '/fullcalendar/test/dragable'], 'clientOptions' => ['language' => 'id', 'selectHelper' => true, 'editable' => true, 'selectable' => true, 'eventClick' => new JsExpression($JSEventClick), 'droppable' => true, 'now' => '2016-05-07', 'firstDay' => '0', 'theme' => true, 'aspectRatio' => 1.8, 'defaultView' => 'timelineMonth', 'views' => ['timelineOneDays' => ['type' => 'timeline', 'duration' => ['days' => 1]]], 'resourceLabelText' => 'Rooms', 'resourceColumns' => [['labelText' => 'Department', 'field' => 'title'], ['labelText' => 'parent Event', 'field' => 'title'], ['labelText' => 'CreateBy', 'field' => 'create_at']]]]); /* Modal::begin([ 'headerOptions' => ['id' => 'modalHeader'], 'id' => 'modal-select', // 'size' => 'modal-sm', //keeps from closing modal with esc key or by clicking out of the modal. // user must click cancel or X to close // 'clientOptions' => ['backdrop' => 'static', 'keyboard' => FALSE] ]); echo "<div id='modalContent'></div>"; Modal::end(); */ ?> <?php $this->registerJs("\t\t\r\n\t\t/* \$(function() { // document ready\r\n\t\t\t \$('#external-events .fc-event').each(function() {\r\n\r\n\t\t\t\t// store data so the calendar knows to render an event upon drop\r\n\t\t\t\t\$(this).data('event', {\r\n\t\t\t\t\ttitle: \$.trim(\$(this).text()), // use the element's text as the event title\r\n\t\t\t\t\tstick: true // maintain when user navigates (see docs on the renderEvent method)\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// make the event draggable using jQuery UI\r\n\t\t\t\t\$(this).draggable({\r\n\t\t\t\t\tzIndex: 999,\r\n\t\t\t\t\trevert: true, // will cause the event to go back to its\r\n\t\t\t\t\trevertDuration: 0 // original position after the drag\r\n\t\t\t\t});\r\n\r\n\t\t\t}); \r\n\t\t)}; */\r\n", $this::POS_BEGIN);
EOF; $JSEventClick = <<<EOF \tfunction(calEvent, jsEvent, view) { \t\talert('Event: ' + calEvent.id); \t // alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY); \t\t//alert('View: ' + view.name); \t\t// change the border color just for fun \t\t\$(this).css('border-color', 'red'); \t} EOF; /* * VIEW SCHEDULE PLAN * @author ptrnov [ptr.nov@gmail.com] * @since 1.2 */ $fcNutulen = FullcalendarScheduler::widget(['header' => ['left' => 'plus,today, prev,next', 'center' => 'title', 'right' => 'month,listWeek'], 'options' => ['id' => 'alendar-notulen', 'language' => 'id'], 'optionsEventUrl' => ['events' => Url::to(['/widget/notulen/json-calendar-event']), 'resources' => [], 'changeDropUrl' => [], 'dragableReceiveUrl' => [], 'dragableDropUrl' => []], 'clientOptions' => ['firstDay' => '0', 'theme' => true, 'timezone' => 'local', 'selectHelper' => true, 'editable' => true, 'selectable' => true, 'select' => new JsExpression($JSCode), 'eventClick' => new JsExpression($JSCode), 'droppable' => true, 'firstDay' => '0', 'defaultView' => 'month']]); /*Triger FC SHOE*/ $this->registerJs("\t\n\t\t\tvar elem = document.getElementById('fc-button-set-date-issue');\n\t\t\tvar list = elem.getElementsByTagName('button')[3];\n\t\t\tsetTimeout(function(){\n\t\t\t\tlist.click();\n\t\t\t},50);\n\n\t", $this::POS_READY); /* * MEMO CALENDAR * PERIODE 23-22 * @author ptrnov [ptr.nov@gmail.com] * @since 1.2 */ /* $calenderNutulen=yii2fullcalendar\yii2fullcalendar::widget([ 'id'=>'calendar-notulen', 'options' => [ 'lang' => 'id', //'firstDay' => ['default' => '6'], //... more options to be defined here! ],