JSHelper Class |
Namespace: NetQuarry
The JSHelper type exposes the following members.
Name | Description | |
---|---|---|
AddApplicationScriptRefs |
Adds the standard application .js script reference(s).
| |
AddFrameworkScriptRef |
Add a javascript file reference that depends on framework script (e.g. jQuery or Bootstrap).
| |
AddGoogleAnalytics |
Add Google Analytics script to the page header. For best performance this should go at the very end of the header,
immediately before the close of the header tag.
| |
AddLinkRef(Page, String, Boolean) |
Add stylesheet references to the page header.
Note that application developers who want to limit browser caching should generally use the
AddLinkRef(Page, String, String) overload and provide the
AppCacheVer(IAppContext) as the cacheVer.
| |
AddLinkRef(Page, String, String) |
Add stylesheet references to the page header.
Generally application developers who want to limit browser caching should provide the
AppCacheVer(IAppContext) as the cacheVer.
| |
AddLinkRef(Page, String, String, String, Boolean) |
Add a stylesheet reference (or other links) to the page header.
Note that application developers who want to limit browser caching should generally use the
AddLinkRef(Page, String, String, String, String) overload and provide the
AppCacheVer(IAppContext) as the cacheVer.
| |
AddLinkRef(Page, String, String, String, String) |
Add a stylesheet reference (or other links) to the page header. Generally application stylesheet references should
be added using the AddLinkRef(Page, String, String) overload and this overload only for other types of links.
Note that application developers who want to limit browser caching should generally provide the AppCacheVer(IAppContext)
as the cacheVer.
| |
AddScriptRef(Page, String, Boolean) |
Add script references to the page header.
| |
AddScriptRef(Page, String, String) |
Add script references to the page header.
Generally application developers who want to limit browser caching should provide the
AppCacheVer(IAppContext) as the cacheVer.
| |
AddScriptRef(Page, String, Boolean, Int32) |
Add script references to the page header.
| |
AddScriptRef(Page, String, String, Int32, Boolean, Boolean) |
Add script references to the page header.
Generally application developers who want to limit browser caching should provide the
AppCacheVer(IAppContext) as the cacheVer.
| |
AlertInit |
Returns the script to initialized client-side pinging for alerts. This is normally called only from
top windows.
| |
AppCacheVer |
Gets a version string to manage browser caching of css and js files.
| |
CrumbSet |
Returns the script for calling the CrumbSet() breadcrumb management function.
| |
DelFilter |
Returns the script for deleting a saved mapper filter.
| |
DirtyConfirm(String) |
Generate javascript for use in an onclick handler to determine whether the current page is dirty and,
if so, to confirm that the user wants to abandon their changes. Normally this script is prepended to
any other javascript that may be performed. If the only action involved is a navigation via an anchor
tag then typically this script is sufficient by itself.
| |
DirtyConfirm(String, String) |
Generate javascript for use in an onclick handler to determine whether the current page is dirty and,
if so, to confirm that the user wants to abandon their changes. Normally this script is prepended to
any other javascript that may be performed. If the only action involved is a navigation via an anchor
tag then typically this script is sufficient by itself.
Typically you should use the DirtyConfirm(String) overload which uses window as
the window symbol unless you know you need to refer to the window differently.
| |
EAPDefaultCSS |
Gets the path to the EAPDefault CSS file with a query parameter to prevent unwanted browser caching.
Use EAPDefaultCSS(IAppContext) instead in order to allow for the BaseCSS override.
| |
EAPDefaultCSS(IAppContext) |
Gets the path to the EAPDefault CSS file with a query parameter to prevent unwanted browser caching.
Call this method, instead of EAPDefaultCSS in order to allow for the BaseCSS override.
| |
EAPjQueryJS |
Gets the path to the EAPjquery.js javascript file with a query parameter to prevent unwanted browser caching.
| |
EAPjQueryUIJS |
Gets the path to the EAPjqueryUI.js javascript file with a query parameter to prevent unwanted browser caching.
| |
EAPMobileJS |
Gets the path to the EAPMobile.js javascript file with a query parameter to prevent unwanted browser caching.
| |
EAPUtilJS |
Gets the path to the EAPUtils javascript file with a query parameter to prevent unwanted browser caching.
| |
EnsureDoPostBack |
Ensures that .Net registers a __doPostBack method on the page. Normally .Net only registers __doPostBack if
the page contains at least one control that invokes a postback. Typically this is fine, however, when rendering custom
HTML that wants to use __doPostBack you should call this method to ensure that .Net registers the method on the page.
| |
Eval |
Evaluate an arbitrary javascript expression.
| |
EvalBool |
Evaluate a javascript expression and interpret the results as a boolean value.
| |
GenApplicationScriptRefs |
Generate the HTML for the standard application .js script reference(s).
| |
GenLinkRef |
Generate the HTML for a .css link reference.
| |
GenScriptRef |
Generate the HTML for a .js script reference.
| |
GenScriptTag |
Generate the HTML for a block of javascript code.
| |
HighChartsJS |
Gets the resource URL for HighCharts functionality
| |
jQueryPath |
Gets the path to the jQuery library javascript file appropriate for current application settings.
Determination of what consistutes the correct version of jQuery involves a number of factors including:
| |
OpenBootModal(String) | Obsolete.
Generate javascript to open a modal dialog to present the specified URL.
This method is deprecated in favor of OpenBootModal(IAppContext, String, BootModalOptions) in order to provide
improved support on mobile devices.
| |
OpenBootModal(IAppContext, String, BootModalOptions) |
Generate javascript to open a modal dialog to present the specified URL.
| |
OpenBootModal(IAppContext, String, BootModalOptions, String) |
Generate javascript to open a modal dialog to present the specified URL.
If a non-blank CSS class name is provided the class will be added to the dialog outer container and
a CSS class will be added to the body contained in the dialog's IFRAME with a "-body" suffix (e.g.
if the CSS class name is "my-dialog" then "my-dialog-body" will be added to the contained body). A
class is applied to the contained body because it is contained in an IFRAME and you cannot apply CSS
across IFRAME elements.
| |
OpenIWin |
Generate javascript for in inplace iframe div widget.
| |
OpenLightbox |
Generate javascript to open a lightbox window (currently using jQuery Colorbox by Jack Moore) to present the specified URL.
| |
OpenPopupWindowJS(String, NavTarget) |
Returns the script to open a popup window.
| |
OpenPopupWindowJS(String, String, String, PopupOpts, String) |
Returns the script to open a popup window.
| |
PopcalDateStrings |
Generate the localization strings for the popcal.js widget.
| |
PopSafeClose |
If the current window is a popup window or an iframe hosted in a Bootstrap modal dialog, then the window/dialog will be closed. If not,
the provide non-popup javascript will be executed.
| |
PopupCal |
Returns the script to pop up the calendar widget.
| |
PopupTimePicker |
Returns the script to pop up the time picker widget.
| |
RegisterAsbMenu |
Register the DIV required by the ASB (Auto-Suggest Box) functionality.
| |
RegisterMonthsArray |
Resister an array of localized full and abbreviated month names for the specified culture.
This array is used by platform javascript code for parsing and rendering formatted dates.
| |
RegisterSupersubs |
Register startup script for the supersubs (an improved superfish) cascading menu jQuery plug-in.
May be called multiple times without causing multiple registrations.
| |
StatusMsgJS(String, StatusMsgOptions) |
Generates javascript for calling the javascript StatusMsg() function which provides
a message and optional animated icon showing that processing is being performed.
The StatusMsg() function is appropriate for use on a post. At this time it is not
appropriate for use with AJAX calls because there is currently no mechanism for
clearing the status indicator. The indicator goes away when the new page replaces
the old.
| |
StatusMsgJS(String, StatusMsgOptions, Int32) |
Generates javascript for calling the javascript StatusMsg() function which provides
a message and optional animated icon showing that processing is being performed.
The StatusMsg() function is appropriate for use on a post. At this time it is not
appropriate for use with AJAX calls because there is currently no mechanism for
clearing the status indicator. The indicator goes away when the new page replaces
the old.
| |
StatusMsgJS(IAppContext, String, String, StatusMsgOptions) |
Generates javascript for calling the javascript StatusMsg() function which provides
a message and optional animated icon showing that processing is being performed.
The StatusMsg() function is appropriate for use on a post. At this time it is not
appropriate for use with AJAX calls because there is currently no mechanism for
clearing the status indicator. The indicator goes away when the new page replaces
the old.
| |
StatusMsgJS(IAppContext, String, String, StatusMsgOptions, Int32) |
Generates javascript for calling the javascript StatusMsg() function which provides
a message and optional animated icon showing that processing is being performed.
The StatusMsg() function is appropriate for use on a post. At this time it is not
appropriate for use with AJAX calls because there is currently no mechanism for
clearing the status indicator. The indicator goes away when the new page replaces
the old.
| |
ToDateScript |
Create a javascription expression for a date object.
| |
ValidWindowOpenTarget |
Convert a window.open() target string into one valid for all browsers. IE is picky.
|