I'm writing a Bitbucket server plugin that adds a client-web-item to bitbucket.pullrequest.action.
Previously, I would add buttons as web-items to bitbucket.pull-request.toolbar.actions, set the styleClass, then request the button through jQuery by calling the style class. Because bitbucket.pull-request.toolbar.actions is gone, I'm now adding the buttons as client-web-items to bitbucket.pullrequest.action. This means the buttons appear in the drop down list on pull request pages.
I'm able to get a button to show up through the following xml:
<client-web-item key="my-button" name="Repositories Global web item" weight="30" section="bitbucket.pullrequest.action"> <label>my-button-label</label> </client-web-item>
However, if I add the following styleClass to the previous block:
<styleClass>custom-button</styleClass>
the button disappears from the drop down. I'd like to be able to grab the button in my javascript like I did with web-items, by calling:
myButton = jQuery(" .custom-button");
Am I using bitbucket.pullrequest.action incorrectly?
Community moderators have prevented the ability to post new answers.
The documentation for client-web-item says, for styleClass : "Defines an additional CSS class that may be added to this web item when it is rendered on the page. Note that this value may be ignored in some situations. "
I am not sure when it will be ignored. But could that be a lead? Let me know if you find something.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.