Author: Alexander S. Kazachkin 

alexander.kazachkin@citeck.ru

1.Citeck

The library with client helping functions is located in the file citeck.js and is available on all system pages.

Now there are 5 main functional categories: 

Moreover there are some functions that do not refer to any category. These functions are located in the library root. 


1.1. Citeck.namespace

Citeck.namespace allows to create the chain of the objects in the current main object Citeck. It takes one string argument that is a list of names separated with the dot around each other. 

If the following code would be executed:

Citeck.namespace("Testing.Functional") 

We will obtain such a result:

Pic.1 “Citeck” object after the usage of function “Citeck.namespace” 

On the picture 1 we can see that the object Functional has been added to the object Testing, and both have been added to the current object Citeck. In such a way this function allows to create the needed name space with the help of nested objects. 


2. Citeck.utils 

Citeck.utils is the biggest category with many different actions. This set of functions could be conditionally divided in several groups: the general-purpose groups, data loaders and value check. 

2.1. General-purpose functions

2.2. Data Loaders

Data loaders are used to get the values from the server using ajax requests. There are two main functions for creation of so called lazy and group data loading. 

Also there are 7 purpose-built data loaders:

All data loaders use Citeck.utils.bulkloader as a basic function for request creation.  

2.3. Value Check Functions 

All value check functions take the string as the only argument and return it to the Boolean Value:

3. Citeck.HTML5

The functions of this object are targeting to define the control elements and HTML5 attributes that are available in the current browser. 

The category contains 3 functions: 

3.1.  Citeck.HTML5.supportedInputTypes

It recalls the list of all new Input added to HTML5 in the current browser:

Pic.2. The result of “Citeck.HTML5.supportedInputeTypes” function performed in the last version of Google Chrome. 

3.2. Citeck.HTML5.supportAttribute

This function allows us to see whether the requested attribute is supported in the current Input version (in the browser). 

Pic.3 The result of Citeck.HTML5.supportedAttribute function performed in the last version of Google Chrome. 


3.3. Citeck.HTML5.supportInput

It is similar to Citeck.HTML5.supportedInputTypes function, but it accepts as the argument the name Inpit and returns the Boolean value. 

Pic.4 The result of Citeck.HTML5.supportInput function performed in the last version of Google Chrome. 


4. Citeck.Browser

This function helps to receive the information about the browser used by the user in that moment. Now it contains only one function – Citeck.Browser.isIE that allows to know if the current browser is Internet Explorer or not, and its version. The argument is the version number. The result will be the Boolean value. 

5. Citeck.UI

Now the library contains 2 widgets and 2 its helper functions. In order to initialize the widget it is necessary to declare it with the key word new. 

5.1. Citeck.UI.preview


This widget Is for the document preview with nodeRef

The initialization process is the following:

new Citeck.UI.preview(id, params); 

The following methods will be available after the initialization:  

There are some extra options:


5.2. Citeck.UI.waitIndicator

It is a widget for displaying of loading indicator. This widget allows to add the indicator in any place of the page for every element. 

This initialization process is the following: 

new Citeck.UI.waitIndicator(id, params);

The next parameters can be specified during the initialization: 

The next methods are available after the initialization: 

6. Citeck.mobile

It is used to define the mobile details of the current device. Now it has only two functions:

 Both methods do not take any arguments, but return the Boolean value.