Custom Script.js

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Peter
    Junior Member
    • Jul 2017
    • 11

    Custom Script.js


    Hello,
    I would like to add a js script to add colors in the lead table to the status.
    I did a script that I tested in the console and that works fine.
    Unfortunately it does not work because the page loads before all information is displayed.
    I do not know where I have to put it so that it's supported by the system.
    If you can help me.
    Thank you
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello
    Do you want to change the text or the background of lead status?
    In general better to set own view.
    You can run the code in the afterRender method.
    You can include js file in the tpl of needed view

    Comment

    • Peter
      Junior Member
      • Jul 2017
      • 11

      #3
      Hello,

      I want change the background of lead status.
      I try with afterRender method and I come back to you if I can not make it.

      Thanks

      Comment

      • tanya
        Senior Member
        • Jun 2014
        • 4308

        #4
        Hi, I'm trying espocrm few days. like this a lot. I would just like to be able to change the color of the words in the fields, for example, for the priority.

        Comment

        • Peter
          Junior Member
          • Jul 2017
          • 11

          #5

          it works ! Thanks again ! A small question, do you know if it is possible to add the calendar in the right bar in the page of the leads?


          Comment

          • tanya
            Senior Member
            • Jun 2014
            • 4308

            #6
            EspoCRM is open-source and very flexible
            You need to develop own side panel for lead.

            application/Espo/Modules/Crm/Resources/metadata/clientDefs/Contact.json
            use it as example.
            sidePanels section
            look at tasks

            Comment

            • Peter
              Junior Member
              • Jul 2017
              • 11

              #7
              Ok thanks


              Should I add the calendar file in views/record/panels for that work or just add
              {
              "name":"calendar",
              "label":"Calendar",
              "view":"crm:views/calendar/calendar",
              "aclScope": "Calendar"
              },
              in Contact.json ?

              Sorry for my question and thanks for your help.

              Comment

              • Peter
                Junior Member
                • Jul 2017
                • 11

                #8
                It's ok it's work !! Thanks one more time !!

                Comment

                • Peter
                  Junior Member
                  • Jul 2017
                  • 11

                  #9

                  Just one last question if I want to put the calendar below the details of the lead is in the same file lead.json?

                  Comment

                  • Peter
                    Junior Member
                    • Jul 2017
                    • 11

                    #10
                    It's ok too
                    Thanks, I understand the system thanks to you !!

                    Comment

                    Working...