Namespace: assetFinder

Granite.author.ui. assetFinder

The asset finder allow the user to search for assets and then add those to the content of the page.
It is located in the SidePanel

Initialized on Document#event:cq-editor-loaded (all asset controllers should be registered prior to this)

Source:
ui/ui.assetFinder.js

Classes

AssetDragAndDrop

Members


$el :jQuery

Corresponding jQuery element

Type:
  • jQuery
Source:
ui/ui.assetFinder.js

registry :Object

Contains all registered controllers

Type:
  • Object
Source:
ui/ui.assetFinder.js

TagList :Granite.author.ui.TagList

Lists of tags

Type:
  • Granite.author.ui.TagList
Source:
ui/ui.assetFinder.js

Methods


register(name, controller)

Register an asset controller.
Asset controllers are responsible for the loading of assets of a given type in the Asset Finder.
To add drag and drop capabilities for new asset types, make sure to also register the appropriate AssetDragAndDrop Controller under the dropController

Note that this doesn't add the corresponding asset type in the select list. This is done on "cq-editor-loaded", and thus assumes that all asset controllers have been registered before the event is triggered.

Parameters:
Name Type Description
name string

Internal name of the controller, also used to derive the corresponding asset type

controller Granite.author.ui.assetFinder~AssetController

Controller instance

Source:
ui/ui.assetFinder.js

Type Definitions


AssetController

Type:
  • Object
Properties:
Name Type Description
setUp function

Called before loading the current asset controller

tearDown function

Called before unloading the current asset controller

loadAssets function

Loads the assets of a certain type

setServlet function

Override the servlet path

setSearchPath function

Override the search path

setItemResourceType function

Override the item resource type

resetSearchPath function

Resets the search path to the default value

viewInAdminRoot string

URI Template used to view assets of this type in admin (e.g., "/assetdetails.html{+item}"). It will be expanded with the selected asset path

Source:
ui/ui.assetFinder.js