Class Index | File Index

Classes


Class pwlib.extensions.moodle

The Moodle extension for PaintWeb. This extension handles the Moodle integration inside the PaintWeb code.

Note: This extension is supposed to work with Moodle 1.9 and Moodle 2.0.
Defined in: moodle.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
The extensionRegister event handler.
<private>  
The guiHide application event handler.
<private>  
The guiShow application event handler.
<private>  
The imageSave application event handler.
<private> <inner>  
The image save onreadystatechange event handler for the XMLHttpRequest which performs the image save.
<private>  
The submit event handler for the form to which the PaintWeb instance is attached to.
Class Detail
pwlib.extensions.moodle(app)
Parameters:
{PaintWeb} app
Reference to the main paint application object.
Method Detail
{Boolean} extensionRegister()
The extensionRegister event handler. Setup event listeners, determine Moodle version, and more.
Returns:
{Boolean} True if the extension initialized successfully, or false if not.

<private> guiHide()
The guiHide application event handler. When the PaintWeb GUI is hidden, we must show again the textarea icons for the current textarea element, inside a Moodle page.

<private> guiShow()
The guiShow application event handler. When the PaintWeb GUI is shown, we must hide the textarea icons for the current textarea element, inside a Moodle page.

<private> imageSave(ev)
The imageSave application event handler. When the user attempts to save an image, this extension handles the event by sending the image data to the Moodle server, to perform the actual save operation.
Parameters:
{pwlib.appEvent.imageSave} ev
The application event object.

<private> <inner> imageSaveReady(xhr)
The image save onreadystatechange event handler for the XMLHttpRequest which performs the image save. This function uses the reply to determine if the image save operation is successful or not.

The pwlib.appEvent.imageSaveResult application event is dispatched.

The server-side script must reply with a JSON object with the following properties:

Parameters:
{XMLHttpRequest} xhr
The XMLHttpRequest object.

<private> onSubmitUnsaved()
The submit event handler for the form to which the PaintWeb instance is attached to. This method is invoked by the TinyMCE plugin when the form is submitted while the user edits an image with unsaved changes.

Documentation generated by JsDoc Toolkit 2.3.0 on Sat Jun 26 2010 21:57:01 GMT+0300 (EEST)