2024 April Release

JavaScriptPermanent link for this heading

Include following two JavaScript files in the head tag:

At the end of the body tag, after the mustache template add the script tag as defined in the example page. It is used for configuration (calldata) and the rendering will be triggered (fsc.webcontent.render(calldata)). The function _toggle allows opening and closing folders, if the template with several levels is used.

The following configuration settings are available:

  • target: "https://at.cloud.fabasoft.com/folio"
    The Fabasoft Cloud installation from where the data should be retrieved.
  • rootobject: "COO.1.506.2.2044"
    The root Teamroom or root folder. It can be defined as Fabasoft Cloud ID (e.g. COO.1.506.2.2044) or as public link ID (e.g. 1hqdbo7wvev5s1fpgwi0s86k1s). When using the Fabasoft Cloud ID an authentication is always mandatory. Only public links without password protection can be used.
  • sortby: ["COOSYSTEM_1_1_objname:UP:"]
    The documents can be sorted per column up or down (:UP: or :DOWN:).
  • maxleveldepth: 5
    The maximum folder level that should be displayed. A value up to 5 can be defined.
  • language: "en"
    The language in which the strings should be retrieved.
  • locale: "en-US"
    The locale in which the dates and times should be retrieved.
  • timezoneoffset: -120
    The time zone offset that should be considered.
  • datetimeformat: "dd/mm/yy hh:mm"
    The date and time format that should be considered for all dates and times (overrides the locale setting).
  • containerid: "FscJSLibContainer"
    The HTML element in which the document list should be rendered (see chapter “Container Tag”).
  • templateid: "FscJSLibTemplateWithFiveLevels"
    The ID of the script tag that contains the mustache template (see chapter “Mustache Template”).
  • strings: ["FSCVENV_1_1001_StrExpand", "FSCVENV_1_1001_StrCollapse"]
    Multilingual strings can be retrieved form the Fabasoft Cloud and used in the mustache template (e.g. {{{strings.StrExpand}}}).
    Note: Only the short reference is used in the mustache template to denote the string.
  • dataonly: true | false
    Do not render the data returned from the Fabasoft Cloud by using a mustache template. You may render the data by yourself. The data from the Fabasoft Cloud will be passed to the success callback function (see below).

By help of fsc.webcontent.setSuccessCallback(callbackfunction) you may define a function that is called after a successful rendering. The function will get the JSON data as parameter.

By help of fsc.webcontent.setErrorCallback(callbackfunction) you may define a function that is called whenever an error occurred. The function will get the JSON data as parameter. The JSON data will also contain an errors member that will describe the errors occurred.