Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions webapp/core/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"datatables.net-fixedcolumns-bs": "3.2.2",
"hp-autonomy-about-page": "0.3.0",
"bootstrap": "3.3.7",
"Flot": "flot#~0.8.3",
"moment-timezone": "0.5.11"
},
"devDependencies": {
Expand Down
20 changes: 15 additions & 5 deletions webapp/core/src/main/less/app-include.less
Original file line number Diff line number Diff line change
Expand Up @@ -1599,12 +1599,18 @@ input.find-input {
width: @custom3;
}

.parametric-value-count {
.parametric-value-graph-cell {
width: @custom3;
text-align: right;
}

.parametric-value-count,.parametric-value-graph {
&:extend(.text-right);
}

.parametric-value-name,
.parametric-value-count {
.parametric-value-count,
.parametric-value-graph{
white-space: nowrap;
}

Expand Down Expand Up @@ -2238,19 +2244,23 @@ h4.similar-dates-message {
}

@media @smHeightScreen {
.entity-topic-map {
.entity-topic-map, .dategraph-content {
height: @custom4;
}
}

@media @mHeightScreen {
.entity-topic-map {
.entity-topic-map, .dategraph-content {
height: 500px;
}
}

@media @lgHeightScreen {
.entity-topic-map {
.entity-topic-map, .dategraph-content {
height: @lgHeightScreenTopicMapHeight;
}
}

.dategraph-content {
clear: both;
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ define([
const IndexesView = options.IndexesView;
this.collapsed = {};

const config = configuration();

const views = [{
shown: configuration().enableMetaFilter,
shown: config.enableMetaFilter,
initialize: function () {
//Initializing the text with empty string to stop IE11 issue with triggering input event on render
this.filterModel = new Backbone.Model({text: ''});
Expand Down Expand Up @@ -175,7 +177,8 @@ define([
inputTemplate: NumericParametricFieldView.dateInputTemplate,
formatting: NumericParametricFieldView.dateFormatting,
indexesCollection: options.indexesCollection,
filteredParametricCollection: filteredParametricCollection
filteredParametricCollection: filteredParametricCollection,
showGraphButtons: _.contains(config.resultViewOrder, 'dategraph')
});
}.bind(this),
get$els: function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ define([
queryModel: this.queryModel,
parametricFieldsCollection: this.parametricFieldsCollection,
selectedParametricValues: this.selectedParametricValues,
indexesCollection: this.indexesCollection
indexesCollection: this.indexesCollection,
showGraphButtons: this.showGraphButtons
});
}
},
Expand All @@ -52,6 +53,7 @@ define([
this.indexesCollection = options.indexesCollection;
this.parametricFieldsCollection = options.parametricFieldsCollection;
this.queryModel = options.queryModel;
this.showGraphButtons = options.showGraphButtons;

this.listView = new ListView({
collection: this.collection,
Expand All @@ -61,6 +63,7 @@ define([
tagName: 'tbody',
itemOptions: {
selectedValuesCollection: options.selectedValuesCollection,
showGraphButtons: options.showGraphButtons
}
});
},
Expand Down Expand Up @@ -109,7 +112,8 @@ define([
parametricFieldsCollection: this.parametricFieldsCollection,
queryModel: this.queryModel,
selectedParametricValues: this.selectedParametricValues,
indexesCollection: this.indexesCollection
indexesCollection: this.indexesCollection,
showGraphButtons: options.showGraphButtons
})
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@ define([
tagName: 'li',
template: _.template(template),

initialize: function(options) {
this.showGraphButtons = options.showGraphButtons;
},

render: function() {
this.$el
.html(this.template({
count: this.model.get('count') || 0,
value: this.model.get('value'),
displayValue: this.model.get('displayValue')
displayValue: this.model.get('displayValue'),
showGraphButtons: this.showGraphButtons
}))
.iCheck({checkboxClass: 'icheckbox-hp'});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ define([
ItemView: ItemView,
collectionChangeEvents: {
selected: 'updateSelected'
},
itemOptions: {
showGraphButtons: options.showGraphButtons
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ define([
return {
id: fieldModel.id,
displayName: fieldModel.get('displayName'),
view: new ParametricSelectModalListView({paginator: paginator})
view: new ParametricSelectModalListView({
showGraphButtons: options.showGraphButtons,
paginator: paginator
})
};
}.bind(this));

Expand Down Expand Up @@ -102,6 +105,10 @@ define([
});
},

getSelectedField: function(){
return this.fieldSelectionModel.get('field');
},

remove: function () {
this.fieldData.forEach(function (data) {
data.view.remove();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ define([
'shown.bs.modal': function() {
// The content view will be visible now, so check if we need to load parametric values
this.parametricSelectView.checkScroll();
},
'click .parametric-value-graph': function(e){
var $checkboxEl = $(e.currentTarget).prev()
this.externalSelectedValues.trigger('graph', this.parametricSelectView.getSelectedField(), $checkboxEl.data('value'));
}
}, Modal.prototype.events),

Expand All @@ -40,7 +44,8 @@ define([
indexesCollection: options.indexesCollection,
queryModel: options.queryModel,
parametricFieldsCollection: options.parametricFieldsCollection,
selectedParametricValues: this.selectedParametricValues
selectedParametricValues: this.selectedParametricValues,
showGraphButtons: options.showGraphButtons
});

Modal.prototype.initialize.call(this, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ define([

initialize: function (options) {
this.selectedValuesCollection = options.selectedValuesCollection;
this.showGraphButtons = options.showGraphButtons;

this.$el.attr('data-value', this.model.get('value'));
this.$el.attr('data-display-value', this.model.get('displayValue'));
Expand All @@ -21,6 +22,10 @@ define([
render: function () {
this.$el.html(template);

if (!this.showGraphButtons) {
this.$('.parametric-value-graph-cell').addClass('hide');
}

this.$text = this.$('.parametric-value-text');
this.$name = this.$('.parametric-value-name');
this.$count = this.$('.parametric-value-count');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ define([
type: 'Parametric'
};

if (this.selectedParametricValues.get(attributes)) {
if ($(e.target).closest('.parametric-value-graph-cell').length) {
this.selectedParametricValues.trigger('graph', attributes.field, attributes.value);
} else if (this.selectedParametricValues.get(attributes)) {
this.selectedParametricValues.remove(attributes);
} else {
this.selectedParametricValues.add(attributes);
Expand All @@ -54,6 +56,7 @@ define([
this.filteredParametricCollection = options.filteredParametricCollection;
this.selectedParametricValues = options.queryState.selectedParametricValues;
this.filterModel = options.filterModel;
this.showGraphButtons = options.showGraphButtons;

this.initializeProcessingBehaviour();

Expand Down Expand Up @@ -96,7 +99,8 @@ define([
parametricFieldsCollection: options.parametricFieldsCollection,
filteredParametricCollection: this.filteredParametricCollection,
selectedParametricValues: this.selectedParametricValues,
filterModel: this.filterModel
filterModel: this.filterModel,
showGraphButtons: options.showGraphButtons
},
numericViewItemOptions: {
inputTemplate: options.inputTemplate,
Expand All @@ -110,7 +114,8 @@ define([
zoomEnabled: options.zoomEnabled,
buttonsEnabled: options.buttonsEnabled,
coordinatesEnabled: options.coordinatesEnabled,
collapsed: isCollapsed
collapsed: isCollapsed,
showGraphButtons: options.showGraphButtons
}
}
});
Expand Down
Loading