Version 1.0.1 is now available! Looking for a migration guide?
v1.0.1
/
  • Get Started
  • Working
  • GitHub
  • Overview
  • Introduction
  • Actions
  • Call
  • Call
  • CallList
  • CallList
  • FetchList
  • FetchList
  • Batch
  • Batch
  • BatchByChunk
  • BatchByChunk
  • Tools
  • HealthCheck
  • Ping
  • Logger
  • Logger
  • Telegram
  • Limiters
  • Limiters
  • B24Frame
  • Introduction
  • Initialization
  • Auth
  • Dialog
  • Options
  • Parent
  • Placement
  • Slider
  • b24ui
  • b24icons
v1.0.1
  • Get started
  • Working

Slider Manager Class

Provides methods for working with sliders in the Bitrix24 application. It allows opening and closing sliders, as well as managing their content.
We are still updating this page. Some data may be missing here — we will complete it shortly.
// ... /////
$b24 = await initializeB24Frame()
// ... /////
const makeOpenSliderForUser = async(userId: number) =>
{
    return $b24.slider.openPath(
        $b24.slider.getUrl(`/company/personal/user/${userId}/`),
        950
    )
    .then((response: StatusClose) =>
    {
        if(
            !response.isOpenAtNewWindow
            && response.isClose
        )
        {
            $logger.info("Slider is closed! Reinit the application")
            return reloadData()
        }
    })
}

Methods

getUrl

getUrl(path: string = '/'): URL

Returns a URL relative to the domain name and path.

// ... /////
$b24 = await initializeB24Frame()
// ... /////
const url = $b24.slider.getUrl('/settings/configs/userfield_list.php')

getTargetOrigin

getTargetOrigin(): string

Returns the Bitrix24 address (e.g., https://name.bitrix24.com).

openSliderAppPage

async openSliderAppPage(params: any = {}}: Promise<any>

Opens a slider with the application frame.

// ... /////
$b24 = await initializeB24Frame()
// ... /////
const makeOpenAppOptions = async() => {
    return $b24.slider.openSliderAppPage(
        {
            place: 'app.options',
            bx24_width: 650,
            bx24_label: {
                bgColor: 'violet',
                text: '🛠️',
                color: '#ffffff',
            },
            bx24_title: 'App Options',
        }
    )
}

closeSliderAppPage {#closeSliderAppPage}

async closeSliderAppPage(): Promise<void>

Closes the slider with the application.

// ... /////
$b24 = await initializeB24Frame()
// ... /////
const makeClosePage = async (): Promise<void> => {
    return $b24.slider.closeSliderAppPage()
}

openPath {#openPath}

async openPath(url: URL, width: number = 1640): Promise<StatusClose>

Opens the specified path inside the portal in a slider.

Handles errors related to mobile device usage and can open the URL in a new tab if the slider is not supported.

Returns StatusClose

ParameterTypeDescription
urlURLURL to be opened.
widthnumberSlider width, a number in the range from 1640 to 900.
// ... /////
$b24 = await initializeB24Frame()
// ... /////
const makeOpenSliderEditCurrency = async(currencyCode: string) =>
{
    return $b24.slider.openPath(
        $b24.slider.getUrl(`/crm/configs/currency/edit/${currencyCode}/`),
        950
    )
    .then((response: StatusClose) =>
    {
        $logger.warn(response)
        if(
            !response.isOpenAtNewWindow
            && response.isClose
        )
        {
            $logger.info("Slider is closed! Reinit the application")
            return reloadData()
        }
    })
}

makeOpenSliderEditCurrency('INR')

Placement

Used for managing the placement of widgets in the Bitrix24 application.

 

On this page

  • Methods
    • getUrl
    • getTargetOrigin
    • openSliderAppPage
    • closeSliderAppPage {#closeSliderAppPage}
    • openPath {#openPath}
Releases
Published under MIT License.

Copyright © 2024-present Bitrix24