LADS.Layout.NewCatalog Class
The collections page
Constructor
Item Index
Methods
- addCollection
- changeDisplayTag
- clickCollection
- colorSortTags
- contentsHelper
- createArtTiles
- doSearch
- drawArtworkTile
- drawCatalog
- enableSingleCollectionUI
- getCollectionContents
- getCollectionsHelper
- getRoot
- getState
- init
- initSearch
- loadCollection
- showArtwork
- showCollection
- sortCatalog
- sortComparator
- sortValuation
- switchPage
- switchPageTour
Methods
addCollection
-
collection
Add a collection to the left bar
Parameters:
-
collection
Doqthe collection to add
changeDisplayTag
-
artworks
-
tag
Changes the selected tag and re-sorts
clickCollection
-
elt
-
sPos
-
artwrk
Click handler for collection title in left bar
Parameters:
-
elt
JQuery objthe element we're clicking
-
sPos
Numberif undefined, set scroll position to 0, otherwise, use this
-
artwrk
Doqif undefined, set currentArtwork to null, otherwise, use this
colorSortTags
-
tag
Set the colors of the sort tags
Parameters:
-
tag
Stringthe name of the sort tag
contentsHelper
-
contents
Helper function to process collection contents
Parameters:
-
contents
Arrayarray of doq objects for each of the contents of this collection
createArtTiles
-
artworks
Create tiles for each artwork/tour in a collection
Parameters:
-
artworks
Arrayan array of doq objects
doSearch
()
Search collection using string in search input box
drawArtworkTile
-
currentWork
-
tag
-
onSearch
-
i
-
w
-
h
Creates an artwork tile in a collection's catalog
drawCatalog
-
artworks
-
tag
-
start
-
onSearch
Draw the collection catalog
enableSingleCollectionUI
()
When only a single collection exists, this function modifies the CSS to hide the list of collections and expand the description area.
getCollectionContents
-
collecion
-
callback
Get contents (artworks, videos, tours) in the specified collection and make catalog
Parameters:
-
collecion
Doqthe collection whose contents we want
-
callback
Functiona function to call when the contents have been retrieved
getCollectionsHelper
()
Helper function to add collections to left bar
getRoot
()
JQuery Object
Returns the root of the collections page
Returns:
root of the collections page
getState
()
Object
Gets the current state of the collections page
Returns:
object containing state
init
()
Sets up the collections page UI
initSearch
-
contents
Store the search strings for each artwork/tour
Parameters:
-
contents
Arraythe contents of this collection (array of doqs)
loadCollection
-
collection
-
isPrivate
When a collection is selected in the left bar, load its image and description in the display area
Parameters:
-
collection
Doqthe collection to load
-
isPrivate
Booleana little bit of a hack to get private exhibits to show in settings view. When set to true it just ignores anything that relies on 'this' since 'this' doesn't exist for a private exhibit (it doesn't have a label in the exhib list)
showArtwork
-
artwork
Shows an artwork in the upper section; sets the current thumbnail to be the artwork's and shows name, description, etc
Parameters:
-
artwork
Doqthe artwork doq to be shown
showCollection
-
c
Show collection contents and display current artwork if there is one
Parameters:
-
c
Doqthe relevant collection doq
sortCatalog
-
artworks
-
tag
Sort the catalog by the given criterium
Returns:
an avl tree for easy sorting
sortComparator
-
primary
-
secondary
Generates a comparator function for catalog sorting
sortValuation
-
property
Generates a valuation function for catalog sorting
Parameters:
-
property
Stringvaluation property name
switchPage
()
Switch to the artwork viewer or tour player
switchPageTour
-
tour
Switch to the tour player
Parameters:
-
tour
Doqthe relevant tour doq