Skip to content

Commit

Permalink
[#69] Disable default load & refine uii filter style
Browse files Browse the repository at this point in the history
  • Loading branch information
wayangalihpratama committed Nov 29, 2021
1 parent 5712c0f commit dee9158
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
4 changes: 2 additions & 2 deletions resources/css/frame.css
Original file line number Diff line number Diff line change
Expand Up @@ -512,10 +512,10 @@ button.btn.btn-secondary.buttons-collection.dropdown-toggle.buttons-colvis {

/* Customize RSR UII Report */
/* RSR UII filter style */
div#uii-report-filter {
/* div#uii-report-filter {
margin-top: 100px;
position: absolute;
left: 25px;
top: auto;
visibility: hidden;
}
} */
8 changes: 4 additions & 4 deletions resources/js/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ $("main").append(
class="btn btn-sm btn-primary"
style="height:35px;"
>
Filter
Generate
</button>
</div>
</form>
Expand All @@ -242,7 +242,7 @@ $("main").append(
src="/frame/uii-datatable-report"
frameborder={0}
width="100%"
style="min-width:100%; min-height: 950px;"
style="min-width:100%; min-height: 175px;"
></iframe>
</div>
</div>
Expand Down Expand Up @@ -289,8 +289,8 @@ const showModalError = (response) => {
};

$("#filter-uii-report").on("click", () => {
window.document.getElementById("uii-report-filter").style.visibility =
"hidden";
// window.document.getElementById("uii-report-filter").style.visibility =
// "hidden";
window.document.getElementById("uii-report-data-frame").style.minHeight =
"950px";
let country_id = $("#uii-country-level").val();
Expand Down
25 changes: 14 additions & 11 deletions resources/js/uii-datatable-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ const partnership_id = $("meta[name='partnership']").attr("content");
const endpoints = [country_id || 0, partnership_id || 0].join("/");

// Rsr Datatables / UII Report
renderRsrTableTemplate("datatables", "65px", "").then((res) => {
renderRsrTable(endpoints, baseurl, "datatables").then((res) => {
// set parent iframe height
parent.window.document.getElementById(
"uii-report-filter"
).style.visibility = "visible";
const bodyHeight = document.body.scrollHeight;
parent.window.document.getElementById(
"uii-report-data-frame"
).style.height = bodyHeight / 8 + bodyHeight + "px";
if (country_id) {
// load page by filter
renderRsrTableTemplate("datatables", "65px", "").then((res) => {
renderRsrTable(endpoints, baseurl, "datatables").then((res) => {
// set parent iframe height
parent.window.document.getElementById(
"uii-report-filter"
).style.visibility = "visible";
const bodyHeight = document.body.scrollHeight;
parent.window.document.getElementById(
"uii-report-data-frame"
).style.height = bodyHeight / 8 + bodyHeight + "px";
});
});
});
}

0 comments on commit dee9158

Please sign in to comment.