This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| neat_things [2018/01/16 14:49] pawel created | neat_things [2019/01/24 13:03] (current) root | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | ==== Add light-yellow background to a field' | ||
| + | |||
| + | If you'd like to highlight the background of the field' | ||
| + | <code java> | ||
| + | <script type=" | ||
| + | target = document.getElementById(' | ||
| + | if (target) { | ||
| + | target.style=" | ||
| + | } | ||
| + | |||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== Hiding current field unless priority is set to P1 and change colors to text box and font ==== | ||
| + | |||
| + | <code java> | ||
| + | <script type=" | ||
| + | priority = document.getElementById(' | ||
| + | if (priority) { | ||
| + | target = document.getElementById(' | ||
| + | // Hide the target field if priority isn't critical | ||
| + | if (priority.value != 2) target.style.display=' | ||
| + | |||
| + | priority.onchange=function() { | ||
| + | if (this.value == 2) { | ||
| + |  | ||
| + | // set background color of the text box to yellow | ||
| + |  | ||
| + | // set font color to red | ||
| + |  | ||
| + |  | ||
| + | } else { | ||
| + |  | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | === Display radio button option that was selected with alert message === | ||
| + | <code java> | ||
| + | <script type=" | ||
| + | jQuery(document).ready(function($) { | ||
| + | JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, | ||
| + | callVerifyAndUpdateFunction(); | ||
| + | }); | ||
| + | callVerifyAndUpdateFunction(); | ||
| + | function | ||
| + | var radioValue1=document.getElementById(' | ||
| + | var radioValue2=document.getElementById(' | ||
| + | var radioValue3=document.getElementById(' | ||
| + | if (radioValue1){ | ||
| + |  | ||
| + | } | ||
| + | if (radioValue2){ | ||
| + |  | ||
| + | } | ||
| + | if (radioValue3){ | ||
| + |  | ||
| + | } | ||
| + |  | ||
| + | |||
| + | } | ||
| + | |||
| + | }); | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Adding messages to your JIRA tickets ==== | ||
| + | |||
| + | You can display informational messages in your Jira tickets for users to see. | ||
| + | See the following URL: [[https:// | ||
| + | |||
| + | ==== Adding colors to your Drop Down custom field options ==== | ||
| + | |||
| + | Source URL: [[https:// | ||
| + | |||
| + | Although the documentation is a bit outdated, and the colors don't match exactly what is in the documentation, | ||
| + | |||
| + | {{: | ||
| + | |||
| + | In order to accomplish this, you need to add span code as you see it in the screenshot: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | ==== Disabling a field from being seen using banner ==== | ||
| + | **<color red>have not confirmed this yet</ | ||
| + | Link: [[https:// | ||
| + | I found this in the above linked forum discussion, not tested yet. | ||
| + | <code java> | ||
| + | <script type=" | ||
| + | (function($) { | ||
| + | AJS.toInit(function(){ | ||
| + | // init on load | ||
| + | AJS.$("# | ||
| + | }) | ||
| + | JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, | ||
| + | // init on refresh | ||
| + | AJS.$("# | ||
| + | }); | ||
| + | })(AJS.$); | ||
| + | </ | ||
| + | </ | ||
| + | |||