Set user's session data if it's available.
Base name for the message queue session storage container, which is completed with the collectionId.
Message queue which is responsible to save comments when a page reload is needed to authenticate (when posting a comment).
Instance of WidgetUi. This can handle the UI part of the widget.
Pseudonym is still missing.
Error message override.
Shows a dialog with a sign in link to re-login after a session expire.
Adds or overrides configuration options.
Sets logging level.
MessageQueue saves a message to the session storage to preserve it after a page reload.
Saves a comment to the session storage.
Verifies if there are comments for the provided collection id.
Returns the comment saved in the storage.
Clears the storage attached to the provided collectionId.
Incorporates the communication with the content creation service, Livefyre authentication, live streaming, and creation of the markup of the commenting widget.
The Widget is configurable and customizable.
Override of oCommentUi.Widget.init function. This is responsible to load the comments and the article related data. This function also initiates live stream from Livefyre.
Decides what happens when an error occurs. It clears the container. If the article is flagged as unclassified, no message appears. If any other error occurs, show a generic not available message.
Handle the comments, render them, and initiate the login process as well.
Calling this method with a height in pixels as parameter will adapt the UI to shrink within that height. If the current UI is smaller, it will fill the space to occupy the full height, or if the current UI is taller, a scroll will appear on the comments.
Inserts message when SUDS reports as authentication is not available.
Tries to obtain the user's login data. Calls a callback with the resulted status, and also fires an event if the user can be logged in.
Broadcasts a logout event.
Login required and pseudonym is missing
Login required, first attempt of the login process is successful. If the user is still not logged in, then fail. If the user has no pseudonym, ask for a pseudonym.
Login is required.
If pseudonym is missing, ask for a pseudonym.
If there is no known method to login the user, generate a
loginRequired.authAction event that can be handled at the integration level.
If successful, check if the user is logged in.
Tracks a comment post.
Tracks when CCS is down.
Tracks when the widget is successfully loaded.
Shows a dialog for setting the initial pseudonym (shown when the user doesn't have a pseudonym set).
Settings dialog where the user can change its pseudonym or email preferences.
Shows a message to the user in a dialog (not modal).
Widget.js exposed as main constructor
Comment IDs are saved to avoid duplicates. This returns if an ID already exists.
Removes a comment ID from the list of existing comments IDs.
Adds the following parameters to an existing comment object:
Iterates over an array of comments and applies the modifications made by the processOneComment function.
New comment received over the stream, this function handles it.
Post a comment. Known fact is that the user is logged in and the comment body is not blank.
Insert the comment in the DOM instantly, and try to post the comment with the API. If successful, leave the comment in the DOM and change the ID with the real comment ID. If unsuccessful, remove the comment from the DOM, repopulate the comment area with the comment and show the error message.
Export a single instance of the config container.
List of the templates available.
Shim of String.trim for older browsers. Trims a string.