ยินดีต้อนรับ - Default

jutinut/lab

คลัง Component สำหรับ Yii — เลือก อ่านสเปค แล้วก๊อป snippet ไปใช้ได้เลย

14 widgets 1.0.0 version 20260904 build
14
widgets พร้อมใช้
15
หน้าคู่มือ
6
หมวดหมู่
ALL
ใช้ร่วมทุกโดเมน
--

หน้าแรก

ภาพรวม Component Lab — รายการทุกตัวที่พร้อมใช้งานและคู่มือเริ่มต้น

เริ่มต้นใช้งาน / getting started
1

เลือก component จากดัชนีทางซ้าย

แต่ละรายการมีเลขกำกับตามลำดับในแคตตาล็อก

2

อ่านตารางสเปค

บอกชื่อคลาส ตำแหน่งไฟล์ และหมวดหมู่ของ widget ตัวนั้น

3

กดปุ่ม COPY ที่กล่องโค้ด

ได้ snippet พร้อมวางลงใน view ของคุณได้ทันที

4

ปรับพารามิเตอร์ให้ตรงกับข้อมูลจริง

ส่วนใหญ่ต้องผูกกับ Model หรือ CActiveDataProvider ของหน้านั้น

01

Jtable

ตารางข้อมูลมาตรฐาน — Filter/Pagination/Row Actions

class
Jtable
ไฟล์
protected/modules/jutinut/components/Jtable.php
หมวดหมู่
data
เรียกใช้จาก
ทุกโดเมนที่ import application.modules.jutinut.components.*
วิธีเรียกใช้ / usage
$this->widget('Jtable', array(
  'dataProvider' => $dp,
  'columns' => array('col1','col2'),
));
ตัวอย่างการทำงานจริง / live demo

แสดงรายละเอียดข้อมูล... /ules/jutinut/Jtable:55

ลำดับ ลป. ผู้ประกอบการ ประเภทธุรกิจ รายได้ ภาษีที่ชำระ ภ.พ.30 ปี 2559 เทียบ 50/30 +- หัก ณ. 3/53 GFMIS ข้อมูลรวม
ลำดับ ลป. ผู้ประกอบการ ประเภทธุรกิจ รายได้ ภาษีที่ชำระ ภ.พ.30 ปี 2559 เทียบ 50/30 +- หัก ณ. 3/53 GFMIS ข้อมูลรวม
02

Jtablechkbox

ตารางข้อมูลพร้อม Checkbox หลายแถวสำหรับ Batch Action

class
Jtablechkbox
ไฟล์
protected/modules/jutinut/components/Jtablechkbox.php
หมวดหมู่
data
เรียกใช้จาก
ทุกโดเมนที่ import application.modules.jutinut.components.*
วิธีเรียกใช้ / usage
$this->widget('Jtablechkbox', array(
  'dataProvider' => $dp,
  'checkBoxColumn' => true,
  'ajaxUrl' => array('batchUpdate'),
));
ตัวอย่างการทำงานจริง / live demo

Template- /ules/jutinut/Jtablechkbox:23

chk ลำดับ ลป. ผู้ประกอบการ ประเภทธุรกิจ รายได้ ภาษีที่ชำระ ภ.พ.30 ปี 2559 เทียบ 50/30 +- หัก ณ. 3/53 GFMIS ข้อมูลรวม
chk ลำดับ ลป. ผู้ประกอบการ ประเภทธุรกิจ รายได้ ภาษีที่ชำระ ภ.พ.30 ปี 2559 เทียบ 50/30 +- หัก ณ. 3/53 GFMIS ข้อมูลรวม

03

Jtablechkboxpost

ตาราง Checkbox Batch Submit แบบ POST เต็มรูปแบบ

class
Jtablechkboxpost
ไฟล์
protected/modules/jutinut/components/Jtablechkboxpost.php
หมวดหมู่
data
เรียกใช้จาก
ทุกโดเมนที่ import application.modules.jutinut.components.*
วิธีเรียกใช้ / usage
$this->widget('Jtablechkboxpost', array(
  'dataProvider' => $dp,
  'postAction' => array('doBatch'),
));
ตัวอย่างการทำงานจริง / live demo

Template- /ules/jutinut/Jtablechkboxpost:23

jQuery DataTables – Row selection using checkboxes

See full article on Gyrocode.com

array(0) { }
ลำดับ ลป. ผู้ประกอบการ ประเภทธุรกิจ รายได้ ภาษีที่ชำระ ภ.พ.30 ปี 2559 เทียบ 50/30 +- หัก ณ. 3/53 GFMIS ข้อมูลรวม
ลำดับ ลป. ผู้ประกอบการ ประเภทธุรกิจ รายได้ ภาษีที่ชำระ ภ.พ.30 ปี 2559 เทียบ 50/30 +- หัก ณ. 3/53 GFMIS ข้อมูลรวม

Press Submit and check console for URL-encoded form data that would be submitted.

