redmine-view-customize-scripts
redmine-view-customize-scripts copied to clipboard
change background depend in tracker id when new or edit issue
im try this code depend in your example https://github.com/onozaty/redmine-view-customize-scripts/blob/master/examples/0043.change_style_according_to_input_value/example.md
this my code
$(function() {
function changeBackground(color) {
document.body.style.background = color;
}
const setup = function(trackerid) {
const trackerid = $('#issue_tracker_id').val();
const applyStyle = function() {
if (trackerid.val() == '128' || trackerid.val() == '126') {
window.addEventListener("load",function() { changeBackground('red') });
} else {
window.addEventListener("load",function() { changeBackground('yellow') });
}
};
trackerid.on('change', applyStyle);
applyStyle();
}
// Note: Change the ID according to the custom field you want to target.
setup($('#issue_tracker_id'));
});
The code is not likely to work as JavaScript. I think you see an error in the DevTools console of the browser, so can you try to solve this problem by looking at it?
Thanks.
Ok brother I will try Thx for replay me
Can u help to code it Because our user dismiss change tracker Because that I need change background the page depends in tracker id
Again, I am not your coder. I think you should hire an engineer who understands JavaScript. No knowledge of Redmine is required.
Repeated inquiries by you are already beyond the scope of our support as plugin authors.
Again, I am not your coder. I think you should hire an engineer who understands JavaScript. No knowledge of Redmine is required.
Repeated inquiries by you are already beyond the scope of our support as plugin authors.
If you would be my sponsor, I might be able to be a little more responsive 😉.
- https://github.com/sponsors/onozaty
This issue is stale because it has been open for 60 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.