Skip to content

Javascript

Rainer Sulzbach edited this page May 25, 2021 · 7 revisions

Clownfish - javascript

Javascripts can be used to code client side scripts. They can be included in the template and are linked to a site.

Table cf_javascript

attribute description
name (unique) Name of the javascript
content Source of the javascript
checkoutby Reference of the user that checked out the javascript

Steps to define a javascript:

  1. define name of the javascript
  2. create the javascript (New button)
  3. select the created javascript in the dropdownlist
  4. check it out (Check out button)
  5. write the stylesheet
  6. save the javascript (Save button)
  7. check it in (Check in button)
  8. commit the changes - new version is generated (Commit button)

When a javascript is commited to the system, a version is created in the table cf_javascriptversion (content is compressed)

A javascript is linked to a site using the js directive.

It is also possible to call a Javascript directly with *.js where * is the name of the javascript. This makes it possible to include several javascripts from the backend in other templates.

Clone this wiki locally