This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Adding additional colours to Request types

Dear Thwack Community,

I would like to add 4 additional colours to the "Request Type" section.

Can anyone show me what HTML file (and the location on server) I need to edit to add the extra lines to enable the additional colours?

See attached screenshots.

Appreciate any assistance.

attachments.zip
  • This is a little bit tricky, but here's the answer.

    Step 1

    From the WHD server navigate to:

    C:\Program Files\WebHelpDesk\bin\webapps\helpdesk\colorpicker

    Step 2

    Open the colorpicker.js file w/ Notepad++ or another editor

    Step 3

    Navigate to line 50'ish and find this code snippet

    var _html = "";

      for(i=0;i<o.color.length;i++) {

      var drawColorChip = true;

      if( ! $settings.editMode ) {

      drawColorChip = (o.defaultColor == o.color[i] );

      }

      if( drawColorChip ) {

      _html += '<div style="background-color:'+o.color[i]+';"></div>';

      }

      if($$oldIndex==-1 && o.defaultColor==o.color[i]) $$oldIndex = i;

       }

    Step 4

    Insert this line of code directly after the code snippet from Step 3 and insert your color manually by changing '+o.color[i]+' to the color you want to add

      _html += '<div style="background-color:'+YOURCOLORHERE';"></div>';

    Step 5

    Repeat Step 4 on a new line for each color you wish to add

    Step 6

    Save colorpicker.js

    Because of the way the colors are originally being produced, you need to manually add each color outside of the iterative function.

    I've attached a screenshot.

    Let me know if you need any additional help.

    Thx,

    Ap.

    Untitled.png

  • The only question I would have for that is what is the likyhood it gets blow away with an upgrade? For the custom CSS or icons if you do anything outside look and feel in setup it gets reset upon upgrades. Just something to remember.

  • There is a possibility that it could get blown away w/ the upgrade, but, I strongly suggest backing up the entire directory before upgrade as a precautionary measure. It did not effect our upgrade (done on Monday), but each environment is different.

  • Hi Andeporter,

    Thank you so much.  I will start the work on it now and will let you know whether I achieved success or a miserable failure.

  • You are welcome! Failure is just delayed success my friend.....

  • Ok, so I encountered a small problem... The colours disappeared altogether.  See attached screenshot of both WHD interface and the saved code snippet.

    Screenshot 2016-07-22 14.55.06.png

    Screenshot 2016-07-22 14.56.42.png

    I have a suspicion it might have something to do with those ' ' in which the colour code is encapsulated.

    Any ideas?

  • Ah so it was indeed the apostrophes.  Now the new colour is displayed, however, upon choosing the new colour and clicking "Save" the application reverts back to the previous colour used.

    What did I miss?

    Screenshot 2016-07-22 15.09.49.png

  • Haha, only just.

    The new problem still exists though...  If I select my newly created colour, it does not stick.  It reverts back to the previous colour.

    What am I missing?

  • Are you saying when you click on it, it reverts back, or when you actually submit the form, then it reverts back?