Forum

Priority colors on ...
 
Notifications
Clear all

Priority colors on mobile grey

2 Posts
2 Users
0 Reactions
15 Views
Posts: 2
Topic starter
(@dfeenstra)
Member
Joined: 6 years ago

I use a Dutch translation and figured out that I had to add this in my user css file to get the theme colors in the prioritybox:

td.osta_priority.osta_priority_emergency {
    background: url(../img/priority-pattern-overlay.png) #fc6872!important;
}
td.osta_priority_high {
    background: url(../img/priority-pattern-overlay.png) #e5bc61!important;
}
td.osta_priority_normal {
    background: url(../img/priority-pattern-overlay.png) #a5cb59!important;
}
td.osta_priority_low {
    background: url(../img/priority-pattern-overlay.png) #5bb3f5!important;

I now can use my own priority translations with the colors from you, but on the mobile screen the colors are grey now. How can i get the colors there too?


1 Reply
Posts: 2
Topic starter
(@dfeenstra)
Member
Joined: 6 years ago

I fixed it by editing /include/staff/templates/queue-tickets.tmpl.php:

$( "td.osta_priority.osta_priority_laag" ).closest( "tr" ).addClass( "priority-laag");
$( "td.osta_priority.osta_priority_normaal" ).closest( "tr" ).addClass( "priority-normaal");
$( "td.osta_priority.osta_priority_hoog" ).closest( "tr" ).addClass( "priority-hoog");
$( "td.osta_priority.osta_priority_noodgeval" ).closest( "tr" ).addClass( "priority-noodgeval");

My user-css.css is now:

td.osta_priority.osta_priority_noodgeval {
background: url(../img/priority-pattern-overlay.png) #fc6872!important;
}
td.osta_priority_hoog {
background: url(../img/priority-pattern-overlay.png) #e5bc61!important;
}
td.osta_priority_normaal {
background: url(../img/priority-pattern-overlay.png) #a5cb59!important;
}
td.osta_priority_laag {
background: url(../img/priority-pattern-overlay.png) #5bb3f5!important;
}

It works now also on the mobile layout, but I was wondering if it is possible to make this editing in an other file just like the css in user-css.css file so that I dont have to edit the php file again after a update of Osticket Awesome. Or, a better solution should be to create a way to let Osticket translate the priority texts. Now I have the Dutch translations of the priotity, but they are also in Dutch when I have Osticket in Engelish. No problem for me, but if it is possible to use translations and not having to edit files should be better.


Reply
Posts: 1177
Admin
(@stevland)
Member
Joined: 2 months ago

Hi @dfeenstra,

It took me a while to figure out what you are asking!

It sounds like you've figured out how to manually translate the names of the Priority Levels (Low / Normal / High / Emergency) into Dutch.

You then discovered that this broke osTicket Awesome's functionality, which relies on having the exact syntax of the words in English.

I am glad that you figured out a solution on your own. Nice work!

And yes, you should be able to put your code into the /osta/user-scripts.js file, which is conveniently right beside /osta/user-styles.css.

user-scripts.js loads after all of the other jQuery and Javascript and anything included there should override any previous scripts.


Reply
Share: