Results 1 to 7 of 7

Thread: ListView bgcolor

  1. #1
    Chris1981 is offline Member
    Join Date
    Oct 2007
    Posts
    9

    Default ListView bgcolor

    Hey all,

    I was wondering if someone could help me, i have installed a Quotes module onto my install of SugarCRM ... one of the fields is "Quote Stage" and there are 3 options in the select box under that which are:

    1. Awaiting Clients OK
    2. OK to Proceed
    3. Not Accepted

    What i want to be able to do is change the background colour of that record in the listview depending on what value that select box is on.

    So if if i had 1 Not Accepted job that row would be red and 1 Awaiting Clients OK job which would be orange.

    I only want this to work on the Quotes listview though.

    Can anyone help pleaseeeeee, i have been pulling my hair out trying to figure this.

    Thanks people

  2. #2
    Chris1981 is offline Member
    Join Date
    Oct 2007
    Posts
    9

    Default Re: ListView bgcolor

    Can anyone help out with this please?

  3. #3
    sacramentojoe is offline Sugar Community Member
    Join Date
    Nov 2005
    Posts
    447

    Default Re: ListView bgcolor

    just write a style for that row in CSS and have ti build off of the value from the DB.
    Do you need a more specific answer?

  4. #4
    Chris1981 is offline Member
    Join Date
    Oct 2007
    Posts
    9

    Default Re: ListView bgcolor

    Yes please, i dont quite understand what you mean.

    there would have to be some php in there somewhere to say "If status is approved then the bgcolor is blahh or else the background color is normal"

    I have had a look around but buggered if i can find where it should go.

  5. #5
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: ListView bgcolor

    One idea would be to add some JavaScript to the ListView.html in question.

    The JavaScript could in turn do the evaluation of the values which you have mentioned and dynamically set the background color. You could try automatically executing the code using the OnLoad() event handler.

    The one thing I don't know off hand though is whether or not executing the JavaScript using the OnLoad() event handler of the page will allow it to read the different values or if the JavaScript code would have to be triggered after the page is loaded.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  6. #6
    Chris1981 is offline Member
    Join Date
    Oct 2007
    Posts
    9

    Default Re: ListView bgcolor

    Any chance of an example so i can give it a go ... my javascript is veryyyy under the line.

  7. #7
    Chris1981 is offline Member
    Join Date
    Oct 2007
    Posts
    9

    Default Re: ListView bgcolor

    Can anyone help?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Can't edit ListView in Studio
    By leenwebb in forum Help
    Replies: 7
    Last Post: 2011-03-14, 11:49 AM
  2. Same record multible times in Listview
    By jones70 in forum Help
    Replies: 5
    Last Post: 2011-01-28, 04:47 AM
  3. Replies: 2
    Last Post: 2009-09-13, 11:22 AM
  4. ListView 'Contact' field is linked to wrong record
    By leenwebb in forum Developer Help
    Replies: 4
    Last Post: 2007-02-19, 05:41 PM
  5. Bug - Tasks ListView
    By dtokeefe in forum Developer Help
    Replies: 0
    Last Post: 2005-09-27, 11:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •