1. Kayako Download customers: we will continue to develop and support Kayako Download beyond July 2017, alongside the new Kayako for existing customers.

    Find out more.

  2. The forum you are viewing relates to Kayako Classic. If you signed up or upgraded to the new Kayako (after the 4th July 2016), the information in this thread may not apply to you. You can visit the forums for the new Kayako here.

Change Ticket View column widths

Discussion in 'Style and design' started by tallen-bt, Sep 29, 2011.

  1. tallen-bt

    tallen-bt Established Member

    Is it possible to modify the widths of the cells? TicketID for example is much too long and I wanted to know if this can be modified.
     
  2. Gary McGrath

    Gary McGrath Staff Member

  3. tallen-bt

    tallen-bt Established Member

    That covers something different, I am looking where I can change the column widths.
     
  4. Gary McGrath

    Gary McGrath Staff Member

    Can you screen shot what your on about? the column widths are dynamic and actually expand and contract depending on screen resolution etc..

    Gary
     
  5. tallen-bt

    tallen-bt Established Member

    Oh... I was hoping to be able to shorten Ticket ID for example since it is much bigger than needs to be.
    ColumnWidth.PNG

    Also noticed this at the bottom:
    StyleGlitch.PNG
     
  6. Gary McGrath

    Gary McGrath Staff Member

    line: 1413 of class.SWIFT_UserinterfaceGrid.php ( __swift\library\userinterface )

    You will find the line has: ' width="'. IIF($_val->GetWidth(), $_val->GetWidth(), '')

    So it pretty much looks up the size of the actual field in the DB and uses that to set the size of the column.

    ( the lookup code is in class.SWIFT_UserInterfaceGridField.php in the same location ) - line 227

    In your case your ticket ID is like 4 characters, but the field size is designed for #ABC-123-12345, so obviously it comes out with a much larger field size than your using. ( its a var char of 20 characters )

    You will need to amend the GetWidth function and make it check the name of the field, and if its ticketmaskid, return a custom size.

    Gary
     
    mik34 likes this.
  7. Gary McGrath

    Gary McGrath Staff Member

    To follow on from this, as I did not give much direction on what code lol

    You would have to change the getwidth function to something like this:

    Code:
    
     public function GetWidth()
     {
      if (!$this->GetIsClassLoaded())
      {
       return false;
      }
            if ($this->_fieldName == 'tickets.ticketid')
            {
               return '4';
            }
      return $this->_fieldWidth;
     }
    
    
    Gary
     
  8. tallen-bt

    tallen-bt Established Member

    Thanks!
     
    mik34 likes this.
  9. scrupul0us

    scrupul0us Member

    how can I use this for the ticket type field?
    Code:
    if ($this->_fieldName == 'tickets.tickettype')
    {
    return '50';
    }
    
    throws 500 errors for me
     
  10. scrupul0us

    scrupul0us Member

    I also tried:

    Code:
    if ($this->_fieldName == 'tickets.type')
    
    This DOESNT throw any errors but it doesn't change the size of the column either :/
     
  11. Gary McGrath

    Gary McGrath Staff Member

    It should be something like this:

    if ($this->_fieldName == 'tickets.tickettypetitle')
    {
    return '30';
    }

    Gary
     
  12. scrupul0us

    scrupul0us Member

    Thanks Gary! Is there a reference for these?
     
  13. Gary McGrath

    Gary McGrath Staff Member

    I am afraid not, we are making code modifications here, its not something kayako would ever write a guide for

    gary
     
  14. scrupul0us

    scrupul0us Member

    Gary,

    Awesome! Every bit of customization helps =)

    Thanks for your assistance...
     
  15. Softek_Support

    Softek_Support Established Member

    Could you please point me towards how I would do this in v3 ?
     
  16. Gareth Rooney

    Gareth Rooney New Member

    Hi this path is no longer valid __swift\library\userinterface

    where is it in ver 4.52.2417?
     
  17. Gary McGrath

    Gary McGrath Staff Member

    Hi there,

    It can be found at __swift\apps\base\library\UserInterface ( near line 1512 )

    Gary
     
  18. cesarin

    cesarin Member

    Hi gary!
    thanks again for being the top gury on this forum!
    your help is always awesome.

    How, I tried to make a change using your template, it works perfect (the tickets.fullname column ) size wise. But the names are still cut (they show ...)
    Is there an option to prevent the names column from cutting down the full name?
     
  19. Gary McGrath

    Gary McGrath Staff Member

    Hey Cesarin!

    class.View_Manage.php ( __apps\tickets\staff )

    Near line 407, you will want to increase 15 to a higher number for full name and last replier I imagine

    Gary
     
  20. join8x

    join8x New Member

    Thanks Gary very much :)
     

Share This Page