This documentation relates to an earlier version of Atlassian Gadgets.

Unknown macro: {spacejump}

or visit the current documentation home.

Skip to end of metadata
Go to start of metadata

Terminology: On this page and its child pages,

  • when we refer to the 'framework', we mean the Atlassian Gadgets JavaScript Framework.
  • when we refer to a 'gadget', we mean a gadget JavaScript object.

JavaScript Framework is currently in JIRA only

The Atlassian Gadgets JavaScript Framework is currently part of the JIRA project. It will eventually be moved into Atlassian Gadgets. See AG-622. Until that merge is completed, you will only be able to use the framework if you are developing gadgets for JIRA.

Here is a list of all entries in the cookbook, plus the first few lines of content. Click a link to see the full text for each entry.

Adding a Chart to the Issue Navigator
Adding a Reload Option to your Gadget

This will add a reload icon to the footer of the gadget and an auto-reload option to the config screen:

Adding Something to your Gadget Footer

Use the following code in your view template function:

Adjusting the Gadget Height when the Window is Resized

Enable the onResizeAdjustHeight option on the view object:

Making Ajax Calls

The framework wraps the OpenSocial method with the standard jQuery interface You should write code as if you were just using the jQuery interface. For example:

Making your Gadget Reload when Resized

Enable the onResizeReload option on the view object:

Restricting Edit Permissions on your Gadget Preferences

Use the framework and include the views feature:

Showing the Config Screen on Initial Load Only

Include the isConfigured userpref defaulted to 'false':

Specifying Required Features for the Framework

The framework uses the following features. It is safest just to include all of them:

Specifying Required Resources for the Framework

The framework requires the inclusion of the following resources:

Theming your Gadget Dynamically

It is possible to have the theme dynamically adapt to the space available with some JavaScript like this:

Using Authentication in your Gadget

Specify the appropriate features as 'required' in your gadget XML, include the necessary resources in the CDATA section, and use the useOauth parameter when constructing your gadget:

Using Cookies in your Gadget

Use the gadget object API for createCookie, readCookie and eraseCookie:

Using Special UserPrefs for the Framework

There are a couple of UserPref values that the framework can use to add functionality to the gadget:


Using the Atlassian Gadgets JavaScript Framework
Gadgets and Dashboards Documentation

  • No labels