brixxbox Wiki
  • Einstieg und Feature-Übersicht
    • Technische Übersicht
    • Praxisbeispiele
    • Responsive Design
    • Rollen und Rechte
    • Mandanten und Währungsfähigkeit
    • Multi-Language
    • Integrierte KI
    • Integriertes Archiv
  • App Erstellung
    • Design-Cockpit
    • How Tos
      • Custom Grid Column Date Format
      • Create Report REST
      • Telerik Extension Functions
        • Telerik Page Footer Sum
        • Telerik Page Header Sum
      • Printing in LAN
  • Client API Reference
    • Functions
      • addCalendarEventSource
      • addClassToGridRowCell
      • addEventListener
      • addToolbarButton
      • brixxGPT
      • businessBrixx
        • DHL Shiping
          • CreateShipment
          • GetLabel
        • DPD Shiping
          • CreateShipment
        • UPS Shiping
        • Inventory Movement
        • Currency Conveter
        • Datev Export
          • Datev Export SqlDataRead Example
          • Datev Export sqlMainData Example
          • Datev Export sqlGetCounter Example
        • GS1 Code Splitter
        • SEPA Export
        • Diamant Connector
          • Diamant OpenStack
          • Diamant Transaction
          • Diamant CloseStack
      • cancelCalendarChanges
      • callWebHook
      • changeHelpText
      • clearGridSelection
      • cloudPrint
      • cloudQuery
      • closeModal
      • composeEmail
      • createPublicAppUrl
      • copyConfigRecordById
      • createReport
        • ZUGFeRD
      • deleteAttachment
      • deleteConfigRecordById
      • deleteRecord
      • displayRecord
      • downloadAttachments
      • disableGridHyperLinks
      • enableNotifications
      • enableValidator
      • excludeFromReadonly
      • executeStoredProcedure
      • getAttachmentId
      • getAttachmentById
      • getAttachmentByFileName
      • getAttachmentsForCurrentRecord
      • getLastAttachmentByRecordId
      • getBrowserToken
      • getControlUnmodifiedValue
      • getCustomMessage
      • getCustomSetting
      • getCalcDateTime
      • getHtmlElement
      • getDate
      • getCalcDate
      • getFieldValue
      • getSessionToken
      • getUserClaim
      • getConfigRecordAttachmentIdByFileName
      • getSignatureImageBlob
      • getGeoLocation
      • getLabelText
      • globalSearch
      • initAllControls
      • initControl
      • isModal
      • isUserInRole
      • isRowSelected
      • inviteUser
      • localValue
      • loadAndDisplayRecord
      • loadAndDisplayRecordById
      • loadConfigRecordByValue
      • loadConfigRecordById
      • loadRecord
      • loadRecordById
      • logAdd
      • logout
      • markAllControlsAsUnModified
      • messageBox
      • newGridEntry
      • newRecord
      • printBlob
      • print
      • readOnlyMode
      • refresh
      • refreshAttachments
      • refreshDataSource
      • refreshBadges
      • reInitValidation
      • replaceText
      • serverFunction
      • setControlUnmodifiedValue
      • setFieldValue
      • setLabelText
      • setTooltipText
      • setToolbarButtonMode
      • setEnable
      • setVisibility
      • startBrixxbox
      • startMode
      • startScanner
      • showBlob
      • showMessage
      • showAttachments
      • showDiscussion
      • showWikiPage
      • sqlReadValue
      • sqlWrite
      • sqlRead
      • saveCurrentRecordWithoutEvents
      • saveCurrentRecord
      • saveConfigRecord
      • saveStructure
      • setBackgroundColor
      • setFontStyle
      • setFontWeight
      • setGridDefaults
      • setTextColor
      • setFocus
      • setDecimalDigits
      • switchTagControl
      • selectGridRows
      • showRowDetailPanel
      • showRowDetailButton
      • setGridAutoRefresh
      • setGridGrouping
      • showMessageBox (deprecated)
      • showTabPage
      • setFieldUnit
      • takePicture
      • triggerEvent
      • toggleGridSelection
      • unselectGridRows
      • uploadAttachment
      • updateTitle
      • validateInput
      • queryStoredProcedure
      • setValidatorValue
    • Variables
      • userId
      • recordId
      • record
      • isLoadingRecord
    • Controls
      • Accordion
      • AppConfig
      • Badge
      • Button
      • Camera
      • Chart
      • CheckBox
      • ComboBox
      • DateBox
      • DateTimeBox
      • DocViewer
      • FileImport
      • FormGroup
      • FormGroupRow
      • FullCalendar
      • Grid
      • GridConfig
      • GroupBox
      • HorizontalLine
      • HtmlTable
      • HtmlTemplate
      • Image
      • Label
      • MultilineTextBox
      • NumBox
      • TabControl
      • TabPage
      • TextBox
      • LinkLabel
      • RadioButton
      • Report
      • Row
      • Scanner
      • SignaturePad
      • Tag
      • TemplateGrid
      • TemplateGridElement
      • TimeBox
      • Unit
      • WedgeScanner
      • Widget
      • WidgetContainer
      • WysiwygText
    • Events
      • onAppStart
      • onAppInitialized
      • onAttachmentDeleted
      • onAttachmentsShow
      • onAttachmentsHide
      • onChange
      • onCellClick
      • onCellEdit
      • onClick
      • onChildAppClosed
      • onDataTransform
      • onEventClick
      • onEventChange
      • onFileImport
      • onKeyDown
      • onKeyPress
      • onModalClose
      • onMailHistoryShow
      • onRowClick
      • onRecordLoad
      • onRecordLoaded
      • onRecordSave
      • onRecordSaved
      • onRowSelectionChanged
      • onRowCreated
      • onRecordNew
      • onRecordDelete
      • onRecordDeleted
      • onKeyUp
      • onScan
      • onReturnFromModal
      • onSubDataRequest
      • onTabShown
      • onTimeSelected
      • onPictureTaken
      • OnCheckPermissions
    • Tips and Tricks
      • Date and Time
        • The moment.js Library
  • Server API Reference
    • Functions
      • loadConfigRecordById
      • saveConfigRecordById
      • sqlWrite
      • sqlRead
      • sendEmail
      • createReportPdfBlob
      • cloudPrint
      • businessBrixx
  • Configuration
    • Workspace Settings
      • CustomHeaderFooterBackgroundColor
      • CustomInviteText
      • CustomLogoBackgroundColor
      • CustomLogoUrl
      • RecordLockWaitTime
      • WhiteLabeling
    • App Editor
      • Custom HTML Templates
        • jsTree
        • Slider
      • App Editor Properties
        • AddToAttachements
        • AppAltViewName
        • AppAttachments
        • AppColor
        • AppConfigToStartName
        • AppConfigToStartSourceField
        • AppConfigToStartTargetField
        • AppDiscussion
        • AppHistory
        • AppIcon
        • AppMailHistory
        • AppMasterTable
        • AppParameters
        • AppPrefix
        • AppPreviewRecordId
        • AppTitle
        • AttaDocType
        • AttachementFilename
        • AutoDisableOnEdit
        • ButtonStyleClass
        • BlockInputDuringEventExecution
        • CascadeCopy
        • CascadeDelete
        • ChartData
        • ChartData
        • ChartDataJson
        • ChartLabel
        • ChartLabelAxesX
        • ChartLabelAxesY
        • ChartType
        • ComboBoxEditButton
        • ComboBoxListButton
        • ComboboxKey
        • ComboboxMinSearchLength
        • ComboboxMultiselect
        • ComboboxValue
        • ConcurrencyControl
        • CreateMenu
        • CssTemplateContent
        • Data
        • DateTimeUtc
        • DecimalDigits
        • DefaultValue
        • DevMode
        • DisableGridResponsiveness
        • EditAbsoloutGridHeight
        • EditDefineUnit
        • Enable
        • GridAutoRefreshIntervals
        • GridCellEdit
        • GridColumnFilter
        • GridColumnOrder
        • GridFilterVisibility
        • GridFooter
        • GridInlineEdit
        • GridNoHyperLink
        • GridPageSizeVisibility
        • GridRowOrderDragDropParam
        • GridSelectMode
        • GridSortingMode
        • GridToolbarVisibility
        • GroupGridColumns
        • HelpText
        • HiddenGridColumns
        • HideEditButtonColumn
        • HideSelectCheckboxColumn
        • HtmlTableClasses
        • HtmlTableDisablePagination
        • HtmlTemplateContent
        • Id
        • IncludeInGlobalSearch
        • InputMaskRegEx
        • InputTag
        • Label
        • LabelWidthClass
        • LabelWrap
        • LoadRecordOnLeave
        • ManualRefreshOnly
        • NoSpinButton
        • RecordObservation
        • RefersToConfig
        • ReportCulture
        • ReportId
        • RowReorder
        • SearchPrefixes
        • SelectAllOnFocus
        • ServerSidePaging
        • ServerSidePagingIndexColumns
        • SmoothScroll
        • TagValue
        • TextColor
        • ToolTip
        • ValidateInputBeforeExecution
        • ValidatorMessage
        • Visibility
        • WidthClass
        • WysiwygHtmlCleanup
        • WysiwygHtmlFragment
      • Controls
        • grid
        • combobox
    • Template Gallery
      • Extended CRM-System
      • Time Recording
      • Project Management
      • Digital Visitor-Management
      • Data Archive
      • Ticket-System
      • Digital Adressbook
      • Driver's Logbook
      • Order Management
      • Basic CRM
      • 🇩🇪 Erweitertes CRM-System
      • 🇩🇪 Zeiterfassung
      • 🇩🇪 Digitales Besuchermanagement
      • 🇩🇪 Datenarchiv
      • 🇩🇪 Projektmanagement
      • 🇩🇪 Ticketsystem
      • 🇩🇪 Digitale Adressverwaltung
      • 🇩🇪 Fahrtenbuch
      • 🇩🇪 Auftragsverwaltung
      • 🇩🇪 Basis CRM
    • Apps
      • ApiKeys
      • CloudGateway
      • Attachments
      • AuditHistory
      • DevelopmentChangeHistory
      • DocumentTypes
      • Jobs
        • Cron Definitions
      • Menu Editor
      • Reports
      • Roles
      • ServerSideFunction
      • SqlFunction
      • SqlStoredProcedure
      • SqlTrigger
      • StandardDatasources
      • StandardMessages
      • StdSqlEditor
      • Translations
      • UserDashboards
      • Users
      • WorkspaceFirewall
      • WorkspaceSettings
        • CustomInviteEmailContent
