Removals and mitigation strategies

This topic details PageBase removals of JavaScript objects from Relativity's JavaScript environment. The removals are grouped based on the suggested mitigation strategy to cater for the removal. If you need a file or functionality and a mitigation strategy is not specified, copy the file or functionality and host it within your Custom Page.

Strategy: Migrate Into the Application

The recommended mitigation strategy for the following removed files/functionality is to house the functionality or script in your own application.

Hosted External Frameworks/Libraries

Framework Scripts Notes
  • Javascript/angular.min.js
  • Javascript/angular-sanitize.min.js
  • Javascript/modified-ui-bootstrap.tpls-0.12.0.js
Consider migrating from AngularJS since it is no longer receiving updates.
JQuery / JQuery UI / JQuery Plugins
  • Scripts/jquery-3.5.1.min.js
  • Scripts/jquery-ui-1.12.1.min.js
  • Scripts/jquery.browser.js
  • Scripts/jquery.signalR-2.3.0.min.js
If usage is only to make DOM selections, modifications, and event handler attachment easy, consider using vanilla JS. If usage is for ajax, consider Fetch API.
  • Javascript/q.js
Consider refactoring to use Promise from the browser.
  • Javascript/mousetrap-global-bind.min.js
  • Javascript/mousetrap-pause.min.js
  • Javascript/mousetrap.min.js
Toastr Javascript/toastr/toastr.min.js  
Knockout Javascript/knockout-3.5.1.js  

Strategy: Replace dialog and modal functions with your app's specific frameworks and libraries

The following dialog and modal functions are being removed from the Relativity JavaScript environment. We recommend updating consumption of these functions to an equivalent from your app's own frameworks and libraries, rather than hosting the code behind these.

  • confirmYesNo(), confirmYesNoCloseEvent(), confirmYesNoOpenEvent()
  • ShowWarningDialog()
  • SpinningModal(), CloseSpinningModal()

Strategy: Replace with native JavaScript functionality

The following functions have native JavaScript and Web API equivalents and are being dropped from the Relativity JavaScript environment. Please update any consumption of the following to the listed replacement options.

Deprecated Replacement
click() Use
currentPage() Use URL or Location APIs
destroyElement() Use Element.remove()
GenericVisibilityToggle, GenericVisibilityToggleByElement Use CSS Transitions or host hide/show logic in your app
getLocalStorageObject(), setlocalStorageObject() localStorage may persist beyond what's necessary for you; so prefer sessionStorage by default, but use localStorage if necessary.
getUrlParameterOfCurrentPage(), queryString() Use the searchParams property of a URL built from a window's Location, or host the functions in your own app (either of these functions can currently be found in Relativity's grandunifiedjavascriptfile.js).
PopWindow() using _blank as the windowName parameter.
preventDefaultLogic() Use Event.preventDefault()
RelativityAjax(), RelativitySjax(), RelativityPostCall(), relativity.Kepler Use the Fetch API.
urlencode(), urldecode() Depending on your situation, consider use of encodeURIComponent and decodeURIComponent, or encodeURI and decodeURI. If these don't suit your needs, you can host urlencode() and urldecode() in your own app; but note that urlencode() and urldecode() make use of escape and unescape native functions which are marked for deprecation.

Strategy: Replace usage with a new PageBase API or existing API

The following have been replaced by new or existing APIs in Relativity. Please update any consumption of the following to the equivalent replacement options.

HEAP click tracking

Deprecated Replacement
Scripts/click-tracking.min.js Replace by calling relativity.internal.getClickTrackingElements() and adding the returned script(s) to the DOM.

Configuration values

For each of these items, see Configuration Values

Deprecated Replacement

see Configuration Values

GetApplicationPath() Use
window.relativity.config.applicationPath: string
window.relativity.getApplicationPath(): Promise<string>
GetInstanceGuid() window.relativity.getInstanceGuid(): Promise<string>
GetKeplerApplicationPath() window.relativity.config.keplerApplicationPath: string
window.relativity.getKeplerApplicationPath(): Promise<string>
GetRelativityApplicationCurrencySymbol() window.relativity.getCurrencySymbol(): Promise<string>
GetRelativityApplicationWebResourceFile() window.relativity.getRelativityApplicationWebResourceFile(appGuid: string, version: string, fileName: string): string
GetRelativityVersion() window.relativity.getRelativityVersion(): Promise<string>
GetRestApplicationPath() window.relativity.config.restApplicationPath: string
window.relativity.getRestApplicationPath(): Promise<string>

