Webapp; isDirty checking

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Konstantin
Posts: 61
Joined: Tue Oct 27, 2015 11:49 am

Webapp; isDirty checking

Post by Konstantin »

Hi !!!
I use this function to check isDirty status.

Code: Select all

goog.events.listen(editor, sync.api.Editor.EventTypes.DIRTY_STATUS_CHANGED, function(e) {
sendIsDirtyToApplication(e.isDirty);
}
This event change to TRUE in many situation:
1) Change text
2) Set ReadOnly mode thru:

Code: Select all


editor.getActionsManager().invokeOperation(
'SetReadOnlyStatusOperation',
{'read-only': data.value}
);
3) Use my own action, even empty:

Code: Select all

SaveAction.prototype.actionPerformed = function(callback) {
new sync.ops.ServerOperation("webapp.extention.action.SaveAction", editor.controller).doOperation(callback, {
editorUID: window.editorUID
}, null);

Code: Select all

public class SaveAction implements AuthorOperation {

@Override
public void doOperation(AuthorAccess authorAccess, ArgumentsMap argumentsMap) throws IllegalArgumentException, AuthorOperationException {
}

@Override
public String getDescription() {
return null;
}

@Override
public ArgumentDescriptor[] getArguments() {
return null;
}

}

Code: Select all

goog.events.listen(editor, sync.api.Editor.EventTypes.DIRTY_STATUS_CHANGED, function(e) {
sendSetDirty(e.isDirty);
});
But I need take only text changing. How can I separate them?
cristi_talau
Posts: 517
Joined: Thu Sep 04, 2014 4:22 pm

Re: Webapp; isDirty checking

Post by cristi_talau »

Hello,

These problems are solved in 18.0.1. So, they will be also solved in the next SDK release.

If you are interested, we can give you access to the SNAPSHOT version of the SDK. Just send an email on our support email address.

Best,
Cristian
Post Reply