2020-09-26 05:12:05 +08:00
|
|
|
// Manage the Add New Control button
|
|
|
|
function AddNewControl(el) {
|
|
|
|
url = el.getAttribute('data-url');
|
|
|
|
window.location.assign(url);
|
|
|
|
}
|
|
|
|
|
2020-09-26 05:05:16 +08:00
|
|
|
function initPage() {
|
|
|
|
// Manage the BACK button
|
|
|
|
document.getElementById("backBtn").addEventListener("click", function onBackClick(evt) {
|
|
|
|
evt.preventDefault();
|
|
|
|
window.history.back();
|
|
|
|
});
|
|
|
|
|
|
|
|
// Disable the back button if there is nothing to go back to
|
|
|
|
$j('#backBtn').prop('disabled', !document.referrer.length);
|
|
|
|
|
|
|
|
// Manage the REFRESH Button
|
|
|
|
document.getElementById("refreshBtn").addEventListener("click", function onRefreshClick(evt) {
|
|
|
|
evt.preventDefault();
|
|
|
|
window.location.reload(true);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
$j(document).ready(function() {
|
|
|
|
initPage();
|
|
|
|
});
|