Other functions and properties

Deprecated Replacement
AddPageHistoryAsync relativity.navigation.pushStateAndRecent()
navHeaderApi, relativity.navHeader Replace uses of the show() and hide() of these with relativity.internal.toggleTabStrip(boolean). Discontinue use of any other properties of these objects.
redirectToLogout() Use relativity.internal.errorApi (most likely the init() function)

Obsolete: discontinue use

The functionality behind each of the items listed below becomes obsolete. These items will not be hosted, nor will the properties be used (in most cases, they will no longer be available), once Relativity's Web Servers are deprecated. We recommend against hosting any of these in your own application.

Category Script/Function/Property
Hosted scripts
  • AngularWidgets/dist/app.min.js
  • Javascript/buttermilk.js
  • Javascript/layoutCategories.js
  • Javascript/relativity.Kepler.js
Browser Storage Items
  • loggedInUser-9.1
  • lastMOTDCheck
Global JS API objects
  • navHeaderApi, relativity.navHeader
  • relativity.redirectionHelper
  • relativity.UserPreferences
Global JS Functions
  • _isClickTrackingEnabled()
  • backfromdocdetailpage()
  • bindKeyboardShortcutsGlobal()
  • chartCallback()
  • checkIfHasDismissedMoTD()
  • checkIfIsTextOnlyMoTD()
  • CheckSize()
  • closeHeaderFlyoutsOnFocus()
  • closeNpsSurvey()
  • collapseCategory()
  • compareDocuments()
  • confirmLeave()
  • ConfirmRedirect()
  • continueButtonClickPostback()
  • createTooltip()
  • CSAPIconSwitchOnChange()
  • CSAPIconSwitchOnDateFieldUpdate()
  • delayDestoryElement()
  • DelayedResizeScrollingDivInvoker()
  • dismissMoTD()
  • dismissTooltip()
  • displayMessageOfTheDay()
  • EndPreviewSession()
  • featuresWithCenterCoordinates()
  • FilterTypeOnChange()
  • findScrollDiv()
  • ForcePostBack()
  • flyoutTextReturned()
  • getAvailableHeight()
  • GetCsrfTokenFromPage() - only relevant to ASMX services, which are no longer hosted. Use Kepler services instead.
  • GetRelAuthIDFromPage()
  • GrandUnifiedStartupFunction()
  • hasSeenMOTDDuringSession()
  • helpTextReturned(),
  • hideListFrame()
  • htmlDecode()
  • IsActiveXSupported()
  • isOnDocProfile()
  • itemlistPivotChartResize()
  • kCuraScrollingDivRegister()
  • keepInBoundsX()
  • loadMotdStyles()
  • messageOfTheDaySetup()
  • moveAll()
  • moveAllTheWayDown()
  • moveAllTheWayUp()
  • moveOption()
  • moveSelected()
  • noItemlistPivotChartResize()
  • npsSurveySetup()
  • OnSelectFocus()
  • OnSelectKeypress()
  • OnSelectMouseDown()
  • openFlyoutHTML5()
  • patchEditTables()
  • pivotCallback()
  • pivotChange()
  • populateHelpText()
  • PopViewWindowCreate()
  • quickSearchCriteriaResize()
  • readMoTD()
  • RefreshPage()
  • registerResizer()
  • registerZoomPan()
  • RelativityDocumentCompare()
  • resetDelay()
  • resizeOnItemlist()
  • resizeWorkspaceTitle()
  • runNpsSurvey()
  • scootIntoFrame()
  • SetFilterTypeViewValue()
  • setLastReviewedDocumentArtifactID()
  • SetParentParentNavigationSafeToFalse()
  • ShowAboutModal()
  • showApplicationErrorFlyout()
  • showGenericFlyout()
  • showHelpTooltip()
  • showHelpTooltipMessage()
  • showMonthOption()
  • SizeScrollableDiv()
  • SizeScrollableDivForReal()
  • storeListBoxOptionsInHiddenField()
  • storeListBoxOptionsInHiddenFields()
  • testBothColumns()
  • ToggleChildImageVisibility()
  • toggleImageButtonEnabled()
  • twoListSelectItemlistResize()
  • twoListSelectResize()
  • UpdateUrlProtocol()
Other Global JS properties
  • _confirmYesNoJqueryDialog_UsedADialogButtonToClose
  • bodyOverflowStyle
  • curScroll
  • global_cancel
  • isPaneDragging
  • kCuraWebProtocol
  • scrollDiv
  • shortcutsLoaded