Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
ab2872c1
Commit
ab2872c1
authored
Feb 15, 2020
by
季圣华
Browse files
升级easyUI到1.9.4版本
parent
0527b980
Changes
540
Show whitespace changes
Inline
Side-by-side
Too many changes to show.
To preserve performance only
20 of 540+
files are displayed.
Plain diff
Email patch
erp_web/js/easyui
-1.3.5
/demo/combotree/tree_data1.json
→
erp_web/js/easyui/demo/combotree/tree_data1.json
View file @
ab2872c1
File moved
erp_web/js/easyui/demo/combotreegrid/basic.html
0 → 100644
View file @
ab2872c1
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<title>
Basic ComboTreeGrid - 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 ComboTreeGrid
</h2>
<p>
Click the right arrow button to show the TreeGrid.
</p>
<div
style=
"margin:20px 0"
></div>
<div
class=
"easyui-panel"
style=
"width:100%;max-width:400px;padding:30px 60px;"
>
<div
style=
"margin-bottom:20px"
>
<input
class=
"easyui-combotreegrid"
data-options=
"
width:'100%',
panelWidth:500,
label:'Select Item:',
labelPosition:'top',
url:'treegrid_data1.json',
idField:'id',
treeField:'name',
columns:[[
{field:'name',title:'Name',width:200},
{field:'size',title:'Size',width:100},
{field:'date',title:'Date',width:100}
]]"
>
</div>
</div>
</body>
</html>
\ No newline at end of file
erp_web/js/easyui/demo/combotreegrid/multiple.html
0 → 100644
View file @
ab2872c1
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<title>
Multiple ComboTreeGrid - 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 ComboTreeGrid
</h2>
<p>
Click the right arrow button to show the TreeGrid and select items.
</p>
<div
style=
"margin:20px 0"
></div>
<div
class=
"easyui-panel"
style=
"width:100%;max-width:400px;padding:30px 60px;"
>
<div
style=
"margin-bottom:20px"
>
<input
class=
"easyui-combotreegrid"
data-options=
"
width:'100%',
panelWidth:500,
label:'Select Items:',
labelPosition:'top',
url:'treegrid_data1.json',
idField:'id',
treeField:'name',
multiple:true,
value:['211','31'],
columns:[[
{field:'name',title:'Name',width:200},
{field:'size',title:'Size',width:100},
{field:'date',title:'Date',width:100}
]]"
>
</div>
</div>
</body>
</html>
\ No newline at end of file
erp_web/js/easyui
-1.3.5
/demo/treegrid/treegrid_data1.json
→
erp_web/js/easyui/demo/
combo
treegrid/treegrid_data1.json
View file @
ab2872c1
File moved
erp_web/js/easyui
-1.3.5
/demo/datagrid/aligncolumns.html
→
erp_web/js/easyui/demo/datagrid/aligncolumns.html
View file @
ab2872c1
...
...
@@ -11,11 +11,8 @@
</head>
<body>
<h2>
Aligning Columns in DataGrid
</h2>
<div
class=
"demo-info"
>
<div
class=
"demo-tip icon-tip"
></div>
<div>
Use align and halign properties to set the alignment of the columns and their header.
</div>
</div>
<div
style=
"margin:10px 0;"
></div>
<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'"
>
...
...
erp_web/js/easyui
-1.3.5
/demo/datagrid/basic.html
→
erp_web/js/easyui/demo/datagrid/basic.html
View file @
ab2872c1
...
...
@@ -11,11 +11,8 @@
</head>
<body>
<h2>
Basic DataGrid
</h2>
<div
class=
"demo-info"
>
<div
class=
"demo-tip icon-tip"
></div>
<div>
The DataGrid is created from markup, no JavaScript code needed.
</div>
</div>
<div
style=
"margin:10px 0;"
></div>
<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'"
>
...
...
erp_web/js/easyui/demo/datagrid/cacheeditor.html
0 → 100644
View file @
ab2872c1
<!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:2}}"
>
List Price
</th>
<th
data-options=
"field:'unitcost',width:80,align:'right',editor:{type:'numberbox',options:{precision:2}}"
>
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>
\ No newline at end of file
erp_web/js/easyui
-1.3.5
/demo/datagrid/cellediting.html
→
erp_web/js/easyui/demo/datagrid/cellediting.html
View file @
ab2872c1
...
...
@@ -11,26 +11,22 @@
</head>
<body>
<h2>
Cell Editing in DataGrid
</h2>
<div
class=
"demo-info"
>
<div
class=
"demo-tip icon-tip"
></div>
<div>
Click a cell to start editing.
</div>
</div>
<div
style=
"margin:10px 0;"
></div>
<p>
Click a cell to start editing.
</p>
<div
style=
"margin:20px 0;"
></div>
<table
id=
"dg"
class=
"easyui-datagrid"
title=
"Cell Editing in DataGrid"
style=
"width:700px;height:auto"
<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',
onClickCell: onClickCell
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:'listprice',width:80,align:'right',editor:{type:'numberbox',options:{precision:
2
}}"
>
List Price
</th>
<th
data-options=
"field:'unitcost',width:80,align:'right',editor:
{type:
'numberbox'
,options:{precision:2}}
"
>
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>
...
...
@@ -51,32 +47,48 @@
}
}
$
(
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
;
}
});
}
});
var
editIndex
=
undefined
;
function
endEditing
(){
if
(
editIndex
==
undefined
){
return
true
}
if
(
$
(
'
#dg
'
).
datagrid
(
'
validateRow
'
,
editIndex
)){
$
(
'
#dg
'
).
datagrid
(
'
endEdit
'
,
editIndex
);
editIndex
=
undefined
;
return
true
;
},
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
false
;
return
;
}
}
function
onClickCell
(
index
,
field
){
if
(
endEditing
()){
$
(
'
#dg
'
).
datagrid
(
'
selectRow
'
,
index
)
.
datagrid
(
'
editCell
'
,
{
index
:
index
,
field
:
field
});
editIndex
=
index
;
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>
\ No newline at end of file
erp_web/js/easyui
-1.3.5
/demo/datagrid/cellstyle.html
→
erp_web/js/easyui/demo/datagrid/cellstyle.html
View file @
ab2872c1
...
...
@@ -11,11 +11,8 @@
</head>
<body>
<h2>
DataGrid Cell Style
</h2>
<div
class=
"demo-info"
>
<div
class=
"demo-tip icon-tip"
></div>
<div>
The cells which listprice value is less than 30 are highlighted.
</div>
</div>
<div
style=
"margin:10px 0;"
></div>
<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,
...
...
erp_web/js/easyui
-1.3.5
/demo/datagrid/checkbox.html
→
erp_web/js/easyui/demo/datagrid/checkbox.html
View file @
ab2872c1
...
...
@@ -11,11 +11,8 @@
</head>
<body>
<h2>
CheckBox Selection on DataGrid
</h2>
<div
class=
"demo-info"
>
<div
class=
"demo-tip icon-tip"
></div>
<div>
Click the checkbox on header to select or unselect all selections.
</div>
</div>
<div
style=
"margin:10px 0;"
></div>
<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'"
>
...
...
erp_web/js/easyui/demo/datagrid/clientpagination.html
0 → 100644
View file @
ab2872c1
<!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,
pageSize: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
target
=
this
;
var
dg
=
$
(
target
);
var
state
=
dg
.
data
(
'
datagrid
'
);
var
opts
=
dg
.
datagrid
(
'
options
'
);
if
(
!
state
.
allRows
){
state
.
allRows
=
(
data
.
rows
);
}
if
(
!
opts
.
remoteSort
&&
opts
.
sortName
){
var
names
=
opts
.
sortName
.
split
(
'
,
'
);
var
orders
=
opts
.
sortOrder
.
split
(
'
,
'
);
state
.
allRows
.
sort
(
function
(
r1
,
r2
){
var
r
=
0
;
for
(
var
i
=
0
;
i
<
names
.
length
;
i
++
){
var
sn
=
names
[
i
];
var
so
=
orders
[
i
];
var
col
=
$
(
target
).
datagrid
(
'
getColumnOption
'
,
sn
);
var
sortFunc
=
col
.
sorter
||
function
(
a
,
b
){
return
a
==
b
?
0
:
(
a
>
b
?
1
:
-
1
);
};
r
=
sortFunc
(
r1
[
sn
],
r2
[
sn
])
*
(
so
==
'
asc
'
?
1
:
-
1
);
if
(
r
!=
0
){
return
r
;
}
}
return
r
;
});
}
var
start
=
(
opts
.
pageNumber
-
1
)
*
parseInt
(
opts
.
pageSize
);
var
end
=
start
+
parseInt
(
opts
.
pageSize
);
data
.
rows
=
state
.
allRows
.
slice
(
start
,
end
);
return
data
;
}
var
loadDataMethod
=
$
.
fn
.
datagrid
.
methods
.
loadData
;
var
deleteRowMethod
=
$
.
fn
.
datagrid
.
methods
.
deleteRow
;
$
.
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
);
}
var
pager
=
dg
.
datagrid
(
'
getPager
'
);
pager
.
pagination
({
onSelectPage
:
function
(
pageNum
,
pageSize
){
opts
.
pageNumber
=
pageNum
;
opts
.
pageSize
=
pageSize
;
pager
.
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
);
},
deleteRow
:
function
(
jq
,
index
){
return
jq
.
each
(
function
(){
var
row
=
$
(
this
).
datagrid
(
'
getRows
'
)[
index
];
deleteRowMethod
.
call
(
$
.
fn
.
datagrid
.
methods
,
$
(
this
),
index
);
var
state
=
$
(
this
).
data
(
'
datagrid
'
);
if
(
state
.
options
.
loadFilter
==
pagerFilter
){
for
(
var
i
=
0
;
i
<
state
.
allRows
.
length
;
i
++
){
if
(
state
.
allRows
[
i
]
==
row
){
state
.
allRows
.
splice
(
i
,
1
);
break
;
}
}
$
(
this
).
datagrid
(
'
loadData
'
,
state
.
allRows
);
}
});
},
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>
\ No newline at end of file
erp_web/js/easyui
-1.3.5
/demo/datagrid/columngroup.html
→
erp_web/js/easyui/demo/datagrid/columngroup.html
View file @
ab2872c1
...
...
@@ -11,11 +11,8 @@
</head>
<body>
<h2>
Column Group
</h2>
<div
class=
"demo-info"
>
<div
class=
"demo-tip icon-tip"
></div>
<div>
The header cells can be merged. Useful to group columns under a category.
</div>
</div>
<div
style=
"margin:10px 0;"
></div>
<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>
...
...
erp_web/js/easyui
-1.3.5
/demo/datagrid/complextoolbar.html
→
erp_web/js/easyui/demo/datagrid/complextoolbar.html
View file @
ab2872c1
...
...
@@ -11,13 +11,10 @@
</head>
<body>
<h2>
DataGrid Complex Toolbar
</h2>
<div
class=
"demo-info"
>
<div
class=
"demo-tip icon-tip"
></div>
<div>
The DataGrid toolbar can be defined from a
<
div/
>
markup, so you can define the layout of toolbar easily.
</div>
</div>
<div
style=
"margin:10px 0;"
></div>
<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'"
>
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>
...
...
@@ -29,17 +26,9 @@
</tr>
</thead>
</table>
<div
id=
"tb"
style=
"padding:5px;height:auto"
>
<div
style=
"margin-bottom: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>
<div>
Date From:
<input
class=
"easyui-datebox"
style=
"width:80px"
>
To:
<input
class=
"easyui-datebox"
style=
"width:80px"
>
<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>
...
...
@@ -50,6 +39,12 @@
</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>
\ No newline at end of file
erp_web/js/easyui
-1.3.5
/demo/datagrid/contextmenu.html
→
erp_web/js/easyui/demo/datagrid/contextmenu.html
View file @
ab2872c1
...
...
@@ -11,13 +11,52 @@
</head>
<body>
<h2>
Context Menu on DataGrid
</h2>
<div
class=
"demo-info"
>
<div
class=
"demo-tip icon-tip"
></div>
<div>
Right click on the header of DataGrid to display context menu.
</div>
</div>
<div
style=
"margin:10px 0;"
></div>
<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
(
$
){
function
buildMenu
(
target
){
var
state
=
$
(
target
).
data
(
'
datagrid
'
);
if
(
!
state
.
columnMenu
){
state
.
columnMenu
=
$
(
'
<div></div>
'
).
appendTo
(
'
body
'
);
state
.
columnMenu
.
menu
({
onClick
:
function
(
item
){
if
(
item
.
iconCls
==
'
tree-checkbox1
'
){
$
(
target
).
datagrid
(
'
hideColumn
'
,
item
.
name
);
$
(
this
).
menu
(
'
setIcon
'
,
{
target
:
item
.
target
,
iconCls
:
'
tree-checkbox0
'
});
}
else
{
$
(
target
).
datagrid
(
'
showColumn
'
,
item
.
name
);
$
(
this
).
menu
(
'
setIcon
'
,
{
target
:
item
.
target
,
iconCls
:
'
tree-checkbox1
'
});
}
}
})
var
fields
=
$
(
target
).
datagrid
(
'
getColumnFields
'
,
true
).
concat
(
$
(
target
).
datagrid
(
'
getColumnFields
'
,
false
));
for
(
var
i
=
0
;
i
<
fields
.
length
;
i
++
){
var
field
=
fields
[
i
];
var
col
=
$
(
target
).
datagrid
(
'
getColumnOption
'
,
field
);
state
.
columnMenu
.
menu
(
'
appendItem
'
,
{
text
:
col
.
title
,
name
:
field
,
iconCls
:
'
tree-checkbox1
'
});
}
}
return
state
.
columnMenu
;
}
$
.
extend
(
$
.
fn
.
datagrid
.
methods
,
{
columnMenu
:
function
(
jq
){
return
buildMenu
(
jq
[
0
]);
}
});
})(
jQuery
);
$
(
function
(){
$
(
'
#dg
'
).
datagrid
({
url
:
'
datagrid_data1.json
'
,
...
...
@@ -38,47 +77,13 @@
]],
onHeaderContextMenu
:
function
(
e
,
field
){
e
.
preventDefault
();
if
(
!
cmenu
){
createColumnMenu
();
}
cmenu
.
menu
(
'
show
'
,
{
$
(
this
).
datagrid
(
'
columnMenu
'
).
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>
\ No newline at end of file
erp_web/js/easyui
-1.3.5
/demo/datagrid/custompager.html
→
erp_web/js/easyui/demo/datagrid/custompager.html
View file @
ab2872c1
...
...
@@ -11,11 +11,8 @@
</head>
<body>
<h2>
Custom DataGrid Pager
</h2>
<div
class=
"demo-info"
>
<div
class=
"demo-tip icon-tip"
></div>
<div>
You can append some buttons to the standard datagrid pager bar.
</div>
</div>
<div
style=
"margin:10px 0;"
></div>
<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>
...
...
erp_web/js/easyui/demo/datagrid/datagrid_data1.json
0 → 100644
View file @
ab2872c1
{
"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"
}
]}
erp_web/js/easyui
-1.3.5
/demo/datagrid/datagrid_data2.json
→
erp_web/js/easyui/demo/datagrid/datagrid_data2.json
View file @
ab2872c1
File moved
erp_web/js/easyui/demo/datagrid/fluid.html
0 → 100644
View file @
ab2872c1
<!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>
\ No newline at end of file
erp_web/js/easyui
-1.3.5
/demo/datagrid/footer.html
→
erp_web/js/easyui/demo/datagrid/footer.html
View file @
ab2872c1
...
...
@@ -11,11 +11,8 @@
</head>
<body>
<h2>
Footer Rows in DataGrid
</h2>
<div
class=
"demo-info"
>
<div
class=
"demo-tip icon-tip"
></div>
<div>
The summary informations can be displayed in footer rows.
</div>
</div>
<div
style=
"margin:10px 0;"
></div>
<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',
...
...
erp_web/js/easyui
-1.3.5
/demo/datagrid/formatcolumns.html
→
erp_web/js/easyui/demo/datagrid/formatcolumns.html
View file @
ab2872c1
...
...
@@ -11,11 +11,8 @@
</head>
<body>
<h2>
Format DataGrid Columns
</h2>
<div
class=
"demo-info"
>
<div
class=
"demo-tip icon-tip"
></div>
<div>
The list price value will show red color when less than 30.
</div>
</div>
<div
style=
"margin:10px 0;"
></div>
<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>
...
...
Prev
1
…
6
7
8
9
10
11
12
13
14
…
27
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment