初始化CRICS
This commit is contained in:
18
WebSite/easyui-1.4.2/demo/accordion/_content.html
Normal file
18
WebSite/easyui-1.4.2/demo/accordion/_content.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>AJAX Content</title>
|
||||
</head>
|
||||
<body>
|
||||
<p style="font-size:14px">Here is the content loaded via AJAX.</p>
|
||||
<ul>
|
||||
<li>easyui is a collection of user-interface plugin based on jQuery.</li>
|
||||
<li>easyui provides essential functionality for building modern, interactive, javascript applications.</li>
|
||||
<li>using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.</li>
|
||||
<li>complete framework for HTML5 web page.</li>
|
||||
<li>easyui save your time and scales while developing your products.</li>
|
||||
<li>easyui is very easy but powerful.</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
51
WebSite/easyui-1.4.2/demo/accordion/actions.html
Normal file
51
WebSite/easyui-1.4.2/demo/accordion/actions.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Accordion Actions - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Accordion Actions</h2>
|
||||
<p>Click the buttons below to add or remove accordion items.</p>
|
||||
<div style="margin:20px 0 10px 0;">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="selectPanel()">Select</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="addPanel()">Add</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="removePanel()">Remove</a>
|
||||
</div>
|
||||
<div id="aa" class="easyui-accordion" style="width:500px;height:300px;">
|
||||
<div title="About" data-options="iconCls:'icon-ok'" style="overflow:auto;padding:10px;">
|
||||
<h3 style="color:#0099FF;">Accordion for jQuery</h3>
|
||||
<p>Accordion is a part of easyui framework for jQuery. It lets you define your accordion component on web page more easily.</p>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function selectPanel(){
|
||||
$.messager.prompt('Prompt','Please enter the panel title:',function(s){
|
||||
if (s){
|
||||
$('#aa').accordion('select',s);
|
||||
}
|
||||
});
|
||||
}
|
||||
var idx = 1;
|
||||
function addPanel(){
|
||||
$('#aa').accordion('add',{
|
||||
title:'Title'+idx,
|
||||
content:'<div style="padding:10px">Content'+idx+'</div>'
|
||||
});
|
||||
idx++;
|
||||
}
|
||||
function removePanel(){
|
||||
var pp = $('#aa').accordion('getSelected');
|
||||
if (pp){
|
||||
var index = $('#aa').accordion('getPanelIndex',pp);
|
||||
$('#aa').accordion('remove',index);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
28
WebSite/easyui-1.4.2/demo/accordion/ajax.html
Normal file
28
WebSite/easyui-1.4.2/demo/accordion/ajax.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Loading Accordion Content with AJAX - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Loading Accordion Content with AJAX</h2>
|
||||
<p>Click AJAX panel header to load content via AJAX.</p>
|
||||
<div style="margin:20px 0 10px 0;"></div>
|
||||
<div class="easyui-accordion" style="width:500px;height:300px;">
|
||||
<div title="About" data-options="iconCls:'icon-ok'" style="overflow:auto;padding:10px;">
|
||||
<h3 style="color:#0099FF;">Accordion for jQuery</h3>
|
||||
<p>Accordion is a part of easyui framework for jQuery. It lets you define your accordion component on web page more easily.</p>
|
||||
</div>
|
||||
<div title="Help" data-options="iconCls:'icon-help'" style="padding:10px;">
|
||||
<p>The accordion allows you to provide multiple panels and display one or more at a time. Each panel has built-in support for expanding and collapsing. Clicking on a panel header to expand or collapse that panel body. The panel content can be loaded via ajax by specifying a 'href' property. Users can define a panel to be selected. If it is not specified, then the first panel is taken by default.</p>
|
||||
</div>
|
||||
<div title="Ajax" data-options="href:'_content.html'" style="padding:10px">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
52
WebSite/easyui-1.4.2/demo/accordion/basic.html
Normal file
52
WebSite/easyui-1.4.2/demo/accordion/basic.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic Accordion - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic Accordion</h2>
|
||||
<p>Click on panel header to show its content.</p>
|
||||
<div style="margin:20px 0 10px 0;"></div>
|
||||
<div class="easyui-accordion" style="width:500px;height:300px;">
|
||||
<div title="About" data-options="iconCls:'icon-ok'" style="overflow:auto;padding:10px;">
|
||||
<h3 style="color:#0099FF;">Accordion for jQuery</h3>
|
||||
<p>Accordion is a part of easyui framework for jQuery. It lets you define your accordion component on web page more easily.</p>
|
||||
</div>
|
||||
<div title="Help" data-options="iconCls:'icon-help'" style="padding:10px;">
|
||||
<p>The accordion allows you to provide multiple panels and display one or more at a time. Each panel has built-in support for expanding and collapsing. Clicking on a panel header to expand or collapse that panel body. The panel content can be loaded via ajax by specifying a 'href' property. Users can define a panel to be selected. If it is not specified, then the first panel is taken by default.</p>
|
||||
</div>
|
||||
<div title="TreeMenu" data-options="iconCls:'icon-search'" style="padding:10px;">
|
||||
<ul class="easyui-tree">
|
||||
<li>
|
||||
<span>Foods</span>
|
||||
<ul>
|
||||
<li>
|
||||
<span>Fruits</span>
|
||||
<ul>
|
||||
<li>apple</li>
|
||||
<li>orange</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<span>Vegetables</span>
|
||||
<ul>
|
||||
<li>tomato</li>
|
||||
<li>carrot</li>
|
||||
<li>cabbage</li>
|
||||
<li>potato</li>
|
||||
<li>lettuce</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
12
WebSite/easyui-1.4.2/demo/accordion/datagrid_data1.json
Normal file
12
WebSite/easyui-1.4.2/demo/accordion/datagrid_data1.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{"total":28,"rows":[
|
||||
{"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
|
||||
{"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
|
||||
{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"},
|
||||
{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
|
||||
{"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
|
||||
{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"},
|
||||
{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"},
|
||||
{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"Adult Female","itemid":"EST-16"},
|
||||
{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"},
|
||||
{"productid":"AV-CB-01","productname":"Amazon Parrot","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"}
|
||||
]}
|
||||
33
WebSite/easyui-1.4.2/demo/accordion/expandable.html
Normal file
33
WebSite/easyui-1.4.2/demo/accordion/expandable.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Keep Expandable Panel in Accordion - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Keep Expandable Panel in Accordion</h2>
|
||||
<p>Keep a expandable panel and prevent it from collapsing.</p>
|
||||
<div style="margin:20px 0 10px 0;"></div>
|
||||
<div class="easyui-accordion" style="width:500px;height:300px;">
|
||||
<div title="Top Panel" data-options="iconCls:'icon-search',collapsed:false,collapsible:false" style="padding:10px;">
|
||||
<input class="easyui-searchbox" prompt="Enter something here" style="width:300px;height:25px;">
|
||||
</div>
|
||||
<div title="About" data-options="selected:true" style="padding:10px;">
|
||||
<h3 style="color:#0099FF;">Accordion for jQuery</h3>
|
||||
<p>Accordion is a part of easyui framework for jQuery. It lets you define your accordion component on web page more easily.</p>
|
||||
</div>
|
||||
<div title="Title1" style="padding:10px">
|
||||
<p>Content1</p>
|
||||
</div>
|
||||
<div title="Title2" style="padding:10px">
|
||||
<p>Content2</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
33
WebSite/easyui-1.4.2/demo/accordion/fluid.html
Normal file
33
WebSite/easyui-1.4.2/demo/accordion/fluid.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fluid Accordion - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Fluid Accordion</h2>
|
||||
<p>This example shows how to set the width of accordion to a percentage of its parent container.</p>
|
||||
<div style="margin:20px 0 10px 0;"></div>
|
||||
<div class="easyui-accordion" style="width:100%;height:180px;">
|
||||
<div title="About" data-options="iconCls:'icon-ok'" style="overflow:auto;padding:10px;">
|
||||
<p>width: 100%</p>
|
||||
</div>
|
||||
<div title="Help" data-options="iconCls:'icon-help',href:'_content.html'" style="padding:10px;">
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin:20px 0 10px 0;"></div>
|
||||
|
||||
<div class="easyui-accordion" style="width:50%;height:180px;">
|
||||
<div title="About" data-options="iconCls:'icon-ok'" style="overflow:auto;padding:10px;">
|
||||
<p>width: 50%</p>
|
||||
</div>
|
||||
<div title="Help" data-options="iconCls:'icon-help',href:'_content.html'" style="padding:10px;">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
34
WebSite/easyui-1.4.2/demo/accordion/multiple.html
Normal file
34
WebSite/easyui-1.4.2/demo/accordion/multiple.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Multiple Accordion Panels - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Multiple Accordion Panels</h2>
|
||||
<p>Enable 'multiple' mode to expand multiple panels at one time.</p>
|
||||
<div style="margin:20px 0 10px 0;"></div>
|
||||
<div class="easyui-accordion" data-options="multiple:true" style="width:500px;height1:300px;">
|
||||
<div title="Language" data-options="iconCls:'icon-ok'" style="overflow:auto;padding:10px;">
|
||||
<p>A programming language is a formal language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely.</p>
|
||||
</div>
|
||||
<div title="Java" style="padding:10px;">
|
||||
<p>Java (Indonesian: Jawa) is an island of Indonesia. With a population of 135 million (excluding the 3.6 million on the island of Madura which is administered as part of the provinces of Java), Java is the world's most populous island, and one of the most densely populated places in the world.</p>
|
||||
</div>
|
||||
<div title="C#" style="padding:10px;">
|
||||
<p>C# is a multi-paradigm programming language encompassing strong typing, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines.</p>
|
||||
</div>
|
||||
<div title="Ruby" style="padding:10px;">
|
||||
<p>A dynamic, reflective, general-purpose object-oriented programming language.</p>
|
||||
</div>
|
||||
<div title="Fortran" style="padding:10px;">
|
||||
<p>Fortran (previously FORTRAN) is a general-purpose, imperative programming language that is especially suited to numeric computation and scientific computing.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
48
WebSite/easyui-1.4.2/demo/accordion/tools.html
Normal file
48
WebSite/easyui-1.4.2/demo/accordion/tools.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Accordion Tools - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Accordion Tools</h2>
|
||||
<p>Click the tools on top right of panel to perform actions.</p>
|
||||
<div style="margin:20px 0 10px 0;"></div>
|
||||
<div class="easyui-accordion" style="width:500px;height:300px;">
|
||||
<div title="About" data-options="iconCls:'icon-ok'" style="overflow:auto;padding:10px;">
|
||||
<h3 style="color:#0099FF;">Accordion for jQuery</h3>
|
||||
<p>Accordion is a part of easyui framework for jQuery. It lets you define your accordion component on web page more easily.</p>
|
||||
</div>
|
||||
<div title="Help" data-options="iconCls:'icon-help'" style="padding:10px;">
|
||||
<p>The accordion allows you to provide multiple panels and display one ore more at a time. Each panel has built-in support for expanding and collapsing. Clicking on a panel header to expand or collapse that panel body. The panel content can be loaded via ajax by specifying a 'href' property. Users can define a panel to be selected. If it is not specified, then the first panel is taken by default.</p>
|
||||
</div>
|
||||
<div title="DataGrid" style="padding:10px" data-options="
|
||||
selected:true,
|
||||
tools:[{
|
||||
iconCls:'icon-reload',
|
||||
handler:function(){
|
||||
$('#dg').datagrid('reload');
|
||||
}
|
||||
}]">
|
||||
<table id="dg" class="easyui-datagrid"
|
||||
data-options="url:'datagrid_data1.json',method:'get',fit:true,fitColumns:true,singleSelect:true">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:100">Product ID</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right'">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:150">Attribute</th>
|
||||
<th data-options="field:'status',width:50,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
19
WebSite/easyui-1.4.2/demo/calendar/basic.html
Normal file
19
WebSite/easyui-1.4.2/demo/calendar/basic.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic Calendar - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic Calendar</h2>
|
||||
<p>Click to select date.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<div class="easyui-calendar" style="width:250px;height:250px;"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
46
WebSite/easyui-1.4.2/demo/calendar/custom.html
Normal file
46
WebSite/easyui-1.4.2/demo/calendar/custom.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Custom Calendar - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Custom Calendar</h2>
|
||||
<p>This example shows how to custom the calendar date by using 'formatter' function.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
|
||||
<div class="easyui-calendar" style="width:250px;height:250px;" data-options="formatter:formatDay"></div>
|
||||
|
||||
<script>
|
||||
var d1 = Math.floor((Math.random()*30)+1);
|
||||
var d2 = Math.floor((Math.random()*30)+1);
|
||||
function formatDay(date){
|
||||
var m = date.getMonth()+1;
|
||||
var d = date.getDate();
|
||||
var opts = $(this).calendar('options');
|
||||
if (opts.month == m && d == d1){
|
||||
return '<div class="icon-ok md">' + d + '</div>';
|
||||
} else if (opts.month == m && d == d2){
|
||||
return '<div class="icon-search md">' + d + '</div>';
|
||||
}
|
||||
return d;
|
||||
}
|
||||
</script>
|
||||
<style scoped="scoped">
|
||||
.md{
|
||||
height:16px;
|
||||
line-height:16px;
|
||||
background-position:2px center;
|
||||
text-align:right;
|
||||
font-weight:bold;
|
||||
padding:0 2px;
|
||||
color:red;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
28
WebSite/easyui-1.4.2/demo/calendar/disabledate.html
Normal file
28
WebSite/easyui-1.4.2/demo/calendar/disabledate.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Disable Calendar Date - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Disable Calendar Date</h2>
|
||||
<p>This example shows how to disable specified dates, only allows the user to select Mondays.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
|
||||
<div class="easyui-calendar" style="width:250px;height:250px;" data-options="
|
||||
validator: function(date){
|
||||
if (date.getDay() == 1){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
30
WebSite/easyui-1.4.2/demo/calendar/firstday.html
Normal file
30
WebSite/easyui-1.4.2/demo/calendar/firstday.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>First Day of Week - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>First Day of Week</h2>
|
||||
<p>Choose the first day of the week.</p>
|
||||
|
||||
<div style="margin:20px 0">
|
||||
<select onchange="$('#cc').calendar({firstDay:this.value})">
|
||||
<option value="0">Sunday</option>
|
||||
<option value="1">Monday</option>
|
||||
<option value="2">Tuesday</option>
|
||||
<option value="3">Wednesday</option>
|
||||
<option value="4">Thursday</option>
|
||||
<option value="5">Friday</option>
|
||||
<option value="6">Saturday</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="cc" class="easyui-calendar" style="width:250px;height:250px;"></div>
|
||||
</body>
|
||||
</html>
|
||||
23
WebSite/easyui-1.4.2/demo/calendar/fluid.html
Normal file
23
WebSite/easyui-1.4.2/demo/calendar/fluid.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fluid Calendar - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Fluid Calendar</h2>
|
||||
<p>This example shows how to set the width of calendar to a percentage of its parent container.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<div class="easyui-panel" style="width:700px;padding:10px">
|
||||
<p>width: 50%, height: 250px</p>
|
||||
<div class="easyui-calendar" style="width:50%;height:250px;"></div>
|
||||
<p>width: 30%, height: 40%</p>
|
||||
<div class="easyui-calendar" style="width:30%;height:40%;"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
37
WebSite/easyui-1.4.2/demo/combo/animation.html
Normal file
37
WebSite/easyui-1.4.2/demo/combo/animation.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Combo Animation - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Combo Animation</h2>
|
||||
<p>Change the animation type when open & close the drop-down panel.</p>
|
||||
<div style="margin:20px 0">
|
||||
<span>Animation Type:</span>
|
||||
<select onchange="changeAnimation(this.value)">
|
||||
<option>slide</option>
|
||||
<option>fade</option>
|
||||
<option>show</option>
|
||||
</select>
|
||||
</div>
|
||||
<select id="cc" style="width:150px"></select>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('#cc').combo();
|
||||
changeAnimation('slide');
|
||||
});
|
||||
function changeAnimation(atype){
|
||||
$('#cc').combo('panel').panel({
|
||||
openAnimation:atype,
|
||||
closeAnimation:(atype=='show'?'hide':atype)
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
42
WebSite/easyui-1.4.2/demo/combo/basic.html
Normal file
42
WebSite/easyui-1.4.2/demo/combo/basic.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic Combo - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic Combo</h2>
|
||||
<p>Click the right arrow button to show drop down panel that can be filled with any content.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<select id="cc" style="width:150px"></select>
|
||||
<div id="sp">
|
||||
<div style="color:#99BBE8;background:#fafafa;padding:5px;">Select a language</div>
|
||||
<div style="padding:10px">
|
||||
<input type="radio" name="lang" value="01"><span>Java</span><br/>
|
||||
<input type="radio" name="lang" value="02"><span>C#</span><br/>
|
||||
<input type="radio" name="lang" value="03"><span>Ruby</span><br/>
|
||||
<input type="radio" name="lang" value="04"><span>Basic</span><br/>
|
||||
<input type="radio" name="lang" value="05"><span>Fortran</span>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('#cc').combo({
|
||||
required:true,
|
||||
editable:false
|
||||
});
|
||||
$('#sp').appendTo($('#cc').combo('panel'));
|
||||
$('#sp input').click(function(){
|
||||
var v = $(this).val();
|
||||
var s = $(this).next('span').text();
|
||||
$('#cc').combo('setValue', v).combo('setText', s).combo('hidePanel');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
86
WebSite/easyui-1.4.2/demo/combobox/actions.html
Normal file
86
WebSite/easyui-1.4.2/demo/combobox/actions.html
Normal file
@@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>ComboBox Actions - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>ComboBox</h2>
|
||||
<p>Click the buttons below to perform actions.</p>
|
||||
|
||||
<div style="margin:20px 0;">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="setvalue()">SetValue</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="alert($('#state').combobox('getValue'))">GetValue</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#state').combobox('disable')">Disable</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#state').combobox('enable')">Enable</a>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function setvalue(){
|
||||
$.messager.prompt('SetValue','Please input the value(CO,NV,UT,etc):',function(v){
|
||||
if (v){
|
||||
$('#state').combobox('setValue',v);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<select id="state" class="easyui-combobox" name="state" style="width:200px;">
|
||||
<option value="AL">Alabama</option>
|
||||
<option value="AK">Alaska</option>
|
||||
<option value="AZ">Arizona</option>
|
||||
<option value="AR">Arkansas</option>
|
||||
<option value="CA">California</option>
|
||||
<option value="CO">Colorado</option>
|
||||
<option value="CT">Connecticut</option>
|
||||
<option value="DE">Delaware</option>
|
||||
<option value="FL">Florida</option>
|
||||
<option value="GA">Georgia</option>
|
||||
<option value="HI">Hawaii</option>
|
||||
<option value="ID">Idaho</option>
|
||||
<option value="IL">Illinois</option>
|
||||
<option value="IN">Indiana</option>
|
||||
<option value="IA">Iowa</option>
|
||||
<option value="KS">Kansas</option>
|
||||
<option value="KY">Kentucky</option>
|
||||
<option value="LA">Louisiana</option>
|
||||
<option value="ME">Maine</option>
|
||||
<option value="MD">Maryland</option>
|
||||
<option value="MA">Massachusetts</option>
|
||||
<option value="MI">Michigan</option>
|
||||
<option value="MN">Minnesota</option>
|
||||
<option value="MS">Mississippi</option>
|
||||
<option value="MO">Missouri</option>
|
||||
<option value="MT">Montana</option>
|
||||
<option value="NE">Nebraska</option>
|
||||
<option value="NV">Nevada</option>
|
||||
<option value="NH">New Hampshire</option>
|
||||
<option value="NJ">New Jersey</option>
|
||||
<option value="NM">New Mexico</option>
|
||||
<option value="NY">New York</option>
|
||||
<option value="NC">North Carolina</option>
|
||||
<option value="ND">North Dakota</option>
|
||||
<option value="OH" selected>Ohio</option>
|
||||
<option value="OK">Oklahoma</option>
|
||||
<option value="OR">Oregon</option>
|
||||
<option value="PA">Pennsylvania</option>
|
||||
<option value="RI">Rhode Island</option>
|
||||
<option value="SC">South Carolina</option>
|
||||
<option value="SD">South Dakota</option>
|
||||
<option value="TN">Tennessee</option>
|
||||
<option value="TX">Texas</option>
|
||||
<option value="UT">Utah</option>
|
||||
<option value="VT">Vermont</option>
|
||||
<option value="VA">Virginia</option>
|
||||
<option value="WA">Washington</option>
|
||||
<option value="WV">West Virginia</option>
|
||||
<option value="WI">Wisconsin</option>
|
||||
<option value="WY">Wyoming</option>
|
||||
</select>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
71
WebSite/easyui-1.4.2/demo/combobox/basic.html
Normal file
71
WebSite/easyui-1.4.2/demo/combobox/basic.html
Normal file
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic ComboBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic ComboBox</h2>
|
||||
<p>Type in ComboBox to try auto complete.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
|
||||
<select class="easyui-combobox" name="state" style="width:200px;">
|
||||
<option value="AL">Alabama</option>
|
||||
<option value="AK">Alaska</option>
|
||||
<option value="AZ">Arizona</option>
|
||||
<option value="AR">Arkansas</option>
|
||||
<option value="CA">California</option>
|
||||
<option value="CO">Colorado</option>
|
||||
<option value="CT">Connecticut</option>
|
||||
<option value="DE">Delaware</option>
|
||||
<option value="FL">Florida</option>
|
||||
<option value="GA">Georgia</option>
|
||||
<option value="HI">Hawaii</option>
|
||||
<option value="ID">Idaho</option>
|
||||
<option value="IL">Illinois</option>
|
||||
<option value="IN">Indiana</option>
|
||||
<option value="IA">Iowa</option>
|
||||
<option value="KS">Kansas</option>
|
||||
<option value="KY">Kentucky</option>
|
||||
<option value="LA">Louisiana</option>
|
||||
<option value="ME">Maine</option>
|
||||
<option value="MD">Maryland</option>
|
||||
<option value="MA">Massachusetts</option>
|
||||
<option value="MI">Michigan</option>
|
||||
<option value="MN">Minnesota</option>
|
||||
<option value="MS">Mississippi</option>
|
||||
<option value="MO">Missouri</option>
|
||||
<option value="MT">Montana</option>
|
||||
<option value="NE">Nebraska</option>
|
||||
<option value="NV">Nevada</option>
|
||||
<option value="NH">New Hampshire</option>
|
||||
<option value="NJ">New Jersey</option>
|
||||
<option value="NM">New Mexico</option>
|
||||
<option value="NY">New York</option>
|
||||
<option value="NC">North Carolina</option>
|
||||
<option value="ND">North Dakota</option>
|
||||
<option value="OH" selected>Ohio</option>
|
||||
<option value="OK">Oklahoma</option>
|
||||
<option value="OR">Oregon</option>
|
||||
<option value="PA">Pennsylvania</option>
|
||||
<option value="RI">Rhode Island</option>
|
||||
<option value="SC">South Carolina</option>
|
||||
<option value="SD">South Dakota</option>
|
||||
<option value="TN">Tennessee</option>
|
||||
<option value="TX">Texas</option>
|
||||
<option value="UT">Utah</option>
|
||||
<option value="VT">Vermont</option>
|
||||
<option value="VA">Virginia</option>
|
||||
<option value="WA">Washington</option>
|
||||
<option value="WV">West Virginia</option>
|
||||
<option value="WI">Wisconsin</option>
|
||||
<option value="WY">Wyoming</option>
|
||||
</select>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
22
WebSite/easyui-1.4.2/demo/combobox/combobox_data1.json
Normal file
22
WebSite/easyui-1.4.2/demo/combobox/combobox_data1.json
Normal file
@@ -0,0 +1,22 @@
|
||||
[{
|
||||
"id":1,
|
||||
"text":"Java",
|
||||
"desc":"Write once, run anywhere"
|
||||
},{
|
||||
"id":2,
|
||||
"text":"C#",
|
||||
"desc":"One of the programming languages designed for the Common Language Infrastructure"
|
||||
},{
|
||||
"id":3,
|
||||
"text":"Ruby",
|
||||
"selected":true,
|
||||
"desc":"A dynamic, reflective, general-purpose object-oriented programming language"
|
||||
},{
|
||||
"id":4,
|
||||
"text":"Perl",
|
||||
"desc":"A high-level, general-purpose, interpreted, dynamic programming language"
|
||||
},{
|
||||
"id":5,
|
||||
"text":"Basic",
|
||||
"desc":"A family of general-purpose, high-level programming languages"
|
||||
}]
|
||||
47
WebSite/easyui-1.4.2/demo/combobox/combobox_data2.json
Normal file
47
WebSite/easyui-1.4.2/demo/combobox/combobox_data2.json
Normal file
@@ -0,0 +1,47 @@
|
||||
[{
|
||||
"value":"f20",
|
||||
"text":"Firefox 2.0 or higher",
|
||||
"group":"Firefox"
|
||||
},{
|
||||
"value":"f15",
|
||||
"text":"Firefox 1.5.x",
|
||||
"group":"Firefox"
|
||||
},{
|
||||
"value":"f10",
|
||||
"text":"Firefox 1.0.x",
|
||||
"group":"Firefox"
|
||||
},{
|
||||
"value":"ie7",
|
||||
"text":"Microsoft Internet Explorer 7.0 or higher",
|
||||
"group":"Microsoft Internet Explorer"
|
||||
},{
|
||||
"value":"ie6",
|
||||
"text":"Microsoft Internet Explorer 6.x",
|
||||
"group":"Microsoft Internet Explorer"
|
||||
},{
|
||||
"value":"ie5",
|
||||
"text":"Microsoft Internet Explorer 5.x",
|
||||
"group":"Microsoft Internet Explorer"
|
||||
},{
|
||||
"value":"ie4",
|
||||
"text":"Microsoft Internet Explorer 4.x",
|
||||
"group":"Microsoft Internet Explorer"
|
||||
},{
|
||||
"value":"op9",
|
||||
"text":"Opera 9.0 or higher",
|
||||
"group":"Opera"
|
||||
},{
|
||||
"value":"op8",
|
||||
"text":"Opera 8.x",
|
||||
"group":"Opera"
|
||||
},{
|
||||
"value":"op7",
|
||||
"text":"Opera 7.x",
|
||||
"group":"Opera"
|
||||
},{
|
||||
"value":"Safari",
|
||||
"text":"Safari"
|
||||
},{
|
||||
"value":"Other",
|
||||
"text":"Other"
|
||||
}]
|
||||
33
WebSite/easyui-1.4.2/demo/combobox/customformat.html
Normal file
33
WebSite/easyui-1.4.2/demo/combobox/customformat.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Custom Format in ComboBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Custom Format in ComboBox</h2>
|
||||
<p>This sample shows how to custom the format of list item.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<input class="easyui-combobox" name="language" data-options="
|
||||
url: 'combobox_data1.json',
|
||||
method: 'get',
|
||||
valueField: 'id',
|
||||
textField: 'text',
|
||||
panelWidth: 350,
|
||||
panelHeight: 'auto',
|
||||
formatter: formatItem
|
||||
">
|
||||
<script type="text/javascript">
|
||||
function formatItem(row){
|
||||
var s = '<span style="font-weight:bold">' + row.text + '</span><br/>' +
|
||||
'<span style="color:#888">' + row.desc + '</span>';
|
||||
return s;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
23
WebSite/easyui-1.4.2/demo/combobox/dynamicdata.html
Normal file
23
WebSite/easyui-1.4.2/demo/combobox/dynamicdata.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Load Dynamic ComboBox Data - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Load Dynamic ComboBox Data</h2>
|
||||
<p>Click the button below to load data.</p>
|
||||
|
||||
<div style="margin:20px 0;">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#language').combobox('reload', 'combobox_data1.json')">LoadData</a>
|
||||
</div>
|
||||
|
||||
<input class="easyui-combobox" id="language" name="language"
|
||||
data-options="valueField:'id',textField:'text'">
|
||||
</body>
|
||||
</html>
|
||||
36
WebSite/easyui-1.4.2/demo/combobox/fluid.html
Normal file
36
WebSite/easyui-1.4.2/demo/combobox/fluid.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fluid ComboBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Fluid ComboBox</h2>
|
||||
<p>This example shows how to set the width of combobox to a percentage of its parent container.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<p>width: 50%</p>
|
||||
<input class="easyui-combobox" name="language" style="width:50%"
|
||||
data-options="
|
||||
url: 'combobox_data2.json',
|
||||
method: 'get',
|
||||
valueField:'value',
|
||||
textField:'text',
|
||||
groupField:'group'
|
||||
">
|
||||
<p>width: 30%</p>
|
||||
<input class="easyui-combobox" name="language" style="width:30%"
|
||||
data-options="
|
||||
url:'combobox_data1.json',
|
||||
method:'get',
|
||||
valueField:'id',
|
||||
textField:'text',
|
||||
panelHeight:'auto'
|
||||
">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
26
WebSite/easyui-1.4.2/demo/combobox/group.html
Normal file
26
WebSite/easyui-1.4.2/demo/combobox/group.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Group ComboBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Group ComboBox</h2>
|
||||
<p>This example shows how to display combobox items in groups.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
|
||||
<input class="easyui-combobox" name="browser" style="width:280px;" data-options="
|
||||
url: 'combobox_data2.json',
|
||||
method: 'get',
|
||||
valueField:'value',
|
||||
textField:'text',
|
||||
groupField:'group'
|
||||
">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
32
WebSite/easyui-1.4.2/demo/combobox/icons.html
Normal file
32
WebSite/easyui-1.4.2/demo/combobox/icons.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>ComboBox with Extra Icons- jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>ComboBox with Extra Icons</h2>
|
||||
<p>The user can attach extra icons to the ComboBox.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<input class="easyui-combobox"
|
||||
name="language"
|
||||
data-options="
|
||||
url:'combobox_data1.json',
|
||||
method:'get',
|
||||
valueField:'id',
|
||||
textField:'text',
|
||||
panelHeight:'auto',
|
||||
icons:[{
|
||||
iconCls:'icon-add'
|
||||
},{
|
||||
iconCls:'icon-cut'
|
||||
}]
|
||||
">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
71
WebSite/easyui-1.4.2/demo/combobox/multiline.html
Normal file
71
WebSite/easyui-1.4.2/demo/combobox/multiline.html
Normal file
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Multiline ComboBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Multiline ComboBox</h2>
|
||||
<p>This example shows how to create a multiline ComboBox.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
|
||||
<select class="easyui-combobox" name="state" data-options="multiple:true,multiline:true" style="width:200px;height:50px">
|
||||
<option value="AL">Alabama</option>
|
||||
<option value="AK">Alaska</option>
|
||||
<option value="AZ">Arizona</option>
|
||||
<option value="AR">Arkansas</option>
|
||||
<option value="CA">California</option>
|
||||
<option value="CO">Colorado</option>
|
||||
<option value="CT">Connecticut</option>
|
||||
<option value="DE">Delaware</option>
|
||||
<option value="FL">Florida</option>
|
||||
<option value="GA">Georgia</option>
|
||||
<option value="HI">Hawaii</option>
|
||||
<option value="ID">Idaho</option>
|
||||
<option value="IL">Illinois</option>
|
||||
<option value="IN">Indiana</option>
|
||||
<option value="IA">Iowa</option>
|
||||
<option value="KS">Kansas</option>
|
||||
<option value="KY">Kentucky</option>
|
||||
<option value="LA">Louisiana</option>
|
||||
<option value="ME">Maine</option>
|
||||
<option value="MD">Maryland</option>
|
||||
<option value="MA">Massachusetts</option>
|
||||
<option value="MI">Michigan</option>
|
||||
<option value="MN">Minnesota</option>
|
||||
<option value="MS">Mississippi</option>
|
||||
<option value="MO">Missouri</option>
|
||||
<option value="MT">Montana</option>
|
||||
<option value="NE">Nebraska</option>
|
||||
<option value="NV">Nevada</option>
|
||||
<option value="NH">New Hampshire</option>
|
||||
<option value="NJ">New Jersey</option>
|
||||
<option value="NM">New Mexico</option>
|
||||
<option value="NY">New York</option>
|
||||
<option value="NC">North Carolina</option>
|
||||
<option value="ND">North Dakota</option>
|
||||
<option value="OH" selected>Ohio</option>
|
||||
<option value="OK">Oklahoma</option>
|
||||
<option value="OR">Oregon</option>
|
||||
<option value="PA">Pennsylvania</option>
|
||||
<option value="RI">Rhode Island</option>
|
||||
<option value="SC">South Carolina</option>
|
||||
<option value="SD">South Dakota</option>
|
||||
<option value="TN">Tennessee</option>
|
||||
<option value="TX">Texas</option>
|
||||
<option value="UT">Utah</option>
|
||||
<option value="VT">Vermont</option>
|
||||
<option value="VA">Virginia</option>
|
||||
<option value="WA">Washington</option>
|
||||
<option value="WV">West Virginia</option>
|
||||
<option value="WI">Wisconsin</option>
|
||||
<option value="WY">Wyoming</option>
|
||||
</select>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
29
WebSite/easyui-1.4.2/demo/combobox/multiple.html
Normal file
29
WebSite/easyui-1.4.2/demo/combobox/multiple.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Multiple Select - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Load Dynamic ComboBox Data</h2>
|
||||
<p>Drop down the panel and select multiple items.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
|
||||
<input class="easyui-combobox"
|
||||
name="language"
|
||||
data-options="
|
||||
url:'combobox_data1.json',
|
||||
method:'get',
|
||||
valueField:'id',
|
||||
textField:'text',
|
||||
multiple:true,
|
||||
panelHeight:'auto'
|
||||
">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
73
WebSite/easyui-1.4.2/demo/combobox/navigation.html
Normal file
73
WebSite/easyui-1.4.2/demo/combobox/navigation.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Navigate ComboBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Navigate ComboBox</h2>
|
||||
<p>Navigate through combobox items width keyboard to select an item.</p>
|
||||
<div style="margin:20px 0;">
|
||||
<input type="checkbox" checked onchange="$('#cc').combobox({selectOnNavigation:$(this).is(':checked')})">
|
||||
<span>SelectOnNavigation</span>
|
||||
</div>
|
||||
|
||||
<select id="cc" class="easyui-combobox" name="state" style="width:200px;">
|
||||
<option value="AL">Alabama</option>
|
||||
<option value="AK">Alaska</option>
|
||||
<option value="AZ">Arizona</option>
|
||||
<option value="AR">Arkansas</option>
|
||||
<option value="CA">California</option>
|
||||
<option value="CO">Colorado</option>
|
||||
<option value="CT">Connecticut</option>
|
||||
<option value="DE">Delaware</option>
|
||||
<option value="FL">Florida</option>
|
||||
<option value="GA">Georgia</option>
|
||||
<option value="HI">Hawaii</option>
|
||||
<option value="ID">Idaho</option>
|
||||
<option value="IL">Illinois</option>
|
||||
<option value="IN">Indiana</option>
|
||||
<option value="IA">Iowa</option>
|
||||
<option value="KS">Kansas</option>
|
||||
<option value="KY">Kentucky</option>
|
||||
<option value="LA">Louisiana</option>
|
||||
<option value="ME">Maine</option>
|
||||
<option value="MD">Maryland</option>
|
||||
<option value="MA">Massachusetts</option>
|
||||
<option value="MI">Michigan</option>
|
||||
<option value="MN">Minnesota</option>
|
||||
<option value="MS">Mississippi</option>
|
||||
<option value="MO">Missouri</option>
|
||||
<option value="MT">Montana</option>
|
||||
<option value="NE">Nebraska</option>
|
||||
<option value="NV">Nevada</option>
|
||||
<option value="NH">New Hampshire</option>
|
||||
<option value="NJ">New Jersey</option>
|
||||
<option value="NM">New Mexico</option>
|
||||
<option value="NY">New York</option>
|
||||
<option value="NC">North Carolina</option>
|
||||
<option value="ND">North Dakota</option>
|
||||
<option value="OK">Oklahoma</option>
|
||||
<option value="OR">Oregon</option>
|
||||
<option value="PA">Pennsylvania</option>
|
||||
<option value="RI">Rhode Island</option>
|
||||
<option value="SC">South Carolina</option>
|
||||
<option value="SD">South Dakota</option>
|
||||
<option value="TN">Tennessee</option>
|
||||
<option value="TX">Texas</option>
|
||||
<option value="UT">Utah</option>
|
||||
<option value="VT">Vermont</option>
|
||||
<option value="VA">Virginia</option>
|
||||
<option value="WA">Washington</option>
|
||||
<option value="WV">West Virginia</option>
|
||||
<option value="WI">Wisconsin</option>
|
||||
<option value="WY">Wyoming</option>
|
||||
</select>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
27
WebSite/easyui-1.4.2/demo/combobox/remotedata.html
Normal file
27
WebSite/easyui-1.4.2/demo/combobox/remotedata.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Binding to Remote Data - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Binding to Remote Data</h2>
|
||||
<p>The ComboBox is bound to a remote data.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<input class="easyui-combobox"
|
||||
name="language"
|
||||
data-options="
|
||||
url:'combobox_data1.json',
|
||||
method:'get',
|
||||
valueField:'id',
|
||||
textField:'text',
|
||||
panelHeight:'auto'
|
||||
">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
48
WebSite/easyui-1.4.2/demo/combobox/remotejsonp.html
Normal file
48
WebSite/easyui-1.4.2/demo/combobox/remotejsonp.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Remote JSONP - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Remote JSONP</h2>
|
||||
<p>This sample shows how to use JSONP to retrieve data from a remote site.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<input class="easyui-combobox" style="width:250px" data-options="
|
||||
loader: myloader,
|
||||
mode: 'remote',
|
||||
valueField: 'id',
|
||||
textField: 'name'
|
||||
">
|
||||
<script>
|
||||
var myloader = function(param,success,error){
|
||||
var q = param.q || '';
|
||||
if (q.length <= 2){return false}
|
||||
$.ajax({
|
||||
url: 'http://gd.geobytes.com/AutoCompleteCity',
|
||||
dataType: 'jsonp',
|
||||
data: {
|
||||
q: q
|
||||
},
|
||||
success: function(data){
|
||||
var items = $.map(data, function(item,index){
|
||||
return {
|
||||
id: index,
|
||||
name: item
|
||||
};
|
||||
});
|
||||
success(items);
|
||||
},
|
||||
error: function(){
|
||||
error.apply(this, arguments);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
53
WebSite/easyui-1.4.2/demo/combogrid/actions.html
Normal file
53
WebSite/easyui-1.4.2/demo/combogrid/actions.html
Normal file
@@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>ComboGrid Actions - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>ComboGrid Actions</h2>
|
||||
<p>Click the buttons below to perform actions.</p>
|
||||
<div style="margin:20px 0">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="getValue()">GetValue</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="setValue()">SetValue</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="disable()">Disable</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="enable()">Enable</a>
|
||||
</div>
|
||||
<input id="cc" class="easyui-combogrid" style="width:250px" data-options="
|
||||
panelWidth: 500,
|
||||
idField: 'itemid',
|
||||
textField: 'productname',
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
columns: [[
|
||||
{field:'itemid',title:'Item ID',width:80},
|
||||
{field:'productname',title:'Product',width:120},
|
||||
{field:'listprice',title:'List Price',width:80,align:'right'},
|
||||
{field:'unitcost',title:'Unit Cost',width:80,align:'right'},
|
||||
{field:'attr1',title:'Attribute',width:200},
|
||||
{field:'status',title:'Status',width:60,align:'center'}
|
||||
]],
|
||||
fitColumns: true
|
||||
">
|
||||
<script type="text/javascript">
|
||||
function getValue(){
|
||||
var val = $('#cc').combogrid('getValue');
|
||||
alert(val);
|
||||
}
|
||||
function setValue(){
|
||||
$('#cc').combogrid('setValue', 'EST-13');
|
||||
}
|
||||
function disable(){
|
||||
$('#cc').combogrid('disable');
|
||||
}
|
||||
function enable(){
|
||||
$('#cc').combogrid('enable');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
34
WebSite/easyui-1.4.2/demo/combogrid/basic.html
Normal file
34
WebSite/easyui-1.4.2/demo/combogrid/basic.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic ComboGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic ComboGrid</h2>
|
||||
<p>Click the right arrow button to show the DataGrid.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<select class="easyui-combogrid" style="width:250px" data-options="
|
||||
panelWidth: 500,
|
||||
idField: 'itemid',
|
||||
textField: 'productname',
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
columns: [[
|
||||
{field:'itemid',title:'Item ID',width:80},
|
||||
{field:'productname',title:'Product',width:120},
|
||||
{field:'listprice',title:'List Price',width:80,align:'right'},
|
||||
{field:'unitcost',title:'Unit Cost',width:80,align:'right'},
|
||||
{field:'attr1',title:'Attribute',width:200},
|
||||
{field:'status',title:'Status',width:60,align:'center'}
|
||||
]],
|
||||
fitColumns: true
|
||||
">
|
||||
</select>
|
||||
</body>
|
||||
</html>
|
||||
12
WebSite/easyui-1.4.2/demo/combogrid/datagrid_data1.json
Normal file
12
WebSite/easyui-1.4.2/demo/combogrid/datagrid_data1.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{"total":28,"rows":[
|
||||
{"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
|
||||
{"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
|
||||
{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"},
|
||||
{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
|
||||
{"selected":true,"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
|
||||
{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"},
|
||||
{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"},
|
||||
{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"Adult Female","itemid":"EST-16"},
|
||||
{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"},
|
||||
{"productid":"AV-CB-01","productname":"Amazon Parrot","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"}
|
||||
]}
|
||||
54
WebSite/easyui-1.4.2/demo/combogrid/fluid.html
Normal file
54
WebSite/easyui-1.4.2/demo/combogrid/fluid.html
Normal file
@@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fluid ComboGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Fluid ComboGrid</h2>
|
||||
<p>This example shows how to set the width of ComboGrid to a percentage of its parent container.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<p>width: 50%</p>
|
||||
<select class="easyui-combogrid" style="width:50%" data-options="
|
||||
panelWidth: 500,
|
||||
panelMinWidth: '50%',
|
||||
idField: 'itemid',
|
||||
textField: 'productname',
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
columns: [[
|
||||
{field:'itemid',title:'Item ID',width:80},
|
||||
{field:'productname',title:'Product',width:120},
|
||||
{field:'listprice',title:'List Price',width:80,align:'right'},
|
||||
{field:'unitcost',title:'Unit Cost',width:80,align:'right'},
|
||||
{field:'attr1',title:'Attribute',width:200},
|
||||
{field:'status',title:'Status',width:60,align:'center'}
|
||||
]],
|
||||
fitColumns: true
|
||||
">
|
||||
</select>
|
||||
<p>width: 30%</p>
|
||||
<select class="easyui-combogrid" style="width:30%" data-options="
|
||||
panelWidth: 500,
|
||||
idField: 'itemid',
|
||||
textField: 'productname',
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
columns: [[
|
||||
{field:'itemid',title:'Item ID',width:80},
|
||||
{field:'productname',title:'Product',width:120},
|
||||
{field:'listprice',title:'List Price',width:80,align:'right'},
|
||||
{field:'unitcost',title:'Unit Cost',width:80,align:'right'},
|
||||
{field:'attr1',title:'Attribute',width:200},
|
||||
{field:'status',title:'Status',width:60,align:'center'}
|
||||
]],
|
||||
fitColumns: true
|
||||
">
|
||||
</select>
|
||||
</body>
|
||||
</html>
|
||||
33
WebSite/easyui-1.4.2/demo/combogrid/initvalue.html
Normal file
33
WebSite/easyui-1.4.2/demo/combogrid/initvalue.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Initialize Value for ComboGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Initialize Value for ComboGrid</h2>
|
||||
<p>Initialize value when ComboGrid is created.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<input class="easyui-combogrid" style="width:250px" value="EST-12" data-options="
|
||||
panelWidth: 500,
|
||||
idField: 'itemid',
|
||||
textField: 'productname',
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
columns: [[
|
||||
{field:'itemid',title:'Item ID',width:80},
|
||||
{field:'productname',title:'Product',width:120},
|
||||
{field:'listprice',title:'List Price',width:80,align:'right'},
|
||||
{field:'unitcost',title:'Unit Cost',width:80,align:'right'},
|
||||
{field:'attr1',title:'Attribute',width:200},
|
||||
{field:'status',title:'Status',width:60,align:'center'}
|
||||
]],
|
||||
fitColumns: true
|
||||
">
|
||||
</body>
|
||||
</html>
|
||||
37
WebSite/easyui-1.4.2/demo/combogrid/multiple.html
Normal file
37
WebSite/easyui-1.4.2/demo/combogrid/multiple.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Multiple ComboGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Multiple ComboGrid</h2>
|
||||
<p>Click the right arrow button to show the DataGrid and select items.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<select class="easyui-combogrid" style="width:250px" data-options="
|
||||
panelWidth: 500,
|
||||
multiple: true,
|
||||
idField: 'itemid',
|
||||
textField: 'productname',
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
columns: [[
|
||||
{field:'ck',checkbox:true},
|
||||
{field:'itemid',title:'Item ID',width:80},
|
||||
{field:'productname',title:'Product',width:120},
|
||||
{field:'listprice',title:'List Price',width:80,align:'right'},
|
||||
{field:'unitcost',title:'Unit Cost',width:80,align:'right'},
|
||||
{field:'attr1',title:'Attribute',width:200},
|
||||
{field:'status',title:'Status',width:60,align:'center'}
|
||||
]],
|
||||
fitColumns: true
|
||||
">
|
||||
</select>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
38
WebSite/easyui-1.4.2/demo/combogrid/navigation.html
Normal file
38
WebSite/easyui-1.4.2/demo/combogrid/navigation.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Navigate ComboGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Navigate ComboGrid</h2>
|
||||
<p>Navigate through grid items with keyboard to select an item.</p>
|
||||
<div style="margin:20px 0">
|
||||
<input type="checkbox" checked onchange="$('#cc').combogrid({selectOnNavigation:$(this).is(':checked')})">
|
||||
<span>SelectOnNavigation</span>
|
||||
</div>
|
||||
<select id="cc" class="easyui-combogrid" style="width:250px" data-options="
|
||||
panelWidth: 500,
|
||||
idField: 'itemid',
|
||||
textField: 'productname',
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
columns: [[
|
||||
{field:'itemid',title:'Item ID',width:80},
|
||||
{field:'productname',title:'Product',width:120},
|
||||
{field:'listprice',title:'List Price',width:80,align:'right'},
|
||||
{field:'unitcost',title:'Unit Cost',width:80,align:'right'},
|
||||
{field:'attr1',title:'Attribute',width:200},
|
||||
{field:'status',title:'Status',width:60,align:'center'}
|
||||
]],
|
||||
fitColumns: true
|
||||
">
|
||||
</select>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
39
WebSite/easyui-1.4.2/demo/combotree/actions.html
Normal file
39
WebSite/easyui-1.4.2/demo/combotree/actions.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>ComboTree Actions - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>ComboTree Actions</h2>
|
||||
<p>Click the buttons below to perform actions</p>
|
||||
<div style="margin:20px 0">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="getValue()">GetValue</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="setValue()">SetValue</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="disable()">Disable</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="enable()">Enable</a>
|
||||
</div>
|
||||
<input id="cc" class="easyui-combotree" data-options="url:'tree_data1.json',method:'get',required:true" style="width:200px;">
|
||||
<script type="text/javascript">
|
||||
function getValue(){
|
||||
var val = $('#cc').combotree('getValue');
|
||||
alert(val);
|
||||
}
|
||||
function setValue(){
|
||||
$('#cc').combotree('setValue', '122');
|
||||
}
|
||||
function disable(){
|
||||
$('#cc').combotree('disable');
|
||||
}
|
||||
function enable(){
|
||||
$('#cc').combotree('enable');
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
19
WebSite/easyui-1.4.2/demo/combotree/basic.html
Normal file
19
WebSite/easyui-1.4.2/demo/combotree/basic.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic ComboTree - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic ComboTree</h2>
|
||||
<p>Click the right arrow button to show the tree panel.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<input class="easyui-combotree" data-options="url:'tree_data1.json',method:'get',required:true" style="width:200px;">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
22
WebSite/easyui-1.4.2/demo/combotree/fluid.html
Normal file
22
WebSite/easyui-1.4.2/demo/combotree/fluid.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fluid ComboTree - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Fluid ComboTree</h2>
|
||||
<p>This example shows how to set the width of ComboTree to a percentage of its parent container.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<p>width: 50%</p>
|
||||
<input class="easyui-combotree" value="122" data-options="url:'tree_data1.json',method:'get'" style="width:50%;">
|
||||
<p>width: 30%, height: 26px</p>
|
||||
<input class="easyui-combotree" value="124" data-options="url:'tree_data1.json',method:'get'" style="width:30%;height:26px">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
19
WebSite/easyui-1.4.2/demo/combotree/initvalue.html
Normal file
19
WebSite/easyui-1.4.2/demo/combotree/initvalue.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Initialize Value for ComboTree - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Initialize Value for ComboTree</h2>
|
||||
<p>Initialize Value when ComboTree is created.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<input class="easyui-combotree" value="122" data-options="url:'tree_data1.json',method:'get',required:true" style="width:200px;">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
22
WebSite/easyui-1.4.2/demo/combotree/multiple.html
Normal file
22
WebSite/easyui-1.4.2/demo/combotree/multiple.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Multiple ComboTree - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Multiple ComboTree</h2>
|
||||
<p>Click the right arrow button to show the tree panel and select multiple nodes.</p>
|
||||
<div style="margin:20px 0">
|
||||
<span>Cascade Check: </span>
|
||||
<input type="checkbox" checked onclick="$('#cc').combotree({cascadeCheck:$(this).is(':checked')})">
|
||||
</div>
|
||||
<select id="cc" class="easyui-combotree" data-options="url:'tree_data1.json',method:'get'" multiple style="width:200px;"></select>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
49
WebSite/easyui-1.4.2/demo/combotree/tree_data1.json
Normal file
49
WebSite/easyui-1.4.2/demo/combotree/tree_data1.json
Normal file
@@ -0,0 +1,49 @@
|
||||
[{
|
||||
"id":1,
|
||||
"text":"My Documents",
|
||||
"children":[{
|
||||
"id":11,
|
||||
"text":"Photos",
|
||||
"state":"closed",
|
||||
"children":[{
|
||||
"id":111,
|
||||
"text":"Friend"
|
||||
},{
|
||||
"id":112,
|
||||
"text":"Wife"
|
||||
},{
|
||||
"id":113,
|
||||
"text":"Company"
|
||||
}]
|
||||
},{
|
||||
"id":12,
|
||||
"text":"Program Files",
|
||||
"children":[{
|
||||
"id":121,
|
||||
"text":"Intel"
|
||||
},{
|
||||
"id":122,
|
||||
"text":"Java",
|
||||
"attributes":{
|
||||
"p1":"Custom Attribute1",
|
||||
"p2":"Custom Attribute2"
|
||||
}
|
||||
},{
|
||||
"id":123,
|
||||
"text":"Microsoft Office"
|
||||
},{
|
||||
"id":124,
|
||||
"text":"Games",
|
||||
"checked":true
|
||||
}]
|
||||
},{
|
||||
"id":13,
|
||||
"text":"index.html"
|
||||
},{
|
||||
"id":14,
|
||||
"text":"about.html"
|
||||
},{
|
||||
"id":15,
|
||||
"text":"welcome.html"
|
||||
}]
|
||||
}]
|
||||
32
WebSite/easyui-1.4.2/demo/datagrid/aligncolumns.html
Normal file
32
WebSite/easyui-1.4.2/demo/datagrid/aligncolumns.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Aligning Columns in DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Aligning Columns in DataGrid</h2>
|
||||
<p>Use align and halign properties to set the alignment of the columns and their header.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
|
||||
<table class="easyui-datagrid" title="Aligning Columns in DataGrid" style="width:700px;height:250px"
|
||||
data-options="singleSelect:true,collapsible:true,url:'datagrid_data1.json',method:'get'">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80,halign:'center'">Item ID</th>
|
||||
<th data-options="field:'productid',width:100,halign:'center'">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right',halign:'center'">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right',halign:'center'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:250,halign:'center'">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center',halign:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
32
WebSite/easyui-1.4.2/demo/datagrid/basic.html
Normal file
32
WebSite/easyui-1.4.2/demo/datagrid/basic.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic DataGrid</h2>
|
||||
<p>The DataGrid is created from markup, no JavaScript code needed.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
|
||||
<table class="easyui-datagrid" title="Basic DataGrid" style="width:700px;height:250px"
|
||||
data-options="singleSelect:true,collapsible:true,url:'datagrid_data1.json',method:'get'">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:100">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right'">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:250">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
149
WebSite/easyui-1.4.2/demo/datagrid/cacheeditor.html
Normal file
149
WebSite/easyui-1.4.2/demo/datagrid/cacheeditor.html
Normal file
@@ -0,0 +1,149 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Cache Editor for DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Cache Editor for DataGrid</h2>
|
||||
<p>This example shows how to cache the editors for datagrid to improve the editing speed.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
|
||||
<table id="dg" class="easyui-datagrid" title="Cache Editor for DataGrid" style="width:700px;height:auto"
|
||||
data-options="
|
||||
iconCls: 'icon-edit',
|
||||
singleSelect: true,
|
||||
toolbar: '#tb',
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
onClickRow: onClickRow
|
||||
">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:100,
|
||||
formatter:function(value,row){
|
||||
return row.productname;
|
||||
},
|
||||
editor:{
|
||||
type:'combobox',
|
||||
options:{
|
||||
valueField:'productid',
|
||||
textField:'productname',
|
||||
method:'get',
|
||||
url:'products.json',
|
||||
required:true
|
||||
}
|
||||
}">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right',editor:{type:'numberbox',options:{precision:1}}">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right',editor:'numberbox'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:250,editor:'text'">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center',editor:{type:'checkbox',options:{on:'P',off:''}}">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<div id="tb" style="height:auto">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" onclick="accept()">Accept</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-undo',plain:true" onclick="reject()">Reject</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="getChanges()">GetChanges</a>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function($){
|
||||
function getCacheContainer(t){
|
||||
var view = $(t).closest('div.datagrid-view');
|
||||
var c = view.children('div.datagrid-editor-cache');
|
||||
if (!c.length){
|
||||
c = $('<div class="datagrid-editor-cache" style="position:absolute;display:none"></div>').appendTo(view);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
function getCacheEditor(t, field){
|
||||
var c = getCacheContainer(t);
|
||||
return c.children('div.datagrid-editor-cache-' + field);
|
||||
}
|
||||
function setCacheEditor(t, field, editor){
|
||||
var c = getCacheContainer(t);
|
||||
c.children('div.datagrid-editor-cache-' + field).remove();
|
||||
var e = $('<div class="datagrid-editor-cache-' + field + '"></div>').appendTo(c);
|
||||
e.append(editor);
|
||||
}
|
||||
|
||||
var editors = $.fn.datagrid.defaults.editors;
|
||||
for(var editor in editors){
|
||||
var opts = editors[editor];
|
||||
(function(){
|
||||
var init = opts.init;
|
||||
opts.init = function(container, options){
|
||||
var field = $(container).closest('td[field]').attr('field');
|
||||
var ed = getCacheEditor(container, field);
|
||||
if (ed.length){
|
||||
ed.appendTo(container);
|
||||
return ed.find('.datagrid-editable-input');
|
||||
} else {
|
||||
return init(container, options);
|
||||
}
|
||||
}
|
||||
})();
|
||||
(function(){
|
||||
var destroy = opts.destroy;
|
||||
opts.destroy = function(target){
|
||||
if ($(target).hasClass('datagrid-editable-input')){
|
||||
var field = $(target).closest('td[field]').attr('field');
|
||||
setCacheEditor(target, field, $(target).parent().children());
|
||||
} else if (destroy){
|
||||
destroy(target);
|
||||
}
|
||||
}
|
||||
})();
|
||||
}
|
||||
})(jQuery);
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var editIndex = undefined;
|
||||
function endEditing(){
|
||||
if (editIndex == undefined){return true}
|
||||
if ($('#dg').datagrid('validateRow', editIndex)){
|
||||
var ed = $('#dg').datagrid('getEditor', {index:editIndex,field:'productid'});
|
||||
var productname = $(ed.target).combobox('getText');
|
||||
$('#dg').datagrid('getRows')[editIndex]['productname'] = productname;
|
||||
$('#dg').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function onClickRow(index){
|
||||
if (editIndex != index){
|
||||
if (endEditing()){
|
||||
$('#dg').datagrid('selectRow', index)
|
||||
.datagrid('beginEdit', index);
|
||||
editIndex = index;
|
||||
} else {
|
||||
$('#dg').datagrid('selectRow', editIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
function accept(){
|
||||
if (endEditing()){
|
||||
$('#dg').datagrid('acceptChanges');
|
||||
}
|
||||
}
|
||||
function reject(){
|
||||
$('#dg').datagrid('rejectChanges');
|
||||
editIndex = undefined;
|
||||
}
|
||||
function getChanges(){
|
||||
var rows = $('#dg').datagrid('getChanges');
|
||||
alert(rows.length+' rows are changed!');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
94
WebSite/easyui-1.4.2/demo/datagrid/cellediting.html
Normal file
94
WebSite/easyui-1.4.2/demo/datagrid/cellediting.html
Normal file
@@ -0,0 +1,94 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Cell Editing in DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Cell Editing in DataGrid</h2>
|
||||
<p>Click a cell to start editing.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
|
||||
<table id="dg" title="Cell Editing in DataGrid" style="width:700px;height:auto"
|
||||
data-options="
|
||||
iconCls: 'icon-edit',
|
||||
singleSelect: true,
|
||||
url: 'datagrid_data1.json',
|
||||
method:'get'
|
||||
">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:100,editor:'text'">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right',editor:{type:'numberbox',options:{precision:1}}">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right',editor:'numberbox'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:250,editor:'text'">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center',editor:{type:'checkbox',options:{on:'P',off:''}}">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
$.extend($.fn.datagrid.methods, {
|
||||
editCell: function(jq,param){
|
||||
return jq.each(function(){
|
||||
var opts = $(this).datagrid('options');
|
||||
var fields = $(this).datagrid('getColumnFields',true).concat($(this).datagrid('getColumnFields'));
|
||||
for(var i=0; i<fields.length; i++){
|
||||
var col = $(this).datagrid('getColumnOption', fields[i]);
|
||||
col.editor1 = col.editor;
|
||||
if (fields[i] != param.field){
|
||||
col.editor = null;
|
||||
}
|
||||
}
|
||||
$(this).datagrid('beginEdit', param.index);
|
||||
var ed = $(this).datagrid('getEditor', param);
|
||||
if (ed){
|
||||
if ($(ed.target).hasClass('textbox-f')){
|
||||
$(ed.target).textbox('textbox').focus();
|
||||
} else {
|
||||
$(ed.target).focus();
|
||||
}
|
||||
}
|
||||
for(var i=0; i<fields.length; i++){
|
||||
var col = $(this).datagrid('getColumnOption', fields[i]);
|
||||
col.editor = col.editor1;
|
||||
}
|
||||
});
|
||||
},
|
||||
enableCellEditing: function(jq){
|
||||
return jq.each(function(){
|
||||
var dg = $(this);
|
||||
var opts = dg.datagrid('options');
|
||||
opts.oldOnClickCell = opts.onClickCell;
|
||||
opts.onClickCell = function(index, field){
|
||||
if (opts.editIndex != undefined){
|
||||
if (dg.datagrid('validateRow', opts.editIndex)){
|
||||
dg.datagrid('endEdit', opts.editIndex);
|
||||
opts.editIndex = undefined;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
dg.datagrid('selectRow', index).datagrid('editCell', {
|
||||
index: index,
|
||||
field: field
|
||||
});
|
||||
opts.editIndex = index;
|
||||
opts.oldOnClickCell.call(this, index, field);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(function(){
|
||||
$('#dg').datagrid().datagrid('enableCellEditing');
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
42
WebSite/easyui-1.4.2/demo/datagrid/cellstyle.html
Normal file
42
WebSite/easyui-1.4.2/demo/datagrid/cellstyle.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>DataGrid Cell Style - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>DataGrid Cell Style</h2>
|
||||
<p>The cells which listprice value is less than 30 are highlighted.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<table class="easyui-datagrid" title="DataGrid Cell Style" style="width:700px;height:250px"
|
||||
data-options="
|
||||
singleSelect: true,
|
||||
iconCls: 'icon-save',
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get'
|
||||
">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:100">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right',styler:cellStyler">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:250">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
function cellStyler(value,row,index){
|
||||
if (value < 30){
|
||||
return 'background-color:#ffee00;color:red;';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
42
WebSite/easyui-1.4.2/demo/datagrid/checkbox.html
Normal file
42
WebSite/easyui-1.4.2/demo/datagrid/checkbox.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>CheckBox Selection on DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>CheckBox Selection on DataGrid</h2>
|
||||
<p>Click the checkbox on header to select or unselect all selections.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
|
||||
<table id="dg" class="easyui-datagrid" title="CheckBox Selection on DataGrid" style="width:700px;height:250px"
|
||||
data-options="rownumbers:true,singleSelect:true,url:'datagrid_data1.json',method:'get'">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'ck',checkbox:true"></th>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:100">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right'">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:220">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div style="margin:10px 0;">
|
||||
<span>Selection Mode: </span>
|
||||
<select onchange="$('#dg').datagrid({singleSelect:(this.value==0)})">
|
||||
<option value="0">Single Row</option>
|
||||
<option value="1">Multiple Rows</option>
|
||||
</select><br/>
|
||||
SelectOnCheck: <input type="checkbox" checked onchange="$('#dg').datagrid({selectOnCheck:$(this).is(':checked')})"><br/>
|
||||
CheckOnSelect: <input type="checkbox" checked onchange="$('#dg').datagrid({checkOnSelect:$(this).is(':checked')})">
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
121
WebSite/easyui-1.4.2/demo/datagrid/clientpagination.html
Normal file
121
WebSite/easyui-1.4.2/demo/datagrid/clientpagination.html
Normal file
@@ -0,0 +1,121 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Client Side Pagination in DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Client Side Pagination in DataGrid</h2>
|
||||
<p>This sample shows how to implement client side pagination in DataGrid.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
|
||||
<table id="dg" title="Client Side Pagination" style="width:700px;height:300px" data-options="
|
||||
rownumbers:true,
|
||||
singleSelect:true,
|
||||
autoRowHeight:false,
|
||||
pagination:true,
|
||||
pageSize1:10">
|
||||
<thead>
|
||||
<tr>
|
||||
<th field="inv" width="80">Inv No</th>
|
||||
<th field="date" width="100">Date</th>
|
||||
<th field="name" width="80">Name</th>
|
||||
<th field="amount" width="80" align="right">Amount</th>
|
||||
<th field="price" width="80" align="right">Price</th>
|
||||
<th field="cost" width="100" align="right">Cost</th>
|
||||
<th field="note" width="110">Note</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script>
|
||||
(function($){
|
||||
function pagerFilter(data){
|
||||
if ($.isArray(data)){ // is array
|
||||
data = {
|
||||
total: data.length,
|
||||
rows: data
|
||||
}
|
||||
}
|
||||
var dg = $(this);
|
||||
var state = dg.data('datagrid');
|
||||
var opts = dg.datagrid('options');
|
||||
if (!state.allRows){
|
||||
state.allRows = (data.rows);
|
||||
}
|
||||
var start = (opts.pageNumber-1)*parseInt(opts.pageSize);
|
||||
var end = start + parseInt(opts.pageSize);
|
||||
data.rows = $.extend(true,[],state.allRows.slice(start, end));
|
||||
return data;
|
||||
}
|
||||
|
||||
var loadDataMethod = $.fn.datagrid.methods.loadData;
|
||||
$.extend($.fn.datagrid.methods, {
|
||||
clientPaging: function(jq){
|
||||
return jq.each(function(){
|
||||
var dg = $(this);
|
||||
var state = dg.data('datagrid');
|
||||
var opts = state.options;
|
||||
opts.loadFilter = pagerFilter;
|
||||
var onBeforeLoad = opts.onBeforeLoad;
|
||||
opts.onBeforeLoad = function(param){
|
||||
state.allRows = null;
|
||||
return onBeforeLoad.call(this, param);
|
||||
}
|
||||
dg.datagrid('getPager').pagination({
|
||||
onSelectPage:function(pageNum, pageSize){
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
$(this).pagination('refresh',{
|
||||
pageNumber:pageNum,
|
||||
pageSize:pageSize
|
||||
});
|
||||
dg.datagrid('loadData',state.allRows);
|
||||
}
|
||||
});
|
||||
$(this).datagrid('loadData', state.data);
|
||||
if (opts.url){
|
||||
$(this).datagrid('reload');
|
||||
}
|
||||
});
|
||||
},
|
||||
loadData: function(jq, data){
|
||||
jq.each(function(){
|
||||
$(this).data('datagrid').allRows = null;
|
||||
});
|
||||
return loadDataMethod.call($.fn.datagrid.methods, jq, data);
|
||||
},
|
||||
getAllRows: function(jq){
|
||||
return jq.data('datagrid').allRows;
|
||||
}
|
||||
})
|
||||
})(jQuery);
|
||||
|
||||
function getData(){
|
||||
var rows = [];
|
||||
for(var i=1; i<=800; i++){
|
||||
var amount = Math.floor(Math.random()*1000);
|
||||
var price = Math.floor(Math.random()*1000);
|
||||
rows.push({
|
||||
inv: 'Inv No '+i,
|
||||
date: $.fn.datebox.defaults.formatter(new Date()),
|
||||
name: 'Name '+i,
|
||||
amount: amount,
|
||||
price: price,
|
||||
cost: amount*price,
|
||||
note: 'Note '+i
|
||||
});
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$('#dg').datagrid({data:getData()}).datagrid('clientPaging');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
34
WebSite/easyui-1.4.2/demo/datagrid/columngroup.html
Normal file
34
WebSite/easyui-1.4.2/demo/datagrid/columngroup.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Column Group - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Column Group</h2>
|
||||
<p>The header cells can be merged. Useful to group columns under a category.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<table class="easyui-datagrid" title="Column Group" style="width:700px;height:250px"
|
||||
data-options="rownumbers:true,singleSelect:true,url:'datagrid_data1.json',method:'get'">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80" rowspan="2">Item ID</th>
|
||||
<th data-options="field:'productid',width:100" rowspan="2">Product</th>
|
||||
<th colspan="4">Item Details</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th data-options="field:'listprice',width:80,align:'right'">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:240">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
50
WebSite/easyui-1.4.2/demo/datagrid/complextoolbar.html
Normal file
50
WebSite/easyui-1.4.2/demo/datagrid/complextoolbar.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>DataGrid Complex Toolbar - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>DataGrid Complex Toolbar</h2>
|
||||
<p>The DataGrid toolbar can be defined from a <div> markup, so you can define the layout of toolbar easily.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<table class="easyui-datagrid" title="DataGrid Complex Toolbar" style="width:700px;height:250px"
|
||||
data-options="rownumbers:true,singleSelect:true,url:'datagrid_data1.json',method:'get',toolbar:'#tb',footer:'#ft'">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:100">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right'">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:240">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div id="tb" style="padding:2px 5px;">
|
||||
Date From: <input class="easyui-datebox" style="width:110px">
|
||||
To: <input class="easyui-datebox" style="width:110px">
|
||||
Language:
|
||||
<select class="easyui-combobox" panelHeight="auto" style="width:100px">
|
||||
<option value="java">Java</option>
|
||||
<option value="c">C</option>
|
||||
<option value="basic">Basic</option>
|
||||
<option value="perl">Perl</option>
|
||||
<option value="python">Python</option>
|
||||
</select>
|
||||
<a href="#" class="easyui-linkbutton" iconCls="icon-search">Search</a>
|
||||
</div>
|
||||
<div id="ft" style="padding:2px 5px;">
|
||||
<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true"></a>
|
||||
<a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true"></a>
|
||||
<a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true"></a>
|
||||
<a href="#" class="easyui-linkbutton" iconCls="icon-cut" plain="true"></a>
|
||||
<a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
81
WebSite/easyui-1.4.2/demo/datagrid/contextmenu.html
Normal file
81
WebSite/easyui-1.4.2/demo/datagrid/contextmenu.html
Normal file
@@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Context Menu on DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Context Menu on DataGrid</h2>
|
||||
<p>Right click on the header of DataGrid to display context menu.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<table id="dg"></table>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('#dg').datagrid({
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
title: 'Context Menu on DataGrid',
|
||||
iconCls: 'icon-save',
|
||||
width: 700,
|
||||
height: 250,
|
||||
fitColumns: true,
|
||||
singleSelect: true,
|
||||
columns:[[
|
||||
{field:'itemid',title:'Item ID',width:80},
|
||||
{field:'productid',title:'Product ID',width:120},
|
||||
{field:'listprice',title:'List Price',width:80,align:'right'},
|
||||
{field:'unitcost',title:'Unit Cost',width:80,align:'right'},
|
||||
{field:'attr1',title:'Attribute',width:250},
|
||||
{field:'status',title:'Status',width:60,align:'center'}
|
||||
]],
|
||||
onHeaderContextMenu: function(e, field){
|
||||
e.preventDefault();
|
||||
if (!cmenu){
|
||||
createColumnMenu();
|
||||
}
|
||||
cmenu.menu('show', {
|
||||
left:e.pageX,
|
||||
top:e.pageY
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
var cmenu;
|
||||
function createColumnMenu(){
|
||||
cmenu = $('<div/>').appendTo('body');
|
||||
cmenu.menu({
|
||||
onClick: function(item){
|
||||
if (item.iconCls == 'icon-ok'){
|
||||
$('#dg').datagrid('hideColumn', item.name);
|
||||
cmenu.menu('setIcon', {
|
||||
target: item.target,
|
||||
iconCls: 'icon-empty'
|
||||
});
|
||||
} else {
|
||||
$('#dg').datagrid('showColumn', item.name);
|
||||
cmenu.menu('setIcon', {
|
||||
target: item.target,
|
||||
iconCls: 'icon-ok'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
var fields = $('#dg').datagrid('getColumnFields');
|
||||
for(var i=0; i<fields.length; i++){
|
||||
var field = fields[i];
|
||||
var col = $('#dg').datagrid('getColumnOption', field);
|
||||
cmenu.menu('appendItem', {
|
||||
text: col.title,
|
||||
name: field,
|
||||
iconCls: 'icon-ok'
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
53
WebSite/easyui-1.4.2/demo/datagrid/custompager.html
Normal file
53
WebSite/easyui-1.4.2/demo/datagrid/custompager.html
Normal file
@@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Custom DataGrid Pager - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Custom DataGrid Pager</h2>
|
||||
<p>You can append some buttons to the standard datagrid pager bar.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<table id="dg" title="Custom DataGrid Pager" style="width:700px;height:250px"
|
||||
data-options="rownumbers:true,singleSelect:true,pagination:true,url:'datagrid_data1.json',method:'get'">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:100">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right'">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:240">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var pager = $('#dg').datagrid().datagrid('getPager'); // get the pager of datagrid
|
||||
pager.pagination({
|
||||
buttons:[{
|
||||
iconCls:'icon-search',
|
||||
handler:function(){
|
||||
alert('search');
|
||||
}
|
||||
},{
|
||||
iconCls:'icon-add',
|
||||
handler:function(){
|
||||
alert('add');
|
||||
}
|
||||
},{
|
||||
iconCls:'icon-edit',
|
||||
handler:function(){
|
||||
alert('edit');
|
||||
}
|
||||
}]
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
12
WebSite/easyui-1.4.2/demo/datagrid/datagrid_data1.json
Normal file
12
WebSite/easyui-1.4.2/demo/datagrid/datagrid_data1.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{"total":28,"rows":[
|
||||
{"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
|
||||
{"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
|
||||
{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"},
|
||||
{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
|
||||
{"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
|
||||
{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"},
|
||||
{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"},
|
||||
{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"Adult Female","itemid":"EST-16"},
|
||||
{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"},
|
||||
{"productid":"AV-CB-01","productname":"Amazon Parrot","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"}
|
||||
]}
|
||||
15
WebSite/easyui-1.4.2/demo/datagrid/datagrid_data2.json
Normal file
15
WebSite/easyui-1.4.2/demo/datagrid/datagrid_data2.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{"total":28,"rows":[
|
||||
{"productid":"FI-SW-01","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
|
||||
{"productid":"K9-DL-01","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
|
||||
{"productid":"RP-SN-01","unitcost":12.00,"status":"P","listprice":28.50,"attr1":"Venomless","itemid":"EST-11"},
|
||||
{"productid":"RP-SN-01","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
|
||||
{"productid":"RP-LI-02","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
|
||||
{"productid":"FL-DSH-01","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"},
|
||||
{"productid":"FL-DSH-01","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"},
|
||||
{"productid":"FL-DLH-02","unitcost":12.00,"status":"P","listprice":63.50,"attr1":"Adult Female","itemid":"EST-16"},
|
||||
{"productid":"FL-DLH-02","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"},
|
||||
{"productid":"AV-CB-01","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"}
|
||||
],"footer":[
|
||||
{"unitcost":19.80,"listprice":60.40,"productid":"Average:"},
|
||||
{"unitcost":198.00,"listprice":604.00,"productid":"Total:"}
|
||||
]}
|
||||
32
WebSite/easyui-1.4.2/demo/datagrid/fluid.html
Normal file
32
WebSite/easyui-1.4.2/demo/datagrid/fluid.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fluid DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Fluid DataGrid</h2>
|
||||
<p>This example shows how to assign percentage width to a column in DataGrid.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
|
||||
<table id="dg" class="easyui-datagrid" title="Fluid DataGrid" style="width:700px;height:250px"
|
||||
data-options="singleSelect:true,collapsible:true,url:'datagrid_data1.json',method:'get'">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',resizable:false" width="15%">Item ID(15%)</th>
|
||||
<th data-options="field:'productid',resizable:false" width="15%">Product(15%)</th>
|
||||
<th data-options="field:'listprice',align:'right',resizable:false" width="15%">List Price(15%)</th>
|
||||
<th data-options="field:'unitcost',align:'right',resizable:false" width="15%">Unit Cost(15%)</th>
|
||||
<th data-options="field:'attr1',resizable:false" width="25%">Attribute(25%)</th>
|
||||
<th data-options="field:'status',align:'center',resizable:false" width="15%">Status(15%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
38
WebSite/easyui-1.4.2/demo/datagrid/footer.html
Normal file
38
WebSite/easyui-1.4.2/demo/datagrid/footer.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Footer Rows in DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Footer Rows in DataGrid</h2>
|
||||
<p>The summary informations can be displayed in footer rows.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<table class="easyui-datagrid" title="Footer Rows in DataGrid" style="width:700px;height:220px"
|
||||
data-options="
|
||||
url: 'datagrid_data2.json',
|
||||
method: 'get',
|
||||
fitColumns: true,
|
||||
singleSelect: true,
|
||||
rownumbers: true,
|
||||
showFooter: true
|
||||
">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:120">Product ID</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right'">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:250">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
39
WebSite/easyui-1.4.2/demo/datagrid/formatcolumns.html
Normal file
39
WebSite/easyui-1.4.2/demo/datagrid/formatcolumns.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Format DataGrid Columns - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Format DataGrid Columns</h2>
|
||||
<p>The list price value will show red color when less than 30.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<table class="easyui-datagrid" title="Format DataGrid Columns" style="width:700px;height:250px"
|
||||
data-options="rownumbers:true,singleSelect:true,iconCls:'icon-ok',url:'datagrid_data1.json',method:'get'">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:100">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right',formatter:formatPrice">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:240">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script>
|
||||
function formatPrice(val,row){
|
||||
if (val < 30){
|
||||
return '<span style="color:red;">('+val+')</span>';
|
||||
} else {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
35
WebSite/easyui-1.4.2/demo/datagrid/frozencolumns.html
Normal file
35
WebSite/easyui-1.4.2/demo/datagrid/frozencolumns.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Frozen Columns in DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Frozen Columns in DataGrid</h2>
|
||||
<p>You can freeze some columns that can't scroll out of view.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<table class="easyui-datagrid" title="Frozen Columns in DataGrid" style="width:700px;height:250px"
|
||||
data-options="rownumbers:true,singleSelect:true,url:'datagrid_data1.json',method:'get'">
|
||||
<thead data-options="frozen:true">
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:100">Item ID</th>
|
||||
<th data-options="field:'productid',width:120">Product</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'listprice',width:90,align:'right'">List Price</th>
|
||||
<th data-options="field:'unitcost',width:90,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:250">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
44
WebSite/easyui-1.4.2/demo/datagrid/frozenrows.html
Normal file
44
WebSite/easyui-1.4.2/demo/datagrid/frozenrows.html
Normal file
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Frozen Rows in DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Frozen Rows in DataGrid</h2>
|
||||
<p>This sample shows how to freeze some rows that will always be displayed at the top when the datagrid is scrolled down.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<table class="easyui-datagrid" title="Frozen Rows in DataGrid" style="width:700px;height:250px"
|
||||
data-options="
|
||||
singleSelect: true,
|
||||
collapsible: true,
|
||||
rownumbers: true,
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
onLoadSuccess: function(){
|
||||
$(this).datagrid('freezeRow',0).datagrid('freezeRow',1);
|
||||
}
|
||||
">
|
||||
<thead data-options="frozen:true">
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:100">Item ID</th>
|
||||
<th data-options="field:'productid',width:120">Product</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'listprice',width:90,align:'right'">List Price</th>
|
||||
<th data-options="field:'unitcost',width:90,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:230">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
58
WebSite/easyui-1.4.2/demo/datagrid/mergecells.html
Normal file
58
WebSite/easyui-1.4.2/demo/datagrid/mergecells.html
Normal file
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Merge Cells for DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Merge Cells for DataGrid</h2>
|
||||
<p>Cells in DataGrid body can be merged.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<table class="easyui-datagrid" title="Merge Cells for DataGrid" style="width:700px;height:250px"
|
||||
data-options="
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
iconCls: 'icon-save',
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
onLoadSuccess: onLoadSuccess
|
||||
">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'productid',width:100">Product</th>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right'">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:240">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
function onLoadSuccess(data){
|
||||
var merges = [{
|
||||
index: 2,
|
||||
rowspan: 2
|
||||
},{
|
||||
index: 5,
|
||||
rowspan: 2
|
||||
},{
|
||||
index: 7,
|
||||
rowspan: 2
|
||||
}];
|
||||
for(var i=0; i<merges.length; i++){
|
||||
$(this).datagrid('mergeCells',{
|
||||
index: merges[i].index,
|
||||
field: 'productid',
|
||||
rowspan: merges[i].rowspan
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
37
WebSite/easyui-1.4.2/demo/datagrid/multisorting.html
Normal file
37
WebSite/easyui-1.4.2/demo/datagrid/multisorting.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Multiple Sorting - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Multiple Sorting</h2>
|
||||
<p>Set 'multiSort' property to true to enable multiple column sorting.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
|
||||
<table class="easyui-datagrid" title="Multiple Sorting" style="width:700px;height:250px"
|
||||
data-options="singleSelect:true,collapsible:true,
|
||||
url:'datagrid_data1.json',
|
||||
method:'get',
|
||||
remoteSort:false,
|
||||
multiSort:true
|
||||
">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80,sortable:true">Item ID</th>
|
||||
<th data-options="field:'productid',width:100,sortable:true">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right',sortable:true">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right',sortable:true">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:250">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
9
WebSite/easyui-1.4.2/demo/datagrid/products.json
Normal file
9
WebSite/easyui-1.4.2/demo/datagrid/products.json
Normal file
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{"productid":"FI-SW-01","productname":"Koi"},
|
||||
{"productid":"K9-DL-01","productname":"Dalmation"},
|
||||
{"productid":"RP-SN-01","productname":"Rattlesnake"},
|
||||
{"productid":"RP-LI-02","productname":"Iguana"},
|
||||
{"productid":"FL-DSH-01","productname":"Manx"},
|
||||
{"productid":"FL-DLH-02","productname":"Persian"},
|
||||
{"productid":"AV-CB-01","productname":"Amazon Parrot"}
|
||||
]
|
||||
60
WebSite/easyui-1.4.2/demo/datagrid/rowborder.html
Normal file
60
WebSite/easyui-1.4.2/demo/datagrid/rowborder.html
Normal file
@@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Row Border in DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Row Border in DataGrid</h2>
|
||||
<p>This sample shows how to change the row border style of datagrid.</p>
|
||||
<div style="margin:20px 0;">
|
||||
<span>Border:</span>
|
||||
<select onchange="changeBorder(this.value)">
|
||||
<option value="lines-both">Both</option>
|
||||
<option value="lines-no">No Border</option>
|
||||
<option value="lines-right">Right Border</option>
|
||||
<option value="lines-bottom">Bottom Border</option>
|
||||
</select>
|
||||
<span>Striped:</span>
|
||||
<input type="checkbox" onclick="$('#dg').datagrid({striped:$(this).is(':checked')})">
|
||||
</div>
|
||||
<table id="dg" class="easyui-datagrid" title="Row Border in DataGrid" style="width:700px;height:250px"
|
||||
data-options="singleSelect:true,fitColumns:true,url:'datagrid_data1.json',method:'get'">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:100">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right'">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:250">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
function changeBorder(cls){
|
||||
$('#dg').datagrid('getPanel').removeClass('lines-both lines-no lines-right lines-bottom').addClass(cls);
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.lines-both .datagrid-body td{
|
||||
}
|
||||
.lines-no .datagrid-body td{
|
||||
border-right:1px dotted transparent;
|
||||
border-bottom:1px dotted transparent;
|
||||
}
|
||||
.lines-right .datagrid-body td{
|
||||
border-bottom:1px dotted transparent;
|
||||
}
|
||||
.lines-bottom .datagrid-body td{
|
||||
border-right:1px dotted transparent;
|
||||
}
|
||||
</style>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
114
WebSite/easyui-1.4.2/demo/datagrid/rowediting.html
Normal file
114
WebSite/easyui-1.4.2/demo/datagrid/rowediting.html
Normal file
@@ -0,0 +1,114 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Row Editing in DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Row Editing in DataGrid</h2>
|
||||
<p>Click the row to start editing.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
|
||||
<table id="dg" class="easyui-datagrid" title="Row Editing in DataGrid" style="width:700px;height:auto"
|
||||
data-options="
|
||||
iconCls: 'icon-edit',
|
||||
singleSelect: true,
|
||||
toolbar: '#tb',
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
onClickRow: onClickRow
|
||||
">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:100,
|
||||
formatter:function(value,row){
|
||||
return row.productname;
|
||||
},
|
||||
editor:{
|
||||
type:'combobox',
|
||||
options:{
|
||||
valueField:'productid',
|
||||
textField:'productname',
|
||||
method:'get',
|
||||
url:'products.json',
|
||||
required:true
|
||||
}
|
||||
}">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right',editor:{type:'numberbox',options:{precision:1}}">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right',editor:'numberbox'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:250,editor:'textbox'">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center',editor:{type:'checkbox',options:{on:'P',off:''}}">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<div id="tb" style="height:auto">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="append()">Append</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="removeit()">Remove</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" onclick="accept()">Accept</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-undo',plain:true" onclick="reject()">Reject</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="getChanges()">GetChanges</a>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var editIndex = undefined;
|
||||
function endEditing(){
|
||||
if (editIndex == undefined){return true}
|
||||
if ($('#dg').datagrid('validateRow', editIndex)){
|
||||
var ed = $('#dg').datagrid('getEditor', {index:editIndex,field:'productid'});
|
||||
var productname = $(ed.target).combobox('getText');
|
||||
$('#dg').datagrid('getRows')[editIndex]['productname'] = productname;
|
||||
$('#dg').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function onClickRow(index){
|
||||
if (editIndex != index){
|
||||
if (endEditing()){
|
||||
$('#dg').datagrid('selectRow', index)
|
||||
.datagrid('beginEdit', index);
|
||||
editIndex = index;
|
||||
} else {
|
||||
$('#dg').datagrid('selectRow', editIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
function append(){
|
||||
if (endEditing()){
|
||||
$('#dg').datagrid('appendRow',{status:'P'});
|
||||
editIndex = $('#dg').datagrid('getRows').length-1;
|
||||
$('#dg').datagrid('selectRow', editIndex)
|
||||
.datagrid('beginEdit', editIndex);
|
||||
}
|
||||
}
|
||||
function removeit(){
|
||||
if (editIndex == undefined){return}
|
||||
$('#dg').datagrid('cancelEdit', editIndex)
|
||||
.datagrid('deleteRow', editIndex);
|
||||
editIndex = undefined;
|
||||
}
|
||||
function accept(){
|
||||
if (endEditing()){
|
||||
$('#dg').datagrid('acceptChanges');
|
||||
}
|
||||
}
|
||||
function reject(){
|
||||
$('#dg').datagrid('rejectChanges');
|
||||
editIndex = undefined;
|
||||
}
|
||||
function getChanges(){
|
||||
var rows = $('#dg').datagrid('getChanges');
|
||||
alert(rows.length+' rows are changed!');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
41
WebSite/easyui-1.4.2/demo/datagrid/rowstyle.html
Normal file
41
WebSite/easyui-1.4.2/demo/datagrid/rowstyle.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>DataGrid Row Style - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>DataGrid Row Style</h2>
|
||||
<p>The rows which listprice value is less than 30 are highlighted.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<table class="easyui-datagrid" title="DataGrid Row Style" style="width:700px;height:250px"
|
||||
data-options="
|
||||
singleSelect: true,
|
||||
iconCls: 'icon-save',
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
rowStyler: function(index,row){
|
||||
if (row.listprice < 30){
|
||||
return 'background-color:#6293BB;color:#fff;font-weight:bold;';
|
||||
}
|
||||
}
|
||||
">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:100">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right'">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:250">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
57
WebSite/easyui-1.4.2/demo/datagrid/selection.html
Normal file
57
WebSite/easyui-1.4.2/demo/datagrid/selection.html
Normal file
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>DataGrid Selection - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>DataGrid Selection</h2>
|
||||
<p>Choose a selection mode and select one or more rows.</p>
|
||||
<div style="margin:20px 0;">
|
||||
<a href="#" class="easyui-linkbutton" onclick="getSelected()">GetSelected</a>
|
||||
<a href="#" class="easyui-linkbutton" onclick="getSelections()">GetSelections</a>
|
||||
</div>
|
||||
<table id="dg" class="easyui-datagrid" title="DataGrid Selection" style="width:700px;height:250px"
|
||||
data-options="singleSelect:true,url:'datagrid_data1.json',method:'get'">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:100">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right'">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:250">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div style="margin:10px 0;">
|
||||
<span>Selection Mode: </span>
|
||||
<select onchange="$('#dg').datagrid({singleSelect:(this.value==0)})">
|
||||
<option value="0">Single Row</option>
|
||||
<option value="1">Multiple Rows</option>
|
||||
</select>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function getSelected(){
|
||||
var row = $('#dg').datagrid('getSelected');
|
||||
if (row){
|
||||
$.messager.alert('Info', row.itemid+":"+row.productid+":"+row.attr1);
|
||||
}
|
||||
}
|
||||
function getSelections(){
|
||||
var ss = [];
|
||||
var rows = $('#dg').datagrid('getSelections');
|
||||
for(var i=0; i<rows.length; i++){
|
||||
var row = rows[i];
|
||||
ss.push('<span>'+row.itemid+":"+row.productid+":"+row.attr1+'</span>');
|
||||
}
|
||||
$.messager.alert('Info', ss.join('<br/>'));
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
45
WebSite/easyui-1.4.2/demo/datagrid/simpletoolbar.html
Normal file
45
WebSite/easyui-1.4.2/demo/datagrid/simpletoolbar.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>DataGrid with Toolbar - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>DataGrid with Toolbar</h2>
|
||||
<p>Put buttons on top toolbar of DataGrid.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<table class="easyui-datagrid" title="DataGrid with Toolbar" style="width:700px;height:250px"
|
||||
data-options="rownumbers:true,singleSelect:true,url:'datagrid_data1.json',method:'get',toolbar:toolbar">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:100">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right'">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:240">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
var toolbar = [{
|
||||
text:'Add',
|
||||
iconCls:'icon-add',
|
||||
handler:function(){alert('add')}
|
||||
},{
|
||||
text:'Cut',
|
||||
iconCls:'icon-cut',
|
||||
handler:function(){alert('cut')}
|
||||
},'-',{
|
||||
text:'Save',
|
||||
iconCls:'icon-save',
|
||||
handler:function(){alert('save')}
|
||||
}];
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
46
WebSite/easyui-1.4.2/demo/datagrid/transform.html
Normal file
46
WebSite/easyui-1.4.2/demo/datagrid/transform.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Transform DataGrid from Table - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Transform DataGrid from Table</h2>
|
||||
<p>Transform DataGrid from an existing, unformatted html table.</p>
|
||||
<div style="margin:20px 0;">
|
||||
<a href="#" class="easyui-linkbutton" onclick="javascript:$('#dg').datagrid()">Transform</a>
|
||||
</div>
|
||||
<table id="dg" style="width:700px;height:auto;border:1px solid #ccc;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid'">Item ID</th>
|
||||
<th data-options="field:'productid'">Product</th>
|
||||
<th data-options="field:'listprice',align:'right'">List Price</th>
|
||||
<th data-options="field:'attr1'">Attribute</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>EST-1</td><td>FI-SW-01</td><td>36.50</td><td>Large</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EST-10</td><td>K9-DL-01</td><td>18.50</td><td>Spotted Adult Female</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EST-11</td><td>RP-SN-01</td><td>28.50</td><td>Venomless</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EST-12</td><td>RP-SN-01</td><td>26.50</td><td>Rattleless</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EST-13</td><td>RP-LI-02</td><td>35.50</td><td>Green Adult</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
69
WebSite/easyui-1.4.2/demo/datalist/basic.html
Normal file
69
WebSite/easyui-1.4.2/demo/datalist/basic.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic DataList - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic DataList</h2>
|
||||
<p>The DataList can be created from the <ul> element.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<ul class="easyui-datalist" title="Basic DataList" lines="true" style="width:400px;height:250px">
|
||||
<li value="AL">Alabama</li>
|
||||
<li value="AK">Alaska</li>
|
||||
<li value="AZ">Arizona</li>
|
||||
<li value="AR">Arkansas</li>
|
||||
<li value="CA">California</li>
|
||||
<li value="CO">Colorado</li>
|
||||
<li value="CT">Connecticut</li>
|
||||
<li value="DE">Delaware</li>
|
||||
<li value="FL">Florida</li>
|
||||
<li value="GA">Georgia</li>
|
||||
<li value="HI">Hawaii</li>
|
||||
<li value="ID">Idaho</li>
|
||||
<li value="IL">Illinois</li>
|
||||
<li value="IN">Indiana</li>
|
||||
<li value="IA">Iowa</li>
|
||||
<li value="KS">Kansas</li>
|
||||
<li value="KY">Kentucky</li>
|
||||
<li value="LA">Louisiana</li>
|
||||
<li value="ME">Maine</li>
|
||||
<li value="MD">Maryland</li>
|
||||
<li value="MA">Massachusetts</li>
|
||||
<li value="MI">Michigan</li>
|
||||
<li value="MN">Minnesota</li>
|
||||
<li value="MS">Mississippi</li>
|
||||
<li value="MO">Missouri</li>
|
||||
<li value="MT">Montana</li>
|
||||
<li value="NE">Nebraska</li>
|
||||
<li value="NV">Nevada</li>
|
||||
<li value="NH">New Hampshire</li>
|
||||
<li value="NJ">New Jersey</li>
|
||||
<li value="NM">New Mexico</li>
|
||||
<li value="NY">New York</li>
|
||||
<li value="NC">North Carolina</li>
|
||||
<li value="ND">North Dakota</li>
|
||||
<li value="OH">Ohio</li>
|
||||
<li value="OK">Oklahoma</li>
|
||||
<li value="OR">Oregon</li>
|
||||
<li value="PA">Pennsylvania</li>
|
||||
<li value="RI">Rhode Island</li>
|
||||
<li value="SC">South Carolina</li>
|
||||
<li value="SD">South Dakota</li>
|
||||
<li value="TN">Tennessee</li>
|
||||
<li value="TX">Texas</li>
|
||||
<li value="UT">Utah</li>
|
||||
<li value="VT">Vermont</li>
|
||||
<li value="VA">Virginia</li>
|
||||
<li value="WA">Washington</li>
|
||||
<li value="WV">West Virginia</li>
|
||||
<li value="WI">Wisconsin</li>
|
||||
<li value="WY">Wyoming</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
25
WebSite/easyui-1.4.2/demo/datalist/checkbox.html
Normal file
25
WebSite/easyui-1.4.2/demo/datalist/checkbox.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Checkbox in DataList - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Checkbox in DataList</h2>
|
||||
<p>Each item in the DataList has a checkbox.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<div class="easyui-datalist" title="Checkbox in DataList" style="width:400px;height:250px" data-options="
|
||||
url: 'datalist_data1.json',
|
||||
method: 'get',
|
||||
checkbox: true,
|
||||
selectOnCheck: false,
|
||||
onBeforeSelect: function(){return false;}
|
||||
">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
18
WebSite/easyui-1.4.2/demo/datalist/datalist_data1.json
Normal file
18
WebSite/easyui-1.4.2/demo/datalist/datalist_data1.json
Normal file
@@ -0,0 +1,18 @@
|
||||
[
|
||||
{"text":"Epson WorkForce 845","group":"Printer"},
|
||||
{"text":"Canon PIXMA MG5320","group":"Printer"},
|
||||
{"text":"HP Deskjet 1000 Printer","group":"Printer"},
|
||||
{"text":"Cisco RV110W-A-NA-K9","group":"Firewall"},
|
||||
{"text":"ZyXEL ZyWALL USG50","group":"Firewall"},
|
||||
{"text":"NETGEAR FVS318","group":"Firewall"},
|
||||
{"text":"Logitech Keyboard K120","group":"Keyboard"},
|
||||
{"text":"Microsoft Natural Ergonomic Keyboard 4000","group":"Keyboard"},
|
||||
{"text":"Logitech Wireless Touch Keyboard K400","group":"Keyboard"},
|
||||
{"text":"Logitech Gaming Keyboard G110","group":"Keyboard"},
|
||||
{"text":"Nikon COOLPIX L26 16.1 MP","group":"Camera"},
|
||||
{"text":"Canon PowerShot A1300","group":"Camera"},
|
||||
{"text":"Canon PowerShot A2300","group":"Camera"}
|
||||
|
||||
|
||||
|
||||
]
|
||||
23
WebSite/easyui-1.4.2/demo/datalist/group.html
Normal file
23
WebSite/easyui-1.4.2/demo/datalist/group.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Group DataList - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Group DataList</h2>
|
||||
<p>This example shows how to display items in groups.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<div class="easyui-datalist" title="Group DataList" style="width:400px;height:250px" data-options="
|
||||
url: 'datalist_data1.json',
|
||||
method: 'get',
|
||||
groupField: 'group'
|
||||
">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
23
WebSite/easyui-1.4.2/demo/datalist/multiselect.html
Normal file
23
WebSite/easyui-1.4.2/demo/datalist/multiselect.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Multiple Selection DataList - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Multiple Selection DataList</h2>
|
||||
<p>The multiple selection allows the user to select multiple items in a datalist.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<div class="easyui-datalist" title="Multiple Selection DataList" style="width:400px;height:250px" data-options="
|
||||
url: 'datalist_data1.json',
|
||||
method: 'get',
|
||||
singleSelect: false
|
||||
">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
22
WebSite/easyui-1.4.2/demo/datalist/remotedata.html
Normal file
22
WebSite/easyui-1.4.2/demo/datalist/remotedata.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Binding to Remote Data - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Binding to Remote Data</h2>
|
||||
<p>The DataList is bound to a remote data.</p>
|
||||
<div style="margin:20px 0"></div>
|
||||
<div class="easyui-datalist" title="Remote Data" style="width:400px;height:250px" data-options="
|
||||
url: 'datalist_data1.json',
|
||||
method: 'get'
|
||||
">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
18
WebSite/easyui-1.4.2/demo/datebox/basic.html
Normal file
18
WebSite/easyui-1.4.2/demo/datebox/basic.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic DateBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic DateBox</h2>
|
||||
<p>Click the calendar image on the right side.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<input class="easyui-datebox"></input>
|
||||
</body>
|
||||
</html>
|
||||
28
WebSite/easyui-1.4.2/demo/datebox/buttons.html
Normal file
28
WebSite/easyui-1.4.2/demo/datebox/buttons.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>DateBox Buttons - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>DateBox Buttons</h2>
|
||||
<p>This example shows how to customize the datebox buttons underneath the calendar.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<input class="easyui-datebox"></input>
|
||||
<input class="easyui-datebox" data-options="buttons:buttons"></input>
|
||||
<script>
|
||||
var buttons = $.extend([], $.fn.datebox.defaults.buttons);
|
||||
buttons.splice(1, 0, {
|
||||
text: 'MyBtn',
|
||||
handler: function(target){
|
||||
alert('click MyBtn');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
27
WebSite/easyui-1.4.2/demo/datebox/clone.html
Normal file
27
WebSite/easyui-1.4.2/demo/datebox/clone.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Clone DateBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Clone DateBox</h2>
|
||||
<p>Click the 'Clone' button to clone datebox components from the exiting datebox.</p>
|
||||
<div style="margin:20px 0;">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="cloneDatebox()">Clone</a>
|
||||
</div>
|
||||
<input id="dt" class="easyui-datebox"></input>
|
||||
<div id="cc" style="margin-top:10px"></div>
|
||||
<script type="text/javascript">
|
||||
function cloneDatebox(){
|
||||
var dt = $('<input>').appendTo('#cc');
|
||||
dt.datebox('cloneFrom', '#dt');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
39
WebSite/easyui-1.4.2/demo/datebox/dateformat.html
Normal file
39
WebSite/easyui-1.4.2/demo/datebox/dateformat.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Date Format - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Date Format</h2>
|
||||
<p>Different date formats are applied to different DateBox components.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<input class="easyui-datebox"></input>
|
||||
<input class="easyui-datebox" data-options="formatter:myformatter,parser:myparser"></input>
|
||||
<script type="text/javascript">
|
||||
function myformatter(date){
|
||||
var y = date.getFullYear();
|
||||
var m = date.getMonth()+1;
|
||||
var d = date.getDate();
|
||||
return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d);
|
||||
}
|
||||
function myparser(s){
|
||||
if (!s) return new Date();
|
||||
var ss = (s.split('-'));
|
||||
var y = parseInt(ss[0],10);
|
||||
var m = parseInt(ss[1],10);
|
||||
var d = parseInt(ss[2],10);
|
||||
if (!isNaN(y) && !isNaN(m) && !isNaN(d)){
|
||||
return new Date(y,m-1,d);
|
||||
} else {
|
||||
return new Date();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
27
WebSite/easyui-1.4.2/demo/datebox/events.html
Normal file
27
WebSite/easyui-1.4.2/demo/datebox/events.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>DateBox Events - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>DateBox Events</h2>
|
||||
<p>Click the calendar image on the right side.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<input class="easyui-datebox" data-options="onSelect:onSelect"></input>
|
||||
<div style="margin:10px 0">
|
||||
<span>Selected Date: </span>
|
||||
<span id="result"></span>
|
||||
</div>
|
||||
<script>
|
||||
function onSelect(date){
|
||||
$('#result').text(date)
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
21
WebSite/easyui-1.4.2/demo/datebox/fluid.html
Normal file
21
WebSite/easyui-1.4.2/demo/datebox/fluid.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fluid DateBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Fluid DateBox</h2>
|
||||
<p>This example shows how to set the width of DateBox to a percentage of its parent container.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<p>width: 50%</p>
|
||||
<input class="easyui-datebox" style="width:50%"></input>
|
||||
<p>width: 30%</p>
|
||||
<input class="easyui-datebox" style="width:30%"></input>
|
||||
</body>
|
||||
</html>
|
||||
30
WebSite/easyui-1.4.2/demo/datebox/restrict.html
Normal file
30
WebSite/easyui-1.4.2/demo/datebox/restrict.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Restrict Date Range in DateBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Restrict Date Range in DateBox</h2>
|
||||
<p>This example shows how to restrict the user to select only ten days from now.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<input id="dd"></input>
|
||||
<script>
|
||||
$(function(){
|
||||
$('#dd').datebox().datebox('calendar').calendar({
|
||||
validator: function(date){
|
||||
var now = new Date();
|
||||
var d1 = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
||||
var d2 = new Date(now.getFullYear(), now.getMonth(), now.getDate()+10);
|
||||
return d1<=date && date<=d2;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
30
WebSite/easyui-1.4.2/demo/datebox/sharedcalendar.html
Normal file
30
WebSite/easyui-1.4.2/demo/datebox/sharedcalendar.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Shared Calendar in DateBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Shared Calendar in DateBox</h2>
|
||||
<p>Multiple datebox components can share a calendar and use it to pick dates.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Start Date:</td>
|
||||
<td>
|
||||
<input class="easyui-datebox" data-options="sharedCalendar:'#cc'">
|
||||
</td>
|
||||
<td>End Date:</td>
|
||||
<td>
|
||||
<input class="easyui-datebox" data-options="sharedCalendar:'#cc'">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="cc" class="easyui-calendar"></div>
|
||||
</body>
|
||||
</html>
|
||||
30
WebSite/easyui-1.4.2/demo/datebox/validate.html
Normal file
30
WebSite/easyui-1.4.2/demo/datebox/validate.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Validate DateBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Validate DateBox</h2>
|
||||
<p>When the selected date is greater than specified date. The field validator will raise an error.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<input class="easyui-datebox" required data-options="validType:'md[\'10/11/2012\']'"></input>
|
||||
<script>
|
||||
$.extend($.fn.validatebox.defaults.rules, {
|
||||
md: {
|
||||
validator: function(value, param){
|
||||
var d1 = $.fn.datebox.defaults.parser(param[0]);
|
||||
var d2 = $.fn.datebox.defaults.parser(value);
|
||||
return d2<=d1;
|
||||
},
|
||||
message: 'The date must be less than or equals to {0}.'
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
18
WebSite/easyui-1.4.2/demo/datetimebox/basic.html
Normal file
18
WebSite/easyui-1.4.2/demo/datetimebox/basic.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic DateTimeBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic DateTimeBox</h2>
|
||||
<p>Click the calendar image on the right side.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<input class="easyui-datetimebox" required style="width:200px">
|
||||
</body>
|
||||
</html>
|
||||
21
WebSite/easyui-1.4.2/demo/datetimebox/fluid.html
Normal file
21
WebSite/easyui-1.4.2/demo/datetimebox/fluid.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fluid DateTimeBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Fluid DateTimeBox</h2>
|
||||
<p>This example shows how to set the width of DateTimeBox to a percentage of its parent container.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<p>width: 50%</p>
|
||||
<input class="easyui-datetimebox" style="width:50%">
|
||||
<p>width: 30%</p>
|
||||
<input class="easyui-datetimebox" style="width:30%">
|
||||
</body>
|
||||
</html>
|
||||
19
WebSite/easyui-1.4.2/demo/datetimebox/initvalue.html
Normal file
19
WebSite/easyui-1.4.2/demo/datetimebox/initvalue.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Initialize Value for DateTime - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Initialize Value for DateTime</h2>
|
||||
<p>The value is initialized when DateTimeBox has been created.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<input class="easyui-datetimebox" value="10/11/2012 2:3:56" style="width:200px">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
22
WebSite/easyui-1.4.2/demo/datetimebox/showseconds.html
Normal file
22
WebSite/easyui-1.4.2/demo/datetimebox/showseconds.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Display Seconds - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Display Seconds</h2>
|
||||
<p>The user can decide to display seconds part or not.</p>
|
||||
<div style="margin:20px 0;">
|
||||
<span>Show Seconds: </span>
|
||||
<input type="checkbox" checked onchange="$('#dt').datetimebox({showSeconds:$(this).is(':checked')})">
|
||||
</div>
|
||||
<input id="dt" class="easyui-datetimebox" style="width:200px">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
18
WebSite/easyui-1.4.2/demo/datetimespinner/basic.html
Normal file
18
WebSite/easyui-1.4.2/demo/datetimespinner/basic.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic DateTimeSpinner - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic DateTimeSpinner</h2>
|
||||
<p>Click spin button to adjust date and time.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<input class="easyui-datetimespinner" value="6/24/2014 17:23" style="width:180px;">
|
||||
</body>
|
||||
</html>
|
||||
28
WebSite/easyui-1.4.2/demo/datetimespinner/clearicon.html
Normal file
28
WebSite/easyui-1.4.2/demo/datetimespinner/clearicon.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>DateTimeSpinner with Clear Icon - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>DateTimeSpinner with Clear Icon</h2>
|
||||
<p>A clear icon can be attached to the datetimespinner. Click it to clear the entered value.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<input class="easyui-datetimespinner" style="width:180px;" data-options="
|
||||
value: '6/24/2014 17:23:56',
|
||||
showSeconds: true,
|
||||
prompt: 'Input date time here!',
|
||||
icons:[{
|
||||
iconCls:'icon-clear',
|
||||
handler: function(e){
|
||||
$(e.data.target).datetimespinner('clear');
|
||||
}
|
||||
}]
|
||||
">
|
||||
</body>
|
||||
</html>
|
||||
21
WebSite/easyui-1.4.2/demo/datetimespinner/fluid.html
Normal file
21
WebSite/easyui-1.4.2/demo/datetimespinner/fluid.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fluid DateTimeSpinner - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Fluid DateTimeSpinner</h2>
|
||||
<p>The width of datetimespinner is set in percentages.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<p>width: 50%</p>
|
||||
<input class="easyui-datetimespinner" value="6/24/2014 17:23" style="width:50%;">
|
||||
<p>width: 30%</p>
|
||||
<input class="easyui-datetimespinner" value="6/25/2014 17:23" style="width:30%;">
|
||||
</body>
|
||||
</html>
|
||||
50
WebSite/easyui-1.4.2/demo/datetimespinner/format.html
Normal file
50
WebSite/easyui-1.4.2/demo/datetimespinner/format.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Format DateTimeSpinner - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Format DateTimeSpinner</h2>
|
||||
<p>The DataTimeSpinner value can be formatted by specifying the 'formatter' and 'parser' functions.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<p>mm/dd/yyyy hh:mm</p>
|
||||
<input class="easyui-datetimespinner" value="6/24/2014 17:23" style="width:180px;">
|
||||
<p>mm/dd/yyyy</p>
|
||||
<input class="easyui-datetimespinner" value="6/24/2014" data-options="formatter:formatter1,parser:parser1" style="width:180px;">
|
||||
<p>yyyy-mm</p>
|
||||
<input class="easyui-datetimespinner" value="6/24/2014" data-options="formatter:formatter2,parser:parser2,selections:[[0,4],[5,7]]" style="width:180px;">
|
||||
<script type="text/javascript">
|
||||
function formatter1(date){
|
||||
if (!date){return '';}
|
||||
return $.fn.datebox.defaults.formatter.call(this, date);
|
||||
}
|
||||
function parser1(s){
|
||||
if (!s){return null;}
|
||||
return $.fn.datebox.defaults.parser.call(this, s);
|
||||
}
|
||||
function formatter2(date){
|
||||
if (!date){return '';}
|
||||
var y = date.getFullYear();
|
||||
var m = date.getMonth() + 1;
|
||||
return y + '-' + (m<10?('0'+m):m);
|
||||
}
|
||||
function parser2(s){
|
||||
if (!s){return null;}
|
||||
var ss = s.split('-');
|
||||
var y = parseInt(ss[0],10);
|
||||
var m = parseInt(ss[1],10);
|
||||
if (!isNaN(y) && !isNaN(m)){
|
||||
return new Date(y,m-1,1);
|
||||
} else {
|
||||
return new Date();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
21
WebSite/easyui-1.4.2/demo/demo.css
Normal file
21
WebSite/easyui-1.4.2/demo/demo.css
Normal file
@@ -0,0 +1,21 @@
|
||||
*{
|
||||
font-size:12px;
|
||||
}
|
||||
body {
|
||||
font-family:verdana,helvetica,arial,sans-serif;
|
||||
padding:20px;
|
||||
font-size:12px;
|
||||
margin:0;
|
||||
}
|
||||
h2 {
|
||||
font-size:18px;
|
||||
font-weight:bold;
|
||||
margin:0;
|
||||
margin-bottom:15px;
|
||||
}
|
||||
.demo-info{
|
||||
padding:0 0 12px 0;
|
||||
}
|
||||
.demo-tip{
|
||||
display:none;
|
||||
}
|
||||
23
WebSite/easyui-1.4.2/demo/dialog/basic.html
Normal file
23
WebSite/easyui-1.4.2/demo/dialog/basic.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic Dialog - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic Dialog</h2>
|
||||
<p>Click below button to open or close dialog.</p>
|
||||
<div style="margin:20px 0;">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#dlg').dialog('open')">Open</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#dlg').dialog('close')">Close</a>
|
||||
</div>
|
||||
<div id="dlg" class="easyui-dialog" title="Basic Dialog" data-options="iconCls:'icon-save'" style="width:400px;height:200px;padding:10px">
|
||||
The dialog content.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
46
WebSite/easyui-1.4.2/demo/dialog/complextoolbar.html
Normal file
46
WebSite/easyui-1.4.2/demo/dialog/complextoolbar.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Complex Toolbar on Dialog - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Complex Toolbar on Dialog</h2>
|
||||
<p>This sample shows how to create complex toolbar on dialog.</p>
|
||||
<div style="margin:20px 0;">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#dlg').dialog('open')">Open</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#dlg').dialog('close')">Close</a>
|
||||
</div>
|
||||
<div id="dlg" class="easyui-dialog" title="Complex Toolbar on Dialog" style="width:400px;height:200px;padding:10px"
|
||||
data-options="
|
||||
iconCls: 'icon-save',
|
||||
toolbar: '#dlg-toolbar',
|
||||
buttons: '#dlg-buttons'
|
||||
">
|
||||
The dialog content.
|
||||
</div>
|
||||
<div id="dlg-toolbar" style="padding:2px 0">
|
||||
<table cellpadding="0" cellspacing="0" style="width:100%">
|
||||
<tr>
|
||||
<td style="padding-left:2px">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true">Edit</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-help',plain:true">Help</a>
|
||||
</td>
|
||||
<td style="text-align:right;padding-right:2px">
|
||||
<input class="easyui-searchbox" data-options="prompt:'Please input somthing'" style="width:150px"></input>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="javascript:alert('save')">Save</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="javascript:$('#dlg').dialog('close')">Close</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
24
WebSite/easyui-1.4.2/demo/dialog/fluid.html
Normal file
24
WebSite/easyui-1.4.2/demo/dialog/fluid.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fluid Dialog - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Fluid Dialog</h2>
|
||||
<p>This example shows how to set the width of Dialog to a percentage of its parent container.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<div class="easyui-dialog" title="Fluid Dialog" style="width:80%;height:200px;max-width:800px;padding:10px" data-options="
|
||||
iconCls:'icon-save',
|
||||
onResize:function(){
|
||||
$(this).dialog('center');
|
||||
}">
|
||||
<p>width: 80%; height: 200px</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
52
WebSite/easyui-1.4.2/demo/dialog/toolbarbuttons.html
Normal file
52
WebSite/easyui-1.4.2/demo/dialog/toolbarbuttons.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Toolbar and Buttons - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Toolbar and Buttons</h2>
|
||||
<p>The toolbar and buttons can be added to dialog.</p>
|
||||
<div style="margin:20px 0;">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#dlg').dialog('open')">Open</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#dlg').dialog('close')">Close</a>
|
||||
</div>
|
||||
<div id="dlg" class="easyui-dialog" title="Toolbar and Buttons" style="width:400px;height:200px;padding:10px"
|
||||
data-options="
|
||||
iconCls: 'icon-save',
|
||||
toolbar: [{
|
||||
text:'Add',
|
||||
iconCls:'icon-add',
|
||||
handler:function(){
|
||||
alert('add')
|
||||
}
|
||||
},'-',{
|
||||
text:'Save',
|
||||
iconCls:'icon-save',
|
||||
handler:function(){
|
||||
alert('save')
|
||||
}
|
||||
}],
|
||||
buttons: [{
|
||||
text:'Ok',
|
||||
iconCls:'icon-ok',
|
||||
handler:function(){
|
||||
alert('ok');
|
||||
}
|
||||
},{
|
||||
text:'Cancel',
|
||||
handler:function(){
|
||||
alert('cancel');;
|
||||
}
|
||||
}]
|
||||
">
|
||||
The dialog content.
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
21
WebSite/easyui-1.4.2/demo/draggable/basic.html
Normal file
21
WebSite/easyui-1.4.2/demo/draggable/basic.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic Draggable - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic Draggable</h2>
|
||||
<p>Move the boxes below by clicking on it with mouse.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<div class="easyui-draggable" style="width:200px;height:150px;background:#fafafa;border:1px solid #ccc"></div>
|
||||
<div class="easyui-draggable" data-options="handle:'#title'" style="width:200px;height:150px;background:#fafafa;border:1px solid #ccc;margin-top:10px">
|
||||
<div id="title" style="padding:5px;background:#ccc;color:#fff">Title</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
35
WebSite/easyui-1.4.2/demo/draggable/constrain.html
Normal file
35
WebSite/easyui-1.4.2/demo/draggable/constrain.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Constrain Draggable - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Constrain Draggable</h2>
|
||||
<p>The draggable object can only be moved within its parent container.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<div class="easyui-panel" style="position:relative;overflow:hidden;width:500px;height:300px">
|
||||
<div class="easyui-draggable" data-options="onDrag:onDrag" style="width:100px;height:100px;background:#fafafa;border:1px solid #ccc;">
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function onDrag(e){
|
||||
var d = e.data;
|
||||
if (d.left < 0){d.left = 0}
|
||||
if (d.top < 0){d.top = 0}
|
||||
if (d.left + $(d.target).outerWidth() > $(d.parent).width()){
|
||||
d.left = $(d.parent).width() - $(d.target).outerWidth();
|
||||
}
|
||||
if (d.top + $(d.target).outerHeight() > $(d.parent).height()){
|
||||
d.top = $(d.parent).height() - $(d.target).outerHeight();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user