Liquit.Settings.List
  • 12 Dec 2023
  • 1 Minute to read
  • Dark
    Light
  • PDF

Liquit.Settings.List

  • Dark
    Light
  • PDF

Article Summary

The Liquit.Settings.List function returns all user and portal settings available. Some properties are read-only; for more details, see the list with all properties.

Usage

Every setting has at least four different properties:

  • id - The identifier of the setting (e.g. “portal.animations” identifies whether or not animations are enabled)
  • force - Reflects whether or not an administrator has locked a user setting in Liquit Workspace > Manage.
  • inherited - This property reflects whether or not the value is inherited or if it is modified
  • value - Returns the value of the setting.

Example

Liquit.Settings.List(function (fault, result) {
  
  // Check if the request failed.
  if (fault != null) {
    alert('Error ' + fault.code + ': ' + fault.message);
    return;
  }
  
  // The result object contains an array with all the settings.
  console.log(result)
  
  // Build a table with all the available settings and their values.
  var table = $('<table>')
  .append(
    $('<tr>').append(
      $('<td>')
      .text('Setting id'),
      $('<td>')
      .text('Value'),
      $('<td>')
      .text('Force'),
      $('<td>')
      .text('Inherited')
    )
  );
  
  // Loop through result.
  for (var i in result)
    table.append(
      $('<tr>').append(
        $('<td>').text(result[i].id),
        $('<td>').text(result[i].value),
        $('<td>').text(result[i].force),
        $('<td>').text(result[i].inherited)
      )
    )
  
  table.appendTo($('body'));

});

Was this article helpful?