1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<h1>Jadwal</h1>
<?php
// $this->widget('booster.widgets.TbListView',array(
//'dataProvider'=>$dataProvider,
//'itemView'=>'_view',
//));
?>
<?php
//$this->widget('booster.widgets.TbGroupGridView', array(
// 'filter' => $model,
// 'type' => 'striped bordered',
// 'dataProvider' => $model->search(),
// 'template' => "{items}",
// 'columns' => array('KELAS'),
// 'mergeColumns' => array('KELAS')
//));
?>
<?php
$this->widget('booster.widgets.TbGridView', array(
'id' => 'view-jadwal-grid',
'type' => 'striped bordered condensed',
'emptyText' => 'Data tidak ditemukan',
'summaryText' => 'Daftar Jadwal {start} - {end} dari {count}',
'dataProvider' => $model->search(),
'afterAjaxUpdate' => 'reinstallDatePicker1', // (#1)
'template' => "{items}",
'filter' => $model,
'columns' => array(
'WEEK',
'TANGGAL',
'SESSION',
array(
'header' => 'Kelas',
'name' => 'KELAS',
'value' => '$data->KELAS',
),
'KODE_MK',
array(
'header' => 'Dosen',
'name' => 'PIC',
'value' => '$data->pic->NAMA'
),
'AKTIFITAS',
array(
'header' => 'Aksi',
'class' => 'booster.widgets.TbButtonColumn',
),
),
));
?>
<?php
//$this->widget('booster.widgets.TbGridView', array(
// 'id' => 'jadwal-grid',
// 'dataProvider' =>
// 'columns' => array(
// 'ID',
// 'WEEK',
// 'TANGGAL',
// 'SESSION',
// 'TA',
// 'ID_KUR',
// /*
//
// 'KELAS',
// 'RUANGAN',
// 'TOPIK',
// 'SUB_TOPIK',
// 'OBJEKTIF',
//
// 'METODE',
// 'ALAT_BANTU',
// 'KET',
// 'LAST_UPDATE',
// 'USER_ID',
// 'WS',
// */
// array(
// 'class' => 'booster.widgets.TbButtonColumn',
// ),
// ),
//));
?>
<?php
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
$('.search-form').toggle();
return false;
});
$('.search-form form').submit(function(){
$('#view-jadwal-grid').yiiGridView('update', {
data: $(this).serialize()
});
return false;
});
");
Yii::app()->clientScript->registerScript('re-install-date-picker1', "
function reinstallDatePicker1(id, data) {
//use the same parameters that you had set in your widget else the datepicker will be refreshed by default
$('#datepicker_for_TANGGAL1').datepicker(jQuery.extend({showMonthAfterYear:false},jQuery.datepicker.regional['en'],{'dateFormat':'yy-mm-dd'}));
}
");
?>