forked from enviPath/enviPy
[Feature] PEPPER in enviPath (#332)
Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#332
This commit is contained in:
@ -160,7 +160,7 @@
|
||||
</div>
|
||||
<ul
|
||||
tabindex="0"
|
||||
class="dropdown-content menu bg-base-100 rounded-box z-50 w-52 p-2"
|
||||
class="dropdown-content menu bg-base-100 rounded-box z-50 w-60 p-2"
|
||||
>
|
||||
{% if pathway.setting.model.app_domain %}
|
||||
<li>
|
||||
@ -206,6 +206,37 @@
|
||||
OECD 301F View
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="pred-prop-toggle-button" class="cursor-pointer">
|
||||
<svg
|
||||
id="pred-prop-icon"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
class="slash"
|
||||
viewBox="0 0 100 30"
|
||||
preserveAspectRatio="none"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<line x1="0" y1="30" x2="100" y2="0" />
|
||||
</svg>
|
||||
Show Predicted Properties
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -441,6 +472,8 @@
|
||||
var appDomainViewEnabled = false;
|
||||
// Global switch for timeseries view
|
||||
var timeseriesViewEnabled = false;
|
||||
// Predicted Property View
|
||||
var predictedPropertyViewEnabled = false;
|
||||
|
||||
function goFullscreen(id) {
|
||||
var element = document.getElementById(id);
|
||||
@ -563,6 +596,23 @@
|
||||
});
|
||||
}
|
||||
|
||||
// Predicted Propertes toggle
|
||||
const predPropBtn = document.getElementById("pred-prop-toggle-button");
|
||||
if (predPropBtn) {
|
||||
predPropBtn.addEventListener("click", function () {
|
||||
predictedPropertyViewEnabled = !predictedPropertyViewEnabled;
|
||||
const icon = document.getElementById("pred-prop-icon");
|
||||
|
||||
if (predictedPropertyViewEnabled) {
|
||||
icon.innerHTML +=
|
||||
'<svg class="slash" viewBox="0 0 100 30" preserveAspectRatio="none" aria-hidden="true"><line x1="0" y1="30" x2="100" y2="0"/></svg>';
|
||||
} else {
|
||||
icon.innerHTML =
|
||||
'<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" />';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Show actions button if there are actions
|
||||
const actionsButton = document.getElementById("actionsButton");
|
||||
const actionsList = actionsButton?.querySelector("ul");
|
||||
|
||||
Reference in New Issue
Block a user