Merge branch 'master' into gh-pages
This commit is contained in:
commit
8486afd0eb
@ -124,6 +124,7 @@ this.recline.Backend.ElasticSearch = this.recline.Backend.ElasticSearch || {};
|
||||
} else if (filter.type === 'geo_distance') {
|
||||
out.geo_distance[filter.field] = filter.point;
|
||||
out.geo_distance.distance = filter.distance;
|
||||
out.geo_distance.unit = filter.unit;
|
||||
}
|
||||
return out;
|
||||
},
|
||||
|
||||
@ -424,7 +424,7 @@ my.Query = Backbone.Model.extend({
|
||||
},
|
||||
geo_distance: {
|
||||
distance: 10,
|
||||
distance_unit: 'km',
|
||||
unit: 'km',
|
||||
point: {
|
||||
lon: 0,
|
||||
lat: 0
|
||||
|
||||
@ -448,7 +448,7 @@ my.MapMenu = Backbone.View.extend({
|
||||
events: {
|
||||
'click .editor-update-map': 'onEditorSubmit',
|
||||
'change .editor-field-type': 'onFieldTypeChange',
|
||||
'change #editor-auto-zoom': 'onAutoZoomChange'
|
||||
'click #editor-auto-zoom': 'onAutoZoomChange'
|
||||
},
|
||||
|
||||
initialize: function(options) {
|
||||
@ -472,13 +472,19 @@ my.MapMenu = Backbone.View.extend({
|
||||
if (this._geomReady() && this.model.fields.length){
|
||||
if (this.state.get('geomField')){
|
||||
this._selectOption('editor-geom-field',this.state.get('geomField'));
|
||||
$('#editor-field-type-geom').attr('checked','checked').change();
|
||||
this.el.find('#editor-field-type-geom').attr('checked','checked').change();
|
||||
} else{
|
||||
this._selectOption('editor-lon-field',this.state.get('lonField'));
|
||||
this._selectOption('editor-lat-field',this.state.get('latField'));
|
||||
$('#editor-field-type-latlon').attr('checked','checked').change();
|
||||
this.el.find('#editor-field-type-latlon').attr('checked','checked').change();
|
||||
}
|
||||
}
|
||||
if (this.state.get('autoZoom')) {
|
||||
this.el.find('#editor-auto-zoom').attr('checked', 'checked');
|
||||
}
|
||||
else {
|
||||
this.el.find('#editor-auto-zoom').removeAttr('checked');
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
|
||||
@ -87,7 +87,7 @@ my.MultiView = Backbone.View.extend({
|
||||
</div> \
|
||||
<div class="menu-right"> \
|
||||
<div class="btn-group" data-toggle="buttons-checkbox"> \
|
||||
<a href="#" class="btn" data-action="filters">Filters</a> \
|
||||
<a href="#" class="btn active" data-action="filters">Filters</a> \
|
||||
<a href="#" class="btn active" data-action="fields">Fields</a> \
|
||||
</div> \
|
||||
</div> \
|
||||
@ -228,12 +228,6 @@ my.MultiView = Backbone.View.extend({
|
||||
});
|
||||
this.$filterEditor = filterEditor.el;
|
||||
$dataSidebar.append(filterEditor.el);
|
||||
// are there actually any filters to show?
|
||||
if (this.model.get('filters') && this.model.get('filters').length > 0) {
|
||||
this.$filterEditor.show();
|
||||
} else {
|
||||
this.$filterEditor.hide();
|
||||
}
|
||||
|
||||
var fieldsView = new recline.View.Fields({
|
||||
model: this.model
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user