Click or drag to resize
ScriptHelper Class
Utility methods for script manipulation.
Inheritance Hierarchy
SystemObject
  CMS.Base.Web.UIScriptHelper

Namespace: CMS.Base.Web.UI
Assembly: CMS.Base.Web.UI (in CMS.Base.Web.UI.dll) Version: 13.0.131
Syntax
C#
public static class ScriptHelper

The ScriptHelper type exposes the following members.

Fields
  NameDescription
Public fieldStatic memberBOOTSTRAP_CUSTOM_FILENAME
Filename of custom bootstrap library.
Public fieldStatic memberBOOTSTRAP_FILENAME
Filename of bootstrap library.
Public fieldStatic memberCLOSE_DIALOG_SCRIPT_KEY
Script registration key for centralized dialog closing.
Public fieldStatic memberDIALOG_SCRIPT_KEY
Script registration key for the dialog script.
Public fieldStatic memberEDIT_DOCUMENT_SCRIPT_KEY
Edit document script key.
Public fieldStatic memberGET_TOP_SCRIPT_KEY
Script registration key for centralized retrieving of 'top' frame.
Public fieldStatic memberJQUERY_FILENAME
Filename of jquery library
Public fieldStatic memberJQUERY_KEY
Script registration key for jQuery JavaScript library.
Public fieldStatic memberMOOTOOLS_FILENAME
Filename of MooTools library.
Public fieldStatic memberMOOTOOLS_KEY
Script registration key for mootools JavaScript library.
Public fieldStatic memberNEWWINDOW_SCRIPT_KEY
Script registration key for the non modal win script.
Public fieldStatic memberSAVE_DOCUMENT_SCRIPT_KEY
Save document script key.
Public fieldStatic memberSCRIPTFILE_PREFIX_KEY
Prefix used for registering script files.
Public fieldStatic memberTOOLBAR_SCRIPT_KEY
Script registration key for the editor toolbar.
Public fieldStatic memberTOOLTIP_SCRIPT_FILE_KEY
Script registration key for tooltip file.
Public fieldStatic memberUNDERSCORE_FILENAME
Filename of Underscore library.
Public fieldStatic memberUNDERSCORE_KEY
Script registration key for Underscore library.
Public fieldStatic memberWOPENER_SCRIPT_KEY
Script registration key for cross-window scripting ("wopener").
Top
Properties
  NameDescription
Public propertyStatic memberAllowProgressScript
If true, progress script is allowed on pages.
Public propertyStatic memberCapslockScript
Capslock check script (OnCasplockOn and OnCapslockOff functions must be implemented).
Public propertyStatic memberCloseDialogScript
Script for centralized dialog closing.
Public propertyStatic memberGetTopScript
Script for centralized retrieving of 'top' frame.
Public propertyStatic memberMinifyCurrentRequestScripts
If true, the scripts in current request are minified.
Public propertyStatic memberNewWindowScript
Script code for the dialog handling.
Public propertyStatic memberOnlyNumbersScript
Only numbers script (Must be implemented in OnKeyDown event).
Public propertyStatic memberScriptMinificationEnabled
Gets if script minification is enabled.
Public propertyStatic memberToolbarScript
HTML Editor toolbar script.
Public propertyStatic memberWOpenerScript
Cross-window scripting script ("wopener").
Top
Methods
  NameDescription