Powered by GitBook
On this page
  • Parameters
  • Example Usages
Export as PDF
  1. Client API Reference
  2. Functions

addToolbarButton

Add Toolbar Buttons with different functionalities.

As we have already discussed in documentation of SetToolbarButtonMode. These are several buttons that are provided by Brixxbox for each app like adding new record, saving new record etc. These buttons provides general functionality needed by most of the apps but in case your app needs extra functionality, Brixxbox also allows this. It is provided by brixxApi function addToolbarButton. It takes a JSON object as a parameter. This JSON contains all the properties that defines this custom button as well as the functionality provided by it. The properties include name, id, and function to execute on clicking this button etc. Adds a custom button to the app toolbar.

Example

   brixxApi.addToolbarButton({
            title: "Print Invoice",
            icon: "print",
            id: "printInvoiceToolbarButton",
            onclick: async function () {
                brixxApi.triggerEvent("click", "printInvoiceBtn");
            }
        });

Parameters

  1. toolbarButtonOptions - It is a JSON Object. In JSON object we passes parameters in the form of key value arguments.It include properties like name, id, function, etc.

Example Usages

As we have already seen a minimal custom print button in above example. Lets now add extra properties like group, css class, and shortcut for our print button. Now we also want this button to be added in our app toolbar on initialization. For this purpose goto current app properties and add onAppInitialized event. Now we need to add following code as a custom code to this event.

   brixxApi.addToolbarButton({
            title: "Print Invoice",
            icon: "print",
            text: "Rechnung drucken",
            group: "invoice",
            id: "printInvoiceToolbarButton",
            cssClass: "btn-success",
            onclick: async function () {
                brixxApi.triggerEvent("click", "printInvoiceBtn");
            },
            shortcut: "Ctrl-Alt-P"
        });

Now when our app is initialized, we can see our custom button on the app toolbar and it should look like this.

We can also add different custom buttons to our app depending upon our own requirements.

PreviousaddEventListenerNextbrixxGPT

Last updated 1 year ago

Example of the Button