-
Notifications
You must be signed in to change notification settings - Fork 82
BuildFire Action Items Component
o5faruk edited this page May 2, 2021
·
8 revisions
This sdk documentation is deprecated and will not be updated. Check out our new docs at https://sdk.buildfire.com/docs/action-items-component
This component simplifies the development of the management controls when adding Action Items (see action items). Typically used on the Control side of a plugin, it allows the app owner to add, edit, delete and sort action items.
This name space consists of one major class:
-
sortableList
which is the class that instantiates the editor component typically used on the control side to add, edit and delete action items
typically used on the control side to add, edit and delete action items.
<!-- Load helper.css to use our helper classes -->
<link href="../../../../styles/helper.css" rel="stylesheet">
<link href="../../../../styles/siteIcons.css" rel="stylesheet">
<!-- JS -->
<script src="../../../../scripts/buildfire.js"></script>
<script src="../../../../scripts/sortable.min.js"></script>
<script src="../../../../scripts/buildfire/components/actionItems/sortableList.js"></script>
var editor = new buildfire.components.actionItems.sortableList([selector],[items optional]);
-
selector
typical css selection string to identify the containing element -
items
loads any previously saved items. items are of typeactionItem
see Action Items
-
editor.init
: a secondary method outside of the constructor to initialize the component -
editor.loadItems(items, appendItems)
use this method to load the carousel with new items or passtrue
inappendItems
to append items to the existing list -
editor.append
: allows you to append a single item or multiple items at once. Items are of typeactionItem
see Action Items -
editor.clear
: use this method to clear out all your items form the carousel
-
editor.onAddItems(items)
an overridable handler that is called when an item is added -
editor.onDeleteItem(item, itemIndex)
an overridable handler that is called when an item is deleted -
editor.onItemChange(item, itemIndex)
an overridable handler that is called when an item is changed -
editor.onOrderChange(item, oldIndex, newIndex)
an overridable handler that is called when an item is changed