mod_wires

Actions, tags (also known as screen components), and javascript for user interfaces using wires.

Used by mod_admin and the other administrative modules.

Wires are actions that are directly coupled to user interface elements. These couplings are defined in the templates using the wire tag.

Edit on GitHub

Actions

add_class

Add a css class to an html element.

alert

Show an alert dialog.

animate

Add a $(..).animate jQuery call to the target element.

confirm

Show a JavaScript confirm message and on confirmation triggers one or more actions and/or sends a postback to the…

dialog

Opens a dialog with a predefined HTML content and title.

dialog_close

Closes a dialog. When there is no dialog open then nothing happens.

dialog_open

Renders a template on the server and opens a dialog with the HTML output of the template.

disable

Sets the “disabled” attribute of a HTML tag and adds the CSS class “disabled”.

editor_add

Add WYSIWYG editor controls to all textarea’s with the z_editor class in the target.

editor_remove

Remove any WYSIWYG editor controls from all textarea’s with the z_editor class in the target.

effect

Add a $(..).effect jQuery call to the target element.

enable

Resets the “disabled” attribute of a HTML tag and removes the CSS class “disabled”.

event

Bind actions to a jQuery event or submit a form.

fade_in

Show an element by animating the opacity.

fade_out

Hide an element by animating the opacity.

focus

Add a $(..).focus() jQuery call to the target element to give it input focus.

form_reset

Resets the target form to its initial state.

growl

Show a message in the upper right corner of the browser window. The message will automatically disappear after some…

hide

Hide an element without any animation.

Scomp

button

Makes a button with an action attached.

draggable

Mark a html element as draggable.

droppable

Mark an element as valid drag destination.

script

This tag is the placeholder where all generated JavaScript scripts will be output on the page.

sortable

Mark an element as sortable.

sorter

A sorter is a container for sortables.

validate

The validator tag accepts the following arguments:

wire

Connect actions and events to a HTML element.

wire_args

Add extra arguments to wired actions.

Referred by

Browser/server interaction

There are multiple ways to set up interaction between server-side Zotonic code and client-side JavaScript.