Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
solr-frontend
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
3da2cabc
authored
2016-06-23 18:03:34 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Extract pagination values from the query string.
1 parent
22582bd1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
src/scripts/solr/model/Solr.js
src/scripts/solr/model/Solr.js
View file @
3da2cab
...
...
@@ -59,6 +59,7 @@ define(function(require) {
if
(
parts
)
{
var
formNameMap
=
this
.
get
(
'formNameMap'
);
var
pagination
=
{};
var
keyValueParts
=
parts
[
1
].
split
(
'&'
);
_
.
each
(
keyValueParts
,
function
(
keyValuePart
,
i
)
{
var
keyFieldValue
=
keyValuePart
.
match
(
/^
([^
.
]
+
)(?:\.([^
.
]
+
))?
=
(
.*
)
$/
);
...
...
@@ -90,9 +91,14 @@ define(function(require) {
item
.
set
(
'checked'
,
true
,
skipOptions
);
}
}
}
else
if
(
key
===
'p'
)
{
pagination
[
'currentPage'
]
=
parseInt
(
value
);
}
else
if
(
key
===
'sz'
)
{
pagination
[
'pageSize'
]
=
parseInt
(
value
);
}
}
},
this
);
this
.
set
(
pagination
,
skipOptions
);
}
},
initialize
:
function
(
data
,
options
)
{
...
...
Please
register
or
sign in
to post a comment