-
-
Notifications
You must be signed in to change notification settings - Fork 728
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
State should not be dirty #319
Comments
Good suggestion. We will need a way to track (unsaved) changes, though. |
I have gotten this working, but need to understand which of my PRs you can accept so that I can find a suitable spot to PR this in. Thank you. |
temporary parking spot for my code // globals.js
window.onbeforeunload = function (e) {
if (SQL.Designer.is_dirty) {
return "" /* some browsers will show this text, some won't. */;
} else {
return undefined;
}
};
// wwwsqldesigner.js
SQL.Designer = function () {
SQL.Designer = this;
this.is_dirty = false;
SQL.Designer.prototype.dirty = function (value, remarks) {
if (value === undefined) {
value = true;
}
this.is_dirty = value;
console.log("Dirty flag set to", this.is_dirty, remarks);
};
// rowmanager.js - nothing
// row.js::update, up, down, changeComment, addRelation, removeRelation, addKey, removeKey, destroy
SQL.Designer.dirty();
// io.js
SQL.Designer.dirty(false, "serversave");
SQL.Designer.dirty(false, "loadresponse"); |
Sorry for being late all the time. As far as I can tell, there is only one PR pending right now (keyboard shortcuts); please feel free to submit this one based on the current master. |
ok thanks! |
bump :) |
@ondras help :) |
If we were to
The text was updated successfully, but these errors were encountered: