Commit dcdd3d68 by pratik24mac Committed by Madhan Neethiraj

ATLAS-2152 : basic-search UI updated to support OR conditions

parent 37b27107
...@@ -112,8 +112,8 @@ td { ...@@ -112,8 +112,8 @@ td {
td { td {
white-space: normal; white-space: normal;
} }
.select-all-header-cell{ .select-all-header-cell {
width : 42px; width: 42px;
} }
} }
...@@ -316,18 +316,41 @@ td { ...@@ -316,18 +316,41 @@ td {
.rules-list>:first-child::before { .rules-list>:first-child::before {
top: -8px; top: -8px;
} }
.rules-group-header .btn-group.group-conditions label {
display: none;
}
.rules-group-container { .rules-group-container {
border: none; border-color: transparent;
background: none; background: none;
.rules-group-header {
.group-actions {
.btn-success {
color: #38BB9B !important;
background-color: transparent !important;
border-color: #38BB9B !important;
}
.btn-danger {
color: #e14f00;
background-color: transparent;
border-color: #e14f00;
}
}
.group-conditions {
.btn-primary {
color: #333 !important;
background-color: #fff !important;
border-color: #ccc !important;
}
.active {
color: #fff !important;
background-color: #5bc0de !important;
border-color: #46b8da !important;
}
}
}
} }
}
.rules-group-header .btn-group.pull-right.group-actions { .rules-group-header .btn-group.pull-right.group-actions {
float: left !important; float: right !important;
}
} }
div.columnmanager-visibilitycontrol { div.columnmanager-visibilitycontrol {
......
...@@ -158,8 +158,8 @@ define(['require', ...@@ -158,8 +158,8 @@ define(['require',
filters: filters, filters: filters,
select_placeholder: '--Select Attribute--', select_placeholder: '--Select Attribute--',
allow_empty: true, allow_empty: true,
conditions: ['AND'], conditions: ['AND','OR'],
allow_groups: false, allow_groups: true,
allow_empty: true, allow_empty: true,
operators: [ operators: [
{ type: '=', nb_inputs: 1, multiple: false, apply_to: ['number', 'string', 'boolean', 'enum'] }, { type: '=', nb_inputs: 1, multiple: false, apply_to: ['number', 'string', 'boolean', 'enum'] },
...@@ -188,7 +188,7 @@ define(['require', ...@@ -188,7 +188,7 @@ define(['require',
}, },
rules: rules_widgets rules: rules_widgets
}); });
this.$('.rules-group-header .btn-group.pull-right.group-actions').toggleClass('pull-right pull-left'); this.$('.rules-group-header .btn-group.pull-right.group-actions').toggleClass('pull-left');
} else { } else {
this.ui.builder.html('<h4>No Attributes are available !</h4>') this.ui.builder.html('<h4>No Attributes are available !</h4>')
} }
......
...@@ -388,7 +388,7 @@ define(['require', ...@@ -388,7 +388,7 @@ define(['require',
var rule = queryBuilderRef.queryBuilder('getRules'); var rule = queryBuilderRef.queryBuilder('getRules');
} }
if (rule) { if (rule) {
var ruleUrl = CommonViewFunction.attributeFilter.generateUrl({ "value": rule.rules, "formatedDateToLong": true }); var ruleUrl = CommonViewFunction.attributeFilter.generateUrl({ "value": rule, "formatedDateToLong": true });
this.searchTableFilters[filtertype][(isTag ? this.value.tag : this.value.type)] = ruleUrl; this.searchTableFilters[filtertype][(isTag ? this.value.tag : this.value.type)] = ruleUrl;
this.makeFilterButtonActive(filtertype); this.makeFilterButtonActive(filtertype);
if (!isTag && this.value && this.value.type && this.searchTableColumns) { if (!isTag && this.value && this.value.type && this.searchTableColumns) {
......
...@@ -57,8 +57,8 @@ define(['require', ...@@ -57,8 +57,8 @@ define(['require',
title: 'Attribute Filter', title: 'Attribute Filter',
content: this, content: this,
allowCancel: true, allowCancel: true,
mainClass : 'modal-lg',
okCloses: false, okCloses: false,
width: '50%',
buttons: [{ buttons: [{
text: 'Cancel', text: 'Cancel',
btnClass: "cancel btn-action", btnClass: "cancel btn-action",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment