Referencing Infragistics JavaScript Resources

Referencing Infragistics JavaScript resources summary

To work with NetAdvantage for jQuery you must reference Infragistics resources in your Web application. You can reference these resources in three different ways.

How to reference resources…

Description

Using Infragistics Loader

The Infragistics Loader can be used to resolve all the Infragistics resources (styles and scripts)

Including all JavaScript files

You can manually reference all the required files

Including combined JavaScript files

Using the combined JavaScript files

Referencing JavaScript resources using the Infragistics Loader

The Infragistics Loader resolves all the Infragistics resources (styles and scripts) for you. You just need to provide the path to required CSS and JavaScript files and declare which resources the loader will fetch for the page. You need to reference the Infragistics Loader:

Referencing External JavaScript Resources

Referencing external JavaScript libraries summary

The Modernizr, JQuery, and JQuery UI JavaScript libraries are always required in your projects including the NetAdvantage for jQuery. The Modernizr library detects the current browser features, allowing the controls to identify a touch or non-touch environment.

Referencing Localization Resources

Referencing localization resources summary

NetAdvantage for jQuery ships with resources for English and Japanese languages.

Starting with Volume 2012.1 we will provide Russian ([ru]) and Bulgarian ([bg]) localization as part of the product. Localization files must be placed in the localization folder../js/i18n (where js is the root folder for the JavaScript files in the NetAdvantage program installation).

After adding Infragistics resources, the scripts folder of your Web application will have a modules folder. Under the modules folder localization resources for modular widgets (igGrid) need to be combined into one file.

The i18n folder will be placed inside the modules folder, holding the JavaScript files to localize the widgets to the Japanese, Bulgarian and Russian languages.

JavaScript files provide localized formats including dates, numbers, and currency for the jQuery editors. These reside in ../js/modules/i18n/regional (where js is the root folder for the JavaScript files in the NetAdvantage program installation).

Note: The regional settings are not part of combined scripts file,therefore they must be referenced if the combined scripts file is used.

Note: In case that Infragistics Loader is NOT used, localization scripts must always be included before the actual JavaScript files. The same applies for regional scripts.

Note: In case that Infragistics Loader is NOT used and we want to configure any regional settings, the infragistics.util.js file must be included before any regional JavaScript files. This is because the regional JavaScript files are dependent of infragistics.util.js functionality and use it internally.

There are two ways to reference localization resources:

Using Infragistics Loader, which resolves the Infragistics resources (styles and scripts) and also the localization resources.

Referencing the localization scripts manually.

The examples below will demonstrate how to include Bulgarian localization resources, assuming you already have the JavaScript files mentioned above.

Referencing English and Japanese localization

If the resources are combined with the widget and all EN resources are combined with the widget JavaScript then there is no need to include *-en.js. If it’s English locale and English product have been installed. In the same manner no need to include *-ja.js resources if it’s Japanese locale and Japanese product was installed.