Skip to content

Commit

Permalink
HPCC-23007 Files menu: file list, warning
Browse files Browse the repository at this point in the history
Filter Icon updated, along with new color change feature and hover to
display warning.

Signed-off-by: Kunal Aswani <Kunal.Aswani@lexisnexisrisk.com>
  • Loading branch information
kunalaswani committed Feb 24, 2020
1 parent 4d63d82 commit 4bac436
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
7 changes: 5 additions & 2 deletions esp/src/eclwatch/DFUQueryWidget.js
Expand Up @@ -77,6 +77,7 @@ define([
this.inherited(arguments);
this.workunitsTab = registry.byId(this.id + "_Workunits");
this.filter = registry.byId(this.id + "Filter");
this.iconFilter = registry.byId(this.id + "IconFilter");
this.clusterTargetSelect = registry.byId(this.id + "ClusterTargetSelect");
this.importForm = registry.byId(this.id + "ImportForm");
this.importTargetSelect = registry.byId(this.id + "ImportTargetSelect");
Expand Down Expand Up @@ -394,8 +395,8 @@ define([
}).then(function (response) {
if (lang.exists("DFUQueryResponse", response)) {
if (response.DFUQueryResponse.Warning && dojo.byId(context.id).offsetParent !== null) {
context.filter.open();
context.filter.setFilterMessage(context.i18n.FilesWarning);
context.filter.iconFilter.style.color = "red";
context.filter.iconFilter.title = response.DFUQueryResponse.Warning;
} else {
context.filter.setFilterMessage("");
}
Expand Down Expand Up @@ -444,11 +445,13 @@ define([
this.filter.on("clear", function (evt) {
context.refreshHRef();
context.refreshGrid();
context.checkIfWarning();
});
this.filter.on("apply", function (evt) {
context.refreshHRef();
context.workunitsGrid._currentPage = 0;
context.refreshGrid();
context.checkIfWarning();
});
topic.subscribe("hpcc/dfu_wu_completed", function (topic) {
context.refreshGrid();
Expand Down
6 changes: 4 additions & 2 deletions esp/src/eclwatch/FilterDropDownWidget.js
Expand Up @@ -151,13 +151,15 @@ define([

refreshState: function () {
if (this.exists()) {
this.iconFilter.src = Utility.getImageURL("filter1.png");
this.iconFilter.style.color = "#1A9BD7";
this.iconFilter.title = this.i18n.Filter;
dom.byId(this.id + "FilterDropDown_label").innerHTML = this.params.ownLabel !== undefined && this.params.ownLabel !== null ? this.params.ownLabel : this.i18n.FilterSet;
domStyle.set(this.id + "FilterDropDown_label", {
"font-weight": "bold"
});
} else {
this.iconFilter.src = Utility.getImageURL("noFilter1.png");
this.iconFilter.style.color = "lightgrey";
this.iconFilter.title = this.i18n.Filter;
dom.byId(this.id + "FilterDropDown_label").innerHTML = this.i18n.Filter;
domStyle.set(this.id + "FilterDropDown_label", {
"font-weight": "normal"
Expand Down
4 changes: 3 additions & 1 deletion esp/src/eclwatch/templates/FilterDropDownWidget.html
@@ -1,5 +1,7 @@
<span class="${baseClass}">
<img id="${id}IconFilter" src="${dojoConfig.urlInfo.resourcePath}/img/noFilter1.png" class="iconNoFilter" />
<span style="vertical-align: middle; font-size: 20px; color: lightgrey">
<i class="fa fa-filter" title="${i18n.Filter}" id="${id}IconFilter"></i>
</span>
<div id="${id}FilterDropDown" data-dojo-type="dijit.form.DropDownButton">
<span id="${id}FilterLabel">${i18n.Filter}</span>
<div class="toolTip" data-dojo-type="dijit.TooltipDialog">
Expand Down

0 comments on commit 4bac436

Please sign in to comment.