Class: ListMedias

ListMedias

Control to display a list of medias


new ListMedias(api, options)

Constructor

Parameters:
Name Type Description
api MacarteAPI
options Object
Properties
Name Type Argument Default Description
target Element <optional>
search boolean <optional>
false

enable search input

thumb boolean <optional>

set thumb selection, if undefined options is hidden

limit boolean <optional>
false

show limit list

size boolean <optional>
12

current size (12x)

Source:
api/ListMedias.js
Fires:
  • event:check
  • event:select
  • event:search
  • event:click
  • event:dblclick
  • change:page
  • draw:item
  • draw:list

Methods


drawItem(m, li)

Show the media list

Parameters:
Name Type Description
m Object

media

li element

list element

Source:
api/ListMedias.js

getFolderDialog(callback)

Get folder dialog

Parameters:
Name Type Description
callback function
Source:
api/ListMedias.js

getHeaderElement()

Get header to add new buttons

Source:
api/ListMedias.js
Returns:
Type
Element

setFolder( [folder])

Set current folder and update the list

Parameters:
Name Type Argument Description
folder string <optional>
Source:
api/ListMedias.js

setThumb( [b])

Set thumbnail button

Parameters:
Name Type Argument Description
b boolean <optional>

if undefined the buuton is masked

Source:
api/ListMedias.js

showPage(page)

Show the current page

Parameters:
Name Type Description
page number
Source:
api/ListMedias.js

updateFolders(cback)

Update folder list (when new added)

Parameters:
Name Type Description
cback function

call when folders are updated

Source:
api/ListMedias.js