Data submitted to the server:
    
04

Jlist

รายการข้อมูลแบบ List View + Pagination

class
Jlist
ไฟล์
protected/modules/jutinut/components/Jlist.php
หมวดหมู่
data
เรียกใช้จาก
ทุกโดเมนที่ import application.modules.jutinut.components.*
วิธีเรียกใช้ / usage
$this->widget('Jlist', array(
  'dataProvider' => $dp,
  'itemView' => '_view_item',
));
ตัวอย่างการทำงานจริง / live demo

/ules/jutinut/Jlist:27

Order ID Item Status Popularity
OR9842 Call of Duty IV Shipped
90,80,90,-70,61,-83,63
OR1848 Samsung Smart TV Pending
90,80,-90,70,61,-83,68
OR7429 iPhone 6 Plus Delivered
90,-80,90,70,-61,83,63
OR7429 Samsung Smart TV Processing
90,80,-90,70,-61,83,63
OR1848 Samsung Smart TV Pending
90,80,-90,70,61,-83,68
OR7429 iPhone 6 Plus Delivered
90,-80,90,70,-61,83,63
OR9842 Call of Duty IV Shipped
90,80,90,-70,61,-83,63
05

Jeditor

ฟอร์มแก้ไขข้อมูล + File Upload + Datepicker

class
Jeditor
ไฟล์
protected/modules/jutinut/components/Jeditor.php
หมวดหมู่
form
เรียกใช้จาก
ทุกโดเมนที่ import application.modules.jutinut.components.*
วิธีเรียกใช้ / usage
$this->widget('Jeditor', array(
  'model' => $model,
  'attributes' => array('name','date','file'),
));
ตัวอย่างการทำงานจริง / live demo

ส่งข้อมูล /ules/jutinut/Jeditor:24

06

Jmodal

Dialog Modal Bootstrap แบบ AJAX + Form

class
Jmodal
ไฟล์
protected/modules/jutinut/components/Jmodal.php
หมวดหมู่
overlay
เรียกใช้จาก
ทุกโดเมนที่ import application.modules.jutinut.components.*
วิธีเรียกใช้ / usage
$this->widget('Jmodal', array(
  'id' => 'myModal',
  'title' => 'หัวข้อ Modal',
  'content' => '<p>เนื้อหา...</p>',
));
ตัวอย่างการทำงานจริง / live demo

Modal ถูกซ่อนไว้เป็นค่าเริ่มต้น

  • กดปุ่มด้านล่างเพื่อเปิดดูตัวอย่างจริง
07

Jiconmenu

เมนูไอคอนแบบ Grid Dashboard

class
Jiconmenu
ไฟล์
protected/modules/jutinut/components/Jiconmenu.php
หมวดหมู่
nav
เรียกใช้จาก
ทุกโดเมนที่ import application.modules.jutinut.components.*
วิธีเรียกใช้ / usage
$this->widget('Jiconmenu', array(
  'items' => array(
    array('label'=>'เมนู1','url'=>array('x'),'icon'=>'fa-home'),
  ),
));
ตัวอย่างการทำงานจริง / live demo
08

Jsummary

สรุปข้อมูล Dashboard สั้นๆ (KPI Summary)

class
Jsummary
ไฟล์
protected/modules/jutinut/components/Jsummary.php
หมวดหมู่
dashboard
เรียกใช้จาก
ทุกโดเมนที่ import application.modules.jutinut.components.*
วิธีเรียกใช้ / usage
$this->widget('Jsummary', array(
  'cards' => array(
    array('label'=>'รายได้','value'=>'1.2M','icon'=>'fa-money'),
  ),
));
ตัวอย่างการทำงานจริง / live demo

รายงานความสุขประจำเดือน /ules/jutinut/Jsummary:85

ความสุข: วันนี้ ปีที่แล้ว วันนี้ ปีนี้ วันนี้ชาติที่แล้ว

เทียบกับมาตรฐานโลก

Add Products to Cart 160/200
Complete Purchase 310/400
Visit Premium Page 480/800
Send Inquiries 250/500
09

Jtodos

รายการ To-Do ที่มี / ทำเสร็จ พร้อม progress bar

class
Jtodos
ไฟล์
protected/modules/jutinut/components/Jtodos.php
หมวดหมู่
dashboard
เรียกใช้จาก
ทุกโดเมนที่ import application.modules.jutinut.components.*
วิธีเรียกใช้ / usage
$this->widget('Jtodos', array(
  'items' => array(
    array('label'=>'Task A','done'=>true),
    array('label'=>'Task B','done'=>false),
  ),
));
ตัวอย่างการทำงานจริง / live demo

Jtodos- /ules/jutinut/Jtodos:41

To Do List

  • ออกแบบ UI หน้าแรก sisaket.net เสร็จแล้ว
  • สร้าง SQL Schema ข่าว 5 โซน เสร็จแล้ว
  • เพิ่ม AJAX Realtime Polling 2 วัน
  • ทดสอบบน Production Server 1 สัปดาห์
