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
09946158
Commit
09946158
authored
Feb 05, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed duplicated query parameters.
parent
13b7c8e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
yii.gridView.js
framework/assets/yii.gridView.js
+14
-8
No files found.
framework/assets/yii.gridView.js
View file @
09946158
...
...
@@ -61,17 +61,23 @@
applyFilter
:
function
()
{
var
$grid
=
$
(
this
);
var
settings
=
$grid
.
data
(
'yiiGridView'
).
settings
;
var
data
=
$
(
settings
.
filterSelector
).
serialize
();
var
url
=
settings
.
filterUrl
;
if
(
url
.
indexOf
(
'?'
)
>=
0
)
{
url
+=
'&'
+
data
;
}
else
{
url
+=
'?'
+
data
;
}
var
data
=
{};
$
.
each
(
$
(
settings
.
filterSelector
).
serializeArray
(),
function
()
{
data
[
this
.
name
]
=
this
.
value
;
});
$
.
each
(
yii
.
getQueryParams
(
settings
.
filterUrl
),
function
(
name
,
value
)
{
if
(
data
[
name
]
===
undefined
)
{
data
[
name
]
=
value
;
}
});
var
pos
=
settings
.
filterUrl
.
indexOf
(
'?'
);
var
url
=
pos
<
0
?
settings
.
filterUrl
:
settings
.
filterUrl
.
substring
(
0
,
pos
);
$grid
.
find
(
'form.gridview-filter-form'
).
remove
();
var
$form
=
$
(
'<form action="'
+
url
+
'" method="get" class="gridview-filter-form" style="display:none" data-pjax></form>'
).
appendTo
(
$grid
);
$
.
each
(
yii
.
getQueryParams
(
url
)
,
function
(
name
,
value
)
{
$
.
each
(
data
,
function
(
name
,
value
)
{
$form
.
append
(
$
(
'<input type="hidden" name="t" value="" />'
).
attr
(
'name'
,
name
).
val
(
value
));
});
$form
.
submit
();
...
...
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