Elements
Extends:
Example:
elements.removeClass({"targetId":".leftPanel","class":"hidden"});
Member Summary
Public Members | ||
public |
drags: {} |
Method Summary
Public Methods | ||
public |
Add a class to a dom element |
|
public |
ariaHiddenToggle(pid: number, json: object) Accessible toggle visible on a target |
|
public |
domCutPaste(pid: number, json: object) Cut a dom element out and paste it somewhere |
|
public |
domRemoveElement(pid: number, json: object) Delete element from dom |
|
public |
dragBoundsUpdate(pid: number, json: object) dragBoundsUpdate - Reset the boundary area manually |
|
public |
dragMoveIntoBounds(pid: number, json: object) dragMoveIntoBounds - Force a drag back into bounds |
|
public |
dragOn - Make an element dragable |
|
public |
dragReset - Reset the drag item |
|
public |
Focus on a target |
|
public |
formActivityMonitor(pid: number, json: object) Monitor element(s) in a form and add classes on change |
|
public |
formValidityMonitor(pid: number, json: object) Monitor element(s) in a form and validate |
|
public |
getCheckBoxValues(pid: number, json: object) Get the values from checked input boxes |
|
public |
getComputedStyle(pid: number, json: object) Get the computed style for an element |
|
public |
getMultiselectValues(pid: *, json: *) |
|
public |
Set the HTML of an element |
|
public |
removeClass(pid: number, json: object) Remove a class to a dom element |
|
public |
scrollContainerToElement(pid: number, json: object) Scroll a dom container target to a dom target |
|
public |
scrollIntoView(pid: number, json: object) Scroll to a dom target |
|
public |
scrollToBottom(pid: number, json: object) Scroll to bottom of a dom target |
|
public |
Scroll a dom container to the top |
|
public |
setAttribute(pid: number, json: object) Set attribute of a dom element |
|
public |
setInputValue(pid: number, json: object) Set the value of an input field |
|
public |
Set style of a dom element |
|
public |
toggleClass(pid: number, json: object) toggle a class on a dom element |
Inherited Summary
From class Queueable | ||
public |
queue: * |
|
public |
|
|
public |
finished(pid: *, mode: *) Call this method after you command has finished. |
|
public |
init(queue: *) init, override this for any promise based inits setting the self.ready=true after the promise |
|
public |
set(pid: *, value: *) |
|
public |
start(pid: *, command: *, json: *) Called from queue, starts running the actual command |
Public Members
public drags: {} source
Public Methods
public addClass(pid: number, json: object) source
Add a class to a dom element
Example:
elements.addClass({"targetId":".leftPanel","class":"hidden"});
public ariaHiddenToggle(pid: number, json: object) source
Accessible toggle visible on a target
Example:
elements.focus({"targetId":"#ps_1"});
public domCutPaste(pid: number, json: object) source
Cut a dom element out and paste it somewhere
Example:
elements.domCutPaste({"targetId":".leftPanel","sourceId":".thing"});
public domRemoveElement(pid: number, json: object) source
Delete element from dom
Example:
elements.domRemoveElement({"targetId":".leftPanel"});
public dragBoundsUpdate(pid: number, json: object) source
dragBoundsUpdate - Reset the boundary area manually
Example:
-elements.dragBoundsUpdate({"drag":"mydraf"});
public dragMoveIntoBounds(pid: number, json: object) source
dragMoveIntoBounds - Force a drag back into bounds
Example:
-elements.dragBoundsUpdate({"drag":"mydraf"});
public dragOn(pid: number, json: object) source
dragOn - Make an element dragable
Params:
Name | Type | Attribute | Description |
pid | number | Process ID |
|
json | object | queue arguments |
|
json.drag | string | the drag item to use |
|
json.targetId | string | element to be dragable |
|
json.dragTargetId | string | element to be the area you can actually drag |
|
json.bounds | string | element to be the area you cant drag out of |
|
json.buffer | int | the amount of buffer in pixels to apply to the boundary |
Example:
-elements.dragOn({"targetId":"#functionDragAnalyticsTop","dragTargetId":"#functionDragAnalyticsTop .dragbar","drag":"analytics","bounds":".edit-scenario-map"});
public dragReset(pid: number, json: object) source
dragReset - Reset the drag item
Example:
-elements.dragReset({"drag":"mydraf"});
public focus(pid: number, json: object) source
Focus on a target
Example:
elements.focus({"targetId":"#ps_1"});
public formActivityMonitor(pid: number, json: object) source
Monitor element(s) in a form and add classes on change
Params:
Name | Type | Attribute | Description |
pid | number | Process ID |
|
json | object | queue arguments |
|
json.targetId | string | elements(s) to monitor for change and add modifiedClass to |
|
json.buttonId | string | Element to add modifiedClass to |
|
json.modifiedClass | string | Class to add to modified elements |
|
json.modifiedQueue | string | Prepared queue to run when element modified |
Example:
elements.formActivityMonitor({"targetId":".functionMonitor","buttonId":".form-save","modifiedClass":"modified"});
public formValidityMonitor(pid: number, json: object) source
Monitor element(s) in a form and validate
Params:
Name | Type | Attribute | Description |
pid | number | Process ID |
|
json | object | queue arguments |
|
json.targetId | string | elements(s) to monitor for change and add modifiedClass to |
|
json.buttonId | string | Element to add modifiedClass to |
|
json.focusClass | string | Class to add to focuses elements |
|
json.validClass | string | Prepared queue to run when element modified |
|
json.errorClass | string | Prepared queue to run when element modified |
|
json.timeout | string | Length of time after user has finished typing to update |
Example:
elements.formValidityMonitor({"targetId":".functionMonitor","buttonId":".submit-form","validClass":"valid","focusClass":"focus","errorClass":"error"},{"queueRun":"Instant"});
public getCheckBoxValues(pid: number, json: object) source
Get the values from checked input boxes
Example:
elements.getCheckBoxValues({"mode":"string","targetId":".functionGetTypes"});
public getComputedStyle(pid: number, json: object) source
Get the computed style for an element
Example:
elements.getComputedStyle({"targetId":"#username","styles":"background"});
public getMultiselectValues(pid: *, json: *) source
Params:
Name | Type | Attribute | Description |
pid | * | ||
json | * |
public innerHTML(pid: number, json: object) source
Set the HTML of an element
Example:
elements.innerHTML({"targetId":".leftPanel","html":"Hello World"});
public removeClass(pid: number, json: object) source
Remove a class to a dom element
Example:
elements.removeClass({"targetId":".leftPanel","class":"hidden"});
public scrollContainerToElement(pid: number, json: object) source
Scroll a dom container target to a dom target
Example:
elements.scrollIntoView({"containerId":".map-elements-list","targetId":"#ps_1"});
public scrollIntoView(pid: number, json: object) source
Scroll to a dom target
Example:
elements.scrollIntoView({"targetId":"#ps_1"});
public scrollToBottom(pid: number, json: object) source
Scroll to bottom of a dom target
Example:
elements.scrollToBottom({"targetId":"#ps_1"});
public scrollTop(pid: number, json: object) source
Scroll a dom container to the top
Example:
elements.scrollTop({"targetId":".map-elements-list"});
public setAttribute(pid: number, json: object) source
Set attribute of a dom element
Example:
elements.setAttribute({"targetId":".leftPanel","attribute":"src","value":"http://foo/bar.png"});
public setInputValue(pid: number, json: object) source
Set the value of an input field
Example:
elements.setInputValue({"targetId":"#username","value":"Hello World"});
public setStyle(pid: number, json: object) source
Set style of a dom element
Example:
elements.setStyle({"targetId":".leftPanel","style":[{"name":"background","value":"red"}]});