Sort Block Element Element

Home | Getting Started | API | Elements | Actions | Validators | Handlers | Configuration Options | Plugins | Mobile | Troubleshooting | About

Table of Contents

1 Sort Block Element - #sortblock {}

The sort block element allows you to make a list of Nitrogen elements sortable by the user.

Usage

#sortblock { tag=block1, items=[
  #sortitem { tag=item1, body="Item 1" },
  #sortitem { tag=item2, body="Item 2" },
  #sortitem { tag=item3, body="Item 3" }
]}

Attributes

tag - (Erlang term)
The term to pass into the sort_event/2 event.
items - (list of #sortitem elements)
The #sortitem elements that will be sortable.
group - (atom or string)
The name of this sortable group.
connect_with_groups - (list of atoms or strings)
The other groups that can accept items from this group.
handle - (atom or string)
A CSS class that will be used as the drag handle for #sortitems.
placeholder - (atom or string)
The class of the placeholder when an item is dragged away
force_placeholder_size - (boolean)
Force the placeholder to be the same size as the moved sortblock item

Callbacks

sort_event(BlockTag, ListOfItemTags)

Called when the user sorts elements. BlockTag is the tag associated with this sort block. ListOfItemTags is a list of item tags in the new order specified by the user.

Date: 2013-10-03 13:41:22 CDT

Author: Rusty Klophaus (@rustyio)

Org version 7.8.02 with Emacs version 23

Validate XHTML 1.0

Comments

Note:To specify code blocks, just use the generic code block syntax:
<pre><code>your code here</code></pre>


comments powered by Disqus