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
100be003
authored
2016-11-07 17:09:13 -0600
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Breaking change; fix global singleton issue around Facets.
1 parent
5060c174
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
src/scripts/solr/model/Solr.js
src/scripts/solr/model/Solr.js
View file @
100be00
...
...
@@ -4,6 +4,7 @@ define(function(require) {
var
Backbone
=
require
(
'backbone'
);
var
Facets
=
require
(
'solr/model/Facets'
);
var
Facet
=
require
(
'solr/model/Facet'
);
var
Ordering
=
require
(
'solr/model/Ordering'
);
var
QueryTextField
=
require
(
'solr/model/QueryTextField'
);
var
Util
=
require
(
'solr/model/Util'
);
...
...
@@ -24,7 +25,11 @@ define(function(require) {
defaults
:
function
defaults
()
{
var
constructor
=
this
.
constructor
;
var
formNameMap
=
{};
var
facets
=
new
Facets
(
this
.
constructor
.
facets
,
{
search
:
this
});
var
constructorFacets
=
{};
_
.
each
(
this
.
constructor
.
facets
,
function
(
facetInfo
,
facetName
)
{
constructorFacets
[
facetName
]
=
new
Facet
(
facetInfo
.
data
,
facetInfo
.
options
);
});
var
facets
=
new
Facets
(
constructorFacets
,
{
search
:
this
});
_
.
each
(
facets
.
values
(),
function
(
facet
)
{
var
formName
=
facet
.
get
(
'formName'
);
if
(
formName
)
{
...
...
Please
register
or
sign in
to post a comment