Page 1 of 1

Webapp; isDirty checking

Posted: Mon Aug 29, 2016 7:12 pm
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?

Re: Webapp; isDirty checking

Posted: Tue Aug 30, 2016 6:27 pm
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