Populates and displays the app. In most cases, this is the only function you will ever need to run.
Adds the sidemenu to the app. This function will create the div and then add the required controls to the sidemenu, based on the options that were set when the App object was initialised.
Creates, populates and adds a header to a control in the app’s sidemenu.
(String) - The text to appear in the section header.
(String or Array) - The text to appear when the cursor is over the help icon.
Loops through the SDCat.App.sidemenuButtons and adds them to the sidemenu.
Creates a select box comprised of the options in a given SDCat.App.items list.
(Object) - Contains the select box specific options. The attributes of this object are as follows:
(String) - The text of this select box’s section header. This will be passed to SDCat.App.createSectionHeader().
(String) - The type of items which will populate this select box.
Preselects default options in a select box, based on the contents of the item’s default attribute.
(String) - The type of items. This will be the same as options.type in SDCat.App.createSelectBox().
Refreshes the content of a select box, based on the contents of the item’s default attribute.
(String) - The type of items. This will be the same as options.type in SDCat.App.createSelectBox().
Creates a JQuery buttonset comprised of the options in a given SDCat.App.items list.
(Object) - Contains the buttonset specific options. The attributes of this object are as follows:
(String) - The text of this buttonset’s section header. This will be passed to SDCat.App.createSectionHeader().
(String) - The type of items which will populate this buttonset.
(Function) - The function to run when the buttonset’s value has been changed.
Creates a JQuery button.
(Object) - Contains the button specific options. The attributes of this object are as follows:
(String) - The text that will appear on the button.
Creates a JQuery drop down box comprised of the options in a given SDCat.App.items list.
(Object) - Contains the drop down box specific options. The attributes of this object are as follows:
(String) - The ID of this drop down box.
(String) - The type of items which will populate this drop down box.
(String) - A description of this drop down box. This will appear on page load as the default text that appears in the drop down box.
(Function) - The function to run when the buttonset’s value has been changed.
Returns an array item names from a SDCat.App.items list where an attribute matches a value.
(String) - The type of items to search through.
(String) - The attribute of the item to search against.
(String) - The value of the attribute to search for.
Example:
// Find all BAS radars
var filteredItems = app.selectItemsByAttribute("radars", "institute", "British Antarctic Survey");
This will return an array containing the radars where the institute attribute matches British Antarctic Survey (i.e. fir and hal).
Selects all items in the app. Note that the only items selected are those where the clearable flag is set to true.
Clears all selected items and resets the selection boxes. Note that the only items selected are those where the clearable flag is set to false.
Adds a help tooltip to an element in the page.
(JQuery element) - When the cursor hovers over this element, the help tooltip will be displayed.
(String or Array) - Collection of bullet points that will appear in the tooltip which make up the help text. If a String is supplied, it will be converted to an Array. This is usually the help attribute of the app components.
Generates the coverage plot by creating a SDCat.CoveragePlot object and displaying it on the page.
Resets the view of the plot to the original timespan after zooming in.