Class jQueryConfig

The jQueryConfig class holds default configuration information common script and CSS libraries. These default values are used by various controls in the Web control framework by default unless you override them explicitly.

Configures:

  • jQuery
  • ww.jQuery
  • jQuery UI
  • jQuery UI CSS Theme

The values from this class are used globally, using a public object. You can set defaults on this object like this:

loConfig = LoadjQueryConfig()  && Gets public instance
loConfig.jQueryCDNUrl =  "https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"
loConfig.jQueryUiCDNUrl = "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"
jQueryFallbackUrl = "~/myscripts/jquery.min.js"
jQueryUIFallbackUrl = "~/myscripts/jquery-ui.min.js"

You can set this code either globally in your Application's OnLoad() handler, or on a per Process class basis in the OnProcessInit() method of a Process class. If you use the latter make sure to do this in all your Process handlers.

For more detailed info please see How jQueryConfig works.

Remarks

This object must be used in conjunction with a wwWebPage
as it relies on the Page object to inject script into the
page.

Class Members

MemberDescription

IncludejQuery

Routine that loads the jQuery library onto a page. Web Connection internally uses this routine to embed jquery into the page so if you always use this method jQuery will only be embedded once even if called more than once.

o.IncludejQuery(lcScriptLocation,llAsString)

IncludejQueryUI


IncludejQueryUi

o.IncludejQueryUI(lcScriptLocation, llAsString)

IncludewwjQuery

Embeds the ww.jquery.js script into a Web Page. If this routine is used consistently to load ww.jquery.js for all controls and occaions, only one instance of the script will be loaded regardless how often the method is called.

o.IncludewwjQuery(lcScriptLocation, llAsString)

jQueryCDNUrl

The default jQuery CDN Url

jQueryFallbackUrl

Fallback Url if CDN jquery Url doesn't work

jQueryLoadMode

This property holds the default jQuery and jQueryUI load mode. The default value is "Default" which is synonymous with loading resources from CDN (with a local fallback) or from a fixed URL when no CDN is available.

jQueryUiCDNUrl

Default jQUery UI CDN Url

jQueryUiCssBasePath

The base CSS Theme path (use the base folder of the themes)

jQueryUIFallbackUrl

Fallback Url if CDN jQueryUI Url doesn't work

jQueryUiTheme

The default Theme used for jQuery UI

wwjQueryUrl

The default url to the ww.jquery.js location. ww.jquery.js provides the Web Connection AJAX features as well a number of jQuery helper plug-ins all based on jQuery.

Requirements

Assembly: webcontrol.prg

See also:

How jQueryConfig works

© West Wind Technologies, 1996-2024 • Updated: 03/27/14
Comment or report problem with topic