I am currently in the process of replicating the Save & Close button in the V8 Style Editor. I need to put a number of additional conditions / actions in place before and after the save which can't be handled by the listeners.
As such, I have gone through the code for the out of the box (ootb) button. I can trace the code through the difference JavaScript functions and I'm pretty sure the class EditorAction is ultimately called. However, I just can't find the last call, where the JSON is passed from the client to the server.
Here is what I have found so far, any help with this, or any tips, would be greatly appreciated.... as always!
- The button is inially created using the statement:
vui.provide("vui.ui.editor.button.save")
- The click handler called when the Save button is clicked is:
editor.save
- The function above is definted in the object:
vui.provide("vui.ui.editor.Editor")
- The Editor save function in turn calls the function:
vui.ui.editor.internal.save
- The internal save funciton above builds upon the request object and calls the function
vui.io.api -
- The api function above continues to build on the request object and then calls the function
vui.ajax
-
- The vui object is declared and the ajax method in turn calls the following function
vQuery.ajax
It's at this last call to the vQuery.ajax function that I lose the process. I assume it uses the vquery.form.js file but I can't see the connection and ultimately, I can't find the call to the EditorAction class.
Any ideas?
Thanks in advance.....