Pecoes Wiki
Advertisement

Namespace Railgun.FriendsList

A wrapper object around all properties and methods that make up the Friend's
List module. The friends property of this object has a counterpart in
localStorage.

Field Summary
Field AttributesField Name and Description
<static> <constant>  
Railgun.FriendsList.addFriendProfileImage
HTML code for the add friend button that appears on profile mastheads.
<static>  
Railgun.FriendsList.friends
An array of objects representing all of the user's friends, initialized in&#13;Railgun.initProcessServerResponse() and kept sorted by username in&#13;the addFriend() method.
<static> <constant>  
Railgun.FriendsList.noFriendsMessage
HTML code for the message which is displayed to the user when the Friend's List is empty.
<static> <constant>  
Railgun.FriendsList.removeFriendProfileImage
HTML code for the remove friend button that appears on profile mastheads.

Method Summary

Method AttributesMethod Name and Description
<static>  
Railgun.FriendsList.addFriend()
Adds a single friend to the Friend's List upon clicking the add friend button and&#13;issues a request to save the updated friends array to localStorage.
<static>  
Railgun.FriendsList.createFriendHTML(username)
Creates a table row element for a single friend to be added to the Friend's List.
<static>  
Railgun.FriendsList.init()
Initialization method for the Friend's List module.
<static>  
Railgun.FriendsList.removeFriend()
Removes a single friend from the Friend's List upon clicking the remove&#13;friend button and issues a request to save the updated friends&#13;array in localStorage.
<static>  
Railgun.FriendsList.toggleLinks(element, show)
Shows friend's links on mouseover and hides them again on mouseout.

Field Detail

<static> <constant> {String}Railgun.FriendsList.addFriendProfileImage
HTML code for the add friend button that appears on profile mastheads.&#13;This message has the railgun-add-friend-image CSS class, and is initialized in&#13;the Railgun.FriendsList.init() method.
See:
Railgun.FriendsList.init()
<static> {Array}Railgun.FriendsList.friends
An array of objects representing all of the user's friends, initialized in&#13;Railgun.initProcessServerResponse() and kept sorted by username in&#13;the addFriend() method. Each element of the array is an object of&#13;the form: { homewiki : "http://mathmagician.wikia.com", html : 'tr ... /tr',&#13;username : "Mathmagician" }
See:
Railgun.initProcessServerResponse
<static> <constant> {String}Railgun.FriendsList.noFriendsMessage
HTML code for the message which is displayed to the user when the Friend's List is empty.&#13;This message has the railgun-no-friends-message CSS class, and is initialized in&#13;the Railgun.FriendsList.init() method.
See:
Railgun.FriendsList.init()
<static> <constant> {String}Railgun.FriendsList.removeFriendProfileImage
HTML code for the remove friend button that appears on profile mastheads.&#13;This message has the railgun-remove-friend-image CSS class, and is initialized in&#13;the Railgun.FriendsList.init() method.
See:
Railgun.FriendsList.init()

Method Detail

  • <static> Railgun.FriendsList.addFriend()
    Adds a single friend to the Friend's List upon clicking the add friend button and&#13;issues a request to save the updated friends array to localStorage.&#13;This method sorts Railgun.FriendsList.friends alphabetically by&#13;username and does not permit duplicates.
    See:
    Railgun.FriendsList.addFriendProfileImage
    Railgun.FriendsList.friends
  • <static> {String}Railgun.FriendsList.createFriendHTML(username)
    Creates a table row element for a single friend to be added to the Friend's List.
    Parameters:
    {String} username
    name of a Wikia user, such as "Mathmagician"
    Returns:
    {String} a table row HTML element with the railgun-friend-tr CSS class.
  • <static> Railgun.FriendsList.init()
    Initialization method for the Friend's List module. This method initializes the&#13;friends property and creates the visual representation of the module&#13;on the siderail.
  • <static> Railgun.FriendsList.removeFriend()
    Removes a single friend from the Friend's List upon clicking the remove&#13;friend button and issues a request to save the updated friends&#13;array in localStorage.
    See:
    Railgun.FriendsList.friends
  • Shows friend's links on mouseover and hides them again on mouseout.
    Parameters:
    {Object} element
    a table row element containing HTML for a single friend
    {Boolean} show
    true to show links, false to hide them
Documentation generator: JsDoc Toolkit 2.4.0
Template: Codeview 1.2
Generated on: 2012-5-30 23:16
Advertisement