Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
f1bf8594
Commit
f1bf8594
authored
Mar 02, 2014
by
Antonio Ramirez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add multiple grid support to gridData
parent
2b482e44
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
yii.gridView.js
framework/assets/yii.gridView.js
+6
-6
No files found.
framework/assets/yii.gridView.js
View file @
f1bf8594
...
...
@@ -33,7 +33,7 @@
return
this
.
each
(
function
()
{
var
$e
=
$
(
this
);
var
settings
=
$
.
extend
({},
defaults
,
options
||
{});
gridData
.
settings
=
settings
;
gridData
[
$e
.
prop
(
'id'
)]
=
{
settings
:
settings
}
;
var
enterPressed
=
false
;
$
(
document
).
on
(
'change.yiiGridView keydown.yiiGridView'
,
settings
.
filterSelector
,
function
(
event
)
{
...
...
@@ -60,7 +60,7 @@
applyFilter
:
function
()
{
var
$grid
=
$
(
this
);
var
settings
=
gridData
.
settings
;
var
settings
=
gridData
[
$grid
.
prop
(
'id'
)]
.
settings
;
var
data
=
{};
$
.
each
(
$
(
settings
.
filterSelector
).
serializeArray
(),
function
()
{
data
[
this
.
name
]
=
this
.
value
;
...
...
@@ -86,12 +86,12 @@
setSelectionColumn
:
function
(
options
)
{
var
$grid
=
$
(
this
);
var
id
=
$
(
this
).
prop
(
'id'
);
gridData
.
selectionColumn
=
options
.
name
;
gridData
[
id
]
.
selectionColumn
=
options
.
name
;
if
(
!
options
.
multiple
)
{
return
;
}
var
inputs
=
"#"
+
id
+
" input[name='"
+
options
.
checkAll
+
"']"
;
$
(
document
).
off
(
'click.yiiGridView'
,
inputs
).
on
(
'click.yiiGridView'
,
inputs
,
function
()
{
$
(
document
).
off
(
'click.yiiGridView'
,
inputs
).
on
(
'click.yiiGridView'
,
inputs
,
function
()
{
$grid
.
find
(
"input[name='"
+
options
.
name
+
"']:enabled"
).
prop
(
'checked'
,
this
.
checked
);
});
$
(
document
).
off
(
'click.yiiGridView'
,
inputs
+
":enabled"
).
on
(
'click.yiiGridView'
,
inputs
+
":enabled"
,
function
()
{
...
...
@@ -102,7 +102,7 @@
getSelectedRows
:
function
()
{
var
$grid
=
$
(
this
);
var
data
=
$grid
.
data
(
'yiiGridView'
)
;
var
data
=
gridData
[
$grid
.
prop
(
'id'
)]
;
var
keys
=
[];
if
(
data
.
selectionColumn
)
{
$grid
.
find
(
"input[name='"
+
data
.
selectionColumn
+
"']:checked"
).
each
(
function
()
{
...
...
@@ -119,7 +119,7 @@
});
},
data
:
function
()
{
data
:
function
()
{
return
this
.
data
(
'yiiGridView'
);
}
};
...
...
Write
Preview
Markdown
is supported
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