10

Jhighchart

Highcharts Chart พื้นฐาน (Line/Bar/Pie)

class
Jhighchart
ไฟล์
protected/modules/jutinut/components/Jhighchart.php
หมวดหมู่
chart
เรียกใช้จาก
ทุกโดเมนที่ import application.modules.jutinut.components.*
วิธีเรียกใช้ / usage
$this->widget('Jhighchart', array(
  'type' => 'line',
  'series' => $dataSeries,
  'title' => 'ชื่อกราฟ',
));
ตัวอย่างการทำงานจริง / live demo

สถิติว่าด้วย... /ules/jutinut/Jhighchart:60

ภาพรวม /ules/jutinut/Jhighchart:82

สถานะทางอณาคต 5,200
50% Increase in 30 Days
ความมั่นคงทางหนี้สิน 92,050
87% Increase in 30 Days
อณาคตทางอาชีพ 200
2% Increase in 30 Days
สภาพจิตใจ (อย่าได้แคร์) 163,921
40% Increase in 30 Days
11

Jhighchartbig

Highcharts ขนาดใหญ่ Full Dashboard Size

class
Jhighchartbig
ไฟล์
protected/modules/jutinut/components/Jhighchartbig.php
หมวดหมู่
chart
เรียกใช้จาก
ทุกโดเมนที่ import application.modules.jutinut.components.*
วิธีเรียกใช้ / usage
$this->widget('Jhighchartbig', array(
  'type' => 'column',
  'series' => $series,
  'height' => 500,
));
ตัวอย่างการทำงานจริง / live demo

Template- /ules/jutinut/Jhighchartbig:27

ยังเป็นโครงเปล่า รอเขียนกราฟ

  • ไฟล์ยังมีแค่กรอบกล่อง ยังไม่มี container และยังไม่ได้เรียก Highcharts
  • ใช้ Jhighchart แทนได้ระหว่างนี้
12

Jcallhighchart

Wrapper Highcharts สำหรับตารางเรียกข้อมูล AJAX ออนไลน์

class
Jcallhighchart
ไฟล์
protected/modules/jutinut/components/Jcallhighchart.php
หมวดหมู่
chart
เรียกใช้จาก
ทุกโดเมนที่ import application.modules.jutinut.components.*
วิธีเรียกใช้ / usage
$this->widget('Jcallhighchart', array(
  'dataUrl' => array('ajaxChartData'),
  'type' => 'spline',
));
ตัวอย่างการทำงานจริง / live demo

Jcallhighchart ทำงานเบื้องหลัง ไม่มีส่วนแสดงผล

  • หน้าที่คือ publish ไฟล์ Highcharts แล้ว register script ให้หน้าที่เรียกใช้
  • เรียกตัวนี้ก่อน แล้วค่อยวาดกราฟด้วย Highcharts.chart() ของคุณเอง
  • กราฟในหน้านี้ (Jsummary, Jhighchart, Jdrilldown) ใช้กลไกเดียวกันนี้
13

Jgraph

กราฟ Network/Graph แบบ Node-Edge

class
Jgraph
ไฟล์
protected/modules/jutinut/components/Jgraph.php
หมวดหมู่
chart
เรียกใช้จาก
ทุกโดเมนที่ import application.modules.jutinut.components.*
วิธีเรียกใช้ / usage
$this->widget('Jgraph', array(
  'nodes' => $nodes,
  'edges' => $edges,
));
ตัวอย่างการทำงานจริง / live demo

/ules/jutinut/Jgraph:30

****************
Inventory 5,200
50% Increase in 30 Days
Mentions 92,050
20% Increase in 30 Days
Downloads 114,381
70% Increase in 30 Days
Direct Messages 163,921
40% Increase in 30 Days
****************
14

Jdrilldown

Highcharts Drill Down ลึกๆ ทีละชั้น

class
Jdrilldown
ไฟล์
protected/modules/jutinut/components/Jdrilldown.php
หมวดหมู่
chart
เรียกใช้จาก
ทุกโดเมนที่ import application.modules.jutinut.components.*
วิธีเรียกใช้ / usage
$this->widget('Jdrilldown', array(
  'series_name' => 'Sales',
  'xis_text'    => 'Product',
  'datatable'   => true,
));
ตัวอย่างการทำงานจริง / live demo
--

เพิ่ม Component ใหม่

สคริปต์ Template สำหรับสร้าง Widget ใหม่ คัดลอกมาแก้ไขได้ทันที

วิธีเรียกใช้ / usage
// Example: สร้าง MyWidget
class MyWidget extends CWidget {
  public $title = '';
  public function run() {
    echo '<div class="box"><h3>'.$this->title.'</h3></div>';
  }
}

// เรียกใช้งาน:
$this->widget('MyWidget', array('title'=>'สวัสดี'));
jutinut/component-lab · v1.0.0 build 20260904.060454