The GEOSS Discovery And Access Broker APIs
Authors: Fabrizio Papeschi, Mattia Santoro, Stefano Nativi
API version: 1.4.3-beta

UI_Utils

Module: UI

Collection of static UI utility methods.
The following CSS is required:

<!-- API CSS -->
<link rel="stylesheet" type="text/css" href="http://api.eurogeoss-broker.eu/docs/assets/css/giapi.css" />

Item Index

Methods

addCloseButtonOnTab

(
  • id
  • onClose
)
static

Adds a close button on the right side of a jQuery UI Tabs tab with the given id. The button is appended to the <ul> or <ol> element which defines the tabs

Parameters:

  • id Object

    the tab identifier

  • onClose Object

    callback function called when the button is clicked

dialog

(
  • action
  • [options]
)
static

Generic dialog

Parameters:

  • action String

    possible values are:

    • "open"
    • "isOpen"
    • "close"

  • [options] Object optional

    all the jQuery UI Dialog options are allowed plus the following

    • [message] String optional

      the message to show

    • [maximize=false] Boolean optional

      if set to true a small maximize button is set beside the close button

    • [maximize] Integer optional

      Integer array [width,height]; if maximize is set to true set the maximum size of the maximized window

discoverDialog

(
  • action
)
static

Dialog to show during a discover

Parameters:

  • action String

    possible values are:

    • "open"
    • "isOpen"
    • "close"

enterKeyDown

(
  • handler
)
static

Set a callback which handles the enter key pression

Parameters:

helpImage

(
  • title
  • helpMsg
  • css
)

Creates a small help icon which shows a dialog when clicked

Parameters:

  • title String

    title of the help dialog

  • helpMsg String

    message of the help dialog

  • css String

    css for the <img&gt element of the icon

isFullScreen

()

loadOverview

(
  • node
  • id
  • [options]
)
static

Loads the given node overview in the HTML container with the specified id using the "small" size of 96x96px and set a "click" listener to the container in order to show the image (in its original size) in a maximizable dialog

Parameters:

  • node GINode
  • id String
  • [options] Object optional

    all the overview options are allowed. If selector is set, index is ignored

    • [selector] Boolean optional

      if set, in case of multiple overviews available, two arrow buttons "left" and "right" placed on bottom of the overview container allow to select which overview to show

    • [maintainSize] Boolean optional

      is set, the overview container maintains the size of the "small" overview size of 96x96 px also if the the image is smaller than 96x96

openNodeInfoPage

(
  • dabNode
  • targetNodeId
)
static

Opens a page with detailed info on the GINode with the given targetNodeId

Parameters:

removeDialogBorders

(
  • id
)
static

Removes the borders from the jQuery UI Dialog with the specified id

Parameters:

  • id Object

    the dialog identifier

removeGlassPane

() static

Removes the glass pane from the HTML element with the given targetId and set the opacity to 1. If a background was set, it is removed.

See also setGlassPane

separator

() static

Exit from the full screen mode of the browser

separator

(
  • css
)
static

Draws a thin light gray line; see the line class in the API CSS file

Parameters:

  • css String

    css for the <div&gt element of the icon; at least a width must be set

setGlassPane

(
  • targetId
  • [options]
)
static

Set a glass pane over the HTML element with the given targetId.

See also UI_Utils/remove:method

Parameters:

  • targetId String

    id of the HTML element where to apply the glass pane

  • [options] Object optional
    • [background=false] Boolean optional

      if set, apply a background with diagonal ticks on the target element

    • [opacity=0.2] Number optional

      set the opacity of the target element

    • [onClick] Function optional

      callback function to call if the glass pane is clicked