Changed: | The |
Changed: | The |
A 'feature' is a JavaScript library that provides specific functionality for inclusion into your gadget. This page gives an overview of how you can use a feature in your gadget and a list of available features.
To create a gadget that uses a particular feature, such as dynamic height adjustment, you will do the following:
Include the feature library via a <Require>
element or an <Optional>
element in your gadget XML specification. The format is:
1 2<ModulePrefs title="My Gadget"> <Require feature="my-feature-name"/> </ModulePrefs>
Here is a simple example:
1 2<ModulePrefs title="My Height-Adjusting Gadget"> <Require feature="dynamic-height"/> </ModulePrefs>
Write some JavaScript code to use the feature. The JavaScript code goes in the <Content>
element of your gadget XML specification. The JavaScript APIs are described in the OpenSocial JavaScript API and in our JavaScript API reference guide.
An unadorned list of features is available from our code repository. Below we provide more detail about the features.
Supported in | Description |
---|---|
Fully supported | This 'authentication refresh' feature is available in Atlassian Gadgets 1.1.3 and later versions of 1.1.x, and in 2.0.4 and all later versions. The authentication refresh feature causes the dashboard to verify and refresh the authentication of every gadget on a regular basis. Every twelve minutes the dashboard will request a new security token for each gadget on the dashboard. It will then make an RPC call to each gadget so that Feature name: auth-refresh Specified by: Shindig |
Fully supported | Allows a gadget to retrieve the base URL for the renderer server. Example:
Feature name: atlassian.util Specified by: Atlassian Gadgets |
Not supported | Google Analytics Feature name: analytics Specified by: OpenSocial |
Not supported | Support for Caja, a Google project aiming to allow web applications to provide active content safely, simply, and flexibly. The basis of the project is that a subset of Javascript provides an object-capability language. Feature name: caja Specified by: OpenSocial |
Not referenced | The content-rewrite feature defines a set of rewriting operations that a container can perform on rendered and proxied content. It also defines rules to allow developers to control which content the rewriter can operate on.
See the OpenSocial Gadgets API Specification. Feature name: content-rewrite Specified by: OpenSocial |
Fully supported | Provides remote content retrieval functions. See the OpenSocial gadgets.io API reference. Feature name: core.io Specified by: OpenSocial |
Fully supported | Provides core gadget support, including JavaScript APIs for manipulating JSON data, escaping and unescaping strings, and accessing user preferences. See the OpenSocial gadgets.json API reference, the OpenSocial gadgets.Prefs API reference, and the OpenSocial gadgets.util API reference. Feature name: core Specified by: OpenSocial |
Fully supported | Gives a gadget the ability to resize itself. Format:
You will call the JavaScript function gadgets.window.adjustHeight() whenever there is a change in content, or another event occurs that requires the gadget to resize itself. See the OpenSocial gadgets.window API reference. You may also find useful information in the Google documentation on creating a user interface. Feature name: dynamic-height Specified by: OpenSocial |
Fully supported | Allows you to embed a Flash movie into your gadget. Format:
You will call the JavaScript function gadgets.flash.embedFlash() to embed a .swf file in your gadget and display it in a designated location. Note that to use this feature, all resources must be bundled in a .swf file. See the OpenSocial gadgets.flash API reference. You may also find useful information in the Google documentation on creating a user interface. Feature name: flash Specified by: OpenSocial |
Fully supported | Allows a gadget to specify details for its directory listing, such as the category in which the gadget should be listed. Format: The only recognized parameter is categories -- the list of directory categories that this gadget should appear in, one per line. Valid values are "JIRA", "Confluence", "FishEye", "Crucible", "Crowd", "Clover", "Bamboo", "Admin", "Charts", "External Content", and "Other". Gadgets that don't specify a directory category, or that specify only invalid categories, will be listed in "Other".
Feature name: gadget-directory Specified by: Atlassian Gadgets |
Not supported | Feature name: locked-domain Specified by: OpenSocial |
Fully supported | A MiniMessage is a temporary message displayed to users from within a gadget. Format:
See the OpenSocial gadgets.MiniMessage API reference. You may also find useful information in the Google documentation on creating a user interface. Feature name: minimessage Specified by: OpenSocial |
Fully supported | Manages popup windows for OAuth. See our detailed instructions on OAuth and the OpenSocial gadgets.oauth.Popup API reference. Feature name: oauthpopup Specified by: OpenSocial |
Not supported | Feature name: opensocial-0.6 Specified by: OpenSocial |
Not supported | Feature name: opensocial-0.7 Specified by: OpenSocial |
Not supported | Feature name: opensocial-current Specified by: OpenSocial |
Not supported | Feature name: opensocial-reference Specified by: OpenSocial |
Not supported | Feature name: opensocial-templates Specified by: OpenSocial |
Not supported | Allows your gadget to publish and subscribe to message channels. See the OpenSocial gadgets.pubsub API reference. Feature name: pubsub Specified by: OpenSocial |
Fully supported | Provides operations for making remote procedure calls for gadget-to-container, container-to-gadget, and gadget-to-gadget communication. Format:
You need to specify "rpc" as a required feature if you are using the Feature name: rpc Specified by: OpenSocial |
Fully supported | Allows you to set the values for user preferences programmatically, without the user's direct participation. Format:
See the OpenSocial gadgets.Prefs API reference. You may also find useful information in the Google documentation on saving state. Feature name: setprefs Specified by: OpenSocial |
Fully supported | Allows you to set your gadget's title programmatically. Format:
See the OpenSocial gadgets.window API reference. You may also find useful information in the Google documentation on creating a user interface. Feature name: settitle Specified by: OpenSocial |
Not referenced | Allows you to manage the skin of your gadget programmatically. Format:
See the OpenSocial gadgets.skins API reference. Feature name: skins Specified by: OpenSocial |
Fully supported | Allows you to add a tabbed user interface to your gadget. Format:
See the OpenSocial gadgets.TabSet API reference. You may also find useful information in the Google documentation on creating a user interface. Feature name: tabs Specified by: OpenSocial |
Partially supported | A view is a location in a container where a gadget is displayed. Different views have different characteristics. For example, a container might have a view that shows gadgets in a small format, and a view that shows gadgets in full page format. Atlassian Gadgets supports the following views:
See the OpenSocial gadgets.views API reference. You may also find useful information in the Google documentation on creating a user interface. Feature name: views Specified by: OpenSocial |
In the above table we show the level of support provided in Atlassian Gadgets for each feature:
<Require>
the feature. To use the feature in containers where it is available while still remaining compatible with Atlassian Gadgets, you must use the <Optional>
element to specify the feature, then test for the presence of the feature using the gadgets.util.hasFeature function.In the above table we have also categorised the features as follows:
Creating your Gadget XML Specification
Using the Atlassian Gadgets JavaScript Framework
Writing an Atlassian Gadget
Gadget Developer Documentation
Rate this page: