hello I created a new jira plugin of type web-item, but I want to create an item same as the "Create" button. Where to find this type of button?
Thanks
If you follow the example described in https://developer.atlassian.com/server/jira/platform/adding-menu-items-to-jira/, you should append the following to atlassian-plugin.xml:
<web-item key="my_links_link" name="Link on My Links Main Section" section="system.top.navigation.bar" weight="47">
<label>My Create Button</label>
<resource type="velocity" name="view" location="my-create-button.vm"/>
</web-item>
In which describes elements that can be used by a web-item. In this case we will be using <resource />
Then, create a file my-create-button.vm under resources directory paste the Split buttons content as below mentioned in link, e.g:
<div id="my_links_link" class="aui-buttons">
<button class="aui-button aui-button-split-main">Split main</button>
<button class="aui-button aui-dropdown2-trigger aui-button-split-more" aria-controls="split-container-dropdown">Split more</button>
</div>
<!-- Be sure to put your dropdown markup outside the button group...
otherwise the buttons will get jaggy edges! -->
<aui-dropdown-menu id="split-container-dropdown">
<aui-item-link>Menu item 1</aui-item-link>
<aui-item-link>Menu item 2</aui-item-link>
<aui-item-link>Menu item 3</aui-item-link>
</aui-dropdown-menu>
Please review what is the Atlassian AUI version the Atlassian application you will be running your plugin on has. For that, you could simply go to your Atlassian application on a web browser, then open up the Development Panel or Inspect, e.g Opening the Web Console.
With the web console open, run the following command:
AJS.version
The output should be used to search for the Atlassian AUI version, so you can review which elements / script are available to your application. In your case, it seems you are attempting on creating Split buttons located in https://docs.atlassian.com/aui/8.1.0/docs/buttons.html
Kind regards,
Rafael
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.