New Ticket Lister formats

Thanks @kendash
I really appreciate this.

Sorry @Jesse
it’s not working for me :frowning:
It won’t show me the ticket state minutes.
Please help

Have you tried putting that tag in the template directly? In other words: don’t use the CALL:X and don’t use a script. If you still see no results for the minutes, did you rename any of your State Groups?

@QMcKay
Yes i did. It’s working fine without the call:x

Is your script Handler named tlister?

Yes I copied the name from @Jesse Post

Do any of your Scripts work properly when used with CALL:x ?

Check the block setting. 276 might be too many pixels for your screen. I use 30" screen. Is the numbers running off screen?

http://forum.sambapos.com/t/navigation-screen-issue/4470/11
Thanks @kendash

1 Like

So did you get it working? BTW me and @QMcKay had that same issue early on in testing when he first introduced Script Debugger

Yes i did. probably was my problem too.
Thanks.

1 Like

I really like this new lister format. And I love that it changes color. I think there are a lot of people that will like this.

3 Likes

Dear @kendash
Can you show an example of how to change colors more than once. 10 min= green 20 min=orange 30 min=red etc…?
Can we change the ticket background color after certain time?
Thanks.

Would have to edit the script and add in more If statements.

No unfortunately not at this time.

@kendash
I tried to do that but it’s changing color only ones.

@emre Is it possible to add the option to change the ticket background color after certain time?

Will need more returns to go with the if statements. They should be inside each statement.

Try something like this

function min(minutes)



{



  var test = minutes;

  if (test>15){

  return '<R><block 276,0,0,0><color Red>' + test + ' min.</color></block>';

  }

  else if (test>10){

  return '<R><block 276,0,0,0><color Green>' + test + ' min.</color></block>';

  }  

  return '<L><block 276,0,0,0>' + test + ' min.</block>';

}

If you want more than 1 range of minutes then you start with the biggest and use else if for each one going from big to small.

So far your example you would do something like this:

function min(minutes)
{
  var test = minutes;
  if (test>30){
  return '<R><block 276,0,0,0><color Red>' + test + ' min.</color></block>';
  }
  else if (test>20){
  return '<R><block 276,0,0,0><color Orange>' + test + ' min.</color></block>';
  }  
  else if (test>10){
  return '<R><block 276,0,0,0><color Green>' + test + ' min.</color></block>';
  }
  return '<L><block 276,0,0,0>' + test + ' min.</block>';
}
1 Like

fyi <block> tag also supports background color if it helps.

<block margin color>

setting a margin is required to set a color.

2 Likes

Hmm I must have read over that. I will toy with that now.

Lol interesting I will have to play with this to get it right.

That was White as a test … I see it applied it only to the area that script was called at. So to get a result for total ticket we may need to build entire ticket template inside a call.