Public methodStatic memberAddScript
Adds a script to an existing script
Public methodStatic memberAddToRegisteredClientScripts
Adds key identifying script to collection of registered scripts.
Public methodStatic memberAddToRegisteredStartupScripts
Adds key identifying script to collection of registered startup scripts.
Public methodStatic memberAlert
Renders alert script to the page
Public methodStatic memberAppendTooltip(WebControl, String, String)
Appends tooltip to control.
Public methodStatic memberAppendTooltip(HtmlGenericControl, String, String, Int32, Boolean)
Appends tooltip to control.
Public methodStatic memberAppendTooltip(WebControl, String, String, Int32, Boolean)
Appends tooltip to control.
Public methodStatic memberEnsurePostbackMethods
Ensures that the postback methods are present in the page
Public methodStatic memberFixPendingCallbacks
Fixes common 'pendingCallbacks' JavaScript error.
Public methodStatic memberFormatTooltipString
Formats string to be used for tooltip.
Public methodStatic memberGetAlertScript
Returns the JavaScript alert message.
Public methodStatic memberGetDisableProgressScript
Returns script to disable progress for a single following action.
Public methodStatic memberGetLayoutResizeScript
Returns script fragment performing callback when layout pane width has been changed.
Public methodStatic memberGetLoaderHtml
Gets the HTML content of the standard system loader.
Public methodStatic memberGetLoaderInlineHtml
Gets the HTML content of the standard system loader icon with specified text.
Public methodStatic memberGetLoaderOverlayHtml
Gets the HTML content of the standard system loader overlay.
Public methodStatic memberGetLocalizedString(String)
Localizes and encodes text to be used in JavaScript string and encapsulates it with "'".
Public methodStatic memberGetLocalizedString(String, Boolean)
Localizes and encodes text to be used in JavaScript string and optionally encapsulates it with "'".
Public methodStatic memberGetModalDialogScript(String, String, Int32, Int32)
Returns script which opens modal dialog.
Public methodStatic memberGetModalDialogScript(String, String, Int32, Int32, Boolean) Obsolete.
Returns script which opens modal dialog.
Public methodStatic memberGetModalDialogScript(String, String, String, String, Boolean)
Returns script which opens modal dialog.
Public methodStatic memberGetScript
Encloses the specified script in an HTML script element.
Public methodStatic memberGetScriptTag
Builds an HTML script tag that can be used to include external script given its URL. Allows to explicitly disable script minification.
Public methodStatic memberGetString
Encodes text to be used in JavaScript string and optionally encapsulates it with "'".
Public methodStatic memberHideVerticalTabs
Hides the parent vertical tabs
Public methodStatic memberIsClientScriptBlockRegistered
Returns whether client script with given key is already registered.
Public methodStatic memberIsJQueryRegistered
Determines whether jQuery library is already registered.
Public methodStatic memberIsMooToolsRegistered
Determines whether MooTools library is already registered.
Public methodStatic memberIsStartupScriptRegistered
Returns whether startup script with given key is already registered.
Public methodStatic memberIsUnderscoreRegistered
Determines whether Underscore JavaScript library is already registered.
Public methodStatic memberJsonSerializeObject
Serializes the specified object to a JSON string using default formatting
Public methodStatic memberRefreshTabHeader
Reload page header and select specified tab
Public methodStatic memberRefreshTree
Registers refresh tree script for documents UI
Public methodStatic memberRegisterAngularModule
Registers Angular module which will be rendered to start a client-side angular module.
Public methodStatic memberRegisterApplicationConstants
Ensures registration of the application constants script. It provides constants applicationUrl, imagesUrl, isRTL.
Public methodStatic memberRegisterBootstrapScripts
Ensures registration of Bootstrap JavaScript library.
Public methodStatic memberRegisterBootstrapTooltip
Ensures registration of bootstrap tooltip script.
Public methodStatic memberRegisterClientApplication
Registers a client script, that adds the client application state to the page, with the Page object.
Public methodStatic memberRegisterClientScriptBlock(Control, Type, String, String, Boolean)
Registers a client script block for AJAX and adds the script block to the page, optionally enclosing it in script tags.
Public methodStatic memberRegisterClientScriptBlock(Page, Type, String, String, Boolean)
Registers a client script block for AJAX and adds the script block to the page, optionally enclosing it in script tags.
Public methodStatic memberRegisterClientScriptInclude
Registers the client script for AJAX and then adds a script file reference to the page. Allows to explicitly disable script minification.
Public methodStatic memberRegisterCloseDialogScript
Registers script for centralized dialog closing. (Contains functionality for refreshing opener window.)
Public methodStatic memberRegisterCMS
Ensures registration of the main CMS script.
Public methodStatic memberRegisterCompletePageScript
Registers the script which checks the page completeness on postback.
Public methodStatic memberRegisterDialogScript
Registers the script for modal dialogs. Provides function modalDialog(url, name, width, height, otherParams, noWopener).
Public methodStatic memberRegisterEditScript
Registers cmsedit.js script to the page and ensures initialization
Public methodStatic memberRegisterFlatResize
Ensures registration of script which causes correct resizing of uni flat selectors.
Public methodStatic memberRegisterGetTopScript
Registers script for centralized retrieving of 'top' frame. (Useful for dialogs.)
Public methodStatic memberRegisterHiddenField(Control, String, String)
Registers the hidden field to a page
Public methodStatic memberRegisterHiddenField(Page, String, String)
Registers the hidden field to a page
Public methodStatic memberRegisterJQuery
Ensures registration of jQuery JavaScript library.
Public methodStatic memberRegisterJQueryAppear
Ensures registration of jQuery appear JavaScript library.
Public methodStatic memberRegisterJQueryCookie
Ensures registration of jQuery cookie JavaScript library.
Public methodStatic memberRegisterJQueryCrop
Ensures registration of jQuery crop JavaScript library.
Public methodStatic memberRegisterJQueryDialog
Ensures registration of jQuery dialog.
Public methodStatic memberRegisterJQueryHighLighter
Ensures registration of jQuery highlighter JavaScript library.
Public methodStatic memberRegisterJQueryTemplates
Ensures registration of jQuery templates JavaScript library.
Public methodStatic memberRegisterJQueryTools
Ensures registration of jQuery tools JavaScript library.
Public methodStatic memberRegisterJQueryUI
Ensures registration of jQuery UI JavaScript library.
Public methodStatic memberRegisterJQueryUILayout
Registers jQuery UI layout library.
Public methodStatic memberRegisterLoader
Ensures the registration of the loader module
Public methodStatic memberRegisterModule
Renders JavaScript code to start a client-side module.
Public methodStatic memberRegisterMooTools
Ensures registration of MooTools JavaScript library.
Public methodStatic memberRegisterOnlyNumbersScript
Registers only numbers script for input fields.
Public methodStatic memberRegisterOnSubmitStatement
Registers the form submit statement.
Public methodStatic memberRegisterPageLoadedEvent
Registers a client script, that rises the PageLoaded event, with the Page object.
Public methodStatic memberRegisterPageLoadedFlag
Registers the script which identifies that page was loaded.
Public methodStatic memberRegisterPrintDialogScript
Registers script for printing dialog.
Public methodStatic memberRegisterRequireJs
Registers the require.js client script with the Page object.
Public methodStatic memberRegisterResizer
Ensures registration of the resizer script.
Public methodStatic memberRegisterRestoreFocusScript
Registers script capable of restoring focus when asynchronous postback is finished.
Public methodStatic memberRegisterSaveChanges
Ensures registration of the save changes notification script.
Public methodStatic memberRegisterSaveShortcut(Page, String)
Registers a script which when invoked via keyboard shortcut saves the document.
Public methodStatic memberRegisterSaveShortcutT(T, String, String)
Registers a control which when invoked via keyboard shortcut saves the document.
Public methodStatic memberRegisterScriptFile
Registers the client script and adds a script file reference to the page. Allows to explicitly disable script minification.
Public methodStatic memberRegisterScriptFromFile
Registers the client script and renders the script from file into the page.
Public methodStatic memberRegisterSetLiveSiteURL
Ensures registration of the update live site URL script for the application list.
Public methodStatic memberRegisterSpellChecker(Page)
Ensures registration of the spellchecker script.
Public methodStatic memberRegisterSpellChecker(Page, Boolean)
Ensures registration of the spellchecker script.
Public methodStatic memberRegisterSplitModeSync
Registers js script for synchronization scroll bars in split mode.
Public methodStatic memberRegisterStartupScript(Control, Type, String, String, Boolean)
Registers the startup script.
Public methodStatic memberRegisterStartupScript(Page, Type, String, String, Boolean)
Registers the startup script.
Public methodStatic memberRegisterTooltip
Ensures registration of tool tip script.
Public methodStatic memberRegisterTreeProgress
Ensures registration of the progress icon script for the tree.
Public methodStatic memberRegisterWebComponentsScript
Registers a client script, which is responsible for loading custom web components.
Public methodStatic memberRegisterWebServiceCallFunction
Registers helper function to call web services.
Public methodStatic memberRegisterWOpenerScript
Registers the script which checks the page completeness on postback.
Public methodStatic memberRenderAngularModulesScript
Renders JavaScript code to start a client-side angular modules.
Public methodStatic memberRequestScriptRegistration
Requests particular script registration. Returns true if the registration is allowed
Public methodStatic memberResetScrollPosition
Reset scroll positions for current request if MaintainScrollPositionOnPostback is enabled
Public methodStatic memberResolveUrl
Resolves URL to be used in javascript. Virtual context prefix needs to be ensured.
Public methodStatic memberSerializeModuleParametersToJson
Converts an object with client-side module parameters to a JSON string.
Top
See Also