ListBookmarks - AFS

AFS Integration Guide

Product
AFS
AFS_Version
7.7
Category
Reference Guide

This widget allows to list the bookmarks of the logged in user. When the list is displayed the user can access or removed its bookmarks.

Parameter

Type

Card

Default

Description

itemsViewCustomActionsCallback

String/Function

Optional

N/A

Name of an existing function or function that can be called to build additional actions to display at the bottom of the items list view.

itemViewCustomActionsCallback

String/Function

Optional

N/A

Name of an existing function or function that can be called to build additional actions to display at the bottom of the item details view.

outsideClickTogglePanel

Boolean

Optional

false

Indicates if the click has to be monitored to change the widget state. See tip below.

A JavaScript-based configuration could look like this:

var AFSWidgetAddBookmark = {
urlBuilder: function() {
return window.location.href; // default implementation
},
nameBuilder: function() {
// return document.title; // default implementation
return document.getElementById('product-title').textContent;
},
descriptionBuilder: function() {
return document.getElementById('product-description').textContent;
}
};

At integration time, the widget can be styled as a pop-up. The click on the main button toggles the presence of a CSS class on the widget top-level container, allowing to update the panel visibility. If styled as a pop-up, the outsideClickTogglePanel option can be useful to change the widget state when a click occurs outside of the widget panel, by removing the previously mentioned CSS class.