File tree Expand file tree Collapse file tree 6 files changed +43
-19
lines changed Expand file tree Collapse file tree 6 files changed +43
-19
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,9 @@ var FieldView = View.extend({
90
90
el : el ,
91
91
parent : this ,
92
92
collection : this . model . fields
93
- } ) , { silent : true } ) ;
93
+ } ) , {
94
+ silent : true
95
+ } ) ;
94
96
this . listenTo ( this . fieldListView , 'change:refineQuery' , this . onRefineClause ) ;
95
97
return this . fieldListView ;
96
98
}
@@ -103,7 +105,9 @@ var FieldView = View.extend({
103
105
el : el ,
104
106
parent : this ,
105
107
collection : this . model . arrayFields
106
- } ) , { silent : true } ) ;
108
+ } ) , {
109
+ silent : true
110
+ } ) ;
107
111
this . listenTo ( this . arrayFieldListView , 'change:refineQuery' , this . onRefineClause ) ;
108
112
return this . arrayFieldListView ;
109
113
}
@@ -133,12 +137,16 @@ var FieldView = View.extend({
133
137
var clauses = [ ] ;
134
138
if ( this . fieldListView ) {
135
139
this . fieldListView . refineQuery . clauses . each ( function ( clause ) {
136
- if ( clause . valid ) clauses . push ( this . prefixClauseKey ( clause ) ) ;
140
+ if ( clause . valid ) {
141
+ clauses . push ( this . prefixClauseKey ( clause ) ) ;
142
+ }
137
143
} . bind ( this ) ) ;
138
144
}
139
145
if ( this . arrayFieldListView ) {
140
146
this . arrayFieldListView . refineQuery . clauses . each ( function ( clause ) {
141
- if ( clause . valid ) clauses . push ( this . prefixClauseKey ( clause ) ) ;
147
+ if ( clause . valid ) {
148
+ clauses . push ( this . prefixClauseKey ( clause ) ) ;
149
+ }
142
150
} . bind ( this ) ) ;
143
151
}
144
152
if ( this . refineClause . valid ) {
@@ -174,7 +182,9 @@ FieldListView = View.extend({
174
182
refineQuery : {
175
183
type : 'state' ,
176
184
required : true ,
177
- default : function ( ) { return new Query ( ) ; }
185
+ default : function ( ) {
186
+ return new Query ( ) ;
187
+ }
178
188
} ,
179
189
queryContext : 'object'
180
190
} ,
Original file line number Diff line number Diff line change @@ -59,7 +59,9 @@ var minicharts_d3fns_date = function(opts) {
59
59
var barcodeBottom = Math . floor ( height - 10 ) ;
60
60
61
61
var barcodeX = d3 . time . scale ( )
62
- . domain ( d3 . extent ( values , function ( d ) { return d . ts ; } ) )
62
+ . domain ( d3 . extent ( values , function ( d ) {
63
+ return d . ts ;
64
+ } ) )
63
65
. range ( [ 0 , width ] ) ;
64
66
65
67
var upperBarBottom = height / 2 - 20 ;
@@ -155,14 +157,14 @@ var minicharts_d3fns_date = function(opts) {
155
157
raf ( function ( ) {
156
158
many ( weekdays , opts . view , weekdayContainer ,
157
159
width / ( upperRatio + 1 ) - upperMargin , upperBarBottom , {
158
- bgbars : true ,
159
- labels : {
160
- 'text-anchor' : 'middle' ,
161
- text : function ( d ) {
162
- return d . label [ 0 ] ;
160
+ bgbars : true ,
161
+ labels : {
162
+ 'text-anchor' : 'middle' ,
163
+ text : function ( d ) {
164
+ return d . label [ 0 ] ;
165
+ }
163
166
}
164
- }
165
- } ) ;
167
+ } ) ;
166
168
} ) ;
167
169
168
170
// calendar icon
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ module.exports = AmpersandView.extend(QueryBuilderMixin, {
24
24
} ,
25
25
selectedValues : {
26
26
type : 'array' ,
27
- default : function ( ) { return [ ] ; }
27
+ default : function ( ) {
28
+ return [ ] ;
29
+ }
28
30
}
29
31
} ,
30
32
initialize : function ( opts ) {
Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ module.exports = {
32
32
this . selectedValues = [ data ] ;
33
33
}
34
34
} else if ( _ . contains ( _ . pluck ( this . selectedValues , 'i' ) , data . i ) ) {
35
- _ . remove ( this . selectedValues , function ( d ) { return d . i === data . i ; } ) ;
35
+ _ . remove ( this . selectedValues , function ( d ) {
36
+ return d . i === data . i ;
37
+ } ) ;
36
38
} else {
37
39
this . selectedValues . push ( data ) ;
38
40
}
@@ -67,7 +69,9 @@ module.exports = {
67
69
$in : this . selectedValues . map ( function ( el ) {
68
70
return el . d . value ;
69
71
} )
70
- } , { parse : true } ) ;
72
+ } , {
73
+ parse : true
74
+ } ) ;
71
75
}
72
76
} ,
73
77
@@ -129,7 +133,9 @@ module.exports = {
129
133
upper += last . d . dx ;
130
134
}
131
135
if ( lower === upper ) {
132
- this . refineValue = new LeafValue ( { content : lower } ) ;
136
+ this . refineValue = new LeafValue ( {
137
+ content : lower
138
+ } ) ;
133
139
} else {
134
140
this . refineValue = new Range ( lower , upper , upperInclusive ) ;
135
141
}
Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ var EJSON = require('mongodb-extended-json');
3
3
var Query = require ( 'mongodb-language-model' ) . Query ;
4
4
// var debug = require('debug')('scout:models:query-options');
5
5
6
- var DEFAULT_QUERY = new Query ( { } , { parse : true } ) ;
6
+ var DEFAULT_QUERY = new Query ( { } , {
7
+ parse : true
8
+ } ) ;
7
9
var DEFAULT_SORT = {
8
10
$natural : - 1
9
11
} ;
Original file line number Diff line number Diff line change @@ -92,7 +92,9 @@ module.exports = AmpersandView.extend({
92
92
} ,
93
93
refineClicked : function ( ) {
94
94
var queryStr = this . _cleanupInput ( this . queryByHook ( 'refine-input' ) . value ) ;
95
- var queryObj = new Query ( EJSON . parse ( queryStr ) , { parse : true } ) ;
95
+ var queryObj = new Query ( EJSON . parse ( queryStr ) , {
96
+ parse : true
97
+ } ) ;
96
98
this . model . query = queryObj ;
97
99
this . trigger ( 'submit' , this ) ;
98
100
} ,
You can’t perform that action at this time.
0 commit comments