Common Libraries

This document is still under construction

Salsa produces a variety of libraries to simplify and standardize complex tasks. To understand these libraries, it it useful to know how Salsa organizes Packages.

Package Layout

Packages are directories containing code and supporting files for a common set of features. All Salsa packages are contained in the /packages/ directory.

  • /salsa The 'salsa' directory contains features and products that are produced by the core SalsaLabs team.
  • /* Other root level directories contain products developed by other organizations running Salsa nodes

    Salsa Common Libraries

  • /salsa/common The 'common' subdirectory contains code that is common for all users of Salsa, at all times. Developers can use these Salsa Common libraries to simplify complex tasks, standardize imgs, and speed up the development process. Some common libraries of note:
    • /salsa/common/hq

      This directory contains packages that are useful for all Headquarters tasks, and span all objects. It does not contain code that is relevant to any specific object.

      • /salsa/common/hq/search - Code to use an inline Javascript popup to search for a particular item. For example, to search for a supporter, you can use the include:
        <?@include "/salsa/common/hq/search/searchInput.sjs?object=supporter&inputName=supporter_KEY&defaultKey=1"?>
        			
        would produce an input box in the HQ.
      • /salsa/common/hq/tag - common libraries for including a tagging widget on a page
      • /salsa/common/hq/workflow - common libraries for producing a workflow with a consistent look and feel. A workflow is a multi-step editing process, rendered using tabs.
      • /salsa/common/hq/list - common libraries for a standard listing of items, with optional filtering, Ajax editing, and links to edit and delete items

    Supporter Libraries

    Libraries that are useful for developing code around supporters
  • /salsa/supporter/common - Contains common libraries that are relevant to supporters, including Query info, profile manager, groups, etc.