Skip to content

Commit

Permalink
fix(eda.plot): fix pagination styling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Pham authored and jinglinpeng committed Feb 18, 2022
1 parent c4cd4b9 commit 8396f2d
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 34 deletions.
13 changes: 6 additions & 7 deletions dataprep/eda/templates/grid_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@
{% endfor %}
</div>
{% endif %}
<div class="num-of-plots-{{ context.rnd }}">
<p>Number of plots per page: </p>
<input type="button" id="decrease-num-per-page-{{ context.rnd }}" value="-" class="num-of-plots-minus-{{ context.rnd }}" onclick="decreaseNum()">
<input type="number" id="num-per-page-{{ context.rnd }}" value="3" onchange="changeNum()"/>
<input type="button" id="increase-num-per-page-{{ context.rnd }}" value="+" class="num-of-plots-plus-{{ context.rnd }}" onclick="increaseNum()">
</div>
<div class="plot-{{ context.rnd }}">
{% for fig in context.components[1] %}
<div class="fig-{{ context.rnd }}">
Expand Down Expand Up @@ -170,13 +176,6 @@
{% endfor %}
</div>
<div class="pagination-{{ context.rnd }}"></div>
<form class="pagination-form-{{ context.rnd }}" onsubmit="return false">
<p>Number of plots per page</p>
<div class="pagination-button-{{ context.rnd }}" id="decrease-num-per-page-{{ context.rnd }}" onclick="decreaseNum()" value="Decrease Num">-</div>
<input type="number" id="num-per-page-{{ context.rnd }}" value="3" onchange="changeNum()"/>
<div class="pagination-button-{{ context.rnd }}" id="increase-num-per-page-{{ context.rnd }}" onclick="increaseNum()" value="Increase Num">+</div>
</form>
<br/><br/>
</body>

</html>
2 changes: 0 additions & 2 deletions dataprep/eda/templates/grid_scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,4 @@
checkFragment();
});
}


</script>
74 changes: 49 additions & 25 deletions dataprep/eda/templates/grid_styles.html
Original file line number Diff line number Diff line change
Expand Up @@ -686,14 +686,10 @@
cursor: default;
}

.pagination-form-{{ context.rnd }} {
text-align: center;
padding-top: 50px;
}

.pagination-{{ context.rnd }} {
text-align: center;
padding-top: 50px;
padding-bottom: 50px;
}

.pagination-button-{{ context.rnd }} {
Expand All @@ -718,26 +714,19 @@
cursor: pointer;
}

form #decrease-num-per-page-{{ context.rnd }} {
margin-right: -4px;
border-radius: 8px 0 0 8px;
}

form #increase-num-per-page-{{ context.rnd }} {
margin-left: -4px;
border-radius: 0 8px 8px 0;
html {
display: table;
margin: auto;
}

form #input-wrap {
margin: 0px;
padding: 0px;
body {
display: table-cell;
vertical-align: middle;
}

input#num-per-page-{{ context.rnd }} {
text-align: center;
border: none;
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
border: 1px solid #ddd;
margin: 0px;
width: 40px;
height: 40px;
Expand All @@ -749,13 +738,48 @@
margin: 0;
}

html {
display: table;
margin: auto;
.num-of-plots-{{ context.rnd }} {
text-align: center;
padding-top: 30px;
}

body {
display: table-cell;
vertical-align: middle;
.num-of-plots-{{ context.rnd }} input,
.num-of-plots-{{ context.rnd }} p {
display: inline-block;
margin: 0;
vertical-align: middle;
box-shadow: none;
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', 'Lucida Grande', sans-serif;
font-size: 15px;
}

.num-of-plots-minus-{{ context.rnd }},
.num-of-plots-plus-{{ context.rnd }} {
padding: 7px 10px 8px;
height: 41px;
background-color: #ffffff;
border: 1px solid #ddd;
cursor:pointer;
}

.num-of-plots-minus-{{ context.rnd }} {
margin-right: -4px;
border-radius: 8px 0 0 8px;
}

.num-of-plots-plus-{{ context.rnd }} {
margin-left: -4px;
border-radius: 0 8px 8px 0;
}

.num-of-plots-minus-{{ context.rnd }}:hover,
.num-of-plots-plus-{{ context.rnd }}:hover {
background: #eeeeee;
}

.num-of-plots-minus-{{ context.rnd }}:focus,
.num-of-plots-plus-{{ context.rnd }}:focus {
outline: none;
}

</style>

0 comments on commit 8396f2d

Please sign in to comment.