Multi Checkboxes design

Samir Freelance
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 12, 2011

How to modify the custom field Multi Checkboxes to be displayed in horizontal ?


4 answers

1 accepted

2 votes
Answer accepted
Samir Freelance
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 17, 2011

<script language="javascript">
var YOUR_CF_NAME = "check boxes";

AJS.$(document).ready(function(){
for(var i=0; i < AJS.$("fieldset").length; i++) {
if(AJS.$("fieldset:eq(" + i + ") legend span")[0] != null && AJS.$("fieldset:eq(" + i + ") legend span")[0].innerHTML == YOUR_CF_NAME) {
AJS.$("fieldset:eq(" + i + ") div").css('display', 'inline');
AJS.$("fieldset:eq(" + i + ") div").css('float', 'left');
}
}
});
</script>
  • Change the YOUR_CF_NAME value up there to the name of your customfield, as the script is not aware of the name of your custom field, so you need to tell it.
  • You may place it in Administration > Issue Fields > Field Configurations > <your-field-configuration> > Edit (for your check box cutomfield)

thanks for the support

RedPS January 23, 2020

Hi, sorry for the bump but here's the update one based on my knowledge and skills and using your code as reference.. I've made changes although it is not the best

var YOUR_CF_NAME = "customfield_<customfieldid>";

for(var i=0; i < $("fieldset").length; i++) {
if(i > 0 ) {
$("fieldset:eq(" + i + ") div").css('display', 'inline');
$("fieldset:eq(" + i + ") div").css('float', 'left');
$("fieldset:eq(" + i + ") div").css('margin-left', '10px');

})
0 votes
Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 22, 2011

I am new to Jira, but I am confused. I am using Jira 4.4.3 and the information about where to put these changes does not make any sense to me. When I look at the html source file through the browser, the css comes from a file named batch.css. The veiw-multiselect.vm does not seem to match source html structure. There is no class shorten in the source html and the id does not match either.

The directions claims we can add javscript through the adminstration interface, but there nothing I can find in the field configuration area where I can add javascript.

I did find the aui-overrides.css file, but I cannot find any information about how that file information gets into batch.css.

What is the real scoop here?

0 votes
Samir Freelance
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2011

I mean Multi Checkboxes
Choose multiple values using checkboxes.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 12, 2011

You'll need to amend the view-multiselect.vm file and restart Jira.

Samir Freelance
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2011

#if ($value)

<div class="shorten" id="${customField.id}-field">

#foreach ($singleValue in $value)
<span>$!singleValue.toString()#if ($velocityCount != $value.size())</span>,#end
#end
</div>
#end

what should i modify in order to be displayed horizontal

Penny Wyatt (On Leave to July 2021)
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 13, 2011

Changing the div to a span might do it, though I haven't tried - since a div starts a new line and a span doesn't.

Samir Freelance
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2011

I mean Multi Checkboxes

Samir Freelance
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2011

NO CHANGE also i delete work folder and restarted the service but the combobox sill in vertical

#if ($value)

<span>
#foreach ($singleValue in $value)
<span>$!singleValue.toString()#if ($velocityCount != $value.size())</span>,#end
#end
</span>
#end

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events