Class: UserGroupView

UserGroupView()

A subview that displays group management. View controls creation of groups and addition of members to groups

Screenshot

Constructor

new UserGroupView()

Source:

Extends

  • Backbone.View

Methods

checkGroupName(e)

Gets the group name the user has entered and attempts to get this group from the server If no group is found, then the group name is marked as available. Otherwise an error msg is displayed
Parameters:
Name Type Description
e Event
Source:

createGroup(e)

Syncs the pending group with the server
Parameters:
Name Type Description
e Event
Source:

createGroupList(userGroup, viewOptions)

Creates a view of a list of groups that the User is a member of
Parameters:
Name Type Description
userGroup UserGroup A user group model
viewOptions Object an object of options for the view
Source:

getGroups()

Gets the groups the this user is a part of and creates a UserGroup collection for each
Source:

insertCreateGroupForm()

Inserts a new form for this user to create a new group. The form container is grabbed from the template
Source:

insertMembership(groups, listContainer) → {String}

Returns a container that includes a view of the user's group membership
Parameters:
Name Type Description
groups Array.<UserGroup> An array of UserGroup models
listContainer String An html string template of a container that will get appended
Source:
Returns:
HTML string filled with groups information
Type
String

onClose()

Closes the view and clears any subviews
Source:

refreshGroupLists()

Will send a request for info about this user and their groups, and redraw the group lists. Will also reset the "Create New Group" form
Source:

showAlert(msg, classes, container)

Displays an alert message to the user
Parameters:
Name Type Description
msg String Message of the alert
classes String A class tag
container String The container tag
Source: