From 8740d1bcbac5b3316f69963a0994555a63b85680 Mon Sep 17 00:00:00 2001 From: rachittiwari8562 <54476275+rachittiwari8562@users.noreply.github.com> Date: Sun, 29 Nov 2020 06:46:23 +0530 Subject: [PATCH] Fix UI of scatterplot-facet and dialog - fixes #3228 (#3338) --- .../scripts/dialogs/scatterplot-dialog.html | 18 +++++++-------- .../scripts/dialogs/scatterplot-dialog.js | 5 +++++ .../core/scripts/facets/scatterplot-facet.js | 22 ++++++++++++------- .../modules/core/styles/project/facets.less | 5 ++++- 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/main/webapp/modules/core/scripts/dialogs/scatterplot-dialog.html b/main/webapp/modules/core/scripts/dialogs/scatterplot-dialog.html index 400a53e81..c76a23c0f 100644 --- a/main/webapp/modules/core/scripts/dialogs/scatterplot-dialog.html +++ b/main/webapp/modules/core/scripts/dialogs/scatterplot-dialog.html @@ -12,22 +12,22 @@
- - + +
- - - + + +
- - - + + +
@@ -38,4 +38,4 @@ - \ No newline at end of file + diff --git a/main/webapp/modules/core/scripts/dialogs/scatterplot-dialog.js b/main/webapp/modules/core/scripts/dialogs/scatterplot-dialog.js index fa0b472b5..256e62e50 100644 --- a/main/webapp/modules/core/scripts/dialogs/scatterplot-dialog.js +++ b/main/webapp/modules/core/scripts/dialogs/scatterplot-dialog.js @@ -81,6 +81,11 @@ ScatterplotDialog.prototype._createDialog = function() { this._level = DialogSystem.showDialog(dialog); this._renderMatrix(); + //the function buttonset() groups the input buttons into one but in doing so it creates icon on the input button + //the icon is created using checkboxradio() + //to get rid of the icon a class "no-icon" is directly applied to input button and checkboxradio() is called again with option :- icon=false + $(".no-icon").checkboxradio("option", "icon", false); + //this function only works after initialisation }; ScatterplotDialog.prototype._renderMatrix = function() { diff --git a/main/webapp/modules/core/scripts/facets/scatterplot-facet.js b/main/webapp/modules/core/scripts/facets/scatterplot-facet.js index b8b665ac6..877d8ad0e 100644 --- a/main/webapp/modules/core/scripts/facets/scatterplot-facet.js +++ b/main/webapp/modules/core/scripts/facets/scatterplot-facet.js @@ -114,18 +114,18 @@ class ScatterplotFacet extends Facet { '' + '
' + '
' + - '' + - '' + + '' + + '' + '
' + '
' + - '' + - '' + - '' + + '' + + '' + + '' + '
' + '
' + - '' + - '' + - '' + + '' + + '' + + '' + '
' + '
'+$.i18n('core-facets/export-plot')+'
' + '
' + @@ -218,6 +218,12 @@ class ScatterplotFacet extends Facet { }); this._elmts.selectors.find(".buttonset").buttonset(); + + //the function buttonset() groups the input buttons into one but in doing so it creates icon on the input button + //the icon is created using checkboxradio() + //to get rid of the icon a class "no-icon" is directly applied to input button and checkboxradio() is called again with option :- icon=false + $(".no-icon").checkboxradio("option", "icon", false); + //this function only works after initialisation }; _fillSelectionOptions(ops) { diff --git a/main/webapp/modules/core/styles/project/facets.less b/main/webapp/modules/core/styles/project/facets.less index 6f3d6c35f..2759867d8 100644 --- a/main/webapp/modules/core/styles/project/facets.less +++ b/main/webapp/modules/core/styles/project/facets.less @@ -282,7 +282,7 @@ img.facet-choice-link { } .facet-scatterplot-selectors-container .scatterplot-selectors .buttonset { - margin: 0.8em 0em; + margin: 0.4em 0em; } .scatterplot-selectors .ui-button-text-only .ui-button-text { @@ -333,11 +333,13 @@ img.facet-choice-link { .scatterplot-selectors .scatterplot-dim-selector label { width: 32px; height: 16px; + padding: 0px; } .scatterplot-selectors .scatterplot-rot-selector label { width: 22px; height: 18px; + padding: 0px; background-image: url("../../images/scatterplot-icons.png"); } @@ -356,6 +358,7 @@ img.facet-choice-link { .scatterplot-selectors .scatterplot-dot-selector label { width: 22px; height: 18px; + padding: 0px; background-image: url("../../images/scatterplot-icons.png"); }