new Group( [ parent ], $el )

Description

Group object

Parameters
Name Type Attributes Description
parent Group <optional>
$el jQuery
Details

Members


<readonly> $el :jQuery

Details
jQuery

condition :string

Details
string

data :object

Details
object

error :string

Details
string

<readonly> flags :object

Details
object

<readonly> id :string

Details
string

<readonly> level :int

Details
int

<readonly> model :Model

Details

not :boolean

Description
Details
boolean

<readonly> parent :Group

Details

<readonly> rules :Array.<object>

Details
Array.<object>

Methods


addGroup( $el [, index ] ) → {Group}

Description

Adds a new Group at specified index

Parameters
Name Type Attributes Default Description
$el jQuery
index int <optional>
end
Returns
Details

addRule( $el [, index ] ) → {Rule}

Description

Adds a new Rule at specified index

Parameters
Name Type Attributes Default Description
$el jQuery
index int <optional>
end
Returns
Details

contains( node [, recursive ] ) → {boolean}

Description

Checks if the group contains a particular Node

Parameters
Name Type Attributes Default Description
node Node
recursive boolean <optional>
false
Returns
Details

drop()

Description

Deletes self

Details

each( [ reverse ], cbRule [, cbGroup [, context ] ] ) → {boolean}

Description

Iterate over all Nodes

Parameters
Name Type Attributes Default Description
reverse boolean <optional>
false

iterate in reverse order, required if you delete nodes

cbRule Model#GroupIteratee

callback for Rules (can be null but not omitted)

cbGroup Model#GroupIteratee <optional>

callback for Groups

context object <optional>

context for callbacks

Returns

if the iteration has been stopped by a callback

Details

empty()

Description

Removes group's content

Details

getNodePos( node ) → {int}

Description

Returns the position of a child Node

Parameters
Name Type Description
node Node
Returns
Details

getPos() → {int}

Description

Returns the node position inside its parent

Returns
Details

insertNode( node [, index [, trigger ] ] ) → {Node}

Description

Adds a Node at specified index

Parameters
Name Type Attributes Default Description
node Node
index int <optional>
end
trigger boolean <optional>
false

fire 'add' event

Returns

the inserted node

Details

isRoot() → {boolean}

Description

Checks if this Node is the root

Returns
Details

length() → {int}

Description

Returns the number of children

Returns
Details

move( target, index )

Description

Moves itself at specific position of Group

Parameters
Name Type Description
target Group
index int
Details

moveAfter( target )

Description

Moves itself after another Node

Parameters
Name Type Description
target Node
Details

moveAtBegin( [ target ] )

Description

Moves itself at the beginning of parent or another Group

Parameters
Name Type Attributes Description
target Group <optional>
Details

moveAtEnd( [ target ] )

Description

Moves itself at the end of parent or another Group

Parameters
Name Type Attributes Description
target Group <optional>
Details

removeNode( node )

Description

Deletes a specific Node

Parameters
Name Type Description
node Node
Details