Changes
Page history
Update shipped plugins
authored
Nov 27, 2017
by
Thimo Kraemer
Hide whitespace changes
Inline
Side-by-side
shipped-plugins.md
View page @
5c846dc8
...
...
@@ -12,7 +12,7 @@ With all these events, the following event
parameters are available. Additional parameters are marked
at the corresponding event.
-
evt-[
\<
eventname
\>
-]allowbubbling (default False)
*
evt-[
\<
eventname
\>
-]allowbubbling (default False)
By default, we only let an event triggered when it
happens on the exact node we bound the event to. If
...
...
@@ -26,7 +26,7 @@ at the corresponding event.
bubbling events are default triggering. in kss the
default is that we suppress these events.)
-
evt-[
\<
eventname
\>
-]preventdefault (default False)
*
evt-[
\<
eventname
\>
-]preventdefault (default False)
If set to True, this disables the default behaviour
to happen upon succesful completion of an event.
...
...
@@ -35,7 +35,7 @@ at the corresponding event.
node, we don't want to link followed as well as it
would be the default behaviour of the click.
-
evt-[
\<
eventname
\>
-]preventbubbling (default False)
*
evt-[
\<
eventname
\>
-]preventbubbling (default False)
When used in combination with allowbubbling on an
outer node, this
...
...
@@ -49,7 +49,7 @@ at the corresponding event.
Special KSS events
------------------
timeout
*
timeout
Implements a timer that triggers the event when the
given period expires.
...
...
@@ -61,7 +61,7 @@ timeout
be set to false to let the timeout event happen only
once.
load
*
load
The event triggers when the bound node gets loaded. That
signifies the full loading of the DOM, and may preceed
...
...
@@ -76,7 +76,7 @@ load
- evt-load-insert (default true): if the event should
trigger on dynamic insertions by KSS.
spinneron
*
spinneron
This event triggers when the "loading..." spinner should
be activated.
...
...
@@ -87,7 +87,7 @@ spinneron
- evt-spinneron-filter: names of server actions that are
observed by this spinner.
spinneroff
*
spinneroff
This event triggers when the "loading..." spinner should
be deactivated.
...
...
@@ -98,7 +98,7 @@ spinneroff
- evt-spinneroff-filter: names of server actions that are
observed by this spinner.
error
*
error
This event triggers when an error occures. Error attributes
can be accessed with the parameter provider "errorAttr".
...
...
@@ -110,39 +110,39 @@ Actions
HTML functions to insert content
--------------------------------
replaceInnerHTML
*
replaceInnerHTML
Replace all children of the given node with the given
content.
- html: the html to insert
replaceHTML
*
replaceHTML
Replace HTML including the given node with the given
content.
- html: the html to use as replacement
prependHTML
*
prependHTML
Add HTML inside the given node, at the beginning.
- html: the html to insert
appendHTML
*
appendHTML
Add HTML inside the given node, at the end.
- html: the html to insert
insertHTMLBefore
*
insertHTMLBefore
Add HTML before given node.
- html: the html to insert
insertHTMLAfter
*
insertHTMLAfter
Add HTML after given node.
...
...
@@ -153,7 +153,7 @@ insertHTMLAfter
Deleting content
----------------
deleteNode
*
deleteNode
Delete the node.
...
...
@@ -161,38 +161,38 @@ deleteNode
Moving content (currently not implemented!)
-------------------------------------------
moveNodeAfter
*
moveNodeAfter
Move the node after the node with the given HTML id.
- html_id: the id of the second node
moveNodeBefore
*
moveNodeBefore
Move the node before the node with the given HTML id.
- html_id: the id of the second node
moveNodeAsLastChild
*
moveNodeAsLastChild
Move the node as last child of the node with the given HTML id.
- html_id: the id of the second node
moveNodeAsFirstChild
*
moveNodeAsFirstChild
Move the node as first child of the node with the given HTML id.
- html_id: the id of the second node
copyChildNodesFrom
*
copyChildNodesFrom
Copy the child nodes from the given HTML id, under the
current node.
- html_id: the id of the second node
copyChildNodesTo
*
copyChildNodesTo
Copy the child nodes of the given node to the given HTML
id.
...
...
@@ -203,48 +203,48 @@ copyChildNodesTo
Attributes
----------
setNodeAttr
*
setNodeAttr
Sets a given HTML attribute of the node.
- name: the attribute name
- value: the attribute value to set
setDataAttr
*
setDataAttr
Sets a given HTML data attribute of the node, available for reading with the dataAttr() parameter producer function.
- name: the attribute name
- value: the attribute value to set
setStyle
*
setStyle
Sets a given style property on the node.
- name: the name of the style element
- value: the style element value to set
setStyles
*
setStyles
Sets the given style properties on the node.
- Requires an arbitrary number of name-value pairs
addClass
*
addClass
Add a class to the classes of the node, in case it is
not there.
- value: the name of the class
removeClass
*
removeClass
Remove a class from the classes of the node, in case it
is defined on it.
- value: the name of the class
toggleClass
*
toggleClass
Add a class to the classes of the node if it's not
there, and remove it if it's there.
...
...
@@ -255,7 +255,7 @@ toggleClass
Variables
---------
setStateVar
*
setStateVar
Sets a variable that resides on the client, in a global
namespace. You can also use namespace-name to separate
...
...
@@ -265,13 +265,13 @@ setStateVar
- name: the variable name
- value: the value to set
setStateVars
*
setStateVars
Sets all given variables in a global namespace.
- Requires an arbitrary number of name-value pairs
setLocalVar
*
setLocalVar
Sets a variable that is stored in the localStorage. This variable
can be sent back to a server action later, as a parameter via
...
...
@@ -280,13 +280,13 @@ setLocalVar
- name: the variable name
- value: the value to set
setLocalVars
*
setLocalVars
Sets all given variables in the localStorage.
- Requires an arbitrary number of name-value pairs
setSessionVar
*
setSessionVar
Sets a variable that is stored in the sessionStorage. This variable
can be sent back to a server action later, as a parameter via
...
...
@@ -295,7 +295,7 @@ setSessionVar
- name: the variable name
- value: the value to set
setSessionVars
*
setSessionVars
Sets all given variables in the sessionStorage.
...
...
@@ -305,7 +305,7 @@ setSessionVars
Miscellaneous actions
---------------------
openURL
*
openURL
Opens a URL in the window specified by *target*. If the window
name does not exist a new window is opened.
...
...
@@ -327,20 +327,20 @@ openURL
- status: [no|yes]
- toolbar: [no|yes]
addHistoryState
*
addHistoryState
Adds a new entry to the browser history. The current HTML state
is stored in sessionStorage.
submit
*
submit
Submits the given node that must be a form.
focus
*
focus
Focus the given node that is a form input.
blur
*
blur
Removes the focus of the given node.
...
...
@@ -351,7 +351,7 @@ Animation actions
At time KSS supports the following animation libraries:
Velocity, GreenSock, jQuery and MooTools
animate
*
animate
If KSS detected an animation library, all parameters are forwarded
to this library and the animation is executed. Please refer to
...
...
@@ -362,7 +362,7 @@ animate
running another animation. A value of "queue" (default), "ignore",
"combine", "finish" and "stop".
scroll
*
scroll
If KSS detected an animation library, all parameters are forwarded
to this library and the scroll animation is executed. The target
...
...
@@ -380,20 +380,20 @@ animated.
Debugging helpers
-----------------
alert
*
alert
Pops up an alert box.
- message: the message to show in the alert box
log
*
log
Logs a message.
- level: the log level to use
- message: the message to log
error
*
error
Throws an exception, when executed.
...
...
@@ -406,35 +406,35 @@ Parameter providers
Fetching content
----------------
nodeAttr(attrname [, recurseParent])
*
nodeAttr(attrname [, recurseParent])
Produces the value of a given html attribute of the
selected node. The optional second parameter is by
default false. If set to true, it tries to recursively
acquire the attribute from parent nodes as well.
dataAttr(attrname [, recurseParent])
*
dataAttr(attrname [, recurseParent])
Produces the value of a given HTML data attribute of the
selected node. The optional second parameter is by
default false. If set to true, it tries to recursively
acquire the attribute from parent nodes as well.
textContent([selector])
*
textContent([selector])
Produces the textual content of the selected node,
and all its descendants.
innerText([selector])
*
innerText([selector])
Produces the rendered textual content of the selected node,
and all its descendants.
innerHTML([selector])
*
innerHTML([selector])
Produces the HTML content of all descendants of the selected node.
outerHTML([selector])
*
outerHTML([selector])
Produces the HTML content of the selected node,
and all its descendants.
...
...
@@ -443,31 +443,31 @@ outerHTML([selector])
Fetching element dimensions
---------------------------
clientWidth([selector])
*
clientWidth([selector])
Produces the inner width of the selected element in pixels. It
includes padding but not the scrollbar, border or margin.
clientHeight([selector])
*
clientHeight([selector])
Produces the inner height of the selected element in pixels. It
includes padding but not the scrollbar, border or margin.
offsetWidth([selector])
*
offsetWidth([selector])
Produces the width of the selected element in pixels. It includes
padding, scrollbar and border but not the margin.
offsetHeight([selector])
*
offsetHeight([selector])
Produces the height of the selected element in pixels. It includes
padding, scrollbar and border but not the margin.
scrollWidth([selector])
*
scrollWidth([selector])
Produces the overall width of the selected element in pixels.
scrollHeight([selector])
*
scrollHeight([selector])
Produces the overall height of the selected element in pixels.
...
...
@@ -475,17 +475,17 @@ scrollHeight([selector])
Fetching variables
------------------
stateVar(name)
*
stateVar(name)
Produces the value of a state variable, that is, the
same that can be set via the setStateVar command.
localVar(name)
*
localVar(name)
Produces the value of a localStorage variable, that is, the
same that can be set via the setLocalVar command.
sessionVar(name)
*
sessionVar(name)
Produces the value of a sessionStorage variable, that is, the
same that can be set via the setSessionVar command.
...
...
@@ -494,7 +494,7 @@ sessionVar(name)
Fetching form, event and error data
-----------------------------------
formVar([fieldname[, formname]])
*
formVar([fieldname[, formname]])
Produces the value of a given field within a given form.
...
...
@@ -506,7 +506,7 @@ formVar([fieldname[, formname]])
For submitting an entire form, see the "kss-includeform" action
parameter below.
eventAttr(name)
*
eventAttr(name)
Produces the value of a given event attribute of the
current event object. Normalized and therefore cross
...
...
@@ -519,7 +519,7 @@ eventAttr(name)
- clientX, clientY
- pageX, pageY
errorAttr(name)
*
errorAttr(name)
Produces the value of a given error attribute of the
current error object.
...
...
@@ -528,29 +528,29 @@ errorAttr(name)
Miscellaneous providers
-----------------------
styleVal(name[, selector])
*
styleVal(name[, selector])
Produces the computed style value of the selected node.
hashTag([url])
*
hashTag([url])
Produces the hash tag of the specified url or the hash tag of
the current location if omitted.
url(relative_url)
*
url(relative_url)
Produces the absolute url.
contains(list, value)
*
contains(list, value)
Returns a boolean if "list" contains "value". "list" can be a
comma or whitespace separated string or an array.
confirm(message)
*
confirm(message)
Pops up an dialog box (OK/Cancel) and returns the selection.
prompt(message[, default])
*
prompt(message[, default])
Pops up an dialog box with an input field (OK/Cancel)
and returns the entered value.
...
...
@@ -567,7 +567,7 @@ prefix.
Per action
----------
kss-includeform
*
kss-includeform
Includes the values of an entire form.
...
...
@@ -583,14 +583,14 @@ kss-includeform
Per rule or per action
----------------------
kss-precondition
*
kss-precondition
The actions are executed only if the value can be evaluated
to true. Otherwise the actions are skipped. All parameter
providers can be used.
kss-selector
*
kss-selector
Changes the scope of execution. All selectors can be
used as if they were parameter providers. A string value can also
...
...
@@ -600,7 +600,7 @@ kss-selector
Relative selectors
------------------
@samenode
*
@samenode
Selects the same node on which the event was triggered
originally.
...
...
@@ -608,37 +608,37 @@ Relative selectors
If used with kss-selector, this is the default, so it has
the same effect as not using kss-selector at all.
@parentnode
*
@parentnode
Selects the parent node of the node on which the event
was triggered originally.
@firstchild
*
@firstchild
Selects the first child of the node on which the event
was triggered originally.
@lastchild
*
@lastchild
Selects the last child of the node on which the event
was triggered originally.
@childnodes / @children
*
@childnodes / @children
Selects all child nodes of the node on which the event
was triggered originally.
@prevsibling / @previoussibling
*
@prevsibling / @previoussibling
Selects the previous sibling of the node on which the event
was triggered originally.
@nextsibling
*
@nextsibling
Selects the next sibling of the node on which the event
was triggered originally.
@currentform
*
@currentform
Selects the form that is in the parent chain of the node on
which the event was triggered originally.