Docs Airdesk (EN)
  • Airdesk Documentation
  • Before You Start
  • Introduction
  • 💻Interface
    • Overview
      • Navigation
      • Filters
      • Summary
      • Menu (+) and (---)
      • Views
      • Favorites
    • Authentication
      • Reset Password
    • User
      • Add
      • Search
      • Notifications
      • Activity
      • Edit Profile
      • Inbox
    • Dashboards
    • Contacts
      • Accounts
      • Contacts
      • Import
    • Sales
      • Deals
      • Contracts
      • Subscriptions
      • Classification
      • Billing
    • Services
      • Calls
      • Projects
      • Cases
      • Tasks
        • Checklists
      • Time
      • Automation
        • Interface
        • Key Concepts
        • Elements
        • Variables
      • Pipelines
    • Marketing
      • Social Media
      • Email Signature
    • Reports
      • Services
        • Timesheet
        • Tasks
        • Cases
        • Projects
      • Sales
        • Contracts
        • Deals
        • Classification
    • Administration
      • Dashboard
        • General
          • General
          • Exports
        • Companies/Subsidiaries
        • Departments
        • Teams
        • Users
          • Invitations
          • Permissions
        • Widget for website
        • Additional Widget Options
        • Email Inbox
        • Domains and URL's
          • SPF Record
          • DKIM Record
          • Return Path
          • MX Record
      • Deals
        • Account Type
        • Deals
          • Reasons for loss
          • Reasons for cancellation
        • Contracts
          • Types of contract
        • Subscriptions
          • Types of subscription
      • Services
        • Calls
          • Pipeline
          • Reasons for cancellation
        • Projects
          • Project types
          • Reasons for cancellation
        • Cases
          • Reasons for cancellation
        • Tasks
          • Reasons for cancellation
          • Checklist Template
        • Time
          • Types of time
          • Inefficient time ratios
      • Marketing
        • Social Media
          • Schedule of Publications
      • Pipelines
    • Security
  • 🚧Help / Support
    • How to ask for help
    • Changelog
    • Roadmap
    • FAQ
    • API
  • 🔧Resources
    • Docs Portuguese
    • Official website
Powered by GitBook
On this page

Was this helpful?

  1. Interface
  2. Administration
  3. Dashboard

Additional Widget Options

Within the code generated by Airdesk, you can add extra widget handling options.

Example of a code generated by Airdesk that is placed on the client's page:

 <script defer> 

      (function (a, i, r, d, e, s, k) { 

        a.airdesk = { settings: { cpid: "TEST-EXAMPLE" } }; 

        e = i.getElementsByTagName("head")[0]; 

        s = i.createElement("script"); 

        s.async = 1; 

        s.src = r + d; 

        e.appendChild(s); 

        a.$airdeskOnLoad = () => { 

          var {$airdesk} = a;

//Extra options are added below this line 

}; 

      })(window, document, "https://script.airdesk.ai/v1/", "air.js"); 

    </script> 

Option

Explanation

$airdesk.open()

The widget will open the form automatically as soon as it's ready.

$airdesk.close()

The widget closes the form.

$airdesk.language(CODE)

If the user doesn't have a language already saved. This option allows you to choose a starting language, instead of choosing the starting language depending on the browser's language. Examples of CODE "en-GB", "pt-PT", "en-ES".

$airdesk.position(STRING)

Changes the initial positioning to a pre-effect.

$airdesk.position('bl')

Changes the widget's positioning to the lower left corner.

$airdesk.right(NUMBER)

Replaces the initial positioning of the widget button on the right. The positioning is done on px basis.

$airdesk.left(NUMBER)

Replaces the initial positioning of the widget button on the left. The positioning is done on px basis.

$airdesk.bottom(NUMBER)

Replaces the initial positioning of the widget button vertically starting from below. The positioning is done on a px basis.

$airdesk.top(NUMBER)

Replaces the initial positioning of the widget button vertically starting at the top. The positioning is done on a px basis.

$airdesk.hidden()

Hide the page widget. It no longer allows to press the button and open the form.

$airdesk.visible()

Shows the widget that has been hidden.

To use widget functions with javascript, these must always be called within a load event.

window.addEventListener ('load', function () {})

You can call up these options after initialization of the widget like for example make the widget, after loading on the page, automatically open the form as follows:

 <script defer> 

      (function (a, i, r, d, e, s, k) { 

        a.airdesk = { settings: { cpid: "TEST-EXAMPLE" } }; 

        e = i.getElementsByTagName("head")[0]; 

        s = i.createElement("script"); 

        s.async = 1; 

        s.src = r + d; 

        e.appendChild(s); 

        a.$airdeskOnLoad = () => { 

          var {$airdesk} = a;

//Opções extra são adicionadas abaixo desta linha 

$airdesk.open() 

}; 

      })(window, document, "https://script.airdesk.ai/v1/", "air.js"); 

    </script> 

Or, it's also possible to call the options in the client's javascript after the widget is initialized, as follows:

window.$airdesk.open(); 
PreviousWidget for websiteNextEmail Inbox

Last updated 4 years ago

Was this helpful?

💻