Extends
- Backbone.Model
Methods
addUpdatedXMLNode(objectDOM, newElement)
Takes the updated XML node and inserts it into the given object DOM in
the correct position.
Parameters:
Name | Type | Description |
---|---|---|
objectDOM |
Element | The full object DOM for this model |
newElement |
Element | The updated element to insert into the object DOM |
getXMLPosition(parentNode, nodeName) → {jQuery|boolean}
Finds the node in the given portal XML document afterwhich the
given node type should be inserted
Parameters:
Name | Type | Description |
---|---|---|
parentNode |
Element | The parent XML element |
nodeName |
string | The name of the node to be inserted into xml |
Returns:
A jQuery object indicating a position,
or false when nodeName is not in the
portal schema
- Type
- jQuery | boolean
parse(objectDOM) → {JSON}
Parses a element from a portal document
Parameters:
Name | Type | Description |
---|---|---|
objectDOM |
XMLElement | A ContentSectionType XML element from a portal document |
Returns:
The result of the parsed XML, in JSON. To be set directly on the model.
- Type
- JSON
reportSectionChange(isActive)
Handler function for the a portal section change. Can be overridden by
derived classes.
Parameters:
Name | Type | Description |
---|---|---|
isActive |
boolean | Whether the active portal section model is this portal section model. |
updateDOM() → {XMLElement}
Makes a copy of the original XML DOM and updates it with the new values from the model.
Returns:
An updated ContentSectionType XML element from a portal document
- Type
- XMLElement
validate() → {Object}
Overrides the default Backbone.Model.validate.function() to
check if this PortalSection model has all the required values necessary
to save to the server.
Returns:
If there are errors, an object comprising error
messages. If no errors, returns nothing.
- Type
- Object