Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove core4.2 backward compatibility PageModified js function #281

Open
github-actions bot opened this issue Nov 12, 2023 · 0 comments
Open

Remove core4.2 backward compatibility PageModified js function #281

github-actions bot opened this issue Nov 12, 2023 · 0 comments
Assignees

Comments

@github-actions
Copy link

github-actions bot commented Nov 12, 2023

// TODO: Remove core4.2 backward compatibility `PageModified` js function

///////////////////////////////////////////////////////////////////////////////////////////////////
// Backward compatibility functions

// TODO: Remove core4.2 backward compatibility `PageModified` js function
//  Remove when Jeedom 4.2 is no longer supported
//  `jmqtt.isPageModified` -> `jeeFrontEnd.modifyWithoutSave`
//  `jmqtt.setPageModified` -> `jeeFrontEnd.modifyWithoutSave = true`
//  `jmqtt.unsetPageModified` -> `jeeFrontEnd.modifyWithoutSave = false`
//  labels: workarround, core4.2, javascript

// Handle get modifyWithoutSave flag in jeeFrontEnd or window
jmqtt.isPageModified = function() {
    return jeeFrontEnd.modifyWithoutSave || window.modifyWithoutSave;
}

// Handle set modifyWithoutSave flag in jeeFrontEnd and window
jmqtt.setPageModified = function() {
    jeeFrontEnd.modifyWithoutSave = true;
    window.modifyWithoutSave = true;
}

// Handle clear modifyWithoutSave flag in jeeFrontEnd and window
jmqtt.unsetPageModified = function() {
    jeeFrontEnd.modifyWithoutSave = false;
    window.modifyWithoutSave = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant