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 {
td {
white-space: normal;
}
.select-all-header-cell{
width : 42px;
.select-all-header-cell {
width: 42px;
}
}
......@@ -316,18 +316,41 @@ td {
.rules-list>:first-child::before {
top: -8px;
}
.rules-group-header .btn-group.group-conditions label {
display: none;
}
.rules-group-container {
border: none;
border-color: transparent;
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 {
float: left !important;
.rules-group-header .btn-group.pull-right.group-actions {
float: right !important;
}
}
div.columnmanager-visibilitycontrol {
......
......@@ -158,8 +158,8 @@ define(['require',
filters: filters,
select_placeholder: '--Select Attribute--',
allow_empty: true,
conditions: ['AND'],
allow_groups: false,
conditions: ['AND','OR'],
allow_groups: true,
allow_empty: true,
operators: [
{ type: '=', nb_inputs: 1, multiple: false, apply_to: ['number', 'string', 'boolean', 'enum'] },
......@@ -188,7 +188,7 @@ define(['require',
},
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 {
this.ui.builder.html('<h4>No Attributes are available !</h4>')
}
......
......@@ -388,7 +388,7 @@ define(['require',
var rule = queryBuilderRef.queryBuilder('getRules');
}
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.makeFilterButtonActive(filtertype);
if (!isTag && this.value && this.value.type && this.searchTableColumns) {
......
......@@ -57,8 +57,8 @@ define(['require',
title: 'Attribute Filter',
content: this,
allowCancel: true,
mainClass : 'modal-lg',
okCloses: false,
width: '50%',
buttons: [{
text: 'Cancel',
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